Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Test/quality request - package installation with dangling symlinks should fail build #18870

Open
smoser opened this issue May 8, 2024 · 1 comment

Comments

@smoser
Copy link
Contributor

smoser commented May 8, 2024

When a package is installed it should not have any dangling symlinks.
Any dangling symlinks represent either pure broken package or missing dependency.

I saw such a thing today with google-cloud-sdk.

$ apk add google-cloud-sdk
$ apk list --installed google-cloud-sdk
google-cloud-sdk-469.0.0-r0 x86_64 {google-cloud-sdk} (Apache-2.0) [installed]

$ cd /
$ for f in $(apk info -L google-cloud-sdk); do
   [ -e "$f" ] || echo "$f"; done
usr/bin/anthoscli
usr/bin/gcloud-crc32c

$ ls -l usr/bin/anthoscli usr/bin/gcloud-crc32c
lrwxrwxrwx    1 root     root            41 May  8 19:41 usr/bin/anthoscli -> /usr/share/google-cloud-sdk/bin/anthoscli
lrwxrwxrwx    1 root     root            45 May  8 19:41 usr/bin/gcloud-crc32c -> /usr/share/google-cloud-sdk/bin/gcloud-crc32c
@smoser
Copy link
Contributor Author

smoser commented May 8, 2024

Some discussion in slack pointed at https://github.com/wolfi-dev/os/blob/main/java-common.yaml and

os/keda-2.14.yaml

Lines 70 to 81 in 3e34716

- name: "${{package.name}}-compat"
description: "Compatibility package to place binaries in the location expected by upstream helm charts"
dependencies:
provides:
- keda-compat=${{package.full-version}}
pipeline:
- runs: |
# The helm chart expects the keda binaries to be in / instead of /usr/bin
mkdir -p "${{targets.subpkgdir}}"
ln -sf /usr/bin/keda ${{targets.subpkgdir}}/keda
ln -sf /usr/bin/keda-admission-webhooks ${{targets.subpkgdir}}/keda-admission-webhooks
ln -sf /usr/bin/keda-adapter ${{targets.subpkgdir}}/keda-adapter
as examples.

java-common provides symlinks into /usr/bin for a bunch of things.
keda-compat puts symlinks into / pointing at /usr/bin/keda. There are multiple things (fips) that implement keda, so you can re-use the keda-compat package.

I think there is still value here and we should allow metadata to override that. some allow-dangling-symlinks: keda, foo, bar

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

No branches or pull requests

1 participant