-
Notifications
You must be signed in to change notification settings - Fork 25
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
Enable libexec artifacts #408
Merged
cpuguy83
merged 9 commits into
Azure:main
from
pmengelbert:pmengelbert/rpm_path_macros/1
Oct 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f930ca4
Enable libexec artifacts
pmengelbert 049dd28
Add libexec capability for debian-based distros
pmengelbert b334181
Add documentation for libexec artifacts
pmengelbert d832058
Add tests for libexec
pmengelbert 4ac9745
Move subpath defaulting for libexec artifacts
pmengelbert dcbeca1
Address PR comments
pmengelbert 0d4ecc2
Run `go generate`
pmengelbert 0d1a89e
Don't insert name in path for libexec artifacts
pmengelbert fa22e90
Update docs
pmengelbert 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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
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.
My reasoning for suggesting a bool here is because the package name can go into
SubPath
and we'd just skip including the spec's package name with that.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.
Next time I will clarify what you want before I implement the solution. I thought you meant that either was acceptable
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.
tldr: I think we should just use subPath and not do anything automatically. With an empty
subPath
, things go directly into/usr/libexec
(which is standard). Otherwise, you can setsubPath
todocker
if you want things to go into/usr/libexec/docker
ordocker/cli-plugins
if you want/usr/libexec/docker/cli-plugins
. Detailed explanation follows.So then in order to get the desired behavior in the example I've been using, you would need
What I don't like about that is it kind of overloads the
subPath
field. When we don't need to change the package name, it would beBoth with the bool and without, it's a leaky abstraction. The user has to know several things:
name
field from the spec (which is usually at the top of the file, dozens of lines away) is inserted some times but not others (yes in /usr/lib artifacts, no in /usr/bin artifacts)subPath
field, and changes the absolute path depth.It's too much to ask of the user IMO. Better to just have
/usr/libexec
be the default (since that's a pretty standard thing to do) and have the user add the application name to the subpath if they want things nested in a subdirectory..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 think the issue is its 50/50 (literally on my system it is right at the 50/50 mark).
In this case also I guess the package name may not line up exactly with what's being installed as well (beyond docker cli plugins) since we need to differentiate package names from upstreams.
Ok, it seems fine to just not use the package name in the path here (and add to the docs).
Thanks for the diligence here.
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.
done