I've emerged scponly-4.3 and tried to run the setup_chroot script, but it fails with # sh setup_chroot.sh grep: config.h: No such file or directory setup_chroot.sh: line 77: syntax error near unexpected token `fi' setup_chroot.sh: line 77: `fi' That section of the script is as follows: BINARIES=`/bin/grep '#define PROG_' config.h | /bin/cut -f2 -d\" | /bin/grep -v ^cd$` if [ `uname -s` = "OpenBSD" ]; then for bin in $BINARIES; do GREP_LIST="$GREP_LIST -e $bin" done LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /usr/bin/tr -s " " | /usr/bin/cut -f5 -d" " | /usr/bin/ grep -v "^Name" | /usr/bin/grep -v $GREP_LIST | /usr/bin/sort -u` elif LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /bin/cut -f2 -d\> | /bin/cut -f1 -d\( | /bin/grep "^ " | /bin/sort -u` fi <-----Line 77! I don't know if I need to change "#define PROG_" to something else or not... Thanks for any help! # emerge info Portage 2.0.53 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-gentoo-r5 x86_64) ================================================================= System uname: 2.6.14-gentoo-r5 x86_64 AMD Opteron(tm) Processor 246 Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 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.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=opteron -mtune=opteron -fomit-frame-pointer -Os -pipe" CHOST="x86_64-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/lib64/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvi pdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/co nfig/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d" CXXFLAGS="-march=opteron -mtune=opteron -fomit-frame-pointer -Os -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo http://mirrors.tds.net/gentoo ftp://gentoo.ccccom.com h ttp://www.ibiblio.org/pub/Linux/distributions/gentoo http://gentoo.osuosl.org" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 3xnowex X a52 aac acpi alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzip2 canvas cdr crypt cups curl dga directfb divx4linux dts dvd dvdr dvdread effects emboss encode esd etherea l exif expat extensions f77 fam fbcon ffmpeg fftw flac foomaticdb fortran gb gd gdbm gif glut gnome gnutls gpm gtk gtk2 gtkhtml h323 i8x0 idn imagemagick imlib inkjar insecure-savers ithreads java jce jpeg jpg junit kqemu lcms libgda libwww lirc live logitech-mouse logrotate lzw lzw-tiff mad maildir mjpeg mng motif mozcalendar mozi lla moznocompose moznoirc moznomail mozsvg mp3 mpeg mpi mpqc mysql mythtv ncurses netcdf network new-login nls no_wxgtk1 nptl nsplugin nvidia offensive ogg oggvorbis openal opengl pam pcre pdflib perl plotutils plugin png pnp pop ppds python quicktime readline recode rtc samba sasl sdl smp spell ssl startup-notification svg tcltk t cpd tetex threads tiff toolbar truetype truetype-fonts type1-fonts udev usb userlocales v4l v4l2 vorbis wmf xch attext xinetd xml xml2 xpm xprint xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Well, this can be easily fixed: --- setup_chroot.sh.orig 2006-01-02 14:58:42.000000000 +0100 +++ setup_chroot.sh 2006-01-02 14:55:54.000000000 +0100 @@ -72,7 +72,7 @@ GREP_LIST="$GREP_LIST -e $bin" done LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /usr/bin/tr -s " " | /usr/bin/cut -f5 -d" " | /usr/bin/grep -v "^Name" | /usr/bin/grep -v $GREP_LIST | /usr/bin/sort -u` -elif +else LIB_LIST=`/usr/bin/ldd $BINARIES 2> /dev/null | /bin/cut -f2 -d\> | /bin/cut -f1 -d\( | /bin/grep "^ " | /bin/sort -u` fi but won't get you very far anyway: # ./setup_chroot.sh grep: config.h: No such file or directory your scponly build is not configured for chrooted operation. please reconfigure as follows, then rebuild and reinstall: ./configure --enable-chrooted-binary (... other options) I'd personally like to see pkg_postinst() back in the ebuild, that worked *much* better.
scponly-4.6 has pkg_setup() back, so you can use 'emerge --config =net-misc/scponly-4.6' instead of the broken shell script.