Summary: | openssh ebuild needs to add sshd user/group in postinst | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jon Nelson (RETIRED) <jnelson> |
Component: | New packages | Assignee: | Brandon Low (RETIRED) <lostlogic> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | agenkin, lostlogic, woodchip |
Priority: | High | ||
Version: | 1.1a | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 4170 | ||
Bug Blocks: | |||
Attachments: | portage.py |
Description
Jon Nelson (RETIRED)
2002-06-25 19:24:01 UTC
so, any ebuild doing user addition stuff in pkg_setup() is broken by definition? i think postfix is using a similar thingy; in its case it *needs* to come before src_install because certain files needs to be chown'ed to the newly created group for postfix. so cant portage and .tbz2's work properly with pkg_setup doing user addition stuff? hit me with the cl00bie stick if need be. Yes. Is any action going to be taken on this? pkg_setup needs to be fixed so that it also works for tbz2 packages too... since woodchip points out that sometimes we need these accounts to exist *before* src_install. pkg_setup() was added by Bevin and he didn't touch every area of the code that he needed to. But easy enough to fix -- I can tweak portage so that tbz2 installs call pkg_setup, then pkg_preinst, then merge, then pkg_postinst. That appears to be the "right thing to do" in this case. OK, I fixed portage.py to call pkg_setup() on packages. The order that everything is done for .tbz2s is as follows: 1) extract info (and ebuild) from tbz2 2) run pkg_setup(), abort if problems 3) extract files from tbz2 4) run pkg_preinst() 5) merge files 6) run pkg_postinst() This fix will be in Portage 2.0.10+; I'm going to attach my working copy of portage.py to this bug so that you can test it to verify that this issue is resolved. Created attachment 1923 [details]
portage.py
pre-2.0.10 portage.py with tbz2 fixes
OK, jnelson has convinced me that using pkg_setup() for adding users is broken. If your compile process requires user accounts to be added, then your compile process is broken and you should look into patching makefiles. pkg_setup() should only be used for checking things, configuring environment variables, etc -- it should make no lasting changes to the underlying system. |