From 0d22e6b8aed18a81f2249376f6d78e2de8d25348 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Mon, 2 Dec 2019 17:22:18 +0100 Subject: Don't hardcode architecture list in the Makefile Move it to config.json instead and grab it from there. --- Makefile | 6 ------ data/config.json | 5 +++++ lib/debian-releases.mk | 6 +++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index cf6cc968c5..0641a3b20a 100644 --- a/Makefile +++ b/Makefile @@ -10,12 +10,6 @@ TESTING = bullseye MIRROR = http://debian.csail.mit.edu/debian SECURITY_MIRROR = http://security.debian.org/debian-security -jessie_ARCHS = amd64 armel armhf i386 -stretch_ARCHS = amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x -buster_ARCHS = amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x -bullseye_ARCHS = amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x -sid_ARCHS = amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x - # The rest of the file should not need to be edited # Include the definitions of the releases to be fetched diff --git a/data/config.json b/data/config.json index 524f31de8d..59660ee0ed 100644 --- a/data/config.json +++ b/data/config.json @@ -59,6 +59,7 @@ "jessie-proposed-updates" ] }, + "architectures": [ "amd64", "armel", "armhf", "i386" ], "release": "oldoldstable" }, "stretch": { @@ -71,6 +72,7 @@ "stretch-proposed-updates" ] }, + "architectures": [ "amd64", "arm64", "armel", "armhf", "i386", "mips", "mips64el", "mipsel", "ppc64el", "s390x" ], "release": "oldstable" }, "buster": { @@ -83,6 +85,7 @@ "buster-proposed-updates" ] }, + "architectures": [ "amd64", "arm64", "armel", "armhf", "i386", "mips", "mips64el", "mipsel", "ppc64el", "s390x" ], "release": "stable" }, "bullseye": { @@ -95,6 +98,7 @@ "bullseye-proposed-updates" ] }, + "architectures": [ "amd64", "arm64", "armel", "armhf", "i386", "mips64el", "mipsel", "ppc64el", "s390x" ], "release": "testing" }, "bookworm": { @@ -114,6 +118,7 @@ "sid" ] }, + "architectures": [ "amd64", "arm64", "armel", "armhf", "i386", "mips64el", "mipsel", "ppc64el", "s390x" ], "release": "unstable" } }, diff --git a/lib/debian-releases.mk b/lib/debian-releases.mk index c868d6edfd..d09ac33be0 100644 --- a/lib/debian-releases.mk +++ b/lib/debian-releases.mk @@ -1,6 +1,10 @@ # This file defines the variables describing all Debian repositories # that need to be fetched in the "update-packages" process +define get_config = +$(shell jq -r $(1) 'data/config.json') +endef + # backports suites only have Sources.xz and respective Packages.xz # available. # Cf. as well https://bugs.debian.org/664866 @@ -12,7 +16,7 @@ MAIN_RELEASES := $(SECURITY_RELEASES) sid define add_main_release = $(1)_MIRROR = $$(MIRROR) $(1)_DIST = $(1) -$(1)_ARCHS ?= amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x +$(1)_ARCHS = $(call get_config, '.distributions.$(1).architectures[]') $(1)_RELEASE = $(1) $(1)_SUBRELEASE = RELEASES += $(1) -- cgit v1.2.3