From patchwork Thu Jun 10 08:08:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490234 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 4G0xSb4cqxz9sW7; Thu, 10 Jun 2021 18:08:47 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk4-0000Bu-L6; Thu, 10 Jun 2021 08:08:44 +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 1lrFk1-0000AR-IU for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk1-0004C8-BX for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: by mail-wm1-f71.google.com with SMTP id v25-20020a1cf7190000b0290197a4be97b7so2745083wmh.9 for ; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mQkN6haDCPKWYstEEK4EL/xRcHEI847mkOkRxoYRV/k=; b=q7YnwPeMrIX2BNMR3d5qqgOdn1Ok9BmHTZ3IgY0VCaDCILFWoncp9w2OEQs70jEOFj v3QPtJBEQ5sCf32jCuOj+6fRxdvw0knXgRgRfxUCitlZ3WeN1auhS376wft7j2+sfCfU K3TIEyzzccCm9Bws5Z2lpHNcJM+xGJAQQjwmNxUIkSg98adDE75QauQjJOwXBQsJfTtz fsAIB7jNdWvhCG4pX4FWwi8C466yiJlszfkMw62HPAz5xsMuYkVtNBLXLs4F0WswGV0T +BiDqviQepj0Twkro3pUuhxKXdpezVonP9rIAwmLwX7QFxpGm5SRJfkij5Jz/xhAK32W RHxQ== X-Gm-Message-State: AOAM53116AJFxm1e2uDrXMgc7VPkBRfSSMFi/3cU5cTK9av2sfBfYLni 7p6vmnH2UZPKvOT3lZQAfUh+9DrsVJFynvOapiM0L/Nphm2BxVN3w50HI7CPctRvR0WahZlQ3Rl BAKVxSTfcsV8RTJex4OQ8sXBkKAT2gFEYIuwhiZFYHQ== X-Received: by 2002:adf:ec10:: with SMTP id x16mr3956013wrn.83.1623312521029; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1ZkwnQM1k10mqw4SQTPmc3wO6cSfHq3y7IJgAsK0XWAMpeObANceJn6AixeNWBZmcSsV10A== X-Received: by 2002:adf:ec10:: with SMTP id x16mr3955993wrn.83.1623312520819; Thu, 10 Jun 2021 01:08:40 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:40 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 1/5] UBUNTU: [Packaging] buildinfo: Use modinfo data for the ABI Date: Thu, 10 Jun 2021 10:08:03 +0200 Message-Id: <20210610080807.25518-2-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Instead of just listing the provided modules, collect the modinfo data from all modules and put it in a modules subdirectory provided by the buildinfo package. This also includes the firmware information so drop the fwinfo file. For Hirsute this adds roughly 25MB to the amd64 generic buildinfo package: $ du -h /usr/lib/linux/5.11.0-14-generic/modules/ 25M /usr/lib/linux/5.11.0-14-generic/modules/ Signed-off-by: Juerg Haefliger --- debian/rules.d/2-binary-arch.mk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 5ae9a989207c..fbc7ce928587 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -460,14 +460,13 @@ endif $(builddir)/build-$*/Module.symvers | sort > $(abidir)/$* # Build the final ABI modules information. - find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \ - sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > $(abidir)/$*.modules - - # Build the final ABI firmware information. + install -d $(abidir)/$*.modules find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \ while read ko; do \ - /sbin/modinfo $$ko | grep ^firmware || true; \ - done | sort -u >$(abidir)/$*.fwinfo + modname=$${ko##*/}; \ + modname=$${modname%.ko}; \ + /sbin/modinfo "$${ko}" > $(abidir)/$*.modules/"$${modname}"; \ + done # Build the final ABI compiler information. ko=$$(find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | head -1); \ @@ -495,10 +494,9 @@ endif $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/config install -m644 $(abidir)/$* \ $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/abi - install -m644 $(abidir)/$*.modules \ - $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules - install -m644 $(abidir)/$*.fwinfo \ - $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/fwinfo + install -d $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules + install -m644 $(abidir)/$*.modules/* \ + $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules/ install -m644 $(abidir)/$*.retpoline \ $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline install -m644 $(abidir)/$*.compiler \ From patchwork Thu Jun 10 08:08:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490235 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 4G0xSf2lvlz9sW7; Thu, 10 Jun 2021 18:08:50 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk6-0000DJ-Tq; Thu, 10 Jun 2021 08:08:46 +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 1lrFk1-0000AX-Vh for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk1-0004CH-Ou for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:41 +0000 Received: by mail-wr1-f69.google.com with SMTP id z3-20020adfdf830000b02901198337bc39so531176wrl.0 for ; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WgdIEC+pxj3bvyCG77MqwM1FWCObdl+ymSaRBlUo7hg=; b=HwIiGQtKhXloiUxoaKqM3KZYpqvr/khvsvotyPh4EpxAfwiE9cBuZIzbZ1zZfua0ne p3hZBNHbIIKdqR+Z/+Otwtu262yQYccxrnxm2nwSwUkfy6PrtvMJ1sMr7kliGDvP9o0Q oF8FN50v+9GheKMnMSUmEWLZ+nhCJhuUa9fsq4mHn76/r8xEfSCukILNIcgwnJ9hqjMu f1YkpFTHnTU8WqaK7FvD4rYDAD9f/XxOPEylibfkg+naqpxLX4/zKFpwqTzhuO7+h8Ds zBo3tYr+roo08/YueRjE51GraWg+1xO/ablFK/WAAxNCoBWOY0tP6FiHGFPFeBhLz+tE BeZg== X-Gm-Message-State: AOAM532O8ihRFn8whKxSgBOZQk1uIkuaZsP2lDngJI/IqyY0+CNzbjGB YSgvw9qe6z0WZ98kJsC5cvuuTF77CCDVyAfr1FhvbVrYC1T2doBpksplap225TxgZ7wCfkeoMSG sPFbiCNX8fcMum4pdWI+QVB1NK8rUFE/oLcVXsUuxbw== X-Received: by 2002:a5d:56d1:: with SMTP id m17mr3845700wrw.354.1623312521481; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrr+jyCJ5F9bFfod2u7f6G+Ht3lFub4XgMANfpi+CyX7p52HH/gILproJVbzBDsYM2/+mMJQ== X-Received: by 2002:a5d:56d1:: with SMTP id m17mr3845691wrw.354.1623312521336; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:41 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 2/5] UBUNTU: [Packaging] buildinfo: Add modinfo data from built-in modules to the ABI Date: Thu, 10 Jun 2021 10:08:04 +0200 Message-Id: <20210610080807.25518-3-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Collect the modinfo data from the built-in modules and put it in a modules.builtin subdirectory provided by the buildinfo package. For Hirsute this adds roughly 1.2MB to the amd64 generic buildinfo package: $ du -h /usr/lib/linux/5.11.0-14-generic/modules.builtin/ 1.2M /usr/lib/linux/5.11.0-14-generic/modules.builtin/ With the previous commit, this results in an amd64 generic buildinfo package size increase from 440K to 4.8M. Signed-off-by: Juerg Haefliger --- debian/rules.d/2-binary-arch.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index fbc7ce928587..2b45b1caf925 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -354,6 +354,20 @@ endif INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \ run-parts -v $(DROOT)/tests-build + # Build the final ABI information for built-in modules. + # This needs to happen before the next step below which removes + # essential files required by modinfo (modules.dep and the likes). + if [ -f $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin ] ; then \ + install -d $(abidir)/$*.modules.builtin; \ + cat $(pkgdir)/lib/modules/$(abi_release)-$*/modules.builtin | \ + while read ko; do \ + modname=$${ko##*/}; \ + modname=$${modname%.ko}; \ + /sbin/modinfo -b $(pkgdir) -k $(abi_release)-$* "$${modname}" > \ + $(abidir)/$*.modules.builtin/"$${modname}"; \ + done; \ + fi + # # Remove files which are generated at installation by postinst, # except for modules.order and modules.builtin @@ -501,6 +515,11 @@ endif $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/retpoline install -m644 $(abidir)/$*.compiler \ $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/compiler + if [ -d $(abidir)/$*.modules.builtin ] ; then \ + install -d $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules.builtin; \ + install -m644 $(abidir)/$*.modules.builtin/* \ + $(pkgdir_bldinfo)/usr/lib/linux/$(abi_release)-$*/modules.builtin/; \ + fi ifneq ($(full_build),false) # Clean out this flavours build directory. From patchwork Thu Jun 10 08:08:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490236 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 4G0xSg3GkBz9sWQ; Thu, 10 Jun 2021 18:08:51 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk7-0000DY-AJ; Thu, 10 Jun 2021 08:08:47 +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 1lrFk2-0000Aj-M8 for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:42 +0000 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk2-0004CQ-Bq for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:42 +0000 Received: by mail-wm1-f71.google.com with SMTP id u17-20020a05600c19d1b02901af4c4deac5so2751095wmq.7 for ; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e1ZP0q+JfKHACamlVnk1tRjQZcafIp0HTJju9JQEIqA=; b=Y73gHYUc2oemMuwujvPPdDB4WvT9Xkr5eain/flfr249FMvqe/yWS4Z6r17/FoRaj2 KGm92PP0Om6A0OsicG94JPiVtMiKN3J354K/bXdMLZhbB90DV/CUhGhC7bMEbdzH7XDF hVBIJ0mErl4tDwpIzGxnOtBzfCYy2nfG4YlunhwtR0iuUJDsuLMpYvBCIVR4uQT+pt3R 95aAWM6vJN9tOIH6fuSp84Dxw3VYfB+hR6srRmDslKjkKAB//nBwyKjyhRYzao0nePzp XHEb2bMb0pOOBynn8SDKYbbUDJI3RQU+tRVvwCGMV1DdF2/ie1Dv1004Cnypxo6sAZh4 /2xQ== X-Gm-Message-State: AOAM530eIlfkrvU0VeknM35A25aF8bvLhttaQSSKUVgcrfGv4bNOxDrR TO7/QapIwjDHdKU+qPmxQgLcmEPvlOfUJNB0Grb+pc14xAXAoIT1u9jogK44FX6+dl44AACQVBb DkNXTgDt7vjFb0hlUCDIlkFI3ZZxgMRXp8o8TBfxdmg== X-Received: by 2002:a5d:6147:: with SMTP id y7mr3879463wrt.418.1623312522055; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYbvYLHYMGAJtqQCY9rIbu7ZJAqHGkLtOF91tasSWqAg/8rdYQD+xFkahyNNoFxJa4J5vykg== X-Received: by 2002:a5d:6147:: with SMTP id y7mr3879444wrt.418.1623312521821; Thu, 10 Jun 2021 01:08:41 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:41 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 3/5] UBUNTU: [Packaging] module-check: Handle current/new ABI modules directory Date: Thu, 10 Jun 2021 10:08:05 +0200 Message-Id: <20210610080807.25518-4-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" The previous commits converted the ABI from a single modules file to a directory containing per-module files. Handle that for the current/new ABI. Signed-off-by: Juerg Haefliger --- debian/scripts/module-check | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/debian/scripts/module-check b/debian/scripts/module-check index c754ea368cfb..2e31045f834f 100755 --- a/debian/scripts/module-check +++ b/debian/scripts/module-check @@ -13,9 +13,9 @@ if (-f "$prev_abidir/ignore.modules" exit(0); } -if (not -f "$abidir/$flavour.modules" or not -f +if (not -d "$abidir/$flavour.modules" or not -f "$prev_abidir/$flavour.modules") { - print "previous or current modules file missing!\n"; + print "previous or current modules file/directory missing!\n"; print " $abidir/$flavour.modules\n"; print " $prev_abidir/$flavour.modules\n"; if (defined($skipmodule)) { @@ -52,10 +52,11 @@ if (-f "$prev_abidir/../modules.ignore") { # Read new modules first print " reading new modules..."; $new_count = 0; -open(NEW, "< $abidir/$flavour.modules") or - die "Could not open $abidir/$flavour.modules"; -while () { +opendir(NEW, "$abidir/$flavour.modules") or + die "Could not open directory $abidir/$flavour.modules"; +while (readdir NEW) { chomp; + next if /^\./; # Ignore '.' and '..' $modules{$_} = 1; $new_count++; } From patchwork Thu Jun 10 08:08:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490237 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 4G0xSh40wjz9sX5; Thu, 10 Jun 2021 18:08:52 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFk8-0000ES-8b; Thu, 10 Jun 2021 08:08:48 +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 1lrFk3-0000BL-8X for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:43 +0000 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk2-0004CV-Pm for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:43 +0000 Received: by mail-wm1-f71.google.com with SMTP id n2-20020a05600c3b82b02901aeb7a4ac06so3488010wms.5 for ; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cH1yRSfkSF1Nrphdv88McIOkMHmyxfHs8TCVGhUtd34=; b=FFrfcxUqr2y1v2CTymN1MEU8lng2jIsfKIs9Lt2lT5W6x4Dr0BUWLBNnjePSsTaFNL LhskOQKSeb+UgU+pHa+wD1wnPh4Hdg8u89CRtlqQyNY2UCyqNlZSz7eLDBTjSXlxkpIJ cJju91CeLPKhWHHLX8Y/47T1CxMUYLVkXbncT7ETO31D1i2k8nK+KPlX9XCf+ioD6ouB ByRRNM0KqnAp+pdAZIkpAlgPLvLSERpTh0iNiVbPnaGtepqHjCpJhXBBQh+5C/wmYU0L sSN710i6qQfhuxhYTT8CJbrVtVpQ9jQsk9jvaUHNdzEm7JNp8O7YJ4i2HnhrnEmfeUUE n6JQ== X-Gm-Message-State: AOAM532q38GfNcFAEJwsJojdzEqa5BDc/+Nz644yOcH4gTZFa2vzjxVF oW4DhbYDxWWO+DtXxYpzWbsBsiHogQW6365FAgw1VymCfRC+TsiBEhraNyAj3jPEIYiRucz6mZl Y0Ey+nntG5mYU1/0FEjEH/SwK/ZK7syhfc9hSa5slBg== X-Received: by 2002:a5d:564a:: with SMTP id j10mr3909772wrw.171.1623312522570; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTLuj5asNbWDdAR7CsDywJbNriirf9LcxG7uqF8xGj5GDWWW4iQAWURfq/KAFUFpXrptQiXw== X-Received: by 2002:a5d:564a:: with SMTP id j10mr3909758wrw.171.1623312522410; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:42 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [Unstable][PATCH v2 4/5] UBUNTU: [Packaging] module-check: Handle previous ABI modules directory Date: Thu, 10 Jun 2021 10:08:06 +0200 Message-Id: <20210610080807.25518-5-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Handle the modules directory of the previous ABI. We still need to support the old style single module list until getabis retrieves an updated buildinfo package. Signed-off-by: Juerg Haefliger --- debian/scripts/module-check | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/scripts/module-check b/debian/scripts/module-check index 2e31045f834f..1045da4e3e65 100755 --- a/debian/scripts/module-check +++ b/debian/scripts/module-check @@ -13,8 +13,8 @@ if (-f "$prev_abidir/ignore.modules" exit(0); } -if (not -d "$abidir/$flavour.modules" or not -f - "$prev_abidir/$flavour.modules") { +if (not -d "$abidir/$flavour.modules" or + not -e "$prev_abidir/$flavour.modules") { print "previous or current modules file/directory missing!\n"; print " $abidir/$flavour.modules\n"; print " $prev_abidir/$flavour.modules\n"; @@ -66,10 +66,18 @@ print "read $new_count modules.\n"; # Now the old modules, checking for missing ones print " reading old modules..."; $old_count = 0; -open(OLD, "< $prev_abidir/$flavour.modules") or - die "Could not open $prev_abidir/$flavour.modules"; -while () { +if (-d "$prev_abidir/$flavour.modules") { + opendir(OLD, "$prev_abidir/$flavour.modules") or + die "Could not open directory $prev_abidir/$flavour.modules"; + @old = readdir OLD; +} else { + open(OLD, "< $prev_abidir/$flavour.modules") or + die "Could not open $prev_abidir/$flavour.modules"; + @old = ; +} +for (@old) { chomp; + next if /^\./; # Ignore '.' and '..' if (not defined($modules{$_})) { print "\n" if not $missing; $missing++; From patchwork Thu Jun 10 08:08:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juerg Haefliger X-Patchwork-Id: 1490238 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 4G0xSk3M4pz9sW7; Thu, 10 Jun 2021 18:08:54 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lrFkA-0000GI-NX; Thu, 10 Jun 2021 08:08:50 +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 1lrFk3-0000BT-I0 for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:43 +0000 Received: from mail-wr1-f72.google.com ([209.85.221.72]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrFk3-0004Cc-AJ for kernel-team@lists.ubuntu.com; Thu, 10 Jun 2021 08:08:43 +0000 Received: by mail-wr1-f72.google.com with SMTP id k25-20020a5d52590000b0290114dee5b660so508039wrc.16 for ; Thu, 10 Jun 2021 01:08:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FOXdCUhyRGaI0hLRgTR2wkdfp1QLiLRQaxjZYsERrLQ=; b=QwzHfsh+IRoEufNptLHg+v+QW2AvrjQk85SWXhlKDYwHOKS2n7TtT+S2AeF8E2GV3Q tlA34a4ODPyOTkobmJ1JgePYqZz1OciJ7aT1i77I1sSpWgwKIdLdlgBzy9oKX/DB9K4r 01NtU8extxqsXxLmc/Xf+p2jDNZTW6QCjjba3HNxjzUXvw2Xo6EhoVfqBegUyPm/JSKZ ON/JMA7YsrNn8rAOShxqODJrWtvejl4vu3MaiFPNKZcIuUAmvMvLeUKlnxQy/qsXqCu3 Uz8V3e9/z+Ccb0huVGFeC6jPUFHSqjl65k/+0RkpFf7IVuGav0TDrf+xvVOQQFxDGKwz FLDQ== X-Gm-Message-State: AOAM532c0UTWqTFQFC/cg39MIrYGHU98+bWYkQkxozo7NaBIavIbdM9L rCTb9qwy1z0ItVBaO+mw/+sK6NRHIksrKBlRDTJWDdMPhv8J+8HZpxs/2Rt/H7wXfzG4U0X5xgi 8wXr4SaT50Zn2ZhP45Uy+Bb4orvNclqpE8PGGglLOPA== X-Received: by 2002:adf:8061:: with SMTP id 88mr3825325wrk.233.1623312523070; Thu, 10 Jun 2021 01:08:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzivKcjKGTZZUcWoJvXniS2noSDP6IZjEDZRKXZq2f5XpOHk6gQF4114Ak+tJHlzqoGJbnKjA== X-Received: by 2002:adf:8061:: with SMTP id 88mr3825316wrk.233.1623312522864; Thu, 10 Jun 2021 01:08:42 -0700 (PDT) Received: from gollum.fritz.box ([194.191.244.86]) by smtp.gmail.com with ESMTPSA id n13sm2843854wrg.75.2021.06.10.01.08.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 01:08:42 -0700 (PDT) From: Juerg Haefliger X-Google-Original-From: Juerg Haefliger To: kernel-team@lists.ubuntu.com Subject: [kteam-tools][PATCH v2 5/5] cranky: master -- getabis: Preserve ABI repo layout with new buildinfo packages Date: Thu, 10 Jun 2021 10:08:07 +0200 Message-Id: <20210610080807.25518-6-juergh@canonical.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210610080807.25518-1-juergh@canonical.com> References: <20210610080807.25518-1-juergh@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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Newer buildinfo packages provide modules and modules.builtin directories containing one file per module with modinfo data rather than a single file with the list of modules. That is a lot of additional data that we don't need in the repo so convert the content of the buildinfo package so that the ABI modules layout is preserved. Signed-off-by: Juerg Haefliger --- cranky/master/getabis | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/cranky/master/getabis b/cranky/master/getabis index ebe4c4abdbc0..57e3e36846ca 100755 --- a/cranky/master/getabis +++ b/cranky/master/getabis @@ -150,7 +150,27 @@ getall_set() do mv "$base/$comp" "$abidir/$arch/$sub.$comp" done - cat "$base/fwinfo" >>"$fwinfo" + # fwinfo might no longer be provided + if [ -f "$base/fwinfo" ] ; then + cat "$base/fwinfo" >> "$fwinfo" + fi + # Handle new modules.builtin + if [ -e "$base/modules.builtin" ] ; then + mv "$base/modules.builtin" "$abidir/$arch/$sub.modules.builtin" + fi + # Convert the new-style module directories to preserve the + # existing ABI layout in the repo + for comp in modules modules.builtin ; do + mdir="$abidir/$arch/$sub.$comp" + if [ -d "$mdir" ] ; then + # Reconstruct fwinfo + grep -he '^firmware:' "$mdir"/* >> "$fwinfo" + # Reconstruct modules and modules.builtin files + ls -1 "$mdir" > "$mdir.tmp" + rm -rf "$mdir" + mv "$mdir.tmp" "$mdir" + fi + done fi rm -rf tmp $filenames echo " done"