Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7260773imu; Wed, 14 Nov 2018 14:25:37 -0800 (PST) X-Google-Smtp-Source: AJdET5dtJGNU+JP3Jb04eOQ9TekexUDjPrdearaO8953bSE9zMUBqge+mS5sGnZlKiz1pJAVYaGi X-Received: by 2002:a17:902:887:: with SMTP id 7-v6mr3744778pll.283.1542234337435; Wed, 14 Nov 2018 14:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542234337; cv=none; d=google.com; s=arc-20160816; b=boELlNgBLutabIwUi2UhcpfHWjd/j/EvbjmpunuKu0+C+AOx8bQhx322hi+noGAnUt 14fTuzUD2CowQ8/1XnNgEPqkG6V0PQem9+O9TASKa/zIkEg+bMDmXAEqycBoTF5RkXqa ngW0taZWzbegNgHEt2XfeGY3FA+RxbfdB8M7xeaYWJsoOd1OOWx7g4t/5+ZRjt/IZc+0 +lKsumAwtcG2RYQ70nWl5p/bn+Gsogw5smHlu/YVnU1yXUznsfYAEB8sJ3rBbw27bl9R LtvL0rA/XEI2fdLflQ0DnEbaJd5vg6rSi6KPFK0HZq1zjcKHaQvXWPD44CAOlNH7l0E4 UBsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=HOz/ymljh5ws6053mNvgaUY8xxSe5NoOJXk52ut4NAY=; b=ieMqIQW4lokQoP7lCJOc/510iVOtSQXRt5N59Acoidqyo7AkH6HQKCsi4I/O0YsVwQ /njSeX7vQtxOWgg5rtu9ow0RxYObQJAzD0mos9knE2STTTeaGDEKtPKm/42bOOTM7BwG HDAVnkry8ALIT0LKXTgD4GtUIL5wB7GYiqj64ztR9A3KV0oJ350lsbX2aHOQ5aHL2fYn QPHv+8ifvKfsH675ybztfUUbdROfQjbR4ml3uIySqKBPzAvUhXkZcKo7Mv9ck5noAhzg fRcNkhhUm+Hm3pClFiVlexP+M6zmOCuUU+k9jfiadDIGkQv657NiG69EI6i9WrODCGMc Lqdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftcM1fdv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61-v6si24978848plb.418.2018.11.14.14.25.22; Wed, 14 Nov 2018 14:25:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftcM1fdv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387590AbeKOI2B (ORCPT + 99 others); Thu, 15 Nov 2018 03:28:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:34416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729131AbeKOI12 (ORCPT ); Thu, 15 Nov 2018 03:27:28 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89C2E22527; Wed, 14 Nov 2018 22:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234145; bh=PI+hZZNFGUt+emewcGFBoB5orr2rU7k1HOxK1T4GxAk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ftcM1fdvpZvicG3uP91MTWZRkdGkDgdl6iFugdrEtxQnKPaStyXMdhoqTriywdBdk s4EdZqk5Uk0V4hnDBRXmnVGM8BppX8H4e+lhyx2sC+AvM0ZaEqed5jU0MDa5UrWcWm ktq+H4jlA57m0voTZr9gaJhW06tkNHnq8nIzIm1s= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Masahiro Yamada , Sasha Levin Subject: [PATCH AUTOSEL 4.19 71/73] kbuild: deb-pkg: fix too low build version number Date: Wed, 14 Nov 2018 17:22:05 -0500 Message-Id: <20181114222207.98701-71-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada [ Upstream commit bbcde0a7241261cd0ca8d8e6b94a4113a4b71443 ] Since commit b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build"), the build version of the kernel contained in a deb package is too low by 1. Prior to the bad commit, the kernel was built first, then the number in .version file was read out, and written into the debian control file. Now, the debian control file is created before the kernel is actually compiled, which is causing the version number mismatch. Let the mkdebian script pass KBUILD_BUILD_VERSION=${revision} to require the build system to use the specified version number. Fixes: b41d920acff8 ("kbuild: deb-pkg: split generating packaging and build") Reported-by: Doug Smythies Signed-off-by: Masahiro Yamada Tested-by: Doug Smythies Signed-off-by: Sasha Levin --- scripts/package/mkdebian | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 663a7f343b42..edcad61fe3cd 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -88,6 +88,7 @@ set_debarch() { version=$KERNELRELEASE if [ -n "$KDEB_PKGVERSION" ]; then packageversion=$KDEB_PKGVERSION + revision=${packageversion##*-} else revision=$(cat .version 2>/dev/null||echo 1) packageversion=$version-$revision @@ -205,10 +206,12 @@ cat < debian/rules #!$(command -v $MAKE) -f build: - \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ + KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= binary-arch: - \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ + KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg clean: rm -rf debian/*tmp debian/files -- 2.17.1