Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp98004rdb; Tue, 19 Dec 2023 10:20:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbjmdmWemmICZ2DppWOupMuD4IF7+3ou0b6Hd7D5qcvoZAf5a2fIpiMS/ZCY5QoqVDzY6U X-Received: by 2002:a50:9b13:0:b0:553:84d0:73a7 with SMTP id o19-20020a509b13000000b0055384d073a7mr1868996edi.36.1703010031574; Tue, 19 Dec 2023 10:20:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703010031; cv=none; d=google.com; s=arc-20160816; b=Nj80dn95EEYePxszBVlpg2n4dnmH29fhq82Dxd0eVLPre3d6rEn/C9gjviZ5CcsO6T RMagxR2K5hSIuRTIU2++IDb1O4usVVG3NBM2ectaX4cpfnkP3UL6Bld2IGu/u+DWp9TF kVm1YHKMcptC22nqTqlRnI622KNKswxkKYzQ7jliN9d2bheBXntex5e00yi6Mmw+qpT9 S0FwckfBOxoGGzqei5NP46Y+7Bh+ydRbYiE+KVzTYQnqljFRXyoHhz093v2H9TmXZeey hPBwUPkovfDLe6SB4HeXrQrnEjIWNd/o5e5PXF6buBIZMh5IAI/++6eV9eeycQCUd0dU KvQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=+qNQstHpIaIeGuPwwFLsXpZv0J0cTCVBefh0TUs/1vc=; fh=5gYN4msaJmwnN8mGpibv8VZnTy0MtvGQcf5D09XpoaQ=; b=N0UFDck5YUzs9nQ57TfAGUyUTC6hJNBQLAe7Fwt4JaTvrmk9TBQyAVukcK6k+01MND RPXsDxhCD69buH621pvwrpofNWaezb2XNQXTaCSDCyIKQlte9jNP6WN4Z/sxQWejEkdB 9h7kf0i0HqPk+StiPoRERAR4XyJd8de8zZFDpsusHn1a4QvTOrYrlJRvjroeadCYKRtA gi4sx4Q6HTa/nv37wT3WG1EwWU//eNThm0JyARNOJ0vAtQLLZyaAp4fc6SbJcFAgyG/r DrsrUVMerRlP2GAJI2TYODwsEncSC7FRjlsomMrsCN6SsG8RNof+MaUmSuUHWDz4ctKm R6iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZXKGT46; spf=pass (google.com: domain of linux-kernel+bounces-5802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l11-20020a056402254b00b0054bf6c62e5asi11117106edb.419.2023.12.19.10.20.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 10:20:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kZXKGT46; spf=pass (google.com: domain of linux-kernel+bounces-5802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2FC0B1F224A5 for ; Tue, 19 Dec 2023 18:20:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49B6C39846; Tue, 19 Dec 2023 18:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kZXKGT46" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07A5738F82; Tue, 19 Dec 2023 18:20:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AD71C433CA; Tue, 19 Dec 2023 18:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703010006; bh=u2yNd+lyopnSLnXJeDa3LJGhWEvy/TMKtwvC5M0a7Ws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kZXKGT46jQErrazVLLjVnqEPJRKZcTtFbw06T5JzLr6QTPz651LM0LFD2RuLvMNuB iLtS4hqQq6fueB5NQUI7mXOKTZnw3WONPrXHc2mhX2IrntrWRSUPCnKTZ3HiqjcgdD jJDHLrYJTAdm0GuvwW028e2bGowwSPWyi7rDdYC0NFcrBbQ5yVsa5HOMqMNqrz6k/e 9NAThsH1cXK2aiB729StJvWq9ywCXw+oUVTXaygvGhG5yQPOoaKvbbqgVt8tHRCwJo xOB3QtjaTKtktcxl2BE5/KEZARoEi0LGPKSndHKxQVR72/jYBylMqqjFJxddP+J2ZN TsChWO3GKq+Jw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ben Hutchings , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] kbuild: deb-pkg: use more debhelper commands Date: Wed, 20 Dec 2023 03:19:57 +0900 Message-Id: <20231219181957.1449958-3-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231219181957.1449958-1-masahiroy@kernel.org> References: <20231219181957.1449958-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") started to require the debhelper tool suite. Use more dh_* commands in create_package(): - dh_installdocs to install copyright - dh_installchangelogs to install changelog - dh_compress to compress changelog - dh_fixperms to replace the raw chmod command - dh_gencontrol to replace the raw dpkg-gencontrol command - dh_md5sums to record the md5sum of included files - dh_builddeb to replace the raw dpkg-deb command Signed-off-by: Masahiro Yamada --- scripts/package/builddeb | 23 ++++++++--------------- scripts/package/mkdebian | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 2eb4910f0ef3..436d55a83ab0 100755 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -26,23 +26,16 @@ if_enabled_echo() { create_package() { local pname="$1" pdir="$2" - local dpkg_deb_opts - mkdir -m 755 -p "$pdir/DEBIAN" - mkdir -p "$pdir/usr/share/doc/$pname" - cp debian/copyright "$pdir/usr/share/doc/$pname/" - cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian" - gzip -n -9 "$pdir/usr/share/doc/$pname/changelog.Debian" - sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \ - | xargs -r0 md5sum > DEBIAN/md5sums" + export DH_OPTIONS="-p${pname} -P${pdir}" - # a+rX in case we are in a restrictive umask environment like 0077 - # ug-s in case we build in a setuid/setgid directory - chmod -R go-w,a+rX,ug-s "$pdir" - - # Create the package - dpkg-gencontrol -p$pname -P"$pdir" - dpkg-deb --root-owner-group ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" .. + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_gencontrol + dh_md5sums + dh_builddeb -- ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} } install_linux_image () { diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index 93a24712b9a1..070149c985fe 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -193,7 +193,7 @@ Section: kernel Priority: optional Maintainer: $maintainer Rules-Requires-Root: no -Build-Depends: debhelper +Build-Depends: debhelper-compat (= 12) Build-Depends-Arch: bc, bison, cpio, flex, kmod, libelf-dev:native, libssl-dev:native, rsync Homepage: https://www.kernel.org/ -- 2.40.1