summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2018-05-31 13:46:14 +0200
committerRaphaël Hertzog <hertzog@debian.org>2018-05-31 13:54:35 +0200
commit5189dc097b5bfe246c683102b6b4caabaefe00f0 (patch)
treec72a0d66f8a5502abe90bdcc3c478fc5a0a125fb /lib
parent5eb8519d081ae16d2c71759c6dafc16e7e232cd8 (diff)
Generalize the code to fetch Packages/Sources updates
It's now easy to extend by adding a supplementary lib/foobar-releases.mk file. I verified that the set of downloaded files are identical with the exception of a bug that got fixed in the process: the update-backports-% rule used to download files for all sections (main, contrib, non-free) but saved them all under the name corresponding to the main section.
Diffstat (limited to 'lib')
-rw-r--r--lib/debian-releases.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/debian-releases.mk b/lib/debian-releases.mk
new file mode 100644
index 0000000000..fea8e9555f
--- /dev/null
+++ b/lib/debian-releases.mk
@@ -0,0 +1,39 @@
+# This file defines the variables describing all Debian repositories
+# that need to be fetched in the "update-packages" process
+
+BACKPORT_RELEASES := $(OLDOLDSTABLE) $(OLDSTABLE) $(STABLE)
+SECURITY_RELEASES := $(BACKPORT_RELEASES) $(TESTING)
+MAIN_RELEASES := $(SECURITY_RELEASES) sid
+
+# Define the variables for the release on the main mirror
+define add_main_release =
+$(1)_MIRROR = $$(MIRROR)
+$(1)_DIST = $(1)
+$(1)_ARCHS ?= amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mipsel powerpc ppc64el s390x
+$(1)_RELEASE = $(1)
+$(1)_SUBRELEASE =
+RELEASES += $(1)
+endef
+$(foreach release,$(MAIN_RELEASES),$(eval $(call add_main_release,$(release))))
+
+# Define the variables for the releases on security.debian.org
+define add_security_release =
+$(1)_security_MIRROR = $$(SECURITY_MIRROR)
+$(1)_security_DIST = $(1)/updates
+$(1)_security_ARCHS = $$($(1)_ARCHS)
+$(1)_security_RELEASE = $(1)
+$(1)_security_SUBRELEASE = security
+RELEASES += $(1)_security
+endef
+$(foreach release,$(SECURITY_RELEASES),$(eval $(call add_security_release,$(release))))
+
+# Define the variables for the *-backports releases
+define add_backport_release =
+$(1)_backports_MIRROR = $$(MIRROR)
+$(1)_backports_DIST = $(1)-backports
+$(1)_backports_ARCHS = $$($(1)_ARCHS)
+$(1)_backports_RELEASE = $(1)-backports
+$(1)_backports_SUBRELEASE =
+RELEASES += $(1)_backports
+endef
+$(foreach release,$(BACKPORT_RELEASES),$(eval $(call add_backport_release,$(release))))

© 2014-2024 Faster IT GmbH | imprint | privacy policy