diff options
author | Christoph Berg | 2015-12-16 06:45:19 +0000 |
---|---|---|
committer | Christoph Berg | 2015-12-16 06:45:19 +0000 |
commit | c25a163f0e080c06033403e9ae22b95525c2633d (patch) | |
tree | 8f29595130f2e2c85f0bc8f99676d265b2f21f36 | |
parent | ec8ad205441b8b774352c1cffce6711389b02244 (diff) |
newpid -N support
-rwxr-xr-x | jenkins/netns-setup | 15 | ||||
-rwxr-xr-x | jenkins/sbuild-package | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/jenkins/netns-setup b/jenkins/netns-setup index 58ac06a..0fadb2a 100755 --- a/jenkins/netns-setup +++ b/jenkins/netns-setup @@ -24,13 +24,16 @@ for dist in $DISTS; do ip link set $ceth netns $ns ip a add $prefix.$net.1/24 dev $veth ip link set $veth up - ip netns exec $ns \ - ip link set lo up - ip netns exec $ns \ - ip a add $prefix.$net.2/24 dev $ceth - ip netns exec $ns \ - ip link set $ceth up + ip netns exec $ns ip link set lo up + ip netns exec $ns ip a add $prefix.$net.2/24 dev $ceth + ip netns exec $ns ip link set $ceth up + ip netns exec $ns ip r add default via $prefix.$net.1 net=$((net + 1)) done done + +iptables -vnL FORWARD | grep -q 'veth+' || \ + iptables -A FORWARD -i veth+ -j ACCEPT +iptables -t nat -vnL POSTROUTING | grep -q 'MASQUERADE' || \ + iptables -t nat -A POSTROUTING -o wlan2 -j MASQUERADE diff --git a/jenkins/sbuild-package b/jenkins/sbuild-package index 784ce25..90af0f6 100755 --- a/jenkins/sbuild-package +++ b/jenkins/sbuild-package @@ -49,8 +49,10 @@ schroot -l | grep -q $chroot || \ # decide if we should build arch:all packages case $architecture in amd64) + BITS=64 ARCH_ALL="--arch-all" ;; # always build arch:all binaries here *) + BITS=32 if egrep -q '^Testsuite: autopkgtest$' $DSC; then echo "Package has Testsuite: autopkgtest, will build arch:all binaries even on $architecture. We'll throw them away at the end." ARCH_ALL="--arch-all" @@ -95,6 +97,7 @@ umask 002 echo "Bulding $PACKAGE (DEB_PG_SUPPORTED_VERSIONS=$DEB_PG_SUPPORTED_VERSIONS)" set -x flock --shared 9 + newpid -iuN newpid$distribution$BITS \ sbuild --nolog --batch \ -d $distribution-pgdg --arch $architecture ${ARCH_ALL:-} ${RESOLVE_ALTERNATIVES:-} \ --finished-build-commands="${FINISHED_BUILD_COMMAND:-}" \ |