From patchwork Mon Mar 8 14:59:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 1449149 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=) 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 4DvM2q6TNNz9sWr; Tue, 9 Mar 2021 02:00:19 +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 1lJHMm-0004xo-4J; Mon, 08 Mar 2021 15:00:16 +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 1lJHMf-0004vb-Pc for kernel-team@lists.ubuntu.com; Mon, 08 Mar 2021 15:00:09 +0000 Received: from mail-wr1-f72.google.com ([209.85.221.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lJHMf-00062t-IG for kernel-team@lists.ubuntu.com; Mon, 08 Mar 2021 15:00:09 +0000 Received: by mail-wr1-f72.google.com with SMTP id g5so4913051wrd.22 for ; Mon, 08 Mar 2021 07:00:09 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RSGRxdOWoYOhUjb36Y++uUvncisc/+zERV7RMOSmkxk=; b=X5F18lB47QgDK96IUtfW9hOBP3XlHurGGzxuLtVGbk+DfNsYEBjXvsWym5QbGtvqxO U8w/xlNKTcOZzrEfZWYT/oxDTcmYb8D6QC14vez6t//GXfxNY6stSjV3Lk4/4YKfUlpT erXm20zHLvI+awESmI2P4A4B5M8Y9KlVz6BjcRrXy+Lq/8BOGMcnRLnSFT11DhUXP4Uu ukHx9fZjk7hhIQvDp5mAD7r/SJ3Da6Bdk2YSuzcbb4koMaDxhSAy+pbwuM1ShZDnhAVm IHTtbpw0X/Hu9HmP7KQgukbtZJa7oiM7MhH1F+4fYHtzxIl8mPrEXhUxhtV8XR5qaG8x dwZg== X-Gm-Message-State: AOAM533mG8ATYlvh4DZ9iXoRJGyKuIxM1pifD1kv/jjCLT68wKpy9a8o Q9ztAqtGVwezZ4U793sc1fHQRNioaA8CC8SFzr+GeGBNozi8lMrAm036zciY4nRraXsaU8VaPN8 MzQxgsadFW6kUSf3QoDvV5ZhqC+huKx7LcaF5H1A3HA== X-Received: by 2002:adf:dbc2:: with SMTP id e2mr23135309wrj.227.1615215608897; Mon, 08 Mar 2021 07:00:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRpX7GCP6wKAjQkG15uDeE198SNoi3vVr/HcWpupaHYNr+D3BcdzALYbtSR79/+aqwOYhjDQ== X-Received: by 2002:adf:dbc2:: with SMTP id e2mr23135278wrj.227.1615215608576; Mon, 08 Mar 2021 07:00:08 -0800 (PST) Received: from localhost ([2001:470:6973:2:2843:61fd:9f2a:3b98]) by smtp.gmail.com with ESMTPSA id v7sm18780422wme.47.2021.03.08.07.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 07:00:08 -0800 (PST) From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/9] UBUNTU: [Packaging] gen-rules -- clean up debian/rules fragment Date: Mon, 8 Mar 2021 14:59:57 +0000 Message-Id: <20210308150004.1746089-3-apw@canonical.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308150004.1746089-1-apw@canonical.com> References: <20210308150004.1746089-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" Convert debian/rules fragement to a simple here script in line with the others in this section. Makes the thing simpler to read, to quote for, and more consistent. BugLink: https://bugs.launchpad.net/bugs/1918134 Signed-off-by: Andy Whitcroft --- debian/scripts/gen-rules.lrm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm index 19830c0..7dc774e 100755 --- a/debian/scripts/gen-rules.lrm +++ b/debian/scripts/gen-rules.lrm @@ -70,23 +70,23 @@ EOL echo "II: build $package for $flavour $archs" # debian/rules.gen - { - echo "" - #echo "# $package $version $suffix_minus $suffix_under" - echo "dkms_nvidia_${suffix_under}_version=\$(shell gawk '/^${package} / { print \$\$2; }' debian/dkms-versions)" - echo "nvidia_${suffix_under}_upstream_version=\$(shell echo \"\$(dkms_nvidia_${suffix_under}_version)\" | cut -d '-' -f 1)" - echo "gencontrol_flags += -Vdkms:nvidia-${suffix_minus}-modules=\"nvidia-dkms-${suffix_minus} (= \$(dkms_nvidia_${suffix_under}_version))\"" - echo "gencontrol_flags += -Vnvk:nvidia-${suffix_minus}=\"nvidia-kernel-common-${suffix_minus} (<= \$(nvidia_${suffix_under}_upstream_version)-1), nvidia-kernel-common-${suffix_minus} (>= \$(nvidia_${suffix_under}_upstream_version))\"" - echo "test::" - echo " @echo $package $version $suffix_minus $suffix_under $suffix_short $targets" - echo "$targets::" - echo " rm -rf \$(dkms_dir)/build \$(dkms_dir)/source" - echo " mkdir -p \$(dkms_dir)/build \$(dkms_dir)/source" - echo " install -d debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}" - echo " install -d debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}/usr/lib/linux/triggers" - echo " \$(call build_dkms, \$(src_abi)-${flavour}, linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}, \$(CURDIR)/debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}/lib/modules/\$(src_abi)-${flavour}/kernel, \"\", nvidia-${suffix_short}, pool/restricted/n/nvidia-graphics-drivers-${suffix_minus}/nvidia-kernel-source-${suffix_minus}_\$(dkms_nvidia_${suffix_under}_version)_\$(arch).deb pool/restricted/n/nvidia-graphics-drivers-${suffix_minus}/nvidia-dkms-${suffix_minus}_\$(dkms_nvidia_${suffix_under}_version)_\$(arch).deb)" - echo " \$(call install_control,linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour},${flavour},nvidia,${suffix_short},postinst postrm prerm config templates)" - } >>"debian/rules.gen" + cat - >>"debian/rules.gen" <= \$(nvidia_${suffix_under}_upstream_version))" +test:: + @echo $package $version $suffix_minus $suffix_under $suffix_short $targets +$targets:: + rm -rf \$(dkms_dir)/build \$(dkms_dir)/source + mkdir -p \$(dkms_dir)/build \$(dkms_dir)/source + install -d debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour} + install -d debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}/usr/lib/linux/triggers + \$(call build_dkms, \$(src_abi)-${flavour}, linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}, \$(CURDIR)/debian/linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour}/lib/modules/\$(src_abi)-${flavour}/kernel, "", nvidia-${suffix_short}, pool/restricted/n/nvidia-graphics-drivers-${suffix_minus}/nvidia-kernel-source-${suffix_minus}_\$(dkms_nvidia_${suffix_under}_version)_\$(arch).deb pool/restricted/n/nvidia-graphics-drivers-${suffix_minus}/nvidia-dkms-${suffix_minus}_\$(dkms_nvidia_${suffix_under}_version)_\$(arch).deb) + \$(call install_control,linux-modules-nvidia-${suffix_minus}-\$(src_abi)-${flavour},${flavour},nvidia,${suffix_short},postinst postrm prerm config templates) +EOL # debian/control.d/meta-nvidia cat - >>"debian/control.d/meta-nvidia" <