View previous topic :: View next topic |
Author |
Message |
resill n00b
Joined: 18 Feb 2018 Posts: 31
|
Posted: Fri Mar 06, 2020 9:11 am Post subject: Custom acct-user ebuilds in the Pentoo overlay don't work |
|
|
Hi all,
Please consider the following example:
Code: | $ cat cortex-0.ebuild
# Copyright 2019-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit acct-user
DESCRIPTION="User for Cortex"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( ${PN} )
acct-user_add_deps |
When trying to merge this, it is causing the following error:
Code: | $ sudo ebuild cortex-0.ebuild manifest clean merge
Appending /home/gukroon/git/pentoo-overlay to PORTDIR_OVERLAY...
>>> Creating Manifest for /home/gukroon/git/pentoo-overlay/acct-user/cortex
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/acct-user/cortex-0/work
>>> Preparing source in /var/tmp/portage/acct-user/cortex-0/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/acct-user/cortex-0/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/acct-user/cortex-0/work ...
>>> Source compiled.
>>> Test phase [not enabled]: acct-user/cortex-0
>>> Install acct-user/cortex-0 into /var/tmp/portage/acct-user/cortex-0/image
>>> Completed installing acct-user/cortex-0 into /var/tmp/portage/acct-user/cortex-0/image
* Final size of build directory: 4 KiB
* Final size of installed tree: 4 KiB
* checking 0 files for package collisions
>>> Merging acct-user/cortex-0 to /
getent: invalid option -- 'M'
Try `getent --help' or `getent --usage' for more information.
* Adding user '-M' to your system ...
* - Userid: next available
* - Shell: /sbin/nologin
* - Home: /dev/null
* You must add group /dev/null to the system first
* ERROR: acct-user/cortex-0::pentoo failed (preinst phase):
* /dev/null is not a valid GID
*
* Call stack:
* ebuild.sh, line 125: Called pkg_preinst
* environment, line 1005: Called acct-user_pkg_preinst
* environment, line 384: Called enewuser '-M' 'cortex' '-1' '-1' '/dev/null' 'cortex'
* environment, line 845: Called die
* The specific snippet of code:
* die "${g} is not a valid GID";
*
* If you need support, post the output of `emerge --info '=acct-user/cortex-0::pentoo'`,
* the complete build log and the output of `emerge -pqv '=acct-user/cortex-0::pentoo'`.
* The complete build log is located at '/var/tmp/portage/acct-user/cortex-0/temp/build.log.gz'.
* The ebuild environment file is located at '/var/tmp/portage/acct-user/cortex-0/temp/environment'.
* Working directory: '/var/tmp/portage/acct-user/cortex-0/homedir'
* S: '/var/tmp/portage/acct-user/cortex-0/work'
!!! FAILED preinst: 1 |
For some reason the system thinks /dev/null is at the GID position. I tried replacing the value of ACCT_USER_ID with an actual number, and the ${PN} part of ACCT_USER_GROUPS with "cortex". This did not work:
Code: | [...]
* A shell was specified but it does not exist !
* ERROR: acct-user/cortex-0::pentoo failed (preinst phase):
* 9999 does not exist in
*
* Call stack:
* ebuild.sh, line 125: Called pkg_preinst
* environment, line 1005: Called acct-user_pkg_preinst
* environment, line 384: Called enewuser '-M' 'cortex' '9999' '-1' '/dev/null' 'cortex'
* environment, line 796: Called die
* The specific snippet of code:
* die "${eshell} does not exist in ${ROOT}";
[...] |
I don;t know how to fix this and I was hoping any of you could tell me what's wrong. Does something need to be changed in the overlay's profile or metadata folder? Am I overlooking anything else? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30996 Location: here
|
Posted: Fri Mar 06, 2020 10:06 am Post subject: |
|
|
I tested in my system and error is
Code: | >>> Merging acct-user/cortex-0 to /
* Adding user 'cortex' to your system ...
* - Userid: 999
* - Shell: /sbin/nologin
* - Home: /dev/null
* You must add group cortex to the system first
* ERROR: acct-user/cortex-0::localrepo failed (preinst phase):
* cortex is not a valid GID
*
* Call stack:
* ebuild.sh, line 125: Called pkg_preinst
* environment, line 1179: Called acct-user_pkg_preinst
* environment, line 359: Called enewuser '-M' 'cortex' '-1' '-1' '/dev/null' 'cortex'
* environment, line 885: Called die
* The specific snippet of code:
* die "${g} is not a valid GID";
*
* If you need support, post the output of `emerge --info '=acct-user/cortex-0::localrepo'`,
* the complete build log and the output of `emerge -pqv '=acct-user/cortex-0::localrepo'`.
* The complete build log is located at '/var/tmp/portage/acct-user/cortex-0/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/acct-user/cortex-0/temp/environment'.
* Working directory: '/var/tmp/portage/acct-user/cortex-0/homedir'
* S: '/var/tmp/portage/acct-user/cortex-0/work'
!!! FAILED preinst: 1 |
This I think is caused because I don't create acct-group/cortex. So I don't know what is wrong in your system
Code: | >>> Merging acct-user/cortex-0 to /
getent: invalid option -- 'M'
Try `getent --help' or `getent --usage' for more information. |
Maybe some unprintable character in ebuild that change the position of the options? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
resill n00b
Joined: 18 Feb 2018 Posts: 31
|
Posted: Sat Mar 07, 2020 10:13 am Post subject: |
|
|
fedeliallalinea wrote: | Maybe some unprintable character in ebuild that change the position of the options? |
To check this I decided to copy acct-user/burp from the Gentoo tree and rewrite it for "Cortex", like so:
Code: | # Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit acct-user
DESCRIPTION="User for Cortex"
ACCT_USER_ID=-1
ACCT_USER_GROUPS=( cortex )
acct-user_add_deps |
As you can see, the only things I changed are the values for DESCRIPTION, ACCT_USER_ID, and ACCT_USER_GROUPS. I did not touch the rest and it still gives me the same error:
Code: | [...]
>>> Merging acct-user/cortex-0 to /
getent: invalid option -- 'M'
Try `getent --help' or `getent --usage' for more information.
* Adding user '-M' to your system ...
* - Userid: next available
* - Shell: /sbin/nologin
* - Home: /dev/null
* You must add group /dev/null to the system first
* ERROR: acct-user/cortex-0::pentoo failed (preinst phase):
* /dev/null is not a valid GID
*
* Call stack:
* ebuild.sh, line 125: Called pkg_preinst
* environment, line 1002: Called acct-user_pkg_preinst
* environment, line 381: Called enewuser '-M' 'cortex' '-1' '-1' '/dev/null' 'cortex'
* environment, line 842: Called die
* The specific snippet of code:
* die "${g} is not a valid GID";
[...] |
Something else must be wrong, but I don't know what. Other Pentoo developers notice the same error on their system as well. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1569 Location: South America
|
Posted: Sat Mar 07, 2020 2:50 pm Post subject: Re: Pentoo's acct-user ebuilds don't work |
|
|
resill wrote: | Code: | $ sudo ebuild cortex-0.ebuild manifest clean merge
[...]
* Adding user '-M' to your system ...
[...]
* You must add group /dev/null to the system first
* ERROR: acct-user/cortex-0::pentoo failed (preinst phase):
* /dev/null is not a valid GID
[...]
* environment, line 384: Called enewuser '-M' 'cortex' '-1' '-1' '/dev/null' 'cortex' |
| Does Pentoo override eclass user? It seems that enewuser is not taking -M as an option ("do not create home directory if it does not exist"). Rather, it seems to be taking it as the user to create, so all arguments 'shift' one place and /dev/null is taken as the user's primary group rather than as the user's home directory. |
|
Back to top |
|
|
resill n00b
Joined: 18 Feb 2018 Posts: 31
|
Posted: Sat Mar 07, 2020 3:10 pm Post subject: Re: Pentoo's acct-user ebuilds don't work |
|
|
GDH-gentoo wrote: | Does Pentoo override eclass user? It seems that enewuser is not taking -M as an option ("do not create home directory if it does not exist"). Rather, it seems to be taking it as the user to create, so all arguments 'shift' one place and /dev/null is taken as the user's primary group rather than as the user's home directory. |
Apparently so, thanks! I'll reach out to the main developers and ask them to have a look at the override. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|