[Qa-jenkins-scm] [jenkins.debian.net] 01/01: Add support for the new Tails build manifest format.

Holger Levsen holger at layer-acht.org
Wed May 18 00:08:33 UTC 2016


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 de5347bea71386182caccbabee74cfdbde631b1c
Author: intrigeri <intrigeri at boum.org>
Date:   Tue May 17 09:55:22 2016 +0000

    Add support for the new Tails build manifest format.
---
 bin/reproducible_create_meta_pkg_sets.sh | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/bin/reproducible_create_meta_pkg_sets.sh b/bin/reproducible_create_meta_pkg_sets.sh
index 6719c7f..a73b19a 100755
--- a/bin/reproducible_create_meta_pkg_sets.sh
+++ b/bin/reproducible_create_meta_pkg_sets.sh
@@ -25,6 +25,25 @@ packages_list_to_deb822() {
 	grep-dctrl -F Package -e '^('"$ALL_PKGS"')$' $PACKAGES > $TMPFILE
 }
 
+tails_build_manifest_to_deb822() {
+	tmpfile="$1"
+	packages="$2"
+	ALL_PKGS=$(python3 - "$tmpfile" <<EOF
+import sys
+import yaml
+with open(sys.argv[1]) as fd:
+	manifest = yaml.load(fd)
+	seen = {}
+	for pkg in (manifest['packages']['binary'] + manifest['packages']['source']):
+		pkgname = pkg['package']
+		if not pkgname in seen:
+			print(pkgname, end='|')
+			seen[pkgname] = True
+EOF
+)
+	grep-dctrl -F Package -e '^('"$ALL_PKGS"')$' $packages > "$tmpfile"
+}
+
 convert_from_deb822_into_source_packages_only() {
 	# given a Packages file in deb822 format on standard input, the
 	# following perl "oneliner" outputs the associated (unversioned)
@@ -373,11 +392,10 @@ update_pkg_sets() {
 
 	# tails
 	if [ ! -z $(find $TPATH -maxdepth 1 -mtime +0 -name ${META_PKGSET[20]}.pkgset) ] || [ ! -f $TPATH/${META_PKGSET[20]}.pkgset ] ; then
-		curl http://nightly.tails.boum.org/build_Tails_ISO_feature-stretch/lastSuccessful/archive/latest.iso.binpkgs > $TMPFILE
-		curl http://nightly.tails.boum.org/build_Tails_ISO_feature-stretch/lastSuccessful/archive/latest.iso.srcpkgs >> $TMPFILE
+		curl http://nightly.tails.boum.org/build_Tails_ISO_feature-stretch/lastSuccessful/archive/latest.iso.build-manifest > $TMPFILE
 		if ! grep '<title>404 Not Found</title>' $TMPFILE ; then
 			echo "parsing $TMPFILE now..."
-			packages_list_to_deb822
+			tails_build_manifest_to_deb822 "$TMPFILE" "$PACKAGES"
 			convert_from_deb822_into_source_packages_only
 			update_if_similar ${META_PKGSET[20]}.pkgset
 		else

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