amazon-linux-2023 icon indicating copy to clipboard operation
amazon-linux-2023 copied to clipboard

[Bug] - AL2023 docker image dnf groupinstall "Development Tools" - Error in POSTTRANS scriptlet in rpm package grub2-common

Open nikonaydenov opened this issue 2 years ago • 3 comments

Describe the bug When we try to install "Development tools" using command dnf groupinstall "Development Tools" on AL2023 docker image version 2023.0.20230614.0 (we tried even newer version and the result is the same) ,installation completes ,but we are noticing following warning/error message in the dnf output ,related to 'grub2-common' package scriptlet exectution:

#10 23.02   Installing       : rpm-sign-4.16.1.3-12.amzn2023.0.6.x86_64           312/313 
#10 23.12   Installing       : swig-4.1.1-4.amzn2023.0.3.x86_64                   313/313 
#10 23.13   Running scriptlet: grub2-common-1:2.06-61.amzn2023.0.6.noarch         313/313 
#10 23.14 grub2-probe: error: failed to get canonical path of `overlay'.
#10 23.14 warning: %posttrans(grub2-common-1:2.06-61.amzn2023.0.6.noarch) scriptlet failed, exit status 1
#10 23.14 
#10 23.14 Error in POSTTRANS scriptlet in rpm package grub2-common

To Reproduce Command lines: dnf groupinstall "Development Tools"

Expected behavior No errors in POSTTRANS scriptlet execution

Screenshots No screenshots available.

Desktop (please complete the following information): NA

Smartphone (please complete the following information): NA

Additional context Amazon Linux version: reproducible with AL2023 docker image versions - 2023.0.20230614.0, 2023.1.20230629.0, 2023.1.20230705.0

nikonaydenov avatar Jul 10 '23 14:07 nikonaydenov

Hrm... yeah grub2 shouldn't be installed on container images, not sure why "Development Tools" brings it in, I'll look into it

ozbenh avatar Jul 28 '23 00:07 ozbenh

So it installs the "Recommends" (weak deps) ... nss and systemtap have dependencies on crypto-policies-scripts which recommends ... grubby and here comes your kitchen sink.

The workaround is to use dnf groupinstall "Development Tools" -x grubby for now...

Our "Development Tools" group could use some love in other areas, it's a bit bitrotten tbh. That said I don't know what the right fix is here for that grubby, we'll discuss this internally

ozbenh avatar Jul 28 '23 01:07 ozbenh

I believe this can be closed, as

dnf repoquery --recommends crypto-policies-scripts-20240828-2.git626aa59.amzn2023.noarch 2>/dev/null
(grubby if kernel)

crypto-policies-scripts was bumped to 20240828 (from 20220428) in 2023.6.20250123

I only ended up here by mistake because - all of a sudden - we were missing procps-ng in our AL2023 container images. This was previously installed via nss -> crypto-policies-scripts-0:20220428-1.gitdfb10ea.amzn2023.0.2.noarch -> grubby -> grub2-tools -> dracut -> procps-ng. No more grubby no more procps-ng. No complaints here and thanks for cleaning that mess up.

pluralistix avatar Feb 26 '25 22:02 pluralistix