Received: by 10.223.164.202 with SMTP id h10csp1864125wrb; Mon, 27 Nov 2017 08:28:43 -0800 (PST) X-Google-Smtp-Source: AGs4zMZbvR8hdEjrk8dxGuviQd5V2Gm4yX+DpTx7V2Ju0Xoa1VrsoaziV809YzJy2BRMB3cYpCGW X-Received: by 10.159.241.1 with SMTP id q1mr39675646plr.383.1511800123814; Mon, 27 Nov 2017 08:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511800123; cv=none; d=google.com; s=arc-20160816; b=yZuCnqyqLV6tIzaDOvL3OJz2yDfHc0SuE7/xOI2+odiMfotzUnSg5rQ+O/tRg+AkkI RggtzW3/ZQ/CBYXuH0erOTe/tPR65OJjvXcFDFpC0dIomHzzlvmphpckWhENyv+pd3yu abgoBoXjOIBYUNfieuN3YPaUxGeWCyOe+cKj3rzH+WYCMUxeOcZUexZyraVe9WFSwpgY 7TEzH7kREyCyqoEKdmPdhF6GFLvFO7yWWzZ10JEBOq6ESbveSGTcIVXIYRUSF6ohYXJ7 duc5stKQuGO6eWwGlEgtIp96RlTar0l5ZYuIpoJL0pv0nR4Sm9zQGPY8Mj8dbI3dymnA BX7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=pQax1ggZPTSAIGLQnN8ibCciK0m0BTpvfJCBgMdzSSg=; b=0oT8WmGmzugn2L+HOw1wRoFDi0qFyBjwi8c0EdURaIHJjzt6M2qqBZrV3g1VAjBxZa Ywmpr2NQRtTGuowAONhahTGFjdTA3HBvSr3BgwbAEtrncjpd+XmwMJuhBF3dFDUFWLg0 KM9DYDfEQyoDoi9pKLxLnUdNaunZdC/LzzisBxY1C0ofyGuzYNmi4UW7gVxS7XzvxoIj DAEQde60/99u+wPB1wNpp67HDrN0BVWZd1gdV+gJzc1WlQGsj9gknBProBTcNn7xzSeg DlTzbSoj2mkxmMFhMqkbF+YG9WGynqLoaCkLZg3KWEa9HPXp05ODCVT4iej8TM4FkobZ xK+w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si21862085plk.721.2017.11.27.08.28.31; Mon, 27 Nov 2017 08:28:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752938AbdK0Q1U (ORCPT + 78 others); Mon, 27 Nov 2017 11:27:20 -0500 Received: from david.siemens.de ([192.35.17.14]:39849 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbdK0Q1T (ORCPT ); Mon, 27 Nov 2017 11:27:19 -0500 X-Greylist: delayed 784 seconds by postgrey-1.27 at vger.kernel.org; Mon, 27 Nov 2017 11:27:18 EST Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id vARGE1UO028929 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 17:14:01 +0100 Received: from md1em3qc.ww002.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id vARGE0Qu020338; Mon, 27 Nov 2017 17:14:00 +0100 From: Henning Schild To: linux-kernel@vger.kernel.org Cc: Ben Hutchings , Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org, Henning Schild , Konrad Schwarz Subject: [PATCH] builddeb: introduce variables for control-file customization Date: Mon, 27 Nov 2017 17:13:45 +0100 Message-Id: <20171127161345.17880-1-henning.schild@siemens.com> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The debian packages coming out of "make *deb-pkg" lack some critical information in the control-files e.g. the "Depends:" field. If one tries to install a fresh system with such a "linux-image" debootstrap or multistrap might try to install the kernel before its deps and the package hooks will fail. Different debian-based distros use different values for the missing fields. And the values differ between distro versions as well. So hardcoding of e.g. "Depends" is not possible. This patch introduces an option variable for every debian package built by builddeb. That allows advanced users to pass additional arguments to "dpkg-gencontrol" e.g. to set "Depends". All the new variables are optional. for example: make \ KDEB_OPTS_IMAGE=\ "-DDepends='initramfs-tools | linux-initramfs-tool, kmod, linux-base'" \ KDEB_OPTS_LIBC_HEADERS="-DMaintainer='root@machine' -v42" \ bindeb-pkg Signed-off-by: Henning Schild Signed-off-by: Konrad Schwarz --- scripts/package/builddeb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index b4f0f2b3f8d2..037e722bbd8f 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -13,7 +13,10 @@ set -e create_package() { - local pname="$1" pdir="$2" + local pname="$1" + shift + local pdir="$1" + shift mkdir -m 755 -p "$pdir/DEBIAN" mkdir -p "$pdir/usr/share/doc/$pname" @@ -30,7 +33,8 @@ create_package() { chmod -R a+rX "$pdir" # Create the package - dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname -P"$pdir" + dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch}" -p$pname \ + -P"$pdir" "$@" dpkg --build "$pdir" .. } @@ -353,11 +357,13 @@ Description: Linux support headers for userspace development EOF if [ "$ARCH" != "um" ]; then - create_package "$kernel_headers_packagename" "$kernel_headers_dir" - create_package "$libc_headers_packagename" "$libc_headers_dir" + eval 'create_package "$kernel_headers_packagename" \ + "$kernel_headers_dir"' "$KDEB_OPTS_IMAGE_HEADERS" + eval 'create_package "$libc_headers_packagename" \ + "$libc_headers_dir"' "$KDEB_OPTS_LIBC_HEADERS" fi -create_package "$packagename" "$tmpdir" +eval 'create_package "$packagename" "$tmpdir"' "$KDEB_OPTS_IMAGE" if [ -n "$BUILD_DEBUG" ] ; then # Build debug package @@ -381,7 +387,8 @@ Description: Linux kernel debugging symbols for $version all the necessary debug symbols for the kernel and its modules. EOF - create_package "$dbg_packagename" "$dbg_dir" + eval 'create_package "$dbg_packagename" "$dbg_dir" \ + ' "$KDEB_OPTS_IMAGE_DBG" fi if [ "x$1" = "xdeb-pkg" ] -- 2.13.6 From 1586084278030120478@xxx Thu Dec 07 00:50:39 +0000 2017 X-GM-THRID: 1581462888789915714 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread