From patchwork Mon Aug 5 08:37:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 1142040 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 462B3c3lKfz9sP8; Mon, 5 Aug 2019 18:37:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1huYUt-0003Cf-F2; Mon, 05 Aug 2019 08:37:39 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1huYUr-0003C3-Si for kernel-team@lists.ubuntu.com; Mon, 05 Aug 2019 08:37:37 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1huYUr-0006jA-HL; Mon, 05 Aug 2019 08:37:37 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [precise/master-next 2/3] UBUNTU: [debian] Fix regression with ABI subversions and backport Date: Mon, 5 Aug 2019 09:37:34 +0100 Message-Id: <20190805083735.13947-3-apw@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190805083735.13947-1-apw@canonical.com> References: <20190805083735.13947-1-apw@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Whitcroft Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: dann frazier Tim pointed out that 443b5814ee77f8c9083079ce0e6a0806e087630f broke the parsing of backport versions, such as 8.13~14.10+ppa.1. This should fix it. I used the following script to validate the regular expressions: dannf@fluid:~$ cat test.sh set -e splitver() { local ver="$1" local abinum="$(echo $ver | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$/\1/')" local uploadnum="$(echo $ver | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$/\1/')" echo "$abinum $uploadnum" } do_test() { local ver="$1" local expected="$2" local actual="$(splitver $ver)" if [ "$actual" = "$expected" ]; then echo "PASS: $ver" return 0 fi echo "FAIL: $ver split as $actual" return 1 } do_test "33.58" "33 58" do_test "33.59.58" "33.59 58" do_test "8.13~14.10" "8 13" do_test "8.13~14.10+ppa.1" "8 13" do_test "8.13.99~14.10+ppa.3" "8.13 99" dannf@fluid:~$ ./test.sh PASS: 33.58 PASS: 33.59.58 PASS: 8.13~14.10 PASS: 8.13~14.10+ppa.1 PASS: 8.13.99~14.10+ppa.3 Signed-off-by: dann frazier Signed-off-by: Tim Gardner [apw@canonical.com: drop getabis changes as that has separately been backported wholesale.] BugLink: http://bugs.launchpad.net/bugs/1838610 Signed-off-by: Andy Whitcroft --- debian/rules.d/0-common-vars.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 1fd6daffcb02..701639f58e01 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -70,11 +70,11 @@ ifeq ($(full_build),false) skipdbg=true endif -abinum := $(shell echo $(revision) | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$$/\1/')$(abi_suffix) -prev_abinum := $(shell echo $(prev_revision) | sed -r -e 's/([^\+]*)\.[^\.]+(\+.*)?$$/\1/')$(abi_suffix) +abinum := $(shell echo $(revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) +prev_abinum := $(shell echo $(prev_revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) abi_release := $(release)-$(abinum) -uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+]*\.([^\.]+(\+.*)?$$)/\1/') +uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$$/\1/') ifneq ($(full_build),false) uploadnum := $(uploadnum)-Ubuntu endif From patchwork Mon Aug 5 08:37:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 1142041 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 462B3c6FcFz9sPM; Mon, 5 Aug 2019 18:37:46 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1huYUt-0003Cq-KK; Mon, 05 Aug 2019 08:37:39 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1huYUs-0003CC-HM for kernel-team@lists.ubuntu.com; Mon, 05 Aug 2019 08:37:38 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1huYUs-0006jE-1c; Mon, 05 Aug 2019 08:37:38 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [precise/master-next 3/3] UBUNTU: [Packaging] uploadnum should be the remainder of the version Date: Mon, 5 Aug 2019 09:37:35 +0100 Message-Id: <20190805083735.13947-4-apw@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190805083735.13947-1-apw@canonical.com> References: <20190805083735.13947-1-apw@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Whitcroft Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The uploadnum variable in debian/rules is somewhat confusingly named, it should be the "remainder of the version after -", not just the uploadnum itself. This version is only used for identification in uname -v and there it is completely appropriate for this to be complete with backport versions etc. BugLink: http://bugs.launchpad.net/bugs/1407755 Signed-off-by: Andy Whitcroft Acked-by: Chris J Arges Acked-by: Brad Figg Signed-off-by: Brad Figg BugLink: http://bugs.launchpad.net/bugs/1838610 Signed-off-by: Andy Whitcroft --- debian/rules.d/0-common-vars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 701639f58e01..630806f767aa 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -74,7 +74,7 @@ abinum := $(shell echo $(revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*) prev_abinum := $(shell echo $(prev_revision) | sed -r -e 's/([^\+~]*)\.[^\.]+(~.*)?(\+.*)?$$/\1/')$(abi_suffix) abi_release := $(release)-$(abinum) -uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+~]*\.([^\.~]+)(~.*)?(\+.*)?$$/\1/') +uploadnum := $(shell echo $(revision) | sed -r -e 's/[^\+~]*\.([^\.~]+(~.*)?(\+.*)?$$)/\1/') ifneq ($(full_build),false) uploadnum := $(uploadnum)-Ubuntu endif