>>> Merging net-misc/scponly-4.6 to / * Adding group 'scponly' to your system ... * - Groupid: next available * Adding user 'scponly' to your system ... * - Userid: 101 * A shell was specified but it does not exist ! !!! ERROR: net-misc/scponly-4.6 failed. Call stack: ebuild.sh, line 1949: Called dyn_preinst ebuild.sh, line 1297: Called pkg_preinst scponly-4.6.ebuild, line 45: Called enewuser 'preinst' 'scponly' '-1' '/usr/sbin/scponlyc' '/home/scponly' !!! /usr/sbin/scponlyc does not exist in / hetzner phpmyadmin # ls -la /usr/sbin/scponlyc ls: /usr/sbin/scponlyc: No such file or directory scponlyc is not available yet - it's only available AFTER scponly package has been installed. Further - why does the package even try to add a user? There's no need to add a user for scponly to work. I'll attach a patch to the ebuild, which will make it refrain from adding a user. Lastly, the user home directory MIGHT be created in the wrong "hierarchy", as the ebuild will "statically" create the scponly home directory under /home. hetzner phpmyadmin # emerge --info Portage 2.1_pre5-r4 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.6-r3, 2.6.14-hardened-r5.01 i686) ================================================================= System uname: 2.6.14-hardened-r5.01 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.12.0_pre16 ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10, 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/mail/dspam /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control /var/run/dspam" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/Gentoo/Portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS=" http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://gentoo.itdnet.net/gentoo/ http://ftp.gentoo.or.kr/ http://distfiles.gentoo.org/ " LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/Gentoo/Portage/packages" PORTAGE_TMPDIR="/Gentoo/Portage/build" PORTDIR="/Gentoo/Portage/tree" PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc /Gentoo/Portage/local-tree/overlays/gentoo-de" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip acl apache2 async bash-completion berkdb bzip2 cap caps ccache checkpath chroot cracklib crypt cyrus dcc discard-path dlloader ecc erandom exif extensions firefox glep glibc-omitfp hardened hardenedphp hpn iconv idea idled idn imagemagick imap imlib imlib2 jikes jpeg kdeenablefinal linuxthreads-tls logrotate lynxkeymap maildir mime mmap mmx mmxext mode-owner moznoirc mozsvg multislot nls no-old-linux noaudio nocd nodrm nolvm1 nopop3d offensive pam pam-mysql pcre pdf php pic posix postfix prelude pyzor razor readline recode reiserfs sasl sendfile server sftplogging sharedmem sse ssl static sysvipc szip tcpd threads tiff tokenizer tools unicode userlocales utf8 vhosts vim-pager x86 xfs xinetd zlib elibc_glibc kernel_linux linguas_de userland_GNU" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL
Created attachment 81898 [details, diff] Patch removing the chroot stuff from the ebuild With this patch, scponly can be installed just fine.
(In reply to comment #0) > Further - why does the package even try to add a user? There's no need to add a > user for scponly to work. Because it's *needed* for pkg_config() to work... > I'll attach a patch to the ebuild, which will make it refrain from adding a user. No, that's wrong, see above. If you insist on not having a user, then move it to pkg_config() and try if it works correctly. > Lastly, the user home directory MIGHT be created in > the wrong "hierarchy", as the ebuild will "statically" create the scponly home > directory under /home. Yeah? What's wrong with /home? That's where user accounts go usually... If you want something else, then specify myhome="/some/path/${myuser}" when running emerge/emerge --config.
Try this: <snip> --- scponly-4.6.ebuild.orig 2006-02-27 16:08:47.000000000 +0100 +++ scponly-4.6.ebuild 2006-03-11 10:33:43.000000000 +0100 @@ -40,11 +40,6 @@ dodoc setup_chroot.sh } -pkg_preinst() { - enewgroup ${myuser} - enewuser ${myuser} -1 /usr/sbin/scponlyc ${myhome} ${myuser} -} - pkg_postinst() { einfo "You might want to run:" einfo "\"emerge --config =${CATEGORY}/${PF}\"" @@ -66,6 +61,9 @@ } > ${T}/shells mv -f ${T}/shells /etc/shells + enewgroup ${myuser} + enewuser ${myuser} -1 /usr/sbin/scponlyc ${myhome} ${myuser} + BINARIES="/usr/$(get_libdir)/misc/sftp-server /bin/ls /usr/bin/scp /bin/rm /bin/ln /bin/mv /bin/chmod /bin/chown /bin/chgrp /bin/mkdir /bin/rmdir /bin/pwd /bin/groups /usr/bin/ld /bin/echo /usr/bin/rsync" if built_with_use ${PN} subversion; then BINARIES="$BINARIES /usr/bin/svn /usr/bin/svnserve" </snip>
(In reply to comment #2) > (In reply to comment #0) > > Further - why does the package even try to add a user? There's no need to add a > > user for scponly to work. > > Because it's *needed* for pkg_config() to work... I know, but for scponly to work, no seperate user account is needed. > > I'll attach a patch to the ebuild, which will make it refrain from adding a user. > > No, that's wrong, see above. If you insist on not having a user, then move it > to pkg_config() and try if it works correctly. How would I need to modify the ebuild, so that no user account is created? Isn't that what I did with the attached patch? > > Lastly, the user home directory MIGHT be created in > > the wrong "hierarchy", as the ebuild will "statically" create the scponly home > > directory under /home. > > Yeah? What's wrong with /home? That's where user accounts go usually... Usually - yes. But you don't know for sure. If you insist on creating a user, you might want to parse /etc/login.defs All of this chroot setup does NOT belong to the ebuild. It should be something, that the user manually invokes, by executing something like /usr/share/doc/scponly/chroot-setup (or however it might be called). I do think so, because scponly works perfectly fine without this chroot. Or the other way around: chroot is just some optional setup and it should NOT be made mandatory. Anyway, because of the currently broken chroot setup, the scponly package cannot be installed right now.
(In reply to comment #3) > Try this: This works (tested), but it would still setup the unneccessary chroot. IMO it just does not belong into the ebuild, as scponly works perfectly fine without it. Shall I open a new bug for removing the unnecessary chroot setup?
Ah! Now I do understand... I was under the misimpression that pkg_config is automatically run when emerging. That's of course wrong. Everything's fine and perfect. Sorry for me being stupid.
Ping here, this is a trivial fix to move the user/group setup to pkg_postinst()
4.6-r1 in cvs.