[Lucid-LBM] SRU: Make gobi_loader unique to ABI and flavour

Tim Gardner tim.gardner at canonical.com
Wed Sep 15 13:35:49 UTC 2010


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 at 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 at 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 at canonical.com>

-- 
Tim Gardner tim.gardner at canonical.com




More information about the kernel-team mailing list