[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible Debian rebuilder 'thing': add some code comments
Holger Levsen
gitlab at salsa.debian.org
Thu Apr 30 23:18:33 BST 2020
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
f4733b9f by Holger Levsen at 2020-04-30T23:49:35+02:00
reproducible Debian rebuilder 'thing': add some code comments
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
93287f6d by Holger Levsen at 2020-05-01T00:18:18+02:00
reproducible Debian rebuilder 'thing': query a random (amd64) .buildinfo file from builtin-pho db and try to build that
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_debian_rebuilder_prototype.sh
Changes:
=====================================
bin/reproducible_debian_rebuilder_prototype.sh
=====================================
@@ -47,19 +47,28 @@ set_poolpath() {
}
#
-# main: this is basically a description of the steps to use debrebuild today...
+# define what to rebuild
#
-PKG='bash'
-VERSION='5.0-6'
-FILE="${PKG}_${VERSION}_amd64.buildinfo"
-POOLPATH="" # declared as a global variable
-set_poolpath $PKG # so we can set it here with a function
-URLPATH="https://buildinfos.debian.net/buildinfo-pool/$POOLPATH/$PKG"
+# query a random .buildinfo file path from builtin-pho db
+BUILTINPHOPATH=$(psql -A -t -c 'SELECT path FROM builds WHERE arch_amd64=true ORDER BR RANDOM() limit 1')
+FILE="$(echo $BUILTINPHOPATH | cut -d '/' -f5-)"
+PKG="$(echo $FILE | cut -d '_' -f1)"
+VERSION="$(echo $FILE | cut -d '_' -f2)"
+POOLPATH="" # declared as a global variable
+set_poolpath $PKG # so we can set it here with a function
+FTPMASTERPATH="$(echo $BUILTINPHOPATH | cut -d '/' -f2-)"
+URLPATH="https://buildinfos.debian.net/ftp-master.debian.org/buildinfo/$FTPMASTERPATH/$PKG"
+
+# NOPE: and do cleanup on pb7
# hack, should be done better, also with cleanup *after* the job run...
mkdir $PKG || (rm $PKG -r ; mkdir $PKG)
cd $PKG
+#
+# main: this is basically a description of the steps to use debrebuild today...
+#
+
# use gpg here to workaround #955050 in devscripts: debrebuild: please accepted signed .buildinfo files
output_echo "downloading $URLPATH/$FILE"
# FIXME: this will fail with unsigned .buildinfo files
@@ -78,7 +87,7 @@ output_echo "trying to debrebuild $PKG"
# FIXME: file a bug like '#955123 debrebuild: please provide --sbuild-output-only option' but with --output-only-base-release
# (parsing the debrebuild output to gather this information is way to fragile)
-DISTRO=bullseye
+DISTRO=bullseye # NOPE
output_echo "preparing chroot for $DISTRO"
# "|| true" is dummy code for regenerating this chroot every other week or so
sudo sbuild-createchroot $DISTRO /schroots/debrebuild-$DISTRO-amd64 http://deb.debian.org/debian || true
@@ -90,7 +99,7 @@ echo 'Acquire::Check-Valid-Until "false";' | sudo tee /schroots/debrebuild-$DIST
# I guess I think it would be nice if debrebuild would also do this:
# FIXME: file another wishlist bug?
output_echo "fetching source package $PKG"
-dget https://deb.debian.org/debian/pool/main/$POOLPATH/$PKG/${PKG}_5.0-6.dsc
+dget https://deb.debian.org/debian/pool/main/$POOLPATH/$PKG/${PKG}_$VERSION.dsc
# actually run sbuild
# - workaround #955123 in devscripts: debrebuild: please provide --sbuild-output-only option
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/7304a64bdc7c5c1931fea5c8f49e1078d1cada9b...93287f6d63d7b96c4b9343b05c0990edd0d055c2
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/7304a64bdc7c5c1931fea5c8f49e1078d1cada9b...93287f6d63d7b96c4b9343b05c0990edd0d055c2
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/20200430/a5d4bb8a/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list