--- wikisrc/pkgsrc/how_to_do_an_unprivileged_bulk_build_on_irix.mdwn 2011/11/20 20:28:27 1.1 +++ wikisrc/pkgsrc/how_to_do_an_unprivileged_bulk_build_on_irix.mdwn 2012/02/05 07:14:36 1.2 @@ -1,129 +1,129 @@ -First, I bootstrapped pkgsrc into $HOME/bulk: -

-$ cd
-$ env \
-     CC=cc \
-     CXX=CC \
-     MIPSPROBASE=$HOME/mipspro-wrapper \
-     ./proj/pkgsrc/bootstrap/bootstrap \
-         --prefix=$HOME/bulk \
-         --unprivileged \
-         --compiler=mipspro \
-         --quiet
-...
-
-Then, make a backup copy of LOCALBASE: - - $ tar cfz bulk.tar.gz bulk - -It is a good idea to store all configuration files outside of *LOCALBASE*: - - $ mkdir bulk-etc - $ cp bulk/etc/mk.conf bulk-etc/. - -Like on Solaris, I needed to comment out the *pre-build* script. The configuration files look similar to the ones from the Solaris build. - -**Contents** - -[[!toc]] - -#build.conf -

-osrev=`uname -r`
-arch=`uname -m`
-USR_PKGSRC="$HOME/proj/pkgsrc"
-MAKECONF="$HOME/bulk-etc/mk.conf"
-
-PRUNEDISTFILES=no
-NICE_LEVEL="nice -n 20"
-LINTPKGSRC_CACHE=no
-ADMIN="rillig@localhost"
-ADMINSIG="- Roland"
-
-REPORTS_DIR="$HOME/bulk-reports"
-REPORT_BASEDIR=`date +%Y%m%d.%H%M`
-REPORT_HTML_FILE="report.html"
-REPORT_TXT_FILE="report.txt"
-REPORTS_URL="file://$REPORTS_DIR"
-
-UPDATE_VULNERABILITY_LIST=no
-PRUNEPACKAGES=no
-MKSUMS=no
-MKSUMMARY=no
-RSYNC_DST=none
-RSYNC_OPTS=none
-
-#mk.conf -

-# Example /usr/people/rillig/bulk/etc/mk.conf file produced by bootstrap-pkgsrc
-# Wed Feb 21 07:42:55 EST 2007
-
-.ifdef BSD_PKG_MK	# begin pkgsrc settings
-
-OPSYS=			IRIX
-ABI=			64
-PKGSRC_COMPILER=	mipspro
-UNPRIVILEGED=		yes
-PKG_DBDIR=		/usr/people/rillig/bulk/var/db/pkg
-LOCALBASE=		/usr/people/rillig/bulk
-VARBASE=		/usr/people/rillig/bulk/var
-PKG_TOOLS_BIN=		/usr/people/rillig/bulk/sbin
-PKGMANDIR=		man
-
-TOOLS_PLATFORM.install?=	/usr/people/rillig/pkg/bin/ginstall
-TOOLS_PLATFORM.sed?=		/usr/people/rillig/bulk/bin/nbsed
-FETCH_CMD=			/usr/people/rillig/bulk/bin/ftp
-TOOLS_PLATFORM.pax?=		/usr/people/rillig/bulk/bin/pax
-TOOLS_PLATFORM.tar?=		/usr/people/rillig/bulk/bin/tar
-TOOLS_PLATFORM.mtree?=		/usr/people/rillig/bulk/sbin/mtree
-IMAKEOPTS+=		-DBuild64bit -DSgiISA64=4
-
-DISTDIR=		/usr/people/rillig/distfiles
-PKG_DEVELOPER=		yes
-CC=			cc
-CXX=			CC
-CPP=			cc -E
-CXXCPP=			CC -E
-
-MIPSPROBASE=		/usr/people/rillig/mipspro-wrapper
-TOOLS_PLATFORM.nroff=	/usr/people/rillig/pkg/bin/groff
-BULKFILESDIR=		/usr/people/rillig/bulk-logs
-PACKAGES=		/usr/people/rillig/bulk-packages
-WRKOBJDIR=		/usr/people/rillig/bulk-tmp
-
-.endif			# end pkgsrc settings
-
-To get a usable environment, I have built some package before in $HOME/pkg, so that I can link to them (for example *ginstall* and *groff*). -

-$ screen -S bulk
-$ sh proj/pkgsrc/mk/bulk/build -c /usr/people/rillig/bulk-etc/build.conf
-...
-BULK> Package bzip2-1.0.4 not built yet, packaging...
-/usr/people/rillig/pkg/bin/bmake bulk-package PRECLEAN=no
-###
-### Wed Feb 21 08:56:12 EST 2007
-### pkgsrc build log for bzip2-1.0.4
-###
-
-bmake: exec(/bin/sh) failed (Arg list too long)
-*** Error code 1
-
-Grmpf. IRIX has only 20k for the command line and the environment, and that gets filled pretty quickly. Let's see what's the cause for that. It's the command starting with "${RUN} set +e;" and going until the lonely "fi" in line 534. That's pretty much. Since I don't know how to break that into smaller chunks, I stop here. -#Some hours later - -I've made some progress. I didn't rewrite the bulk builds but simply patched bmake to create a temporary file and write the overly long command lines there when an execve fails due to E2BIG. I applied [this patch](ftp://ftp.netbsd.org/pub/pkgsrc/misc/rillig/bmake-irix.patch) in the devel/bmake directory and re-ran bootstrap. Things seem to work now. - -At least, [lang/perl](http://pkgsrc.se/lang/perl) is building, which takes some time. Not to speak of the database generation that follows. Meanwhile, I'm adding the following to the [[pkgsrc/mk.conf]] file, just as in the Solaris bulk build: -

-BULK_PREREQ+=		pkgtools/bootstrap-mk-files
-BULK_PREREQ+=		pkgtools/tnftp
-BULK_PREREQ+=		pkgtools/mtree
-BULK_PREREQ+=		pkgtools/pax
-BULK_PREREQ+=		pkgtools/pkg_install
-BULK_PREREQ+=		sysutils/mtree
-
-BULK_PREREQ+=		sysutils/checkperms
-
-#See also - +First, I bootstrapped pkgsrc into $HOME/bulk: +

+$ cd
+$ env \
+     CC=cc \
+     CXX=CC \
+     MIPSPROBASE=$HOME/mipspro-wrapper \
+     ./proj/pkgsrc/bootstrap/bootstrap \
+         --prefix=$HOME/bulk \
+         --unprivileged \
+         --compiler=mipspro \
+         --quiet
+...
+
+Then, make a backup copy of LOCALBASE: + + $ tar cfz bulk.tar.gz bulk + +It is a good idea to store all configuration files outside of *LOCALBASE*: + + $ mkdir bulk-etc + $ cp bulk/etc/mk.conf bulk-etc/. + +Like on Solaris, I needed to comment out the *pre-build* script. The configuration files look similar to the ones from the Solaris build. + +**Contents** + +[[!toc]] + +#build.conf +

+osrev=`uname -r`
+arch=`uname -m`
+USR_PKGSRC="$HOME/proj/pkgsrc"
+MAKECONF="$HOME/bulk-etc/mk.conf"
+
+PRUNEDISTFILES=no
+NICE_LEVEL="nice -n 20"
+LINTPKGSRC_CACHE=no
+ADMIN="rillig@localhost"
+ADMINSIG="- Roland"
+
+REPORTS_DIR="$HOME/bulk-reports"
+REPORT_BASEDIR=`date +%Y%m%d.%H%M`
+REPORT_HTML_FILE="report.html"
+REPORT_TXT_FILE="report.txt"
+REPORTS_URL="file://$REPORTS_DIR"
+
+UPDATE_VULNERABILITY_LIST=no
+PRUNEPACKAGES=no
+MKSUMS=no
+MKSUMMARY=no
+RSYNC_DST=none
+RSYNC_OPTS=none
+
+#mk.conf +

+# Example /usr/people/rillig/bulk/etc/mk.conf file produced by bootstrap-pkgsrc
+# Wed Feb 21 07:42:55 EST 2007
+
+.ifdef BSD_PKG_MK	# begin pkgsrc settings
+
+OPSYS=			IRIX
+ABI=			64
+PKGSRC_COMPILER=	mipspro
+UNPRIVILEGED=		yes
+PKG_DBDIR=		/usr/people/rillig/bulk/var/db/pkg
+LOCALBASE=		/usr/people/rillig/bulk
+VARBASE=		/usr/people/rillig/bulk/var
+PKG_TOOLS_BIN=		/usr/people/rillig/bulk/sbin
+PKGMANDIR=		man
+
+TOOLS_PLATFORM.install?=	/usr/people/rillig/pkg/bin/ginstall
+TOOLS_PLATFORM.sed?=		/usr/people/rillig/bulk/bin/nbsed
+FETCH_CMD=			/usr/people/rillig/bulk/bin/ftp
+TOOLS_PLATFORM.pax?=		/usr/people/rillig/bulk/bin/pax
+TOOLS_PLATFORM.tar?=		/usr/people/rillig/bulk/bin/tar
+TOOLS_PLATFORM.mtree?=		/usr/people/rillig/bulk/sbin/mtree
+IMAKEOPTS+=		-DBuild64bit -DSgiISA64=4
+
+DISTDIR=		/usr/people/rillig/distfiles
+PKG_DEVELOPER=		yes
+CC=			cc
+CXX=			CC
+CPP=			cc -E
+CXXCPP=			CC -E
+
+MIPSPROBASE=		/usr/people/rillig/mipspro-wrapper
+TOOLS_PLATFORM.nroff=	/usr/people/rillig/pkg/bin/groff
+BULKFILESDIR=		/usr/people/rillig/bulk-logs
+PACKAGES=		/usr/people/rillig/bulk-packages
+WRKOBJDIR=		/usr/people/rillig/bulk-tmp
+
+.endif			# end pkgsrc settings
+
+To get a usable environment, I have built some package before in $HOME/pkg, so that I can link to them (for example *ginstall* and *groff*). +

+$ screen -S bulk
+$ sh proj/pkgsrc/mk/bulk/build -c /usr/people/rillig/bulk-etc/build.conf
+...
+BULK> Package bzip2-1.0.4 not built yet, packaging...
+/usr/people/rillig/pkg/bin/bmake bulk-package PRECLEAN=no
+###
+### Wed Feb 21 08:56:12 EST 2007
+### pkgsrc build log for bzip2-1.0.4
+###
+
+bmake: exec(/bin/sh) failed (Arg list too long)
+*** Error code 1
+
+Grmpf. IRIX has only 20k for the command line and the environment, and that gets filled pretty quickly. Let's see what's the cause for that. It's the command starting with "${RUN} set +e;" and going until the lonely "fi" in line 534. That's pretty much. Since I don't know how to break that into smaller chunks, I stop here. +#Some hours later + +I've made some progress. I didn't rewrite the bulk builds but simply patched bmake to create a temporary file and write the overly long command lines there when an execve fails due to E2BIG. I applied [this patch](ftp://ftp.netbsd.org/pub/pkgsrc/misc/rillig/bmake-irix.patch) in the devel/bmake directory and re-ran bootstrap. Things seem to work now. + +At least, [lang/perl](http://pkgsrc.se/lang/perl) is building, which takes some time. Not to speak of the database generation that follows. Meanwhile, I'm adding the following to the [[pkgsrc/mk.conf]] file, just as in the Solaris bulk build: +

+BULK_PREREQ+=		pkgtools/bootstrap-mk-files
+BULK_PREREQ+=		pkgtools/tnftp
+BULK_PREREQ+=		pkgtools/mtree
+BULK_PREREQ+=		pkgtools/pax
+BULK_PREREQ+=		pkgtools/pkg_install
+BULK_PREREQ+=		sysutils/mtree
+
+BULK_PREREQ+=		sysutils/checkperms
+
+#See also + * [[pkgsrc/How to do an unprivileged bulk build on Solaris]] \ No newline at end of file