[asterisk-commits] pabelanger: branch pabelanger/chroot-1.8 r373186 - /team/pabelanger/chroot-1....

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 19 14:48:22 CDT 2012


Author: pabelanger
Date: Wed Sep 19 14:48:17 2012
New Revision: 373186

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373186
Log:
Lets setup some chroots


Added:
    team/pabelanger/chroot-1.8/tools/
    team/pabelanger/chroot-1.8/tools/depends.sh   (with props)
    team/pabelanger/chroot-1.8/tools/pbuilder.sh   (with props)
    team/pabelanger/chroot-1.8/tools/pbuilderrc   (with props)

Added: team/pabelanger/chroot-1.8/tools/depends.sh
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/chroot-1.8/tools/depends.sh?view=auto&rev=373186
==============================================================================
--- team/pabelanger/chroot-1.8/tools/depends.sh (added)
+++ team/pabelanger/chroot-1.8/tools/depends.sh Wed Sep 19 14:48:17 2012
@@ -1,0 +1,17 @@
+#!/bin/sh
+set -x
+PWD=$1
+
+cd ${PWD}
+
+PACKAGES="ccache subversion wget libncurses-dev libz-dev libssl-dev libxml2-dev"
+PACKAGES="$PACKAGES"
+
+apt-get -y install ${PACKAGES}
+
+./configure --enable-dev-mode
+make NOISY_BUILD=yes
+make NOISY_BUILD=yes install
+make NOISY_BUILD=yes samples
+make NOISY_BUILD=yes clean
+make NOISY_BUILD=yes distclean

Propchange: team/pabelanger/chroot-1.8/tools/depends.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/pabelanger/chroot-1.8/tools/depends.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/pabelanger/chroot-1.8/tools/depends.sh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/pabelanger/chroot-1.8/tools/depends.sh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/pabelanger/chroot-1.8/tools/pbuilder.sh
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/chroot-1.8/tools/pbuilder.sh?view=auto&rev=373186
==============================================================================
--- team/pabelanger/chroot-1.8/tools/pbuilder.sh (added)
+++ team/pabelanger/chroot-1.8/tools/pbuilder.sh Wed Sep 19 14:48:17 2012
@@ -1,0 +1,25 @@
+#!/bin/sh
+set -x
+
+#sudo apt-get update
+#sudo apt-get install build-essential pbuilder debian-archive-keyring ccache
+
+PBUILDER_DIR="${HOME}/.cache/pbuilder"
+
+if ! [ -d ${PBUILDER_DIR}/ccache ]; then
+	mkdir -p ${PBUILDER_DIR}/ccache
+fi
+if ! [ -d ${PBUILDER_DIR}/hook.d ]; then
+	mkdir -p ${PBUILDER_DIR}/hook.d
+fi
+
+cp tools/pbuilderrc ${HOME}/.pbuilderrc
+
+for x in precise; do
+	for y in i386 amd64; do
+		if ! [ -f ${PBUILDER_DIR}/${x}-${y}-base.tgz ]; then
+			sudo DIST=${x} ARCH=${y} pbuilder create
+		fi
+		sudo DIST=${x} ARCH=${y} pbuilder execute tools/depends.sh $PWD
+	done;
+done

Propchange: team/pabelanger/chroot-1.8/tools/pbuilder.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/pabelanger/chroot-1.8/tools/pbuilder.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/pabelanger/chroot-1.8/tools/pbuilder.sh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/pabelanger/chroot-1.8/tools/pbuilder.sh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: team/pabelanger/chroot-1.8/tools/pbuilderrc
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/chroot-1.8/tools/pbuilderrc?view=auto&rev=373186
==============================================================================
--- team/pabelanger/chroot-1.8/tools/pbuilderrc (added)
+++ team/pabelanger/chroot-1.8/tools/pbuilderrc Wed Sep 19 14:48:17 2012
@@ -1,0 +1,89 @@
+export CCACHE_DIR="${HOME}/.cache/pbuilder/ccache"
+export PATH="/usr/lib/ccache:${PATH}"
+EXTRAPACKAGES="ccache"
+BINDMOUNTS="${CCACHE_DIR} ${PWD}"
+ 
+# Codenames for Debian suites according to their alias. Update these when
+# needed.
+UNSTABLE_CODENAME="sid"
+TESTING_CODENAME="wheezy"
+STABLE_CODENAME="squeeze"
+OLDSTABLE_CODENAME="lenny"
+STABLE_BACKPORTS_SUITE="$STABLE_CODENAME-backports"
+  
+# List of Debian suites.
+DEBIAN_SUITES=($UNSTABLE_CODENAME $TESTING_CODENAME $STABLE_CODENAME $OLDSTABLE_CODENAME
+    "unstable" "testing" "stable" "oldstable")
+  
+# List of Ubuntu suites. Update these when needed.
+UBUNTU_SUITES=("precise" "oneiric" "natty" "maverick" "lucid")
+  
+# Mirrors to use. Update these to your preferred mirror.
+DEBIAN_MIRROR="ftp.us.debian.org"
+UBUNTU_MIRROR="mirrors.kernel.org"
+  
+# Optionally use the changelog of a package to determine the suite to use if
+# none set.
+if [ -z "${DIST}" ] && [ -r "debian/changelog" ]; then
+    DIST=$(dpkg-parsechangelog | awk '/^Distribution: / {print $2}')
+    # Use the unstable suite for certain suite values.
+    if $(echo "experimental UNRELEASED" | grep -q $DIST); then
+        DIST="$UNSTABLE_CODENAME"
+    fi
+fi
+  
+# Optionally set a default distribution if none is used. Note that you can set
+# your own default (i.e. ${DIST:="unstable"}).
+: ${DIST:="$(lsb_release --short --codename)"}
+  
+# Optionally change Debian release states in $DIST to their names.
+case "$DIST" in
+    unstable)
+        DIST="$UNSTABLE_CODENAME"
+        ;;
+    testing)
+        DIST="$TESTING_CODENAME"
+        ;;
+    stable)
+        DIST="$STABLE_CODENAME"
+        ;;
+    oldstable)
+        DIST="$OLDSTABLE_CODENAME"
+        ;;
+esac
+  
+# Optionally set the architecture to the host architecture if none set. Note
+# that you can set your own default (i.e. ${ARCH:="i386"}).
+: ${ARCH:="$(dpkg --print-architecture)"}
+  
+NAME="$DIST"
+if [ -n "${ARCH}" ]; then
+    NAME="$NAME-$ARCH"
+    DEBOOTSTRAPOPTS=("--arch" "$ARCH" "${DEBOOTSTRAPOPTS[@]}")
+fi
+ 
+DEBBUILDOPTS="-b"
+if [ "${ARCH}" == "i386" ]; then
+    DEBBUILDOPTS="-B"
+fi
+ 
+BASETGZ="${HOME}/.cache/pbuilder/$NAME-base.tgz"
+DISTRIBUTION="$DIST"
+BUILDRESULT="${HOME}/.cache/pbuilder/$NAME/result/"
+APTCACHE="${HOME}/.cache/pbuilder/$NAME/aptcache/"
+BUILDPLACE="${HOME}/.cache/pbuilder/build/"
+  
+if $(echo ${DEBIAN_SUITES[@]} | grep -q $DIST); then
+    # Debian configuration
+    MIRRORSITE="http://$DEBIAN_MIRROR/debian/"
+    COMPONENTS="main contrib non-free"
+    DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/debian-archive-keyring.gpg")
+elif $(echo ${UBUNTU_SUITES[@]} | grep -q $DIST); then
+    # Ubuntu configuration
+    MIRRORSITE="http://$UBUNTU_MIRROR/ubuntu/"
+    COMPONENTS="main universe"
+    DEBOOTSTRAPOPTS=("${DEBOOTSTRAPOPTS[@]}" "--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg")
+else
+    echo "Unknown distribution: $DIST"
+    exit 1
+fi

Propchange: team/pabelanger/chroot-1.8/tools/pbuilderrc
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/pabelanger/chroot-1.8/tools/pbuilderrc
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/pabelanger/chroot-1.8/tools/pbuilderrc
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list