pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39235: Unprivileged pkgsrc bootstrap fails on OpenSolaris 2008.05



>Number:         39235
>Category:       pkg
>Synopsis:       Unprivileged pkgsrc bootstrap fails on OpenSolaris 2008.05
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 28 05:30:00 +0000 2008
>Originator:     David H. Gutteridge
>Release:        OpenSolaris 2008.05
>Organization:
>Environment:


System: SunOS arcus-opensolaris 5.11 snv_86 i86pc i386 i86pc Solaris
Architecture: i386
Machine: i386
>Description:
When trying to bootstrap pkgsrc on OpenSolaris in unprivileged mode,
I'm encountering the following error:

disciple@arcus-opensolaris:~$ cd pkgsrc/bootstrap
disciple@arcus-opensolaris:~/pkgsrc/bootstrap$ ./bootstrap --unprivileged
===> bootstrap command: ./bootstrap --unprivileged
===> bootstrap started: Mon Jul 28 01:07:10 EDT 2008
Working directory is: /export/home/disciple/pkgsrc/bootstrap/work
===> running: /usr/xpg4/bin/sed -e 's|@DEFAULT_INSTALL_MODE@|'0755'|' 
/export/home/disciple/pkgsrc/sysutils/install-sh/files/install-sh.in > 
/export/home/disciple/pkgsrc/bootstrap/work/bin/install-sh
===> running: /usr/gnu/bin/chmod +x 
/export/home/disciple/pkgsrc/bootstrap/work/bin/install-sh
./bootstrap[770]: /usr/ucb/whoami: not found [No such file or directory]
===> building as unprivileged user /staff
===> Building libnbcompat
===> running: /usr/xpg4/bin/sh 
/export/home/disciple/pkgsrc/bootstrap/work/bin/install-sh -d -o  -g staff 
/export/home/disciple/pkgsrc/bootstrap/work/libnbcompat
chown: illegal option -- g
usage:
        chown [-fhR] owner[:group] file...
        chown -R [-f] [-H|-L|-P] owner[:group] file...
chown: illegal option -- g
usage:
        chown [-fhR] owner[:group] file...
        chown -R [-f] [-H|-L|-P] owner[:group] file...
===> exited with status 2
aborted.


>How-To-Repeat:
(As above.)

>Fix:
OpenSolaris seems to have effectively done away with the /usr/ucb/
binaries, and replaced them with /usr/gnu/bin/.  In the bootstrap
script, there's a hard-coded assumption that /usr/ucb/whoami exists,
which it does not on OpenSolaris 2008.05.

My patch below gets past that hurdle, and unprivileged builds seem to
work the same as privileged builds.  That is, there's another problem
I'm encountering that's common to both, I'll PR that one separately.

--- bootstrap~  2008-07-27 20:34:47.000000000 -0400
+++ bootstrap   2008-07-28 00:48:36.000000000 -0400
@@ -576,7 +576,13 @@
        need_sed=yes
        need_ksh=yes
        set_opsys=no
-       whoamiprog=/usr/ucb/whoami
+       if [ -x /usr/ucb/whoami ]; then
+               whoamiprog=/usr/ucb/whoami
+       elif [ -x /usr/gnu/bin/whoami ]; then
+               whoamiprog=/usr/gnu/bin/whoami
+       else
+               echo "WARNING: Could not find whoami(1)."
+       fi
        machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
        check_compiler=yes
        ;;


>Unformatted:
 
 


Home | Main Index | Thread Index | Old Index