Annotation of wikisrc/pkgsrc/how_to_do_an_unprivileged_bulk_build_on_irix.mdwn, revision 1.2

1.2     ! schmonz     1: First, I bootstrapped pkgsrc into $HOME/bulk:
        !             2: <pre><code>
        !             3: $ cd
        !             4: $ env \
        !             5:      CC=cc \
        !             6:      CXX=CC \
        !             7:      MIPSPROBASE=$HOME/mipspro-wrapper \
        !             8:      ./proj/pkgsrc/bootstrap/bootstrap \
        !             9:          --prefix=$HOME/bulk \
        !            10:          --unprivileged \
        !            11:          --compiler=mipspro \
        !            12:          --quiet
        !            13: ...
        !            14: </code></pre>
        !            15: Then, make a backup copy of LOCALBASE:
        !            16: 
        !            17:      $ tar cfz bulk.tar.gz bulk
        !            18: 
        !            19: It is a good idea to store all configuration files outside of *LOCALBASE*:
        !            20: 
        !            21:      $ mkdir bulk-etc
        !            22:      $ cp bulk/etc/mk.conf bulk-etc/.
        !            23: 
        !            24: Like on Solaris, I needed to comment out the *pre-build* script. The configuration files look similar to the ones from the Solaris build.
        !            25: 
        !            26: **Contents**
        !            27: 
        !            28: [[!toc]]
        !            29: 
        !            30: #build.conf
        !            31: <pre><code>
        !            32: osrev=`uname -r`
        !            33: arch=`uname -m`
        !            34: USR_PKGSRC="$HOME/proj/pkgsrc"
        !            35: MAKECONF="$HOME/bulk-etc/mk.conf"
        !            36: 
        !            37: PRUNEDISTFILES=no
        !            38: NICE_LEVEL="nice -n 20"
        !            39: LINTPKGSRC_CACHE=no
        !            40: ADMIN="rillig@localhost"
        !            41: ADMINSIG="- Roland"
        !            42: 
        !            43: REPORTS_DIR="$HOME/bulk-reports"
        !            44: REPORT_BASEDIR=`date +%Y%m%d.%H%M`
        !            45: REPORT_HTML_FILE="report.html"
        !            46: REPORT_TXT_FILE="report.txt"
        !            47: REPORTS_URL="file://$REPORTS_DIR"
        !            48: 
        !            49: UPDATE_VULNERABILITY_LIST=no
        !            50: PRUNEPACKAGES=no
        !            51: MKSUMS=no
        !            52: MKSUMMARY=no
        !            53: RSYNC_DST=none
        !            54: RSYNC_OPTS=none
        !            55: </code></pre>
        !            56: #mk.conf
        !            57: <pre><code>
        !            58: # Example /usr/people/rillig/bulk/etc/mk.conf file produced by bootstrap-pkgsrc
        !            59: # Wed Feb 21 07:42:55 EST 2007
        !            60: 
        !            61: .ifdef BSD_PKG_MK      # begin pkgsrc settings
        !            62: 
        !            63: OPSYS=                 IRIX
        !            64: ABI=                   64
        !            65: PKGSRC_COMPILER=       mipspro
        !            66: UNPRIVILEGED=          yes
        !            67: PKG_DBDIR=             /usr/people/rillig/bulk/var/db/pkg
        !            68: LOCALBASE=             /usr/people/rillig/bulk
        !            69: VARBASE=               /usr/people/rillig/bulk/var
        !            70: PKG_TOOLS_BIN=         /usr/people/rillig/bulk/sbin
        !            71: PKGMANDIR=             man
        !            72: 
        !            73: TOOLS_PLATFORM.install?=       /usr/people/rillig/pkg/bin/ginstall
        !            74: TOOLS_PLATFORM.sed?=           /usr/people/rillig/bulk/bin/nbsed
        !            75: FETCH_CMD=                     /usr/people/rillig/bulk/bin/ftp
        !            76: TOOLS_PLATFORM.pax?=           /usr/people/rillig/bulk/bin/pax
        !            77: TOOLS_PLATFORM.tar?=           /usr/people/rillig/bulk/bin/tar
        !            78: TOOLS_PLATFORM.mtree?=         /usr/people/rillig/bulk/sbin/mtree
        !            79: IMAKEOPTS+=            -DBuild64bit -DSgiISA64=4
        !            80: 
        !            81: DISTDIR=               /usr/people/rillig/distfiles
        !            82: PKG_DEVELOPER=         yes
        !            83: CC=                    cc
        !            84: CXX=                   CC
        !            85: CPP=                   cc -E
        !            86: CXXCPP=                        CC -E
        !            87: 
        !            88: MIPSPROBASE=           /usr/people/rillig/mipspro-wrapper
        !            89: TOOLS_PLATFORM.nroff=  /usr/people/rillig/pkg/bin/groff
        !            90: BULKFILESDIR=          /usr/people/rillig/bulk-logs
        !            91: PACKAGES=              /usr/people/rillig/bulk-packages
        !            92: WRKOBJDIR=             /usr/people/rillig/bulk-tmp
        !            93: 
        !            94: .endif                 # end pkgsrc settings
        !            95: </code></pre>
        !            96: 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*).
        !            97: <pre><code>
        !            98: $ screen -S bulk
        !            99: $ sh proj/pkgsrc/mk/bulk/build -c /usr/people/rillig/bulk-etc/build.conf
        !           100: ...
        !           101: BULK> Package bzip2-1.0.4 not built yet, packaging...
        !           102: /usr/people/rillig/pkg/bin/bmake bulk-package PRECLEAN=no
        !           103: ###
        !           104: ### Wed Feb 21 08:56:12 EST 2007
        !           105: ### pkgsrc build log for bzip2-1.0.4
        !           106: ###
        !           107: 
        !           108: bmake: exec(/bin/sh) failed (Arg list too long)
        !           109: *** Error code 1
        !           110: </code></pre>
        !           111: 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.
        !           112: #Some hours later
        !           113: 
        !           114: 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.
        !           115: 
        !           116: 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:
        !           117: <pre><code>
        !           118: BULK_PREREQ+=          pkgtools/bootstrap-mk-files
        !           119: BULK_PREREQ+=          pkgtools/tnftp
        !           120: BULK_PREREQ+=          pkgtools/mtree
        !           121: BULK_PREREQ+=          pkgtools/pax
        !           122: BULK_PREREQ+=          pkgtools/pkg_install
        !           123: BULK_PREREQ+=          sysutils/mtree
        !           124: 
        !           125: BULK_PREREQ+=          sysutils/checkperms
        !           126: </code></pre>
        !           127: #See also
        !           128: 
1.1       mspo      129: * [[pkgsrc/How to do an unprivileged bulk build on Solaris]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb