Annotation of wikisrc/pkgsrc/how_to_do_an_unprivileged_bulk_build_on_solaris.mdwn, revision 1.1
1.1 ! mspo 1: First, I bootstrapped pkgsrc into the directory /usr/pkg/2006Q4.
! 2:
! 3: $HOME/proj/pkgsrc/bootstrap/bootstrap --prefix=/usr/pkg/2006Q4 --unprivileged --compiler=sunpro
! 4: mkdir /usr/pkg/2006Q4/etc
! 5: mv work/mk.conf.example /usr/pkg/2006Q4/etc/mk.conf
! 6:
! 7: Then I made a backup of that directory. You can never know. :)
! 8:
! 9: cd /usr/pkg && gtar cfz 2006Q4.tar.gz 2006Q4
! 10:
! 11: Since in a previous try, the pre-build program had removed the pkgsrc directory, I just commented it out by inserting an exit 0 in line 2. Since now there is no danger that anything in that directory is deleted, I could edit the mk.conf file and adjust some local settings.
! 12: #/usr/pkg/2006Q4/mk.conf
! 13: <pre><code>
! 14: # Example /usr/pkg/2006Q4/etc/mk.conf file produced by bootstrap-pkgsrc
! 15: # Tue Jan 9 13:01:49 CET 2007
! 16:
! 17: .ifdef BSD_PKG_MK # begin pkgsrc settings
! 18:
! 19: PKGSRC_COMPILER= sunpro
! 20: UNPRIVILEGED= yes
! 21: PKG_DBDIR= /usr/pkg/2006Q4/var/db/pkg
! 22: LOCALBASE= /usr/pkg/2006Q4
! 23: VARBASE= /usr/pkg/2006Q4/var
! 24: PKG_TOOLS_BIN= /usr/pkg/2006Q4/sbin
! 25: PKGMANDIR= man
! 26:
! 27: TOOLS_PLATFORM.awk?= /usr/pkg/2006Q4/bin/nawk
! 28: TOOLS_PLATFORM.sed?= /usr/pkg/2006Q4/bin/nbsed
! 29: FETCH_CMD= /usr/pkg/2006Q4/bin/ftp
! 30: TOOLS_PLATFORM.pax?= /usr/pkg/2006Q4/bin/pax
! 31: TOOLS_PLATFORM.tar?= /usr/pkg/2006Q4/bin/tar
! 32: TOOLS_PLATFORM.mtree?= /usr/pkg/2006Q4/sbin/mtree
! 33:
! 34: DISTDIR= /usr/pkg/distfiles
! 35: PACKAGES= /usr/pkg/2006Q4-packages
! 36:
! 37: PKG_DEVELOPER= yes
! 38:
! 39: CC= cc
! 40: CXX= CC
! 41: CPP= cc -E
! 42: CXXCPP= CC -E
! 43:
! 44: SUNWSPROBASE= /local/SUNWspro
! 45: USE_LANGUAGES+= c99
! 46:
! 47: TOOLS_PLATFORM.nroff= /opt/bin/groff
! 48:
! 49: .endif # end pkgsrc settings
! 50: </code></pre>
! 51: /usr/pkg/2006Q4/build.conf
! 52: <pre><code>
! 53: # $NetBSD: build.conf-example,v 1.36 2006/06/02 22:01:46 dillo Exp $
! 54: #
! 55:
! 56: osrev=`uname -r`
! 57: arch=`uname -m`
! 58: USR_PKGSRC="$HOME/proj/pkgsrc"
! 59: MAKECONF="/usr/pkg/2006Q4/etc/mk.conf"
! 60:
! 61: PRUNEDISTFILES=no
! 62: NICE_LEVEL="nice -n 20"
! 63: LINTPKGSRC_CACHE=no
! 64:
! 65: ADMIN="1illig@informatik.uni-hamburg.de"
! 66: ADMINSIG="- Roland"
! 67:
! 68: REPORTS_DIR="/usr/pkg/2006Q4-pkgstat"
! 69: REPORT_BASEDIR=`date +%Y%m%d.%H%M`
! 70: REPORT_HTML_FILE="report.html"
! 71: REPORT_TXT_FILE="report.txt"
! 72: REPORTS_URL="file://$REPORTS_DIR"
! 73:
! 74: UPDATE_VULNERABILITY_LIST=yes
! 75: PRUNEPACKAGES=yes
! 76: MKSUMS=yes
! 77: MKSUMMARY=no
! 78: RSYNC_DST=ftp.NetBSD.org:/pub/NetBSD/packages/pkgsrc-200xQy/NetBSD-a.b.c/i386
! 79: RSYNC_OPTS='-e ssh'
! 80: </code></pre>
! 81: I began to setup the bulk build environment in a screen.
! 82:
! 83: $ screen -S <ulk-2006Q4
! 84: $ sh ./proj/pkgsrc/mk/bulk/build -c /usr/pkg/2006Q4/etc/build.conf
! 85:
! 86: It seems to work, and I'm waiting for the package databases to be generated. But since I have a T2000 here, I'm thinking about parallelizing the work. For generating the databases, the two "make" processes could be run completely in parallel, making use of 12000 processors. :)
! 87:
! 88: In the main phase, all packages that have the exact same dependencies can be built in parallel, but must be still installed one after another.
! 89: #Help, my files are being removed
! 90:
! 91: When I had started the bulk build, it complained that it couldn't find /usr/pkg/2006Q4/bin/nawk anymore. But looking at the backup I made above, I say that it had been there after bootstrapping. The simple solution to this was to change the tools definitions in mk.conf so that they point to tools outside ${LOCALBASE}:
! 92: <pre><code>
! 93: TOOLS_PLATFORM.awk= /usr/pkg/current/bin/nawk
! 94: TOOLS_PLATFORM.sed?= /usr/pkg/current/bin/nbsed
! 95: FETCH_CMD= /usr/pkg/current/bin/ftp
! 96: TOOLS_PLATFORM.pax?= /usr/pkg/current/bin/pax
! 97: TOOLS_PLATFORM.tar?= /usr/pkg/current/bin/tar
! 98: TOOLS_PLATFORM.mtree?= /usr/pkg/current/sbin/mtree
! 99: </code></pre>
! 100: Luckily, bin/bmake is not registered as belonging to any package, so it hasn't been removed yet.
! 101:
! 102: The bulk build also tried to deinstall the infrastructure packages, so I had to protect them against that:
! 103: <pre><code>
! 104: BULK_PREREQ+= pkgtools/bootstrap-mk-files
! 105: BULK_PREREQ+= pkgtools/tnftp
! 106: BULK_PREREQ+= pkgtools/mtree
! 107: BULK_PREREQ+= pkgtools/pax
! 108: BULK_PREREQ+= pkgtools/pkg_install
! 109: BULK_PREREQ+= sysutils/mtree
! 110:
! 111: BULK_PREREQ+= sysutils/checkperms
! 112: </code></pre>
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb