Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 86513 - enewuser, enewgroup etc. should not die on failure
Summary: enewuser, enewgroup etc. should not die on failure
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-24 05:41 UTC by Roel Brook
Modified: 2005-03-24 16:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roel Brook 2005-03-24 05:41:18 UTC
A lot of ebuilds create a new user / group on the system. Problem, especially when updateing packages, is this user / group already exists.

i.e. hal:
it creates a new user (haldemon) with a new group (haldemon).

When upgrading hal, the emerge dies on the enewuser statement, because the user already exists. Workaround is to change the "die" stataement behind the || in the ebuiild to ewarn or einfo.

Other example is enemy-territory. It dies on something as basic as adding a group "games" to the system, which ofcourse already exists.

Can the behaviour be changed so that when adding a new user / group portage only produces a warning on failure?

Reproducible: Always
Steps to Reproduce:
1. emerge hal
2. emerge -uv hal




Portage 2.0.51.19 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20050125-r1,
2.6.11-love1 i686)
=================================================================
System uname: 2.6.11-love1 i686 AMD Athlon(tm) XP 2500+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 00:46:55)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.6.3, 1.5, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/fax /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/alias /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -mmmx -msse -m3dnow
-mfpmath=sse,387 -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks parallel-fetch sandbox
sfperms"GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://gd.tuwien.ac.at/opsys/linux/gentoo/
ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_NL@euro"
LC_ALL="nl_NL@euro"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib alsa apache2 apm arts audiofile avi bash-completion
bitmap-fonts bonobo bzlib calender cdparanoia cdr chipcard chroot crypt cups
curl dba divx4linux dvd dvdr dvdread emboss encode esd fam filepro flac
font-server foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2
guile hal imagemagick imlib insecure-drivers java jpeg jpeg2k junit kde ldap
libg++ libwww live mad mikmod mime mmx mono motif mozdevelop mozilla moznomail
moznoxft mp3 mpeg mplayer msn mysql ncurses network nls nptl nvidia odbc
offensive oggvorbis ooo-kde opengl pam pdflib perl php pic png postgres python
qmail qt quicktime readline real rplay samba scanner sdk sdl session sftplogging
slang softmmu speex spell sqlite sse ssl stroke svga tcltk tcpd threads tiff
truetype truetype-fonts type1-fonts usb userlocales v4l wmf xine xinerama xml
xml2 xmms xprint xscreensaver xv xvid zlib video_cards_nvidia linguas_nl"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS
Comment 1 SpanKY gentoo-dev 2005-03-24 08:26:49 UTC
every game ebuild calls `enewuser games` ... something is wrong with your system

post the output of an example emerge which fails
Comment 2 Roel Brook 2005-03-24 14:35:57 UTC
here is the output of emerge -uv enemy-territory:

YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, YOU UNDERSTAND THIS AGREEMENT, AND UNDERSTAND THAT BY CONTINUING THE DOWNLOAD OR INSTALLATION OF THE SOFTWARE, BY LOADING OR RUNNING THE SOFTWARE, OR BY PLACING OR COPYING THE SOFTWARE ONTO YOUR COMPUTER HARD DRIVE OR RAM, YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT.  YOU FURTHER AGREE THAT, EXCEPT FOR WRITTEN SEPARATE AGREEMENTS, IF ANY, BETWEEN ID AND YOU, THIS AGREEMENT IS A COMPLETE AND EXCLUSIVE STATEMENT OF THE RIGHTS AND LIABILITIES OF THE PARTIES HERETO, RELATING TO THE SUBJECT MATTER HEREOF.  THIS AGREEMENT SUPERSEDES ALL PRIOR ORAL AGREEMENTS, PROPOSALS OR UNDERSTANDINGS, AND ANY OTHER COMMUNICATIONS, IF ANY, BETWEEN ID AND YOU RELATING TO THE SUBJECT MATTER OF THIS AGREEMENT.
 * Do you accept the terms of this license (RTCW-ETEULA)? [yes/no] yes
 * Adding group 'games' to your system ...
 *  - Groupid: next available; requested gid taken
groupadd: groep games bestaat reeds <- group already exists.

I'm using shadow 4.0.7-r1

Comment 3 SpanKY gentoo-dev 2005-03-24 15:03:57 UTC
do you have a games group ?

grep games /etc/groups
Comment 4 Roel Brook 2005-03-24 15:42:05 UTC
I thought this group is created by default on a install?

My server has no games installed, but DOES have a games group. But yes, I have a group called games:

grep games /etc/group                                        (~)
games:x:35:roel
users:x:100:games,roel

hmm, what's that user "games" doing there? It's also on my server install:

Goofy root # grep games /etc/group
games:x:35:
users:x:100:games


Comment 5 SpanKY gentoo-dev 2005-03-24 15:46:50 UTC
if you do `export FEATURES=-sandbox` and try to emerge a game does it work ?
Comment 6 Roel Brook 2005-03-24 16:01:15 UTC
OK, this is definitly a configuration issue:

On my server:
Goofy root # ACCEPT_KEYWORDS="~x86" emerge --nodeps enemy-territory
Calculating dependencies ...done!
>>> emerge (1 of 1) games-fps/enemy-territory-2.60 to /
>>> md5 src_uri ;-) et-linux-2.60.x86.run
 * Do you accept the terms of this license (RTCW-ETEULA)? [yes/no] yes
>>> Unpacking source...
>>> Unpacking et-linux-2.60.x86.run to /var/tmp/portage/enemy-territory-2.60/work
30945+1 records in
264612+1 records out
>>> Source unpacked.

It does not even try to create a group "games".

Tried to emerge it with bash (the only noticible difference between the 2 machines is bash vs zsh), but it still fails.

 * Adding group 'games' to your system ...
 *  - Groupid: next available; requested gid taken
groupadd: groep games bestaat reeds

!!! ERROR: games-fps/enemy-territory-2.60 failed.
!!! Function enewgroup, Line 883, Exitcode 9
!!! enewgroup failed
!!! If you need support, post the topmost build error, NOT this status message.

*edit: tried it with FEATURES -sandbox, but still the same error.

Thanks for your help, I really appreciate it
Comment 7 SpanKY gentoo-dev 2005-03-24 16:20:54 UTC
what does `getent group games | cut -f1 -d:` show ?
Comment 8 Roel Brook 2005-03-24 16:30:51 UTC
OK, I have no idea what this command does, but it shows a blank line. On my server it DOES output "games".

roel@Medusa$ getent group games | cut -f1 -d:                             (~)

roel@Medusa$ getent group games                                           (~)

roel@Medusa$ ssh root@192.168.0.240
Password:
Goofy root # getent group games | cut -f1 -d:
games
Goofy root #

getent seems to be used to
"Get entries from administrative database."

How can I regenerate that database?
Comment 9 SpanKY gentoo-dev 2005-03-24 16:33:30 UTC
the 'database' in this case is your /etc/groups file

i'm going to guess that the insane amount of rice on your system has broken coreutils' cut

try `CFLAGS="-pipe" emerge coreutils` and see if `getent group games | cut -f1 -d:` works again