Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 368695 - eutils eclass: old sys-apps/shadow causes general failures: groupadd: invalid option -- 'r'
Summary: eutils eclass: old sys-apps/shadow causes general failures: groupadd: invalid...
Status: RESOLVED DUPLICATE of bug 367633
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 13:33 UTC by Josh Nijenhuis
Modified: 2011-05-28 18:52 UTC (History)
2 users (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 Josh Nijenhuis 2011-05-25 13:33:54 UTC
Fails on emerge, groupadd command does not have -r option

Reproducible: Always

Steps to Reproduce:
1.emerge -av mail-mta/ssmtp
2.
3.
Actual Results:  
output of /var/tmp/portage/mail-mta/ssmtp-2.62-r8/temp/build.log

^[[32;01m * ^[[39;49;00mPackage:    mail-mta/ssmtp-2.62-r8
^[[32;01m * ^[[39;49;00mRepository: gentoo
^[[32;01m * ^[[39;49;00mMaintainer: net-mail@gentoo.org
^[[32;01m * ^[[39;49;00mUSE:        elibc_glibc ipv6 kernel_linux ssl userland_GNU x86
^[[32;01m * ^[[39;49;00mFEATURES:   sandbox
 ^[[32;01m*^[[0m Adding group 'ssmtp' to your system ...
 ^[[32;01m*^[[0m  - Groupid: next available
groupadd: invalid option -- 'r'
Usage: groupadd [options] GROUP

Options:
  -f, --force                   force exit with success status if the specified
                                group already exists
  -g, --gid GID                 use GID for the new group
  -h, --help                    display this help message and exit
  -K, --key KEY=VALUE           overrides /etc/login.defs defaults
  -o, --non-unique              allow create group with duplicate
                                (non-unique) GID

 ^[[31;01m*^[[0m ERROR: mail-mta/ssmtp-2.62-r8 failed (setup phase):
 ^[[31;01m*^[[0m   enewgroup failed
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m              ebuild.sh, line  56:  Called pkg_setup
 ^[[31;01m*^[[0m   ssmtp-2.62-r8.ebuild, line  37:  Called enewgroup 'ssmtp'
 ^[[31;01m*^[[0m          eutils.eclass, line 860:  Called die
 ^[[31;01m*^[[0m The specific snippet of code:
 ^[[31;01m*^[[0m                groupadd -r ${opts} ${egroup} || die "enewgroup failed"
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m If you need support, post the output of 'emerge --info =mail-mta/ssmtp-2.62-r8',
 ^[[31;01m*^[[0m the complete build log and the output of 'emerge -pqv =mail-mta/ssmtp-2.62-r8'.
 ^[[31;01m*^[[0m The complete build log is located at '/var/tmp/portage/mail-mta/ssmtp-2.62-r8/temp/build.log'.
 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/mail-mta/ssmtp-2.62-r8/temp/die.env'.
 ^[[31;01m*^[[0m S: '/var/tmp/portage/mail-mta/ssmtp-2.62-r8/work/ssmtp'

Expected Results:  
made the group and continued

Portage 2.1.9.42 (default/linux/x86/10.0/desktop, gcc-4.4.5, libc-0-r0, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r4-i686-Intel-R-_Xeon-TM-_CPU_3.06GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 24 May 2011 17:00:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.10.1-r1
virtual/os-headers:  0
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X a52 aac acl acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cvs cvsgraph cxx dbus dri dts dvd dvdr emboss encode enscript exif extras fam firefox flac fortran gdbm gdu gif gpm graphviz gtk highlight iconv imagemagick ipv6 jpeg lcms libnotify mad mng mod_python modperl modules mp3 mp4 mpeg mudflap mysql ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl php png policykit ppds pppd python qt3support qt4 readline samba sdl server session slang spell ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vhosts vorbis x264 x86 xcb xml xorg xprint xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Eray Aslan gentoo-dev 2011-05-25 19:44:34 UTC
That's an option introduced in 2008.  Try upgrading sys-apps/shadow.
Comment 2 Josh Nijenhuis 2011-05-26 11:00:00 UTC
I just added the group manually and the remerged and it went fine.
regardless of that, shouldn't then a certain version of shadow be a dependency?
Comment 3 Eray Aslan gentoo-dev 2011-05-26 21:49:36 UTC
No.  sys-apps/shadow is not a direct dependency of ssmtp.  It is called by eutils eclass which is by the way one of the most used eclasses in the tree.  You will hit the same problem in any ebuild that adds a new user or a new group to your system.

By adding the -r flag, base-system basically made an implicit minimum sys-apps/shodow version requirement to add new users/groups in an ebuild.  As shadow-4.0 is no longer in the tree and my guess is it is no longer supported.  You need to upgrade.

Closing as invalid.
Comment 4 SpanKY gentoo-dev 2011-05-28 18:52:43 UTC

*** This bug has been marked as a duplicate of bug 367633 ***