Message ID | 1284478554-5347-1-git-send-email-stefan.bader@canonical.com |
---|---|
State | Accepted |
Delegated to: | Stefan Bader |
Headers | show |
On 09/14/2010 09:35 AM, Stefan Bader wrote: > 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<abi>-<flavor> postfixed version of the > gobi_loader. And both the rules file and the loader are renamed to be > <abi>-<flavor> 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<stefan.bader@canonical.com> > 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<stefan.bader@canonical.com> > --- > 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 \ The concept is right, though I haven't actually run the code. I had to do the same thing for compat-wireless firmware udev rules and class names. Acked-by: Tim Gardner <tim.gardner@canonical.com>
On Tue, Sep 14, 2010 at 05:35:54PM +0200, Stefan Bader wrote: > 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. I understand that this is likely an artifact of your packaging, but gobi-loader is entirely kernel version agnostic. There should never be any requirement to install multiple versions of it or its rules.
On 09/15/2010 04:05 PM, Matthew Garrett wrote: > On Tue, Sep 14, 2010 at 05:35:54PM +0200, Stefan Bader wrote: >> 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. > > I understand that this is likely an artifact of your packaging, but > gobi-loader is entirely kernel version agnostic. There should never be > any requirement to install multiple versions of it or its rules. > Right this is only needed because I put it into the lbm package and due to the way the packaging works. Its fine in Maverick where it is in its own package. -Stefan
Applied to Lucid-LBM (package re-uploaded to proposed)
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 \