Subject: Re: Best way to keep you pkgsrc software up2date
To: None <netbsd-users@NetBSD.org>
From: Christopher W. Richardson <cwr@nexthop.com>
List: netbsd-users
Date: 03/28/2005 15:55:31
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Greg Troxel <gdt@ir.bbn.com> writes:
> "Steven M. Bellovin" <smb@cs.columbia.edu> writes:
>
> > See pkg_comp, which will do builds in a chrooted environment.
> > But I've found it complex to set up.
>
> I was scared of pkg_comp for a while, but on digging in found that it
> wasn't so hard.
>
> [...]
>
> So, basically my advice is to just dig in calmy with the docs and
> trying it, and after half an hour you'll probably be doing
> fine.
Well, this sounded like a great idea, so I thought I'd give it a
try :)
Unfortunately, after much more than 1/2 an hour, I'm still not
doing fine. Well, maybe I'm doing fine, but I'm inexplicably
stuck.
There seems to be some issue during the creation of the root
environment, perhaps with the way it's trying to access the null
mounted directories:
cwr@achilles$pkg_comp makeroot
PKG_COMP ==> Creating sandbox `/localhome2/chroot/pkg_comp/default'
Extracting base.tgz...
Extracting comp.tgz...
Extracting etc.tgz...
Extracting text.tgz...
Extracting xbase.tgz...
Extracting xcomp.tgz...
Extracting xfont.tgz...
Extracting xserver.tgz...
Making device nodes...
Setting root's environment...
Setting up initial configuration...
PKG_COMP ==> Mounting sandboxed filesystems
PKG_COMP ==> Installing new `pkg-vulnerabilities' file
PKG_COMP ==> Checking if pkg_install is up to date
PKG_COMP ==> pkg_install is out of date; rebuilding
===> Checking for vulnerabilities in pkg_install-20050318
[...]
pkg_admin: Cannot chdir to /var/db/pkg: No such file or directory
[...]
/usr/bin/install -c -o root -g wheel -m 444 pkg_view.cat1 /usr/share/man/cat1/pkg_view.0
if [ ! -f /var/db/pkg/pkgdb.byfile.db ]; then if [ ! -d /var/
db/pkg ]; then install -d -o root -g wheel -m 755 /var
/db/pkg; fi;
PKG_DBDIR=/var/db/pkg /usr/sbin/pkg_admin rebuild;
fi
Stored 0 files from 0 packages in /var/db/pkg/pkgdb.byfile.db.
Done.
[...]
missing: ./share/skel (created)
/bin/sh ./mkinstalldirs /usr/pkg/bin
install -c -s -o root -g wheel -m 555 digest /usr/pkg/bin/digest
/bin/sh ./mkinstalldirs /usr/pkg/man/man1
install -c -o root -g wheel -m 444 digest.1 /usr/pkg/man/man1/digest.1
===> Registering installation for digest-20050323
===> Packaging digest-20050323
===> Building binary package for digest-20050323
mkdir: /pkg_comp/packages/All: Read-only file system
=> Can't create directory /pkg_comp/packages/All.
*** Error code 1
Am I missing something obvious? My pkg_comp conf file is
attached. This is on 2.0.2 i386. Any help would be much
appreciated.
Regards,
Chris
# -*- sh -*-
#
# pkg_comp - configuration file
# See pkg_comp(8) for a detailed description of each variable.
#
# Automatically created by create_pkg_comp_conf
#
# Variables used internally by pkg_comp.
AUTO_PACKAGES="security/audit-packages \
devel/autoconf213 \
www/firefox \
security/gnupg \
mail/gnus \
devel/libtool \
devel/libtool-base \
mail/mailcrypt \
pkgtools/pkg_install \
pkgtools/pkgdepgraph \
pkgtools/pkglint \
mail/spamassassin \
x11/xlockmore"
AUTO_TARGET="package"
BUILD_TARGET="package"
COPYROOTCFG="no"
DESTDIR="/localhome2/chroot/pkg_comp/default"
DISTRIBDIR="/localhome2/obj/releasedir/i386"
MOUNT_HOOKS=""
NETBSD_RELEASE="no"
REAL_CACHE=""
REAL_DISTFILES="/usr/pkgsrc/distfiles"
REAL_DISTFILES_OPTS="-t null -o rw"
REAL_PACKAGES="/usr/pkgsrc/packages"
REAL_PACKAGES_OPTS="-t null -o ro"
REAL_PKGSRC="/usr/pkgsrc"
REAL_PKGSRC_OPTS="-t null -o ro"
REAL_PKGVULNDIR="/usr/pkgsrc/distfiles"
REAL_SRC="/usr/src"
REAL_SRC_OPTS="-t null -o ro"
ROOTSHELL="/bin/ksh"
SETS="base.tgz comp.tgz etc.tgz text.tgz"
SETS_X11="xbase.tgz xcomp.tgz xetc.tgz xfont.tgz xserver.tgz"
SYNC_UMOUNT="no"
UMOUNT_HOOKS=""
# Default variables written to the generated mk.conf.
BSDSRCDIR="/usr/src"
CFLAGS=""
CLEANDEPENDS="yes"
CPPFLAGS=""
CXXFLAGS=""
DISTDIR="/pkg_comp/distfiles"
LOCALBASE="/usr/pkg"
MKOBJDIRS="yes"
PACKAGES="/pkg_comp/packages"
PKGSRC_COMPILER="gcc"
PKGVULNDIR="/usr/pkg/share"
PKG_DEVELOPER="yes"
PKG_SYSCONFBASE=""
USE_AUDIT_PACKAGES="yes"
USE_XPKGWEDGE="yes"
WRKDIR_BASENAME="default"
WRKOBJDIR="/pkg_comp/obj/pkgsrc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFCSG9AP65RBOOHTzERAnzmAKCDk8oWkaeT+Dcp7erjSt4wFeutjwCfT5SM
oCnd7nROEzmXmoD6yszm/JE=
=eRXI
-----END PGP SIGNATURE-----