diff mbox series

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

Message ID 20221019163139.44349-1-dimitri.ledkov@canonical.com
State New
Headers show
Series [SRU,J,K] UBUNTU: [Packaging] sameport -- add support for sameport versioning | expand

Commit Message

Dimitri John Ledkov Oct. 19, 2022, 4:31 p.m. UTC
From: Andy Whitcroft <apw@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@canonical.com>
(amend syntax to use bash variable expansion)
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@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(-)

Comments

Stefan Bader Oct. 21, 2022, 7:28 a.m. UTC | #1
On 19.10.22 18:31, Dimitri John Ledkov wrote:
> From: Andy Whitcroft <apw@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@canonical.com>
> (amend syntax to use bash variable expansion)
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---

Personally I do not like variable expansion because it tends to be rather hard 
to read and understand...

> 
>   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 ))"; \
Kleber Souza Nov. 11, 2022, 5:42 p.m. UTC | #2
On 19.10.22 18:31, Dimitri John Ledkov wrote:
> From: Andy Whitcroft <apw@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@canonical.com>
> (amend syntax to use bash variable expansion)
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

Thanks

> ---
> 
>   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 ))"; \
Kleber Souza Nov. 11, 2022, 5:46 p.m. UTC | #3
On 19.10.22 18:31, Dimitri John Ledkov wrote:
> From: Andy Whitcroft <apw@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@canonical.com>
> (amend syntax to use bash variable expansion)
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>


Applied to {jammy/kinetic}:linux.

Thanks,
Kleber


> ---
> 
>   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 ))"; \
diff mbox series

Patch

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 ))"; \