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

pipelines: test: ldd-check: cleanups #39042

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Conversation

dannf
Copy link
Member

@dannf dannf commented Jan 7, 2025

@dannf dannf force-pushed the ldd-check-comment branch from 3281010 to 7953411 Compare January 8, 2025 19:01
Error out if ldd was not able to actually reason about whether or not
a file is a dynamic object by checking it's error message.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@dannf dannf force-pushed the ldd-check-comment branch from 7953411 to 24c6e58 Compare January 8, 2025 20:51
@dannf dannf requested a review from smoser January 9, 2025 21:30
pipelines/test/ldd-check.yaml Outdated Show resolved Hide resolved
I started down this route just trying to fix 'continue'
being called from a function (ratner than return).

Then the nerd-snype / odd love for pain in shell hit me.

Other things here:
1. just a single call to 'ldd' for each file.
2. if 'insist_dyn' is false, then we will just log a message
   instead of failing in the following cases:
   * not a file
   * does not exist
   * is not a dynamic executable

   This allows you to call it on all contents in a package
   and mostly get the results  you want.
3. error if ldd exits other than 1 or 0 , and dump the output.
4. error (which exits immediately) if a package in 'packages'
   is not installed.
5. Please can we add a way to write pipelines in something else?
@smoser smoser requested a review from a team as a code owner January 10, 2025 15:24
@smoser
Copy link
Member

smoser commented Jan 10, 2025

I pushed some changes. please @dannf and others review.

smoser
smoser previously approved these changes Jan 10, 2025
Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@dannf dannf merged commit 03b3231 into wolfi-dev:main Jan 27, 2025
10 checks passed
@dannf dannf deleted the ldd-check-comment branch January 27, 2025 16:12
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.

3 participants