summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "acct-user.eclass: Users need their group already at "build time""Mike Gilbert2023-07-061-1/+0
| | | | | | | | We pass --prefix "${ROOT}" to the useradd command, which means it should be looking in ${ROOT}/etc/group, not ${SYSROOT}/etc/group. Reverts: 1288ef96a50212d05eaf23e98e6cbe2a872d713f Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: Users need their group already at "build time"Andreas K. Hüttel2023-07-031-0/+1
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* acct-user.eclass: include exit status in death messageMike Gilbert2023-06-261-3/+3
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: improve error message when usermod failsMike Gilbert2023-06-261-5/+23
| | | | | | | | | | | | | | | | | usermod refuses to update the home directory for a user with running processes. Output a more helpful message and avoid calling die for this. For other usermod failures, output stderr as an eerror message and die. Example output: * Failed to update user portage * This user currently has one or more running processes. * Please update this user manually with the following command: * usermod '--comment' 'System user; portage' '--home' '/var/lib/portage/home' '--shell' '/bin/bash' '--gid' 'portage' '--groups' '' portage Bug: https://bugs.gentoo.org/888189 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: fix UnknownKeywordsSam James2023-05-271-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* acct-user.eclass: alpha, ia64, s390, m68k lack stable keywordsSam James2023-04-231-1/+1
| | | | | | We dropped them to ~arch a while ago. Signed-off-by: Sam James <sam@gentoo.org>
* acct-user.eclass: add ~arm64-macos to KEYWORDSSam James2023-04-231-1/+1
| | | | | Bug: https://bugs.gentoo.org/904474 Signed-off-by: Sam James <sam@gentoo.org>
* acct-user.eclass: fix spellingSam James2023-03-261-6/+6
| | | | | | | Thanks to codespell. Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* acct-user.eclass: Quote argument of ":" commandUlrich Müller2023-03-261-9/+9
| | | | | | This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* eclass: standardize prologue/epilogueDavid Seifert2023-03-171-5/+5
| | | | | Closes: https://github.com/gentoo/gentoo/pull/30061 Signed-off-by: David Seifert <soap@gentoo.org>
* acct-user.eclass: always fix homedir permissions in pkg_preinstMike Gilbert2022-12-251-26/+25
| | | | | Closes: https://bugs.gentoo.org/886147 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: Don't modify users when EPREFIX is non-emptyJames Le Cuirot2022-12-141-4/+4
| | | | | | | This was happening when running a prefix as root, which we don't really support, but also when building a prefixed system under ROOT. Signed-off-by: James Le Cuirot <chewi@gentoo.org>
* acct-user.eclass: add myself as a maintainerMike Gilbert2022-10-191-0/+1
| | | | | | For bug visibility. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: drop elockuser and eunlockuserMike Gilbert2022-10-191-106/+0
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: inline useradd and usermodMike Gilbert2022-10-191-34/+87
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: respect ACCT_USER_NO_MODIFY in pkg_prermMike Gilbert2022-10-191-12/+19
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: support user override of commentMike Gilbert2022-10-191-3/+17
| | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: Revert "support user override of comment"Michał Górny2022-10-191-14/+3
| | | | | Reverts: 140f92c2b8a15e7e5c28a343a8b289b3d766e143 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Revert "respect ACCT_USER_NO_MODIFY in pkg_prerm"Michał Górny2022-10-191-19/+12
| | | | | Reverts: 720c70288cf15946f2560af7d104e1b3f34f9dd9 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Revert "inline useradd and usermod"Michał Górny2022-10-191-84/+29
| | | | | Reverts: 308c02b897fa7fba442441fd3a7da17ce07ec8ee Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Revert "drop elockuser and eunlockuser"Michał Górny2022-10-191-0/+106
| | | | | Reverts: bde2856fc6bcc73d55dbf481a156805f06510a12 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: drop elockuser and eunlockuserMike Gilbert2022-10-191-106/+0
| | | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: inline useradd and usermodMike Gilbert2022-10-191-29/+84
| | | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: respect ACCT_USER_NO_MODIFY in pkg_prermMike Gilbert2022-10-191-12/+19
| | | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: support user override of commentMike Gilbert2022-10-191-3/+14
| | | | | Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: add keyword ~loongWANG Xuerui2022-04-251-1/+1
| | | | | See: https://github.com/gentoo/gentoo/pull/25183 Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* acct-user.eclass: Fixing user/group creation when using different ROOTJérémy Connat2022-04-231-11/+40
| | | | | | Signed-off-by: Jérémy Connat <morderca@morderca.net> Closes: https://github.com/gentoo/gentoo/pull/19204 Signed-off-by: Sam James <sam@gentoo.org>
* acct-user.eclass: Refuse to lock out the superuserUlrich Müller2022-03-281-0/+5
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* acct-user.eclass: Use arithmetic test for EUIDUlrich Müller2022-03-281-6/+6
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-10/+10
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* acct-user.eclass: EAPI 8 supportDavid Michael2021-06-241-9/+10
| | | | | | | | | | | | | | | | | | | Update the documentation to describe how to depend on GLEP 81 packages with EAPI 8. There is no NSS module for resolving the accounts installed in $SYSROOT, so acct-* packages might also need need to be in $BROOT e.g. for fowners which directly calls chown. - BDEPEND so the build system can resolve names when building packages in nonempty $SYSROOT at src_install time. - IDEPEND so the build system can resolve names when installing binary packages in nonempty $ROOT at pkg_preinst time. - RDEPEND so the target system can use the accounts. Closes: https://github.com/gentoo/gentoo/pull/21377 Signed-off-by: David Michael <fedora.dm0@gmail.com> Signed-off-by: David Seifert <soap@gentoo.org>
* acct-user.eclass: allow opt-out of user modificationThomas Deutschmann2021-01-101-0/+27
| | | | | | | | | | | | | | | In some setups where users are changed/managed not only via ebuilds, for example through configuration management systems, it could be problematic if acct-user.eclass will restore user/group settings to values set in ebuild. Setting ACCT_USER_NO_MODIFY to a non-zero value will allow system administrator to disable modification of any existing user. Note: Lock/unlock when acct-* package will be installed/removed will still happen. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* acct-user.eclass: fix styleThomas Deutschmann2021-01-101-5/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* acct-user.eclass: Support ACCT_USER_ID overrideMichał Górny2021-01-091-11/+20
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Support var overrides for user propertiesMichał Górny2021-01-091-24/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a few variables to allow easy overrides of common user account proprerties, that is: - ACCT_USER_<username>_SHELL - ACCT_USER_<username>_HOME - ACCT_USER_<username>_HOME_OWNER - ACCT_USER_<username>_HOME_PERMS - ACCT_USER_<username>_GROUPS - ACCT_USER_<username>_GROUPS_ADD The first five variables override the respective ACCT_USER_* variables, with ACCT_USER_*_GROUPS being a space-separated list. The *_GROUPS_ADD variable appends to groups present in the ebuild, as this seems a common necessity. We do realize that the original requirement of overriding ebuilds in a local repository was inconvenient. This new logic should permit easy updates via make.conf. Additionally, it has the advantage of clearly reporting the changes made in the build logs. This does not preclude other solutions to the problem. However, this is probably the best one and it should become the current recommendation. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/acct-user: drop x86-macosFabian Groffen2021-01-061-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* eclass: [QA] Revert multiple meaningless doc changesMichał Górny2020-12-281-5/+0
| | | | | | | | | | | Revert multiple meaningless eclass documentation changes, notably adding a lot of placeholders and documenting implementation details. These changes were aimed at silencing (valid) documentation warnings without actually providing valuable documentation to the end users. While some of these changes were beneficial, it would take a lot of effort to review them all and the author is unwilling to fix his mistakes. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass/*: drop ppc-aix m68k-mintFabian Groffen2020-12-271-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* eclass/acct-user: fixup documentationAaron Bauman2020-12-161-0/+5
| | | | Signed-off-by: Aaron Bauman <bman@gentoo.org>
* acct-*.eclass: Create sysusers.d filesMichał Górny2020-09-051-2/+16
| | | | | | Thanks to David Michael for the initial patch and upstream fixes. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Fix eclassdoc tag orderMichał Górny2020-07-041-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-{group,user}: remove sh keywordMikle Kolyada2020-03-261-1/+1
| | | | Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
* eclass/acct-user.eclass: disable pkg_* on Prefix.Benda Xu2020-02-211-0/+10
| | | | | | | | Gentoo Prefix runs with a normal user and cannot manage any other user. Exit gracefully with a message. Closes: https://bugs.gentoo.org/709570 Signed-off-by: Benda Xu <heroxbd@gentoo.org>
* acct-*.eclass: Remove *-fbsd keywordsMichał Górny2019-10-111-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Document primary/supplementary groupsMichał Górny2019-09-081-1/+2
| | | | | Closes: https://bugs.gentoo.org/692964 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: Fix typo in eislocked()Michał Górny2019-08-241-2/+2
| | | | | | Reported by Hello71. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-{group,user}.eclass: Add @SUPPORTED_EAPIS.Ulrich Müller2019-08-201-2/+3
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* acct-*.eclass: Allow dynamic UID/GID assignment via -1Michał Górny2019-08-171-0/+4
| | | | | | | | | | | | | | | | Allow a special value of '-1' to dynamically assign UID/GID for the user or group. This is intended to be used in overlays where proper assignment does not take place but whose owners wish to switch to acct-* packages. While technically it is possible to choose a free UID/GID, it could be taken afterwards by some Gentoo package and unnecessarily introduce a conflict. Using '999' was also suggested (as the first dynamic UID/GID) but it would cause issues for people enabling ACCT_*_ENFORCE_ID. To avoid this, '-1' does not trigger collision checks. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* acct-user.eclass: die explicitly if HOME is missing in preinstMike Gilbert2019-08-151-0/+8
| | | | | Closes: https://bugs.gentoo.org/691478 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* acct-user.eclass: Do not enforce UID unless requestedMichał Górny2019-07-091-2/+3
| | | | | | | | | | Correct the enewuser call not to enforce specified UID unless ACCT_USER_ENFORCE_ID is set. Reported-by: Toralf Förster <toralf@gentoo.org> Tested-by: Marek Szuba <marecki@gentoo.org> Closes: https://bugs.gentoo.org/689102 Signed-off-by: Michał Górny <mgorny@gentoo.org>