From patchwork Wed Dec 5 16:56:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1008343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) 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; dmarc=fail (p=none dis=none) header.from=canonical.com 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 4394ds0cKRz9s9G; Thu, 6 Dec 2018 03:57:05 +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 1gUaTr-0005Mi-Th; Wed, 05 Dec 2018 16:56:59 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1gUaTq-0005Ma-QH for kernel-team@lists.ubuntu.com; Wed, 05 Dec 2018 16:56:58 +0000 Received: from mail-qk1-f199.google.com ([209.85.222.199]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gUaTq-0003CP-GS for kernel-team@lists.ubuntu.com; Wed, 05 Dec 2018 16:56:58 +0000 Received: by mail-qk1-f199.google.com with SMTP id y83so20368224qka.7 for ; Wed, 05 Dec 2018 08:56:58 -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:subject:date:message-id; bh=SjmjG2qT26brTDT3BjiqvfgHFmqFj3Fp5Q2lpohw6/s=; b=gwyVb+HIFQyAeH/O4F9wi2ioKceDomJzhqF4AyKlhpykccm1OEaEp2k6swE3yWUbGd VI0c8XRrRLZ+zv4Wb+UdC7+ddi/ZAp48j+8fWrPLOgSTSoA7xngS0Zu7xHdoNxCvqC66 touIyDtwCoKNzdGhxa0YYHZhCeVTmoste0qQwzi92pIsVJ9WLB8xgMKudf9tK7KvcjJv qtZBNGunc8ipKxFIX1UUZ/jjP9CUqlYxoIAe1dzanTDXmOPikLGBiZKjL0rqCPe1yPQL u9ZRbvjDm8fZpmFBVHLa/3eIXf4G/Llhq04dZFaAZji1js80WRqF4P38jekn/UMRAJG0 b7Gw== X-Gm-Message-State: AA+aEWail3/ij/Z2DDhT9GM5Ga8nHDvy/X+oIZsseaemgcaM/7ctlpRU PtEf8IKzPUzs2ELI+CMpehh7n2vKOTWlGZdpR/WNDZnk6sUUBMOQsozMpvcueOvuFstC3p6BR1I +lUI0H34rcv04pHPkBwIt0ReFEwQXS0jIqKrtDB77 X-Received: by 2002:aed:3105:: with SMTP id 5mr24449099qtg.364.1544029017174; Wed, 05 Dec 2018 08:56:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/XFGoQvcgY+ABmL7+S+Rn1+vTiR+g930khqaIL74Y0anpYWVyvKR9/uvVLti87iX6WTsUIF9w== X-Received: by 2002:aed:3105:: with SMTP id 5mr24449072qtg.364.1544029016596; Wed, 05 Dec 2018 08:56:56 -0800 (PST) Received: from gallifrey.lan ([2804:14c:4e3:4545:9d17:566d:88ff:d842]) by smtp.gmail.com with ESMTPSA id v32sm14685429qta.37.2018.12.05.08.56.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 08:56:55 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU: [Packaging] buildinfo -- include origin package mark to modules files Date: Wed, 5 Dec 2018 14:56:52 -0200 Message-Id: <20181205165652.21515-1-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.17.1 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: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: http://bugs.launchpad.net/bugs/1806380 Include a flag at the end of each line of the "debian.$branch/abi/*/$arch/$flavour.modules" file indicating the package that each module is currently shipped in. This will cause the build to fail when a module is silently moved from or to the linux-modules-extra package. Signed-off-by: Marcelo Henrique Cerri --- debian/rules.d/2-binary-arch.mk | 12 ++++++++++-- debian/scripts/misc/getabis | 16 ++++++++++++---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 20f744c012a9..d3b163bfc00d 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -407,8 +407,16 @@ 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 + > "$(abidir)/$*.modules"; \ + for dir in "$(pkgdir_bin)" "$(pkgdir)" "$(pkgdir_ex)"; do \ + mark=; \ + case "$$dir" in \ + *extra*) mark=' extra';; \ + esac; \ + find "$$dir" -name \*.ko | \ + sed -e 's/.*\/\([^\/]*\)\.ko/\1'"$$mark"'/' >> "$(abidir)/$*.modules"; \ + done; \ + sort -o "$(abidir)/$*.modules" "$(abidir)/$*.modules" # Build the final ABI firmware information. find $(pkgdir_bin) $(pkgdir) $(pkgdir_ex) -name \*.ko | \ diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis index 42690b0311e2..585a9ca8b145 100755 --- a/debian/scripts/misc/getabis +++ b/debian/scripts/misc/getabis @@ -65,8 +65,19 @@ getall() { echo -n "extracting$prefixes..." for filename in $filenames do - dpkg-deb --extract $filename tmp + dpkg-deb --extract "$filename" tmp + # Extract the modules list, so we can mark each line + # with its origin. + case "$filename" in + *extra*) mark=' extra';; + esac + files=$(dpkg-deb --vextract "$filename" tmp) + [ "$?" -ne 0 ] && continue + echo "$files" | sed -n -e '/.*\/\([^\/]*\)\.ko/s//\1'"$mark"'/p' >> \ + "$abidir/$arch/$sub.modules" + done + sort -o "$abidir/$arch/$sub.modules" "$abidir/$arch/$sub.modules" # FORM 1: linux-image et al extracted here. if [ -d tmp/boot ]; then echo -n "images..." @@ -83,9 +94,6 @@ getall() { else echo -n "NO RETPOLINE FILE..." fi - (cd tmp; find lib/modules/$verabi-$sub/kernel -name '*.ko') | \ - sed -e 's/.*\/\([^\/]*\)\.ko/\1/' | sort > \ - $abidir/$arch/$sub.modules ( cd tmp; # Prevent exposing some errors when called by python scripts. SIGPIPE seems to get