From patchwork Tue Sep 14 15:35:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 64718 X-Patchwork-Delegate: stefan.bader@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 9CD09B6EEE for ; Wed, 15 Sep 2010 01:36:09 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OvXY7-0006TB-Mk; Tue, 14 Sep 2010 16:35:59 +0100 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OvXY4-0006SD-W0 for kernel-team@lists.ubuntu.com; Tue, 14 Sep 2010 16:35:57 +0100 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OvXY4-0002bW-4H for ; Tue, 14 Sep 2010 16:35:56 +0100 Received: from p5b2e3e4c.dip.t-dialin.net ([91.46.62.76] helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1OvXY3-0005i2-T4 for kernel-team@lists.ubuntu.com; Tue, 14 Sep 2010 16:35:56 +0100 From: Stefan Bader To: kernel-team@lists.ubuntu.com Subject: [Lucid-LBM] SRU: Make gobi_loader unique to ABI and flavour Date: Tue, 14 Sep 2010 17:35:54 +0200 Message-Id: <1284478554-5347-1-git-send-email-stefan.bader@canonical.com> X-Mailer: git-send-email 1.7.0.4 To: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com SRU Justification: Impact: When adding the gobi loader and its udev rule to the wwan package (to support certain wwan cards) it was not taken into account that these files are installed into common directories and by that are not unique to the package. This causes problems when trying to upgrade the package to a newer kernel ABI as packages are considered different but still provide the same files. Also this would not allow to install multiple flavors in parallel. Fix: For the packaging the udev rules file is modified to check for the current kernel version and run a - postfixed version of the gobi_loader. And both the rules file and the loader are renamed to be - postfixed. Testcase: Installing two flavors of the wwan package or upgrade between abi version currently fails. From 644ff5a21c8eeca4f41ecda7b4bdc9e87ee77a60 Mon Sep 17 00:00:00 2001 From: Stefan Bader Date: Tue, 14 Sep 2010 12:05:52 +0200 Subject: [PATCH] UBUNTU: wwan: Make gobi_loader unique to ABI and flavour BugLink: http://bugs.launchpad.net/bugs/638115 This resolves the problems of packages being held back on ABI bumps and multiple flavours not being installable in parallel. Signed-off-by: Stefan Bader Acked-by: Tim Gardner --- debian/rules.d/2-binary-arch.mk | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 37739a5..25f3a1b 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -185,6 +185,26 @@ endif done $(MAKE) -C $(wwsrcdir) prefix=$(wwpkgdir) install install -d $(wwpkgdir)/DEBIAN + + # + # Hack to make the udev rule and firmware loader specific to the + # package. + # + POSTFIX="$(abinum)-$(target_flavour)" \ + R='PROGRAM="\/bin\/uname -r",'; \ + R=$$R' RESULT!="'$(release)-$$POSTFIX'",'; \ + R=$$R' GOTO="gobi_rules_end"'; \ + sed -i -e "s/^\(LABEL=\"gobi_rules\"\)$$/\0\n$$R\n/" \ + -e "s/\(gobi_loader\)/\0-$$POSTFIX/" \ + $(wwpkgdir)/lib/udev/rules.d/60-gobi.rules + + TGTFILE="$(wwpkgdir)/lib/udev/rules.d/60-gobi"; \ + chmod 644 $${TGTFILE}.rules; \ + mv $${TGTFILE}.rules $${TGTFILE}-$(abinum)-$(target_flavour).rules + + TGTFILE="$(wwpkgdir)/lib/udev/gobi_loader"; \ + mv $$TGTFILE $$TGTFILE-$(abinum)-$(target_flavour) + for script in postinst postrm; do \ sed -e 's/@@KVER@@/$(release)-$(abinum)-$*/g' \ debian/control-scripts/$$script \