[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: refactoring

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Nov 30 22:05:11 GMT 2022



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


Commits:
5b079c49 by Holger Levsen at 2022-11-30T22:52:57+01:00
refactoring

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

- - - - -
7f65008c by Holger Levsen at 2022-11-30T23:04:43+01:00
reproducible Debian: create meta pkg sets: parse cloud-images json packages list using jq

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

- - - - -


1 changed file:

- bin/reproducible_create_meta_pkg_sets.sh


Changes:

=====================================
bin/reproducible_create_meta_pkg_sets.sh
=====================================
@@ -250,24 +250,42 @@ update_pkg_set_specific() {
 		cloud-image)
 			# cloud images of the Debian GNU/Linux operating system designed for OpenStack.
 			# see https://cloud.debian.org/images/cloud/
-			if [ "$SUITE" = "stretch" ] ; then
-				URL="https://cloud.debian.org/images/cloud/OpenStack/current-9/debian-9-openstack-amd64-packages.list"
-			elif [ "$SUITE" = "buster" ] ; then
-				URL="https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64-packages.list"
+			if [ "$SUITE" = "stretch" ] || [ "$SUITE" = "buster" ] ; then
+				if [ "$SUITE" = "stretch" ] ; then
+					URL="https://cloud.debian.org/images/cloud/OpenStack/current-9/debian-9-openstack-amd64-packages.list"
+				elif [ "$SUITE" = "buster" ] ; then
+					URL="https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64-packages.list"
+				fi
+				echo "Downloading $URL now."
+				curl $URL | cut -d ' ' -f1 | cut -d ':' -f1 > $TMPFILE
+				if ! grep '404 Not Found' && ! grep 'DOCTYPE' $TMPFILE ; then
+					echo "parsing $TMPFILE now..."
+					packages_list_to_deb822
+					convert_from_deb822_into_source_packages_only
+				else
+					rm $TMPFILE
+					MESSAGE="Warning: could not update cloud-image package list, skipping pkg set..."
+					irc_message debian-reproducible-changes $MESSAGE
+				fi
 			else
-				#FIXME: cloud-image pkg set broken for bullseye & bookworm
-				URL="https://cloud.debian.org/images/cloud/OpenStack/testing/debian-testing-openstack-amd64-packages.list"
-			fi
-			echo "Downloading $URL now."
-			curl $URL | cut -d ' ' -f1 | cut -d ':' -f1 > $TMPFILE
-			if ! grep '404 Not Found' && ! grep 'DOCTYPE' $TMPFILE ; then
-				echo "parsing $TMPFILE now..."
-				packages_list_to_deb822
+				if [ "$SUITE" = "bullseye" ] ; then
+					URL="https://cloud.debian.org/images/cloud/bullseye/daily/latest/debian-11-generic-amd64-daily.json"
+				elif [ "$SUITE" = "bookworm" ] ; then
+					URL="https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.json"
+				else
+					echo "$SUITE not supported, erroring out."
+					exit 1
+				fi
+				echo "Downloading $URL now."
+				curl $URL | jq '.items[].data.packages[].name' 2>/dev/null | tr -d '"' |xargs echo  > $TMPFILE
+				MISSES=""
+				# convert binary packages into source packages
+				for i in $(cat $TMPFILE) ; do
+					chdist --data-dir=$CHPATH apt-cache $DISTNAME show $i >> ${TMPFILE2} 2>/dev/null || MISSES="$i $MISSES"
+				done
+				echo "The following unknown packages have been ignored: $MISSES"
+				mv ${TMPFILE2} $TMPFILE
 				convert_from_deb822_into_source_packages_only
-			else
-				rm $TMPFILE
-				MESSAGE="Warning: could not update cloud-image package list, skipping pkg set..."
-				irc_message debian-reproducible-changes $MESSAGE
 			fi
 			;;
 		gnome)	# gnome and everything it depends on



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/9f407d14edbff4fc96759df35f8b4ffa780d060b...7f65008ced4bcef7312dae63220c752f39594924

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/9f407d14edbff4fc96759df35f8b4ffa780d060b...7f65008ced4bcef7312dae63220c752f39594924
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/20221130/f457381a/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list