Subject: unprivileged pkgsrc vs. 'make replace'
To: None <tech-pkg@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 06/27/2005 02:41:21
I'm running pkgsrc unprivileged on Linux here, which works pretty fine so 
far - until I tried to update a package with 'make replace': After it 
insisting to install pkg_tarup (which was easy), I get:

 	fehu.org% make replace
 	===> *** No /home/feyrer/pkgsrc/distfiles/pkg-vulnerabilities file found,
 	===> *** skipping vulnerability checks. To fix, install
 	===> *** the pkgsrc/security/audit-packages package and run
 	===> *** '/home/feyrer/pkgsrc/../pkg/sbin/download-vulnerability-list'.
 	===> Replacing db4-4.3.28
 	===> Becoming root@m24s24 to replace db4.
 	/bin/sh *** WARNING - experimental target - data loss may be experienced
 	***
 	Becoming root@m24s24 to create a binary package
 	/bin/sh Becoming root@m24s24 to create a binary package
 	/bin/sh Becoming root@m24s24 to create a binary package
 	/bin/sh Becoming root@m24s24 to create a binary package
loop =>	...
 	/bin/sh Becoming root@m24s24 to create a binary package
 	/home/feyrer/pkgsrc/../pkg/bin/pkg_tarup: fork: Resource temporarily
 	unavailable
 	 /usr/bin/xargs: cannot fork: Resource temporarily unavailable
 	*** Error code 123

I have no idea what's happening in that loop here, but it's probably 
something in the su-on-demand code that's blowing up.

FWIW, I'll attach my $MAKECONF below.

Any ideas?


  - Hubert

MY_NAME!=       whoami
MY_GROUP!=      groups | sed 's/ .*$$//'
MY_OS!=         uname -s
MY_HOME=        ${HOME}/pkgsrc

BINOWN=         ${MY_NAME}
BINGRP=         ${MY_GROUP}
SHAREOWN=       ${MY_NAME}
SHAREGRP=       ${MY_GROUP}
MANOWN=         ${MY_NAME}
MANGRP=         ${MY_GROUP}

WRKOBJDIR=      ${MY_HOME}/obj
PKG_DBDIR=      ${MY_HOME}/db/pkg
OBJMACHINE=     1
DISTDIR=        ${MY_HOME}/distfiles
PACKAGES=       ${MY_HOME}/packages

# X needs xpkgwedge installed!
LOCALBASE=      ${MY_HOME}/../pkg
VARBASE=        ${MY_HOME}/../var

SU_CMD=         /bin/sh -c
FETCH_CMD=      ${LOCALBASE}/bin/ftp
PAX=            ${LOCALBASE}/bin/pax
CHOWN=          true
CHGRP=          true
BINMODE=        755                     # for Solaris strip(1)

# For apache (needs patch to use VARDIR):
APACHE_USER=    ${MY_NAME}
APACHE_GROUP=   ${MY_GROUP}

# Licenses:
ACCEPTABLE_LICENSES+=pine-license
ACCEPTABLE_LICENSES+=no-profit




# Other - HF:
IGNORE_RECOMMENDED=yes