[Qa-jenkins-scm] [jenkins.debian.net] 02/06: reproducible Arch Linux: setting http proxy in pacman.conf
Holger Levsen
holger at layer-acht.org
Thu Nov 23 08:56:56 UTC 2017
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 b01a1739e0a317a0869e4999d7f745520e908911
Author: anthraxx <levente at leventepolyak.net>
Date: Thu Nov 23 00:56:41 2017 +0100
reproducible Arch Linux: setting http proxy in pacman.conf
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
bin/reproducible_setup_archlinux_schroot.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/bin/reproducible_setup_archlinux_schroot.sh b/bin/reproducible_setup_archlinux_schroot.sh
index b461791..84b4a2f 100755
--- a/bin/reproducible_setup_archlinux_schroot.sh
+++ b/bin/reproducible_setup_archlinux_schroot.sh
@@ -91,6 +91,8 @@ tee $SCHROOT_BASE/$TARGET/etc/profile.d/proxy.sh <<-__END__
export no_proxy="localhost,127.0.0.1"
__END__
chmod 755 $SCHROOT_BASE/$TARGET/etc/profile.d/proxy.sh
+sed -i "s|^#XferCommand = /usr/bin/curl -C|XferCommand = /usr/bin/curl -C --proxy $http_proxy|" "$SCHROOT_BASE/$TARGET/etc/pacman.conf"
+
# configure root user to use this for shells and login shells…
echo ". /etc/profile.d/proxy.sh" | tee -a $SCHROOT_BASE/$TARGET/root/.bashrc
@@ -105,8 +107,8 @@ echo "Server = $ARCHLINUX_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGE
perl -0777 -i -pe 's/#\[multilib\]\n#Include = \/etc\/pacman.d\/mirrorlist/[multilib]\nInclude = \/etc\/pacman.d\/mirrorlist/igs' $SCHROOT_BASE/$TARGET/etc/pacman.conf
if [ "$HOSTNAME" = "profitbricks-build4-amd64" ] ; then
# disable signature verification so packages won't fail to install when setting the time to +$x years
- sed -i 's/^SigLevel\s*=.*/SigLevel = Never/' "$SCHROOT_BASE/$TARGET/etc/pacman.conf"
- sed -i 's/^#*XferCommand.*/XferCommand = curl --insecure -C - -f %u > %o/' "$SCHROOT_BASE/$TARGET/etc/pacman.conf"
+ sed -i 's/^#?SigLevel\s*=.*/SigLevel = Never/g' "$SCHROOT_BASE/$TARGET/etc/pacman.conf"
+ sed -i "s|^XferCommand = /usr/bin/curl -C|XferCommand = /usr/bin/curl --insecure -C|" "$SCHROOT_BASE/$TARGET/etc/pacman.conf"
fi
$ROOTCMD bash -l -c 'pacman -Syu --noconfirm'
$ROOTCMD bash -l -c 'pacman -S --noconfirm base-devel devtools fakechroot asciidoc asp'
@@ -175,7 +177,8 @@ $ROOTCMD sed -i "s|/usr/bin/curl |/usr/bin/curl -k |" /etc/makepkg.conf
if [ "$HOSTNAME" = "profitbricks-build4-amd64" ] ; then
# disable signature verification so packages won't fail to install when setting the time to +$x years
- $ROOTCMD sed -i 's/^#?SigLevel\s*=.*/SigLevel = Never/' /etc/pacman.conf
+ $ROOTCMD sed -i 's/^#?SigLevel\s*=.*/SigLevel = Never/g' /etc/pacman.conf
+ $ROOTCMD sed -i "s|^XferCommand = /usr/bin/curl -C|XferCommand = /usr/bin/curl --insecure -C|" /etc/pacman.conf
fi
echo "schroot $TARGET set up successfully in $SCHROOT_BASE/$TARGET - exiting now."
--
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