[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: s#arch#archlinux# everywhere, update TODO

Holger Levsen holger at moszumanska.debian.org
Thu Dec 10 12:13:18 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 8e2e7367d16f6f9da30bf9c465084b83b4422104
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Dec 10 13:13:01 2015 +0100

    reproducible archlinux: s#arch#archlinux# everywhere, update TODO
---
 TODO                                        | 14 ++++----------
 bin/common-functions.sh                     |  4 ++--
 bin/reproducible_build_archlinux_pkg.sh     | 12 ++++++------
 bin/reproducible_setup_archlinux_schroot.sh | 14 +++++++-------
 4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/TODO b/TODO
index 0e1608b..8595b3e 100644
--- a/TODO
+++ b/TODO
@@ -325,23 +325,17 @@ This is about Debian, below are more todo entries for other projects…
 * the job to bootstrap an arch schroot needs to be made idempotent
 ** needs to download bootstrap.tar.gz sig and verify
 ** once this has been done, run it more often than once a year
-* use regular maintenace job to update the arch schroot: 'schroot --directory /tmp -c source:jenkins-reproducible-arch -u root -- pacman -Syu --noconfirm'
+* use regular maintenace job to update the arch schroot: 'schroot --directory /tmp -c source:jenkins-reproducible-archlinux -u root -- pacman -Syu --noconfirm'
 * arch build.sh:
 ** introduce more variations: USER
 ** confirm the others are really working
 ** 'makepkg --skippgpcheck' should be replaced by 'makepkg' and 'echo "keyserver-options auto-key-retrieve" >> ~/.gnupg/gpg.conf'
-*** this should make this obselete: 'schroot --directory /tmp -c source:jenkins-reproducible-arch -- grep  ^validpgpkeys= $PKG/PKGBUILD|cut -d "'" -f2|xargs schroot --directory /tmp -c source:jenkins-reproducible-arch -- gpg --recv-keys'
+*** this should make this obselete: 'schroot --directory /tmp -c source:jenkins-reproducible-archlinux -- grep  ^validpgpkeys= $PKG/PKGBUILD|cut -d "'" -f2|xargs schroot --directory /tmp -c source:jenkins-reproducible-archlinux -- gpg --recv-keys'
 ** on SIGTERM, also ssh to remote host and cleanup there! (via ssh &)
-* create a working scheduler job
-** test 'extra' too
-** idea: reschedule reverse build depends too
-* more random notes:
-** rename arch scripts and jobs to archlinux
-*** remember to adopt cleanup_schroot_sessions() in common_functions.sh when renaming the schroots
-** use archlinux.css not the one from freebsd :)
-*** use arch logo
+* test 'extra' too
 * put results in a db
 ** graph results
+* idea: reschedule reverse build depends too
 
 ----
 notes on source and binary versions:
diff --git a/bin/common-functions.sh b/bin/common-functions.sh
index fb79dc1..d828ce9 100755
--- a/bin/common-functions.sh
+++ b/bin/common-functions.sh
@@ -141,14 +141,14 @@ cleanup_schroot_sessions() {
 	for loop in $(seq 0 40) ; do
 		# first, check if no process using "schroot" is running, if thats the case, loop through all schroot sessions:
 		# arch sessions are ignored, because they are handled properly
-		pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:arch"||true) ; do
+		pgrep -f "schroot --directory" || for i in $(schroot --all-sessions -l |grep -v "session:archlinux"||true) ; do
 			# then, check that schroot is still not run, and then delete the session
 			if [ -z $i ] ; then
 				continue
 			fi
 			pgrep -f "schroot --directory" || schroot -e -c $i
 		done
-		RESULT=$(schroot --all-sessions -l|grep -v "session:arch"||true)
+		RESULT=$(schroot --all-sessions -l|grep -v "session:archlinux"||true)
 		if [ -z "$RESULT" ] ; then
 			echo "No schroot sessions in use atm..."
 			echo
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index de39c45..64c49f4 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -16,7 +16,7 @@ cleanup_all() {
 	cd
 	# delete session if it still exists
 	if [ "$MODE" != "master" ] ; then
-		schroot --end-session -c arch-$SRCPACKAGE-$(basename $TMPDIR) > /dev/null 2>&1 || true
+		schroot --end-session -c archlinux-$SRCPACKAGE-$(basename $TMPDIR) > /dev/null 2>&1 || true
 	fi
 	# delete makepkg build dir
 	if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then
@@ -46,7 +46,7 @@ choose_package() {
 	if [ ! -f $ARCHLINUX_PKGS ] || [ $DUMMY -nt $ARCHLINUX_PKGS ] ; then
 		echo "$(date -u ) - updating list of available packages."
 		local SESSION="archlinux-scheduler-$RANDOM"
-		schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+		schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
 		schroot --run-session -c $SESSION --directory /var/abs/core -- ls -1|sort -R|xargs echo > $ARCHLINUX_PKGS
 		schroot --end-session -c $SESSION
 	fi
@@ -82,10 +82,10 @@ first_build() {
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
 	set -x
-	local SESSION="arch-$SRCPACKAGE-$(basename $TMPDIR)"
+	local SESSION="archlinux-$SRCPACKAGE-$(basename $TMPDIR)"
 	local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
-	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
 	echo "MAKEFLAGS=-j$NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/makepkg.conf
 	schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR
 	schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE $BUILDDIR/
@@ -109,11 +109,11 @@ second_build() {
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
 	set -x
-	local SESSION="arch-$SRCPACKAGE-$(basename $TMPDIR)"
+	local SESSION="archlinux-$SRCPACKAGE-$(basename $TMPDIR)"
 	local BUILDDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b2/$SRCPACKAGE/build2.log
 	NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
-	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch
+	schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-archlinux
 	echo "MAKEFLAGS=-j$NEW_NUM_CPU" | schroot --run-session -c $SESSION --directory /tmp -u root -- tee -a /etc/makepkg.conf
 	schroot --run-session -c $SESSION --directory /tmp -- mkdir $BUILDDIR
 	schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE $BUILDDIR/
diff --git a/bin/reproducible_setup_archlinux_schroot.sh b/bin/reproducible_setup_archlinux_schroot.sh
index c2022b6..3e90bdc 100755
--- a/bin/reproducible_setup_archlinux_schroot.sh
+++ b/bin/reproducible_setup_archlinux_schroot.sh
@@ -4,7 +4,7 @@
 # released under the GPLv=2
 
 #
-# downloads an arch bootstrap chroot archive, then turns it into an schroot,
+# downloads an archlinux bootstrap chroot archive, then turns it into an schroot,
 # then configures pacman and abs
 #
 
@@ -13,11 +13,11 @@ DEBUG=false
 common_init "$@"
 
 # define archlinux mirror to be used
-ARCH_MIRROR=http://mirror.one.com/archlinux/
+ARCHLINUX_MIRROR=http://mirror.one.com/archlinux/
 
 bootstrap() {
 	# define URL for bootstrap.tgz
-	BOOTSTRAP_BASE=$ARCH_MIRROR/iso/
+	BOOTSTRAP_BASE=$ARCHLINUX_MIRROR/iso/
 	echo "$(date -u) - downloading Arch Linux latest/sha1sums.txt"
 	BOOTSTRAP_DATE=$(curl $BOOTSTRAP_BASE/latest/sha1sums.txt 2>/dev/null| grep x86_64.tar.gz| cut -d " " -f3|cut -d "-" -f3|egrep '[0-9.]{9}')
 	if [ -z $BOOTSTRAP_DATE ] ; then
@@ -59,12 +59,12 @@ cleanup() {
 
 SCHROOT_TARGET=$(mktemp -d -p $SCHROOT_BASE/ schroot-install-$TARGET-XXXX)
 trap cleanup INT TERM EXIT
-TARGET=reproducible-arch
+TARGET=reproducible-archlinux
 bootstrap
 trap - INT TERM EXIT
 
-ROOTCMD="schroot --directory /tmp -c source:jenkins-reproducible-arch -u root --"
-USERCMD="schroot --directory /tmp -c source:jenkins-reproducible-arch -u jenkins --"
+ROOTCMD="schroot --directory /tmp -c source:jenkins-reproducible-archlinux -u root --"
+USERCMD="schroot --directory /tmp -c source:jenkins-reproducible-archlinux -u jenkins --"
 
 # configure proxy everywhere
 tee $SCHROOT_BASE/$TARGET/etc/profile.d/proxy.sh <<-__END__
@@ -84,7 +84,7 @@ echo ". /etc/profile.d/proxy.sh" | tee -a $SCHROOT_BASE/$TARGET/root/.bashrc
 # configure pacman
 $ROOTCMD bash -l -c 'pacman-key --init'
 $ROOTCMD bash -l -c 'pacman-key --populate archlinux'
-echo "Server = $ARCH_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGET/etc/pacman.d/mirrorlist
+echo "Server = $ARCHLINUX_MIRROR/\$repo/os/\$arch" | tee -a $SCHROOT_BASE/$TARGET/etc/pacman.d/mirrorlist
 $ROOTCMD bash -l -c 'pacman -Syu --noconfirm'
 $ROOTCMD bash -l -c 'pacman -S --noconfirm base-devel devtools abs'
 # configure abs

-- 
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