Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

Debian distro

2,529 bytes added, 21:45, 24 June 2019
Pbuilder
if you're idea is build ubuntu packages then you need install other packages
<pre>sudo apt-get install build-essential devscripts dh-make quilt autogen autoconf dh-autoreconf dh-buildinfo dh-make pkg-configkernel-package debootstrap
</pre>
A [https://wiki.ubuntu.com/PbuilderHowto pbuilder] environment is a chrooted environment which can have a different distro series or architecture than your host system.
<pre>sudo apt-get install pbuilderpbuilder-scripts qemu-user-static debian-keyring debian-archive-keyring ubuntu-keyring emdebian-archive-keyring debian-ports-archive-keyring</pre> Create ~/.pbuilderrc file with your own pbuilder setup script, upu can use below script: <pre class="brush:bash/shell"># !/bin/shset -eif [ "$OS" == "debian" ]; then MIRRORSITE="http://ftp.no.debian.org/debian/" COMPONENTS="main contrib non-free" DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg") : ${DIST:="wheezy"} : ${ARCH:="amd64"} if [ "$DIST" == "wheezy" ]; then #EXTRAPACKAGES="$EXTRAPACKAGES debian-backports-keyring" OTHERMIRROR="$OTHERMIRROR | deb $MIRRORSITE wheezy-backports $COMPONENTS" fielif [ "$OS" == "raspbian" ]; then MIRRORSITE="http://ftp.acc.umu.se/mirror/raspbian/raspbian/" COMPONENTS="main contrib non-free" DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg") : ${DIST:="wheezy"} : ${ARCH:="armhf"}elif [ "$OS" == "ubuntu" ]; then MIRRORSITE="http://no.archive.ubuntu.com/ubuntu/" COMPONENTS="main restricted universe multiverse" DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")else echo "Unknown OS: $OS" exit 1fiif [ "$DIST" == "" ]; then echo "DIST is not set" exit 1fiif [ "$ARCH" == "" ]; then echo "ARCH is not set" exit 1fiNAME="$OS-$DIST-$ARCH"if [ "$ARCH" == "armel" ] && [ "$(dpkg --print-architecture)" != "armel" ]; then DEBOOTSTRAP="qemu-debootstrap"fiif [ "$ARCH" == "armhf" ] && [ "$(dpkg --print-architecture)" != "armhf" ]; then DEBOOTSTRAP="qemu-debootstrap"fiDEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--arch=$ARCH")BASETGZ="/var/cache/pbuilder/$NAME-base.tgz"DISTRIBUTION="$DIST"BUILDRESULT="/var/cache/pbuilder/$NAME/result/"APTCACHE="/var/cache/pbuilder/$NAME/aptcache/"BUILDPLACE="/var/cache/pbuilder/build"HOOKDIR="/var/cache/pbuilder/hook.d/"</pre> The .pbuilderrc file cares about three environment variables: OS: Either debian, raspbian, or ubuntuDIST: For example wheezy, jessie, trusty, stretch ...ARCH: For example amd64, i386, armel, or armhf Examples: <pre>sudo OS=debian DIST=wheezy ARCH=amd64 pbuilder --createsudo OS=debian DIST=wheezy ARCH=i386 pbuilder --createsudo OS=debian DIST=wheezy ARCH=armel pbuilder --createsudo OS=debian DIST=wheezy ARCH=armhf pbuilder --create</pre>