-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Easier Linux FHS support #8636
Draft
ekohl
wants to merge
2
commits into
puppetlabs:main
Choose a base branch
from
ekohl:fhs-paths
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Easier Linux FHS support #8636
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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.
I wonder how we can signal this runmode. Can install.rb do something about this? I don't like the idea of it patching code but maybe it should?
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 still thinking about this. Ideally we should maintain the same path structure as before when running puppet as a gem or in development mode with bundler.
Honestly patching might be a cleaner solution... it's a bit weird because paths are overridable in
install.rb
but they are still hardcoded here. We should find a way to keep them in sync.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 agree. Another option is to write a file (like an ini file or whatever) with the paths as install.rb defined them somewhere in the gem directory and load it it at runtime.
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.
Due to the way run mode and settings are intertwined, we can't specify the run mode in puppet.conf. You could potentially load paths from a different ini file, unrelated to settings.... Or just patch.
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.
Interesting, FreeBSD has its own paths (mostly the same but under
/usr/local/
). Patching this line when packaging on FreeBSD is indeed an option if providing a FreeBSDRunMode class is acceptable, and that would make my life easier 😉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 am wondering if
__FILE__
could be used to guess what class to use. If it match/opt/puppetlabs/puppet/lib/.*
we have an AIO Puppet, and otherwise some OS-detection just like windows do might help?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.
That was the path I investigated: somehow do that in
install.rb
(hence the clean up PR you saw). I still don't quite know what it should be. It's almost likeinstall.rb
should write out the answers and load them.Or what I also considered: specify a runmode to
install.rb
and load the answers fromRunMode
.I welcome any suggestions what would be preferred.
I had hoped to use this to unify the various Linux distros, but if this makes it easier for BSDs then that's a nice bonus.
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.
On the
install.rb
path I came up with #9490. By making it useRunMode
we can then simplify patch the RunMode to get all the correct paths.