From patchwork Fri Feb 19 00:26:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1441944 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; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=HIU3GJ8f; dkim-atps=neutral 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 4DhXSD753vz9sVn; Fri, 19 Feb 2021 11:26:20 +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 1lCtcd-0004oA-9n; Fri, 19 Feb 2021 00:26:15 +0000 Received: from mail-wr1-f50.google.com ([209.85.221.50]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lCtcZ-0004nO-9M for kernel-team@lists.ubuntu.com; Fri, 19 Feb 2021 00:26:11 +0000 Received: by mail-wr1-f50.google.com with SMTP id a4so2666013wro.8 for ; Thu, 18 Feb 2021 16:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ao9j+n3qkd6+6fNT4n84EWH349b+Cllnvns04YYJ3Rc=; b=HIU3GJ8f+OECkNsJDqg+FD9MMbuuV8RMjPKaVSud2SiVBcpKIyel/dlEaPjM6uhudU FdAzSz+/JQdnbneTtWF13mCF2cLefgzQsNPFE/w4m0XbNxFLOBhTaJ5o88lra/FeZFq+ zU0kwDn/xnPMJbXQWmzpW5SURF/QjaMKcPmSQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ao9j+n3qkd6+6fNT4n84EWH349b+Cllnvns04YYJ3Rc=; b=GVeV8L5nM2L/3whGjB9cYQPZ/DUJ+HLGhyaWq/n/kGY0NUgjnaZ7YcJGkeXGxT0pQm qEpaNKgGMRqVpVh7kKFRaMCO7NcD9kV1anNfOEF0VGSLUnwEuz+s7pN0qTa4JXTUkqdS qNnaaqKo7TDfNY4W+eqDZka9ojxO6exMGRLVG8TFcHrCCwUP4cuEF3Bsozamfysix7Jj JCz9+kN3JM7OiE/Sh49uUnPc3+neyEyj660AqpBb1q4Ky48kp+mDG4lNOEPTv7+M5fXC yvkvF1duj19Tg/fkZ9rLAz/+abi5VL8MRyZoZy56twNPBoz1GnhoF0+nb4KY/hqj6fMH ZO2A== X-Gm-Message-State: AOAM532TY1+/XaxXKaJphGWkGUvva0Z+8j/cWHc24RrLm/NvxHebtZt2 okiKPFrXM3yMoIiWuUwHG5oZVmgM9lYx7g== X-Google-Smtp-Source: ABdhPJyC/ZjJ2wqCuthBI3PXBNXnUGDK27f+6ugV9M+0lLuHEmo+OgTfY4KOWBgvbx+HWSrSkX5Vyw== X-Received: by 2002:a5d:4582:: with SMTP id p2mr6527838wrq.126.1613694370574; Thu, 18 Feb 2021 16:26:10 -0800 (PST) Received: from localhost ([2a01:4b00:85fd:d700:399b:f0af:2e3d:6bdc]) by smtp.gmail.com with ESMTPSA id 75sm9750422wma.23.2021.02.18.16.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 16:26:10 -0800 (PST) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2] UBUNTU: [Packaging] replace custom filter script with dctrl-tools Date: Fri, 19 Feb 2021 00:26:04 +0000 Message-Id: <20210219002605.1166831-2-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210219002605.1166831-1-xnox@ubuntu.com> References: <20210219002605.1166831-1-xnox@ubuntu.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: Dimitri John Ledkov Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Use a tool from the archive to filter just the current architecture udeb packages. Add new line to control file snippet, in case extra paragraphs are generated elsehwere without a leading new line. Before adding udebs, add a new line too, in case the last snippet anywhere else did not end with a new line. BugLink: https://bugs.launchpad.net/bugs/1916095 Signed-off-by: Dimitri John Ledkov --- debian.master/control.stub.in | 1 + debian/control.d/flavour-buildinfo.stub | 1 + debian/rules | 5 ++++- debian/scripts/misc/kernel-wedge-arch.pl | 26 ------------------------ 4 files changed, 6 insertions(+), 27 deletions(-) delete mode 100755 debian/scripts/misc/kernel-wedge-arch.pl diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index 9c1e95609..cae6f6783 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -8,6 +8,7 @@ Build-Depends: dh-systemd, cpio, kernel-wedge, + dctrl-tools, kmod , makedumpfile [amd64] , libcap-dev , diff --git a/debian/control.d/flavour-buildinfo.stub b/debian/control.d/flavour-buildinfo.stub index ed92b3d53..dd08a6715 100644 --- a/debian/control.d/flavour-buildinfo.stub +++ b/debian/control.d/flavour-buildinfo.stub @@ -11,3 +11,4 @@ Description: Linux kernel buildinfo for version PKGVER on DESC DESC. . You likely do not want to install this package. + diff --git a/debian/rules b/debian/rules index 33558795e..ceffe36be 100755 --- a/debian/rules +++ b/debian/rules @@ -220,10 +220,13 @@ $(DEBIAN)/control.stub: \ debian/control: $(DEBIAN)/control.stub echo "# placebo control.stub for kernel-wedge flow change" >debian/control.stub cp $(DEBIAN)/control.stub debian/control + # start new paragraph in debian/control + echo >> debian/control + # append udeb packages export KW_DEFCONFIG_DIR=$(DEBIAN)/d-i && \ export KW_CONFIG_DIR=$(DEBIAN)/d-i && \ LANG=C kernel-wedge gen-control $(release)-$(abinum) | \ - perl -f $(DROOT)/scripts/misc/kernel-wedge-arch.pl $(arch) \ + grep-dctrl -FArchitecture $(arch) \ >>$(CURDIR)/debian/control debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem) diff --git a/debian/scripts/misc/kernel-wedge-arch.pl b/debian/scripts/misc/kernel-wedge-arch.pl deleted file mode 100755 index 4b4fefe67..000000000 --- a/debian/scripts/misc/kernel-wedge-arch.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl -# -# kernel-wedge-arch.pl -- select only specifiers for the supplied arch. -# -use strict; - -require Dpkg::Control; -require Dpkg::Deps; - -my $fh = \*STDIN; - -my @entries; - -my $wanted = $ARGV[0]; - -my $entry; -while (!eof($fh)) { - $entry = Dpkg::Control->new(); - $entry->parse($fh, '???'); - - if ($entry->{'Architecture'} eq $wanted) { - print("\n" . $entry); - } -} - -close($fh); From patchwork Fri Feb 19 00:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1441946 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; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=QWNNW8QE; dkim-atps=neutral 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 4DhXSJ2tblz9sVs; Fri, 19 Feb 2021 11:26:24 +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 1lCtcg-0004oq-FK; Fri, 19 Feb 2021 00:26:18 +0000 Received: from mail-wm1-f47.google.com ([209.85.128.47]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lCtcb-0004no-Bd for kernel-team@lists.ubuntu.com; Fri, 19 Feb 2021 00:26:13 +0000 Received: by mail-wm1-f47.google.com with SMTP id o24so5426487wmh.5 for ; Thu, 18 Feb 2021 16:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iWvs6ozF1/nD+M8z6QffPGAR6Lo4TcJJR+zNJcqZPDA=; b=QWNNW8QEhBkOPF8auyskmMQnPM8VMHKFhbxM5HDHl/5vA4PT678ebiCd0MPSgJ25XU uSpuHI1beDMsra7OQKnCRanp4WF0wgLLsEwaaqoGrwzAcOK3yLBa8dSVIwYl8kdaxT03 pmqrhbkntz+TFc/f0MaqtuDrwRU7heXuT9ZZ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iWvs6ozF1/nD+M8z6QffPGAR6Lo4TcJJR+zNJcqZPDA=; b=FKXa1jm1if8IO3Hv5PW26nkaI6j4bjr+pAxxeCfJhfQUnxS21bTGtBw0yDC8s4vf8I Keag+p7AoXQMqY5p/x+RdKlWpCQUeCQMVHgMOxc1TYpvr3qcliZpKF6KBXdUfE4MnRJS KOHVVgvAMCFN4wnHyci+263u7/8DMYE22HeMfF7aNJs73aCsRXh8KE6pI3/oIPUPdooz 0CvlI8UY7VT6i/wDn40S6HZ0N8Ce0XX4lQAOvZbLS7WP3hfj0+7I+GvvD6WGjlQsTjb9 THnz3ut/W77ynnf+3IsUNE5/4FVkesjpI7IT1Hu3B7VOa3zb8DKeKTvRW4pEtlYmddEK AxSA== X-Gm-Message-State: AOAM531xlGnjH4q8cxXUwOPOOF6CGRCSZJnAtznZS+YZoMyerzDTylW+ MvTY/1YH4c1+O+3AouUnTvGYq7hgrTd6cw== X-Google-Smtp-Source: ABdhPJweSnCq3Lfjbf9KFoE9A8fBed7v8QjgDnvfS/hj7Ly3LeA4f1WUtGVexrrTnWpZTRdzavkHfQ== X-Received: by 2002:a05:600c:4a09:: with SMTP id c9mr5718209wmp.91.1613694372539; Thu, 18 Feb 2021 16:26:12 -0800 (PST) Received: from localhost ([2a01:4b00:85fd:d700:399b:f0af:2e3d:6bdc]) by smtp.gmail.com with ESMTPSA id q21sm12234694wmj.18.2021.02.18.16.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 16:26:12 -0800 (PST) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] UBUNTU: [Packaging] correctly implement noudeb build profiles. Date: Fri, 19 Feb 2021 00:26:05 +0000 Message-Id: <20210219002605.1166831-3-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210219002605.1166831-1-xnox@ubuntu.com> References: <20210219002605.1166831-1-xnox@ubuntu.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: Dimitri John Ledkov Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" When building under either of stage1, noudeb, cross or autopkgtest profiles udeb packages are not desired. Stop generating them, and drop build-dependencies that are used just to create udebs. Also note that dpkg in hirsute and up automatically buidlds packages with a noudeb profile, thus hirsute+ builds will be now much faster. This is a correct and backwards compatibles support for build profiles and can be backported to any prior release, where by default packages will be build with udebs. BugLink: https://bugs.launchpad.net/bugs/1916095 Signed-off-by: Dimitri John Ledkov Acked-by: Seth Forshee --- debian.master/control.d/flavour-control.stub | 2 +- debian.master/control.stub.in | 4 ++-- debian/rules | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/debian.master/control.d/flavour-control.stub b/debian.master/control.d/flavour-control.stub index 17be49dbd..df6377ce1 100644 --- a/debian.master/control.d/flavour-control.stub +++ b/debian.master/control.d/flavour-control.stub @@ -141,7 +141,7 @@ Description: Linux kernel version specific cloud tools for version PKGVER-ABINUM =HUMAN=. Package: SRCPKGNAME-udebs-FLAVOUR -Build-Profiles: +Build-Profiles: XC-Package-Type: udeb Section: debian-installer Architecture: ARCH diff --git a/debian.master/control.stub.in b/debian.master/control.stub.in index cae6f6783..1c1ee8857 100644 --- a/debian.master/control.stub.in +++ b/debian.master/control.stub.in @@ -7,8 +7,8 @@ Build-Depends: debhelper-compat (= 10), dh-systemd, cpio, - kernel-wedge, - dctrl-tools, + kernel-wedge , + dctrl-tools , kmod , makedumpfile [amd64] , libcap-dev , diff --git a/debian/rules b/debian/rules index ceffe36be..bedcd4f60 100755 --- a/debian/rules +++ b/debian/rules @@ -39,6 +39,9 @@ do_tools_common?=true do_tools_host?=false do_tools_perf_jvmti?=false do_enforce_all?=false +ifneq ($(filter noudeb,$(DEB_BUILD_PROFILES)),) +disable_d_i=true +endif # Don't build tools or udebs in a cross compile environment. ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) @@ -220,6 +223,7 @@ $(DEBIAN)/control.stub: \ debian/control: $(DEBIAN)/control.stub echo "# placebo control.stub for kernel-wedge flow change" >debian/control.stub cp $(DEBIAN)/control.stub debian/control +ifeq ($(disable_d_i),) # start new paragraph in debian/control echo >> debian/control # append udeb packages @@ -228,6 +232,7 @@ debian/control: $(DEBIAN)/control.stub LANG=C kernel-wedge gen-control $(release)-$(abinum) | \ grep-dctrl -FArchitecture $(arch) \ >>$(CURDIR)/debian/control +endif debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem) for cert in $(sort $(notdir $^)); \