CFE-4450: Allow passing environment variables to package managers#2963
CFE-4450: Allow passing environment variables to package managers#2963amousset wants to merge 1 commit intocfengine:masterfrom
Conversation
|
Do you have some explicit examples of the use case for each of the package managers as well? |
|
For APT, for example controling needrestart's behavior. But the main use case is for non-standard packages that allow customizing the configuration through env vars used in the postinst script. GitLab is one of them (https://docs.gitlab.com/omnibus/installation/index.html#set-up-the-initial-account): |
|
From my side I think it makes sense, I will invite @olehermanse @craigcomstock to bike shed a bit. |
craigcomstock
left a comment
There was a problem hiding this comment.
Seems fine to me. Seeing this change here kind of begs to have a common python script to share such repeated code.
Also, it's a shame to not have the same for non-python modules if they even need it. For example, apk for alpine, but I have never needed to use env vars so probably fine. We can leave the complex usage to the complex systems: apt, yum and zypper. ;)
Definitely was looking for documentation and examples (a test case is usually a great example) before I read your description. So with those two pieces this looks good to me!
Thanks for the contribution!
|
I created some basic documentation in cfengine/documentation#3374. I also took a look at the tests but it seems there are no tests covering the |
1e58dfd to
31b014d
Compare
Allow passing options to the package managers modules through
env:NAME=VERSIONoptions.Taking the easiest path. If it is considered acceptable I'll add a test case and documentation.