Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Several packages fail emerge with error Invalid user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
brendlefly62
Apprentice
Apprentice


Joined: 19 Dec 2009
Posts: 150

PostPosted: Thu May 09, 2024 1:55 pm    Post subject: [Solved]Several packages fail emerge with error Invalid user Reply with quote

[Update: I got no replies to this post, but my "workaround" below seems to have done the trick, so I'm marking it solved]

I'm working on a newly installed system (my first that is profile 23.0 from the get-go). It is an arm64 system built with Gentoo's current openrc stage3 (https://distfiles.gentoo.org/releases/arm64/autobuilds/current-stage3-arm64-openrc/stage3-arm64-openrc-20240505T234912Z.tar.xz). The system is functioning, and I am adding my usual headless server stuff to it. However, several packages fail in the install phase with error
Code:
chown: invalid user: xxx:xxx

where "xxx" is a typical user:group associated with the package. All three of apache2, ldap, and chrony do this.
    apache2 - "chown: invalid user: apache:apache" follows immediately after message "Installing man pages and online manual"
    ldap - "chown: invalid user: ldap:ldap" follows immediately after installing files in .../image/usr/share/man/man8
    chrony - "chown: invalid user: ntp:ntp" follows immediately after installing files (with cp and chmod) in .../image/usr/share/man/man8 and then reporting "make[1]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc' which follows similar messages starting "make[3] and make[2]


Investigating, I notice that on this new system there are no entries in /etc/shadow or /etc/gshadow for these user/group names. However, on a similar working system that I recently upgraded from profile 17.1 to 23.0, there are /etc/shadow entries, as follows --
    ...
    ntp:!:19604::::::
    ldap:!:19625::::::
    apache:!:19625::::::

and on the similar older system, there are /etc/gshadow entries for them, as follows --
    ntp:!::
    mail:!::
    mysql:!::
    ldap:!::
    apache:!::

Investigating further, I find that acct-user and acct-group packages ARE installed for these --
Code:
# eix -c ntp
[I] acct-group/ntp (0-r3{gpkg}@03/24/2024): System group: ntp
...
[I] acct-user/ntp (0-r3{gpkg}@03/24/2024): user for ntp daemon
...
[I] net-misc/ntp (4.2.8_p17-r2{gpkg}@05/07/2024): Network Time Protocol suite/programs

# eix -c apache
[I] acct-group/apache (0-r3{gpkg}@05/08/2024): System group: apache
[I] acct-user/apache (0-r3{gpkg}@05/08/2024): System user: apache
[I] app-admin/apache-tools (2.4.59{gpkg}@05/08/2024): Useful Apache tools - htdigest, htpasswd, ab, htdbm
...

# eix -c ldap 
[I] acct-group/ldap (0-r2{gpkg}@05/08/2024): System group: ldap
[I] acct-user/ldap (0-r2{gpkg}@05/08/2024): A user for ldap
...


Work-around -- I found that re-emerging these acct-user and acct-group packages fixes the problem.

Questions:
First, I'm wondering why are these user:groups missing from the new system?


Next, what other user:groups might be missing that I just haven't noticed yet?
Answered my own question, comparing list of installed acct-user and acct-group packages to the contents of /etc/passwd -- used this to extend "workaround" to other missing user/group names --
Code:

# eix-update && eix -Ic acct-*/* | grep '\[[I]\]'> /home/joe/temp

# emerge -av1 $(for z in $(for x in $(while read line; do entry=$(echo $line | cut -d' ' -f2); echo $entry; done < /home/joe/temp); do user=$(echo $x | cut -d'/' -f2); echo $user; done | sort -u); do echo -n "$z:  "; ans=$(grep -i ^$z /etc/passwd); [ -n "$ans" ] && echo "found - $ans" || echo "not found"; done | grep "not found" | cut -d':' -f1)


And - is my work-around the "right" way to fix this?

I have not filed a bug against any of these packages -- not sure it's their job to install these users... is it?

Code:
# emerge --info
Portage 3.0.64 (python 3.11.9-final-0, default/linux/arm64/23.0, gcc-13, glibc-2.38-r13, 6.6.30-current-rockchip64 aarch64)
=================================================================
System uname: Linux-6.6.30-current-rockchip64-aarch64-with-glibc2.38
KiB Mem:     2026448 total,    547844 free
KiB Swap:    6291452 total,   6278908 free
Timestamp of repository gentoo: Wed, 08 May 2024 19:15:00 +0000
Head commit of repository gentoo: 71e925a3cc39458ac21caf651460744649d88b20
Head commit of repository joetoo: 689899dfad03bc4619cd22752c397f3508d5307f

sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p5) 2.41.0
distcc 3.4 aarch64-unknown-linux-gnu [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-lang/perl:             5.38.2-r2::gentoo, 5.38.2-r3::gentoo
dev-lang/python:           3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r13::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts:

joetoo
    location: /var/db/repos/joetoo
    sync-type: git
    sync-uri: https://github.com/JosephBrendler/joetoo.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/arm64/binpackages/23.0/arm64

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-mcpu=cortex-a72.cortex-a53+crc+crypto -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/boot.cmd /boot/boot.scr /boot/joetooEnv.txt /boot/u-boot_reflash /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-mcpu=cortex-a72.cortex-a53+crc+crypto -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-mcpu=cortex-a72.cortex-a53+crc+crypto -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news nodoc noinfo parallel-fetch pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-mcpu=cortex-a72.cortex-a53+crc+crypto -mfix-cortex-a53-835769 -mfix-cortex-a53-843419 -O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftpp.gtlib.gatech.edu/pub/gentoo http://open-systems.ufl.edu/mirrors/gentoo ftp://mirrors.rit.edu/gentoo/ http://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/usr/share/dev-perl/DBD-mysqllocale   -/usr/share/locale/en   -/usr/share/locale/en_US   -/usr/share/locale/kf5_all_languages   -/usr/share/locale/locale.alias"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US"
MAKEOPTS="-j37 -l6"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="apache2 arm64 bash-completion bzip2 cgi crypt cxx dbus gdbm gif git gnutls gpm iconv introspection ipv6 libtirpc logrotate modules mp3 mp4 mpeg mysql ncurses odbc openmp pam pcre pdf perl php png readline seccomp ssl svg test-rust threads tiff udev unicode urandom usb verify-sig xattr zlib" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="aes crc32 edsp sha1 sha2 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="ARM X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2 php8-3" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31 ruby33" VIDEO_CARDS="fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS


Example build failure message (ldap) --
Code:
installing slapo-valsort.5 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man5
installing slappw-argon2.5 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man5
make[3]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc/man/man5'
 
  Entering subdirectory man8
make[3]: Entering directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc/man/man8'
/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/build/shtool mkdir -p /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
PAGES=`cd /var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/doc/man/man8; echo *.8`; \
for page in $PAGES; do \
        echo "installing $page in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8"; \
        rm -f /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8/$page; \
        /var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/build/shtool install -c  -m 644 $page.tmp /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8/$page; \
        if test -f "/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/doc/man/man8/$page.links" ; then \
                for link in `cat /var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/doc/man/man8/$page.links`; do \
                        echo "installing $link in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8 as link to $page"; \
                        rm -f /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8/$link ; \
                        /var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6/build/shtool mkln -s /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8/$page /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8/$link; \
                done; \
        fi; \
done
installing lloadd.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapacl.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapadd.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapauth.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapcat.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapd.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapdn.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapindex.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapmodify.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slappasswd.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slapschema.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
installing slaptest.8 in /var/tmp/portage/net-nds/openldap-2.6.6-r2/image/usr/share/man/man8
make[3]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc/man/man8'
 
make[2]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc/man'
 
make[1]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64/doc'
 
chown: invalid user: ���ldap:ldap���
 * ERROR: net-nds/openldap-2.6.6-r2::gentoo failed (install phase):
 *   fowners failed
 *
 * If you need support, post the output of `emerge --info '=net-nds/openldap-2.6.6-r2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-nds/openldap-2.6.6-r2::gentoo'`.
 * The complete build log is located at '/var/log/portage/net-nds:openldap-2.6.6-r2:20240509-121943.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-nds/openldap-2.6.6-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.6.6-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6-.arm64'
 * S: '/var/tmp/portage/net-nds/openldap-2.6.6-r2/work/openldap-OPENLDAP_REL_ENG_2_6_6'
Back to top
View user's profile Send private message
foofoo
n00b
n00b


Joined: 28 Jul 2004
Posts: 29

PostPosted: Sun Nov 17, 2024 10:28 pm    Post subject: Reply with quote

Code:
emerge `qlist -Iq | grep 'acct-'`

was probably overkill but re-emerging acct-group/ntp & acct-user/ntp did fix my chrony service, and even allowed me to
Code:
/etc/init.d/systemd-tmpfiles-setup restart
with no errors (I was getting an "ntp user does not exist" before)

As you say, it is strange that these group/user had to be remerged,.. but I am used to workarounds when I do emerge @world after a long break :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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