[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible Archlinux: introduce user/group variation

Holger Levsen gitlab at salsa.debian.org
Fri Sep 28 21:50:52 BST 2018


Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
a2a503b7 by Holger Levsen at 2018-09-28T20:50:37Z
reproducible Archlinux: introduce user/group variation

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- bin/reproducible_build_archlinux_pkg.sh
- bin/reproducible_common.sh


Changes:

=====================================
bin/reproducible_build_archlinux_pkg.sh
=====================================
@@ -401,6 +401,9 @@ second_build() {
 	export LC_ALL="fr_CH.UTF-8"
 	umask 0002
 	__END__
+	# create group and user
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- groupadd build2
+	schroot --run-session -c $SESSION --directory "$BUILDDIR" -u root -- useradd -g build2 build2
 	# some more output for debugging
 	set -x
 	# remove possible lock in our local session (happens when root maintenance update running while session starts)
@@ -416,7 +419,7 @@ second_build() {
 	echo $VERSION > $TMPDIR/b2/$SRCPACKAGE/build2.version
 	# nicely run makepkg with a timeout of $TIMEOUT hours
 	timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
-		schroot --run-session -c $SESSION --directory "$BUILDDIR/$ACTUAL_SRCPACKAGE/trunk" -- bash -l -c "$MAKEPKG_ENV_VARS makepkg $MAKEPKG_OPTIONS 2>&1" | tee -a $LOG
+		schroot --run-session -c $SESSION --directory "$BUILDDIR/$ACTUAL_SRCPACKAGE/trunk" -u root -- su -c "bash -l -c '$MAKEPKG_ENV_VARS makepkg $MAKEPKG_OPTIONS 2>&1'" build2 | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
 		echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG


=====================================
bin/reproducible_common.sh
=====================================
@@ -486,6 +486,10 @@ write_variation_table() {
 		write_page "<tr><td>user's <a href="https://en.wikipedia.org/wiki/Gecos_field">GECOS</a></td><td>first user,first room,first work-phone,first home-phone,first other</td><td>second user,second room,second work-phone,second home-phone,second other</td></tr>"
 		write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=XXX\"<br />  XXX on amd64: 16 or 15<br />  XXX on i386: 10 or 9<br />  XXX on armhf: 8, 4 or 2</td><td>DEB_BUILD_OPTIONS=\"parallel=YYY\"<br />  YYY on amd64: 16 or 15 (!= the first build)<br />  YYY on i386: 10 or 9 (!= the first build)<br />  YYY is the same as XXX on arm64<br />  YYY on armhf: 8, 4, or 2 (not varied systematically)</td></tr>"
 		write_page "<tr><td>UTS namespace</td><td><em>shared with the host</em></td><td><em>modified using</em> /usr/bin/unshare --uts</td></tr>"
+	elif [ "$1" = "Arch Linux" ]  ; then
+		write_page "<tr><td>env USER</td><td>jenkins</td><td>build 2</td></tr>"
+		write_page "<tr><td>user/uid</td><td>jenkins/103</td><td>build2/1235</td></tr>"
+		write_page "<tr><td>group/gid</td><td>jenkins/105</td><td>build2/1235</td></tr>"
 	else
 		write_page "<tr><td>env USER</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"
 		write_page "<tr><td>uid</td><td colspan=\"2\"> is not yet varied between rebuilds of $1.</td></tr>"



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a2a503b762f2e2fb0e15f01d7468097858f3c2d6

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/a2a503b762f2e2fb0e15f01d7468097858f3c2d6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20180928/75fdb1d3/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list