[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible: use proxy only for apt, but don't set http_proxy environment variable. see #780587 for more info

Holger Levsen holger at moszumanska.debian.org
Sat Mar 28 15:33:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit d9b4628aa1ca8bfeeef7c521990a67f2c5b56db6
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Mar 28 16:33:21 2015 +0100

    reproducible: use proxy only for apt, but don't set http_proxy environment variable. see #780587 for more info
---
 bin/d-i_build.sh                   | 6 +++---
 bin/d-i_manual.sh                  | 6 +++---
 bin/reproducible_setup_pbuilder.sh | 8 +++++---
 etc/pbuilderrc                     | 4 +++-
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh
index 0e53866..922ca71 100755
--- a/bin/d-i_build.sh
+++ b/bin/d-i_build.sh
@@ -48,11 +48,11 @@ pdebuild_package() {
 	# prepare build
 	#
 	if [ ! -f /var/cache/pbuilder/base.tgz ] ; then
-		sudo pbuilder --create
+		sudo pbuilder --create --http-proxy $http_proxy
 	else
 		ls -la /var/cache/pbuilder/base.tgz
 		file /var/cache/pbuilder/base.tgz
-		sudo pbuilder --update || ( sudo rm /var/cache/pbuilder/base.tgz ; sudo pbuilder --create )
+		sudo pbuilder --update --http-proxy $http_proxy || ( sudo rm /var/cache/pbuilder/base.tgz ; sudo pbuilder --create )
 	fi
 	#
 	# 3.0 quilt is not happy without an upstream tarball
@@ -71,7 +71,7 @@ pdebuild_package() {
 	else
 		NUM_CPU=1
 	fi
-	pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU -b"
+	pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU -b" --http-proxy $http_proxy
 	# cleanup
 	echo
 	cat /var/cache/pbuilder/result/${SOURCE}_*changes
diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh
index d68491d..4e80692 100755
--- a/bin/d-i_manual.sh
+++ b/bin/d-i_manual.sh
@@ -37,9 +37,9 @@ pdebuild_package() {
 	# prepare build
 	#
 	if [ -f /var/cache/pbuilder/base.tgz ] ; then
-		sudo pbuilder --create
+		sudo pbuilder --create --http-proxy $http_proxy
 	else
-		sudo pbuilder --update
+		sudo pbuilder --update --http-proxy $http_proxy
 	fi
 
 	#
@@ -47,7 +47,7 @@ pdebuild_package() {
 	#
 	cd manual
 	NUM_CPU=$(cat /proc/cpuinfo |grep ^processor|wc -l)
-	pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU"
+	pdebuild --use-pdebuild-internal --debbuildopts "-j$NUM_CPU" --http-proxy $http_proxy
 	#
 	# publish and cleanup
 	#
diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh
index 189ebeb..667e465 100755
--- a/bin/reproducible_setup_pbuilder.sh
+++ b/bin/reproducible_setup_pbuilder.sh
@@ -88,9 +88,11 @@ setup_pbuilder() {
 		echo "echo 'deb $MIRROR experimental main' > /etc/apt/sources.list.d/experimental.list" > ${TMPFILE}
 		echo "echo 'deb-src $MIRROR experimental main' >> /etc/apt/sources.list.d/experimental.list" >> ${TMPFILE}
 	fi
+	# use host apt proxy configuration for pbuilder too
+	echo "echo '$(cat /etc/apt/apt.conf.d/80proxy)' > /etc/apt/apt.conf.d/80proxy" >> ${TMPFILE}
 	create_setup_tmpfile ${TMPFILE} "${PACKAGES}"
-	sudo pbuilder --create --basetgz /var/cache/pbuilder/${NAME}-new.tgz --distribution $SUITE
-	sudo pbuilder --execute --save-after-exec --basetgz /var/cache/pbuilder/${NAME}-new.tgz -- ${TMPFILE} | tee ${LOG}
+	sudo pbuilder --create --http-proxy $http_proxy --basetgz /var/cache/pbuilder/${NAME}-new.tgz --distribution $SUITE
+	sudo pbuilder --execute --http-proxy $http_proxy --save-after-exec --basetgz /var/cache/pbuilder/${NAME}-new.tgz -- ${TMPFILE} | tee ${LOG}
 	echo
 	echo "Now let's see whether the correct packages where installed..."
 	for PKG in ${PACKAGES} ; do
@@ -109,7 +111,7 @@ setup_pbuilder() {
 #
 update_pbuilder() {
 	NAME=$1
-	sudo pbuilder --update --basetgz /var/cache/pbuilder/${NAME}.tgz
+	sudo pbuilder --update --http-proxy $http_proxy --basetgz /var/cache/pbuilder/${NAME}.tgz
 }
 
 #
diff --git a/etc/pbuilderrc b/etc/pbuilderrc
index 491441c..e21c1ae 100644
--- a/etc/pbuilderrc
+++ b/etc/pbuilderrc
@@ -7,8 +7,10 @@
 MIRRORSITE=http://ftp.de.debian.org/debian/
 EXTRAPACKAGES="fakeroot"
 APTCACHE=""
-export http_proxy="http://localhost:3128"
 COMPRESSPROG="pigz"
+# unset proxy, see #780587
+unset http_proxy
+export -n http_proxy
 # remove /run/shm bindmount once we are running jessie - this is a workaround for #700591
 # /sys and /proc were added as workarounds for #773767
 BINDMOUNTS="$BINDMOUNTS /run/shm /dev/shm /sys"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list