* pbulk TODO: - Ascertain whether deduplication between /pkg/* has any value. - Remember when creating netbsd chroots to run MAKEDEV all. - Mount /distfiles/shared read-only and /distfiles/20xxQy read-write. - Fix @CHOWN@ in pbuild script. - Run bootstrap unprivileged? $ cd ~/pkgsrc/git/pkgsrc $ git branch pkgsrc-2020Q2-base origin/pkgsrc-2020Q2 $ git worktree add -b pkgsrc-2020Q2 ../2020Q2 pkgsrc-2020Q2-base $ su - # zfs create rpool/pbulk/2020Q2 # zfs create rpool/pbulk/2020Q2/bulkbuild # chown pbulk:pbulk /pbulk/2020Q2 /pbulk/2020Q2/bulkbuild # mkdir /distfiles/2020Q2 # chown pbulk:pbulk /distfiles/2020Q2 # mkdir /pkgsrc/2020Q2 # mount -t null -o ro,nodev,nosuid ~riastradh/pkgsrc/git/2020Q2 /pkgsrc/2020Q2 # PS1=' pbulk$ ' su -m pbulk pbulk$ cat >/pbulk/2020Q2/mk.conf-fragment PKGSRC_BRANCH= 2020Q2 ALLOW_VULNERABLE_PACKAGES= yes BINPKG_SITES= # empty FAILOVER_FETCH= yes FETCH_TIMEOUT= 1800 MAKE_JOBS= 12 PASSIVE_FETCH= yes PKG_DEVELOPER= yes #.if defined(PKGPATH) && ${PKGPATH} == "sysutils/dbus" #PKG_FAIL_REASON+= "dbus delenda est" #.endif X11_TYPE= modular DIST_PATH= /distfiles/shared DISTDIR= /distfiles/${PKGSRC_BRANCH} PACKAGES= /pbulk/${PKGSRC_BRANCH}/packages PKGSRCDIR= /pkgsrc/${PKGSRC_BRANCH} WRKOBJDIR= /tmp/pbulk/${PKGSRC_BRANCH} ^D pbulk$ cd /pkgsrc/2020Q2 pbulk$ time nice -n +10 env -i PATH=/bin:/usr/bin ./bootstrap/bootstrap --gzip-binary-kit /pbulk/2020Q2/bootstrap.tgz --make-jobs 12 --mk-fragment /pbulk/2020Q2/mk.conf-fragment --prefix /pbulk/2020Q2/pkg --unprivileged --workdir /tmp/pbulk/boot-2020Q2 pbulk$ (cd pkgtools/pkg_chk && time nice -n +10 env -i PATH=/bin:/usr/bin:/pbulk/2020Q2/pkg/bin bmake bin-install) pbulk$ cat >/pbulk/2020Q2/pkg/etc/pkgchk.conf net/rsync pkgtools/libkver pkgtools/pbulk pkgtools/pkg_chk ^D pbulk$ time nice -n +10 env -i PATH=/bin:/usr/bin:/pbulk/2020Q2/pkg/bin:/pbulk/2020Q2/pkg/sbin pkg_chk -absu pbulk$ diff3 -m /pbulk/2020Q1/pkg/etc/pbulk.conf /pbulk/2020Q1/pkg/share/examples/pbulk/pbulk.conf /pbulk/2020Q2/pkg/share/examples/pbulk/pbulk.conf > /pbulk/2020Q2/pkg/etc/pbulk.conf pbulk$ edit /pbulk/2020Q2/pkg/etc/pbulk.conf # resolve conflicts # zfs create rpool/pkg/2020Q2 # zfs create rpool/pkgbuild/9/2020Q2 # zfs clone rpool/chroot/nbsd9@20200419 rpool/pkgbuild/9/2020Q2/master # ln -sfh 9.0 /pkgbuild/9/2020Q2/master/libkver_osrelease # mkdir /pkgbuild/9/2020Q2/master/distfiles # mkdir /pkgbuild/9/2020Q2/master/pbulk # mkdir /pkgbuild/9/2020Q2/master/pbulk/2020Q2 # mkdir /pkgbuild/9/2020Q2/master/pbulk/2020Q2/pkg # mkdir /pkgbuild/9/2020Q2/master/pbulk/2020Q2/bulkbuild # mkdir /pkgbuild/9/2020Q2/master/pkg # mkdir /pkgbuild/9/2020Q2/master/pkg/2020Q2 # mkdir /pkgbuild/9/2020Q2/master/pkgsrc # mkdir /pkgbuild/9/2020Q2/master/pkgsrc/2020Q2 # chroot /pkgbuild/9/2020Q2/master useradd -u `id -u pbulk` -g =uid -d /pbulk pbulk # mount -t null -o ro,nodev,nosuid ~riastradh/pkgsrc/git/2020Q2 /pkgbuild/9/2020Q2/master/pkgsrc/2020Q2 # mount -t null -o ro,nodev,nosuid /pbulk/2020Q2/pkg /pkgbuild/9/2020Q2/master/pbulk/2020Q2/pkg # mount -t null -o rw,nodev,nosuid /pbulk/2020Q2/bulkbuild /pkgbuild/9/2020Q2/master/pbulk/2020Q2/bulkbuild # mount -t null -o rw,nodev,nosuid /distfiles /pkgbuild/9/2020Q2/master/distfiles Create /pbulk/2020Q2/bulkbuild/mk.conf-fragment. # mkdir /pkgbuild/9/2020Q2/master/tmp/pkgbuild # chown pbulk:pbulk /pkgbuild/9/2020Q2/master/tmp/pkgbuild # chroot /pkgbuild/9/2020Q2/master sh -c 'cd /pkgsrc/2020Q2 && time nice -n +10 env -i PATH=/bin:/usr/bin ./bootstrap/bootstrap --gzip-binary-kit /pbulk/2020Q2/bulkbuild/bootstrap.tgz --make-jobs 12 --mk-fragment /pbulk/2020Q2/bulkbuild/mk.conf-fragment --prefix /pkg/2020Q2 --workdir /tmp/pkgbuild/boot-2020Q2' # progress -zf /pbulk/2020Q2/bulkbuild/bootstrap.tgz tar -C / -xpf - # mkdir /pbulk/2020Q2/bulkbuild/packages # mkdir /pbulk/2020Q2/bulkbuild/packages/All # zfs snap -r rpool/pkgbuild/9/2020Q2/master@20200718 # for i in `jot 24 0`; do zfs clone rpool/pkgbuild/9/2020Q2/master@20200718 rpool/pkgbuild/9/2020Q2/$i; done # for i in `jot 24 0`; do chown pbulk:pbulk /pkgbuild/9/2020Q2/$i/tmp/pkgbuild; done # for i in `jot 24 0`; do mount -t null -o ro,nodev,nosuid ~riastradh/pkgsrc/git/2020Q2 /pkgbuild/9/2020Q2/$i/pkgsrc/2020Q2; done # for i in `jot 24 0`; do mount -t null -o ro,nodev,nosuid /pbulk/2020Q2/pkg /pkgbuild/9/2020Q2/$i/pbulk/2020Q2/pkg; done # for i in `jot 24 0`; do mount -t null -o rw,nodev,nosuid /pbulk/2020Q2/bulkbuild /pkgbuild/9/2020Q2/$i/pbulk/2020Q2/bulkbuild; done # for i in `jot 24 0`; do mount -t null -o rw,nodev,nosuid /distfiles /pkgbuild/9/2020Q2/$i/distfiles; done # time nice -n +15 env -i PATH=/bin:/sbin:/usr/bin:/usr/sbin:/pbulk/2020Q2/pkg/bin SHELL=/bin/sh /pbulk/2020Q2/pkg/bin/bulkbuild-restart