-
Notifications
You must be signed in to change notification settings - Fork 336
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
Adjust scanelf to properly remove "ruby-libs" in the "2.4-alpine3.6" image #161
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know what's the purpose of the spaces surrounding
$1
?Anyway, shouldn't we do
to match libraries in subdirectories too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just syntax -- makes it more readable.
awk
will concatenate the strings directly anyhow.No, because
[ -e /usr/local/lib/**/libxyz.so ]
doesn't work properly in a shell (it could partially work if we enabledglobstar
in the subshell thatawk
spawns, but that's a bit heavy, and will still break completely if there's more than one result). If we needed that sort of check, we'd have to make that string a lot more complex.In the case of Ruby, we know it's only installing
.so
files directly in/usr/local/lib
, so those are all we need to filter out (so that we don't accidentally keep packages that provide.so
files with the same basename, sinceapk
's.so
dependencies work based on the file basenames).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking because it's relevant for docker-library/official-images#4404, specifically for Varnish 4.1 😄
I did not enable the
globstar
option but it seems to work? (For both/usr/local/lib/*.so
in the case of Varnish 6.0 and/usr/local/lib/varnish/*.so
in the case of Varnish 4.1)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, that's strange -- I would imagine that without
globstar
enabled it's acting just like a single glob, but then it wouldn't match/usr/local/lib/xxx.so
, so that's interesting. I wonder what addingset -x; [ ...
alasystem("set -x; [ -e /usr/local/lib/" $1 " ]")
would show (since that should show the exact path that's getting matched).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Can't say I understand what's going on: