ACK/Cmnt: [u, d, c, b, x, t][PATCH] UBUNTU: [Packaging] startnewrelease: Add support for backport versioning

Stefan Bader stefan.bader at canonical.com
Thu Feb 28 14:18:02 UTC 2019


On 19.02.19 17:17, Marcelo Henrique Cerri wrote:
> Ignore: yes
> 
> Use the parent kernel version as base for the new release version if
> the BACKPORT_SUFFIX variable is set in the update.conf file.
> 
> Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---

Though there was just another patch that claimed [ ] && something would return
the return code of the test. Anyhow lets hope this works.. But if not it can be
quickly reverted.

>  debian/rules.d/1-maintainer.mk | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
> 
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index ee8010ba7fa0..d57145b644d9 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -126,10 +126,20 @@ diffupstream:
>  
>  startnewrelease:
>  	dh_testdir
> -	@ver=$$(echo "$(revision)" | perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }'); \
> +	@[ -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"; \
> +		prev_ver="$$(dpkg-parsechangelog -l"$(DEBIAN)/changelog" -SVersion)"; \
> +		if [ "$${ver%.*}" = "$${prev_ver%.*}" ]; then \
> +			ver="$${ver%.*}.$$(( $${prev_ver##*.} +1 ))"; \
> +		fi; \
> +	else \
> +		ver="$(release)-$$(echo "$(revision)" | \
> +			perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }')"; \
> +	fi; \
>  	now="$(shell date -R)"; \
> -	echo "Creating new changelog set for $(release)-$$ver..."; \
> -	echo -e "$(src_pkg_name) ($(release)-$$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \
> +	echo "Creating new changelog set for $$ver..."; \
> +	echo -e "$(src_pkg_name) ($$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \
>  	echo "  CHANGELOG: Do not edit directly. Autogenerated at release." >> \
>  		$(DEBIAN)/changelog.new; \
>  	echo "  CHANGELOG: Use the printchanges target to see the curent changes." \
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20190228/0d9d7102/attachment.sig>


More information about the kernel-team mailing list