Skip to content

azlinux: use weak dependency for prebuilt-ca-certificates#584

Merged
cpuguy83 merged 1 commit intoproject-dalec:mainfrom
cpuguy83:fix_azlinux_shell
Mar 25, 2025
Merged

azlinux: use weak dependency for prebuilt-ca-certificates#584
cpuguy83 merged 1 commit intoproject-dalec:mainfrom
cpuguy83:fix_azlinux_shell

Conversation

@cpuguy83
Copy link
Copy Markdown
Collaborator

@cpuguy83 cpuguy83 commented Mar 25, 2025

As it turns out, the previous "fix" was causing dnf to always choose ca-certificates, presumably because it is what it sees first in the package repo.

By using a weak dependency we can allow the built package to depend on ca-certificates and ignore the prebuilt-ca-certificates but by default install the prebuilt ones.

The end result of the previous case is we end up with bash and some other tools int he final image, which is undesirable.

ref: https://docs.fedoraproject.org/en-US/packaging-guidelines/WeakDependencies/

@cpuguy83 cpuguy83 requested a review from a team as a code owner March 25, 2025 20:30
@cpuguy83 cpuguy83 force-pushed the fix_azlinux_shell branch 2 times, most recently from 457dc69 to db52491 Compare March 25, 2025 20:33
As it turns out, the previous "fix" was causing dnf to *always* choose
`ca-certificates`, presumably because it is what it sees first in the
package repo.

By using a weak dependency we can allow the built package to depend on
ca-certificates and ignore the prebuilt-ca-certificates but by default
install the prebuilt ones.

The end result of the previous case is we end up with bash and some
other tools int he final image, which is undesirable.

Notably, mariner2 does not support weak deps so it will just install the
recommended package and error out if someone tries to include
ca-certificates.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the fix_azlinux_shell branch from db52491 to b935042 Compare March 25, 2025 21:15
@cpuguy83
Copy link
Copy Markdown
Collaborator Author

I updated this to skip the test that checks if ca-certificates can be installed for mariner2 since mariner2 does not support weak dependencies.
We just can't support it there.

@cpuguy83
Copy link
Copy Markdown
Collaborator Author

If it becomes a problem, and I doubt it would, we can do more like manually walking the dependency tree to see if we should install the prebuilt certs or not.

@cpuguy83 cpuguy83 merged commit 677107e into project-dalec:main Mar 25, 2025
22 checks passed
@cpuguy83 cpuguy83 deleted the fix_azlinux_shell branch March 25, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants