Bug#363088: pbuilder: please add example script for cross-arch support i386/amd64

Andres Mejia mcitadel at gmail.com
Sat Jan 5 06:13:09 UTC 2008


This isn't an example script but an example configuration that could
be used to allow maintaining multiple pbuilders with different archs
and distro bases. You would basically set the variables DIST with the
distribution to use and ARCH with the architecture to use.

This comes from https://wiki.ubuntu.com/PbuilderHowto

if [ -n "${DIST}" ] ; then
        NAME="$DIST"
        if [ -n "${ARCH}" ] ; then
                NAME="$NAME-$ARCH"
                DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
                export DEBIAN_BUILDARCH="$ARCH"
        fi
        BASETGZ="`dirname $BASETGZ`/$NAME-base.tgz"
        DISTRIBUTION="$DIST"
        BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
        APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"

        case "$DIST" in
                hardy|gutsy)
                        # ubuntu specific
                        MIRRORSITE="http://us.archive.ubuntu.com/ubuntu"
                        COMPONENTS="main restricted universe multiverse"
                        ;;
                sid|etch)
                        # debian specific
                        MIRRORSITE="http://http.us.debian.org/debian/"
                        COMPONENTS="main contrib non-free"
                        fi
                        ;;
                "*")
                        echo "Unknown distribution: $DIST"
                        exit 1
                        ;;
        esac
fi

-- 
Regards,
Andres Mejia





More information about the Pbuilder-maint mailing list