From patchwork Wed Dec 5 17:16:44 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: 1008360 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 43954n3k8hz9s3C; Thu, 6 Dec 2018 04:16:57 +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 1gUan6-0006wU-Ei; Wed, 05 Dec 2018 17:16:52 +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 1gUan4-0006wO-Er for kernel-team@lists.ubuntu.com; Wed, 05 Dec 2018 17:16:50 +0000 Received: from mail-qk1-f197.google.com ([209.85.222.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gUan4-0004Ld-52 for kernel-team@lists.ubuntu.com; Wed, 05 Dec 2018 17:16:50 +0000 Received: by mail-qk1-f197.google.com with SMTP id k203so20799794qke.2 for ; Wed, 05 Dec 2018 09:16:50 -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=NGFWNYLYQwRAYXF+ERx15+k6Hkb/MGMC9jfaGkuyRBA=; b=IULukHn2u8qxK67De/FS1J2Op04JA6WgqbS7mbK2LSig7U+dbkskJmiJHHNHn6ykfe b1RUSH5NHICcXCHUmkrNDyQUyw0OwxT/qDSnk9sK+7kRL2QWA41dw5BUq8n2hBQ8rsiw /fmeb4B6xn/GLnl3DgkaF5JIjF71uVxPVc3bZgsO8Vdvc5vqgETMobdvFUhHJARt93l8 /lJGvirKHqz/tTOFGpNPhgzrVhd9ZGQJ7hy+gv0fzOm3dsWuEdTO6DhGwjYWAB9cnRDC Xxwdm0idwaHgiNu0rizag7TnAtzdfedJgEMZP2j8Xwks0OZWqZEDXlxB9y1ZMNhguEai WrRw== X-Gm-Message-State: AA+aEWY8/1JyfKn3BG+jQLeMPi9Uz7vz/RE7quMxMu0EbWtUx7lyAe/L 6HPUR8LCQUi30zzMoDWLjjvcx1CerltAWu8MoolIt/as/FbbAxaDA5nbK6q5YeI7zJD9I/mJ2xb OY464MIVlA9W+iSQg+CqpFIG5M3S0OckAqA/TSeK7 X-Received: by 2002:ac8:2a06:: with SMTP id k6mr24563798qtk.245.1544030208824; Wed, 05 Dec 2018 09:16:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/Us2TUnxRVN5/U7++ENFxpOiyUjxhQvhYI3jV496qUyMmLv4a9C6VYxwI5MKujDZkvvpVp84g== X-Received: by 2002:ac8:2a06:: with SMTP id k6mr24563767qtk.245.1544030208530; Wed, 05 Dec 2018 09:16:48 -0800 (PST) Received: from gallifrey.lan ([2804:14c:4e3:4545:9d17:566d:88ff:d842]) by smtp.gmail.com with ESMTPSA id e49sm12904655qta.0.2018.12.05.09.16.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 09:16:47 -0800 (PST) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [b, c, d][PATCH v2] UBUNTU: [Packaging] buildinfo -- include origin package mark to modules files Date: Wed, 5 Dec 2018 15:16:44 -0200 Message-Id: <20181205171644.29784-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 --- v2: Just fixed the initialization of "mark" in debian/scripts/misc/getabis. Updated the same initialization in debian/rules.d/2-binary-arch.mk for consistency. --- debian/rules.d/2-binary-arch.mk | 12 ++++++++++-- debian/scripts/misc/getabis | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 20f744c012a9..974dbf04d2f7 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 \ + case "$$dir" in \ + *extra*) mark=' extra';; \ + *) mark='';; \ + 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..5d9daa023813 100755 --- a/debian/scripts/misc/getabis +++ b/debian/scripts/misc/getabis @@ -65,8 +65,20 @@ 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';; + *) mark='';; + 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 +95,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