[SRU][J][K][PATCH] UBUNTU: [Packaging] sameport -- add support for sameport versioning

Dimitri John Ledkov dimitri.ledkov at canonical.com
Wed Oct 19 16:31:39 UTC 2022


From: Andy Whitcroft <apw at canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1993563

We currently support two types of kernels which are programatically
configured (marked "backports" in kernel-series and having
copy/local-mangle support):

  backports: those who express in an older series (~20.04.N)
  forwardports: those who express in a newer series (+22.04.N)

Add a new third type which represents "backports" into the same series:

  sameports: those which express in the same series (.N)

These will simply number with an additional upload number to allow local
respins, for example linux/5.15.0-30.31 -> linux-lowlatency/5.15.0-30.31.1.

Add support for BACKPORT_SUFFIX to be present and empty using `--` to
represent this situation (in a similar fashion to variants).

Signed-off-by: Andy Whitcroft <apw at canonical.com>
(amend syntax to use bash variable expansion)
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>
---

 SRU for jammy and kinetic. Already applied to unstable

 Currently unused, even if kteam-tools patch lands.

 This is support, for future new kernels.

 debian/rules.d/1-maintainer.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index 23da141a6c..7fbfad26d3 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -136,7 +136,7 @@ startnewrelease:
 	dh_testdir
 	@[ -f "$(DEBIAN)/etc/update.conf" ] && . "$(DEBIAN)/etc/update.conf"; \
 	if [ -n "$$BACKPORT_SUFFIX" ]; then \
-		ver="$$(dpkg-parsechangelog -l"$$DEBIAN_MASTER/changelog" -SVersion)$${BACKPORT_SUFFIX}.1"; \
+		ver="$$(dpkg-parsechangelog -l"$$DEBIAN_MASTER/changelog" -SVersion)$${BACKPORT_SUFFIX/--/}.1"; \
 		prev_ver="$$(dpkg-parsechangelog -l"$(DEBIAN)/changelog" -SVersion)"; \
 		if [ "$${ver%.*}" = "$${prev_ver%.*}" ]; then \
 			ver="$${ver%.*}.$$(( $${prev_ver##*.} +1 ))"; \
-- 
2.34.1




More information about the kernel-team mailing list