From patchwork Tue Dec 3 22:26:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 1203873 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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 47SGnj4bwjz9sR8; Wed, 4 Dec 2019 09:27:37 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1icGdo-0004cO-VY; Tue, 03 Dec 2019 22:27:32 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1icGdi-0004Va-Mo for kernel-team@lists.ubuntu.com; Tue, 03 Dec 2019 22:27:26 +0000 Received: from mail-yb1-f199.google.com ([209.85.219.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1icGdh-0001Kq-5v for kernel-team@lists.ubuntu.com; Tue, 03 Dec 2019 22:27:25 +0000 Received: by mail-yb1-f199.google.com with SMTP id f4so3324987ybb.14 for ; Tue, 03 Dec 2019 14:27:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kuy7egW9py2h12TzdtZveCX4r+YSH2ZBqyBrAXGYgXE=; b=UEWO0tn2NnpGHp6idTmlMYFQQ1IG13E4bjbAudHES6sQ8G5bMuTkqNGqde8F1qGmlm Ya4vE920kmjOzycqnZ87ZKzReO2rrn0dLRZQ5isic5Q9GE2LBZCpvv9qftZ0X5QPLk8D HeyjlfCZZaqbIlysD1CVOMnzDBq6Z1Mhnis4Y64Sqw6h9l7ArA98Jr3mqEfNUykBywVU XhxJcRDETBYq98/UB6fPH17J6gA+/Zhz2hoKsLVMaThLdjYu4v/MAon3jxc+ddt/OFJz izCcUpVwZ8nsG9b9zxux8xSdvgdfcotlTIenmD0kDR+xUGTqlYJoYOWf1LPEYS5AyK+f aFaQ== X-Gm-Message-State: APjAAAWVN1kYMsjJHzFKz12Ay4tLonxWuu5Rig7S67FmwZtVijimSNAf qOLg8CUyAoZeLmWBF2gYII60qTsyVGx9lunicnxtPWb+LmZoFmRmFw/7f+5ygHDVeWWm9ovZwcd J7TbxZI2icSLimHlfJqNyy10Nq4sDMwURFDC50hBCGg== X-Received: by 2002:a25:6e84:: with SMTP id j126mr152624ybc.404.1575412044101; Tue, 03 Dec 2019 14:27:24 -0800 (PST) X-Google-Smtp-Source: APXvYqzfNED4G6b6AObRVfGe1zAP1gkyXUTnLD4M61ah7xZXXkgNxjGB89Q1U7MIBhUzSyVEwPF5JQ== X-Received: by 2002:a25:6e84:: with SMTP id j126mr152603ybc.404.1575412043811; Tue, 03 Dec 2019 14:27:23 -0800 (PST) Received: from localhost ([136.37.150.243]) by smtp.gmail.com with ESMTPSA id m128sm2133600ywc.79.2019.12.03.14.27.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 14:27:23 -0800 (PST) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [REVIEW 2/4][linux-meta] UBUNTU: [Debian] Simplify getting kernel version and abi Date: Tue, 3 Dec 2019 16:26:49 -0600 Message-Id: <20191203222657.1152249-16-seth.forshee@canonical.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191203222657.1152249-1-seth.forshee@canonical.com> References: <20191203222657.1152249-1-seth.forshee@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Signed-off-by: Seth Forshee --- debian/rules | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 77225d74ad17..9ddcb3bb5f91 100755 --- a/debian/rules +++ b/debian/rules @@ -16,9 +16,8 @@ SOURCE=$(shell dpkg-parsechangelog | sed -ne 's/^Source: *//p') SUFFIX=$(shell dpkg-parsechangelog | sed -ne 's/^Source: *linux-meta-lts/-lts/p') # 5 digit versions (2.6.38.., 3 digit kernel base versions (2.6.38) -KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \ - 's/Version: \([0-9]*\.[0-9]*\.[0-9]*\)\..*/\1/') -KERNEL_ABI=$(shell head -n1 < debian/changelog | gawk '{n=split($$0,v,"."); print v[4];}') +KERNEL_VERSION=$(shell dpkg-parsechangelog -SVersion | cut -d. -f1-3) +KERNEL_ABI=$(shell dpkg-parsechangelog -SVersion | cut -d. -f4) # 4 digit versions (3.0..), 2 digit kernel base versions (3.0) #KERNEL_VERSION=$(shell dpkg-parsechangelog | grep ^Version | sed -e \