Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125796 - scponly fails to be installed: A shell was specified but it does not exist !
Summary: scponly fails to be installed: A shell was specified but it does not exist !
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-11 00:57 UTC by Alexander Skwar
Modified: 2006-05-19 22:37 UTC (History)
1 user (show)

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


Attachments
Patch removing the chroot stuff from the ebuild (scponly-no-chroot.patch,2.17 KB, patch)
2006-03-11 01:01 UTC, Alexander Skwar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Skwar 2006-03-11 00:57:08 UTC
>>> 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
Comment 1 Alexander Skwar 2006-03-11 01:01:30 UTC
Created attachment 81898 [details, diff]
Patch removing the chroot stuff from the ebuild

With this patch, scponly can be installed just fine.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-03-11 01:05:46 UTC
(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.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-03-11 01:35:04 UTC
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>
Comment 4 Alexander Skwar 2006-03-11 01:37:52 UTC
(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.
Comment 5 Alexander Skwar 2006-03-11 01:43:18 UTC
(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?

Comment 6 Alexander Skwar 2006-03-11 01:45:41 UTC
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.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-05-07 15:22:36 UTC
Ping here, this is a trivial fix to move the user/group setup to pkg_postinst()
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2006-05-19 22:37:42 UTC
4.6-r1 in cvs.