From 870dbcbf8ccbaf1e27c0ad8c5ebb9c6f54786ae550935a94b74689c80cd6007d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 2 Apr 2008 22:40:47 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hplip?expand=0&rev=27 --- ... => create_hal_global_fdi_from_hpmud_rules | 25 +++++--- hpijs-standalone.spec | 3 +- hplip.changes | 14 +++++ hplip.spec | 58 ++++++++++++++++--- 4 files changed, 83 insertions(+), 17 deletions(-) rename create_hal_global_fdi_from_models.dat => create_hal_global_fdi_from_hpmud_rules (51%) diff --git a/create_hal_global_fdi_from_models.dat b/create_hal_global_fdi_from_hpmud_rules similarity index 51% rename from create_hal_global_fdi_from_models.dat rename to create_hal_global_fdi_from_hpmud_rules index 6b2d674..07bc9ce 100644 --- a/create_hal_global_fdi_from_models.dat +++ b/create_hal_global_fdi_from_hpmud_rules @@ -1,6 +1,7 @@ #! /bin/bash # -# Johannes Meixner , 2004, 2005, 2006 +# Johannes Meixner , 2004, 2005, 2006, 2007, 2008 +# Till Kamppeter , 2008 #set -x @@ -15,12 +16,20 @@ MY_NAME=${0##*/} # Create temporary files: TMP_DATA=$(mktemp -u /tmp/$MY_NAME.XXXXXX) +cat /dev/null >$TMP_DATA -# Extract USB entries from the models.dat file: -test -n "$1" && RULES_FILE="$1" || RULES_FILE="models.dat" -ls $RULES_FILE &>/dev/null || { echo "$MY_NAME error: Required models.dat file '$RULES_FILE' not found." 1>&2 ; exit 3 ; } -tr '[:upper:]' '[:lower:]' <$RULES_FILE | egrep '^usb-pid=[0-9a-f][0-9a-f][0-9a-f][0-9a-f]$' | grep -v '0000' | cut -s -d '=' -f 2 | sort -u >$TMP_DATA -tr '[:upper:]' '[:lower:]' <$RULES_FILE | egrep '^usb-pid=[0-9a-f][0-9a-f][0-9a-f]$' | grep -v '000' | cut -s -d '=' -f 2 | sort -u | sed -e 's/^/0/' >>$TMP_DATA +# Extract HPLIP USB ID classes (the digits in entries like SYSFS{idProduct}=="??12") +# and generate all possible HPLIP USB device IDs, see +# https://bugs.launchpad.net/bugs/195782 +test -n "$1" && RULES_FILE="$1" || RULES_FILE="hpmud.rules" +test -r $RULES_FILE || { echo "$MY_NAME error: Cannot read file '$RULES_FILE'." 1>&2 ; exit 3 ; } +for CLASS in $( sed -n -e '/idVendor}=="03f0"/s/.*idProduct}=="??\([0-9A-Za-z]*\)".*/\1/p' $RULES_FILE ) +do for A in 0 1 2 3 4 5 6 7 8 9 a b c d e f + do for B in 0 1 2 3 4 5 6 7 8 9 a b c d e f + do echo "0x$A$B$CLASS" >>$TMP_DATA + done + done +done # Output: @@ -33,10 +42,10 @@ echo ' ' exec <$TMP_DATA while read PRODUCT do echo - echo ' ' + echo ' ' echo ' ' echo -n ' ' echo ' scanner' echo ' ' diff --git a/hpijs-standalone.spec b/hpijs-standalone.spec index d559062..f1d0da1 100644 --- a/hpijs-standalone.spec +++ b/hpijs-standalone.spec @@ -18,7 +18,7 @@ Summary: HPIJS stand-alone # x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June) # Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc Version: 2.8.2 -Release: 4 +Release: 12 Group: Hardware/Printing License: BSD 3-Clause Url: http://hpinkjet.sourceforge.net/ @@ -64,7 +64,6 @@ For full documentation and license see the package hplip. Authors: -------- David Suffield - Cory Meisch Yie Shiyun Donald J. Welch Cauligi Raghothama S. diff --git a/hplip.changes b/hplip.changes index 385e781..3a1bdc1 100644 --- a/hplip.changes +++ b/hplip.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Apr 2 14:40:57 CEST 2008 - jsmeix@suse.de + +- Exchanged create_hal_global_fdi_from_models.dat with + create_hal_global_fdi_from_hpmud_rules which creates the + global HAL 70-hpmud.fdi file during build-time from the + 55-hpmud.rules file to be in sync with the udev rules file + and to make sure to have all possible HPLIP device IDs, see + https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782 +- Require the exact matching version of the hpijs sub-package + to have the correct libhpip and libhpmud installed. +- Require pyxml to have the xml.parsers.expat Python module, + see https://answers.launchpad.net/hplip/+question/25696 + ------------------------------------------------------------------- Tue Feb 26 12:25:45 CET 2008 - jsmeix@suse.de diff --git a/hplip.spec b/hplip.spec index 1ae1067..7423a28 100644 --- a/hplip.spec +++ b/hplip.spec @@ -18,7 +18,7 @@ Summary: HP's Printing, Scanning, and Faxing Software # x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June) # Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc Version: 2.8.2 -Release: 4 +Release: 23 Group: Hardware/Printing License: BSD 3-Clause; GPL v2 or later; X11/MIT Url: http://hpinkjet.sourceforge.net/ @@ -40,8 +40,8 @@ Source101: hp-toolbox.wrapper Source102: hpijs.1.gz # Source103 is the init script for hpssd: Source103: rchplip -# Script which outputs a global HAL fdi file for HP USB devices which are known to HPLIP: -Source104: create_hal_global_fdi_from_models.dat +# Script which outputs a global HAL fdi file for all HP USB devices which belong to HPLIP: +Source104: create_hal_global_fdi_from_hpmud_rules # Patch100... is for special Suse patches: # Patch101 changes in the udev rules file the owner from "lp" to "root" # to avoid that the permissions can be changed e.g. by any CUPS filter script @@ -50,7 +50,12 @@ Patch101: change-udev-rules.diff # Install into this non-root directory (required when norootforbuild is used): BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: coreutils, /bin/grep, /bin/sed, /usr/bin/find -Requires: %{name}-hpijs, foomatic-filters, python-xml, python-qt +# Require the exact matching version of the hpijs sub-package to make sure +# to have the exact matching version of libhpip and libhpmud installed. +# A wrong library version may let libsane-hpaio crash (e.g. segfault) +# which lets the whole scanning stack frontend<->libsane-dll<->libsane-backend crash +# also for any other backend when the hpaio backend is enabled (e.g. "scanimage -L"): +Requires: %{name}-hpijs = %{version}, foomatic-filters, python-xml, python-qt, pyxml # Either the hplip17 packages or the hplip packages can be installed: Obsoletes: hplip17 # Skip testing devel dependencies required by libtool .la files by the following comment: @@ -95,12 +100,40 @@ http://hpinkjet.sourceforge.net/ Authors: -------- David Suffield - Cory Meisch Yie Shiyun Donald J. Welch Cauligi Raghothama S. + Aaron Albright + Charlie Moore + Chris Wiesner + Chuck Esterbrook + Cory Meisch + David Goodger + David Paschal + Don Castrapel + Foster Nuffer + Hamish B Lawson + Henrique M. Holschuh + Ian Bicking + Jacqueline Pitter + James Thiele + John Hosszu + John Oleinik + Linus Araque + Mark Crawford + Mark Overton + Michael Foord + Mike Orr + Pete Parks + Philippe Normand + Sam Rushing + Smith Kennedy + Steve DeRoos + Tavis Rudd + Till Kamppeter %package hpijs +License: BSD 3-Clause; GPL v2 or later; X11/MIT Summary: HPIJS for HP's printing and scanning software HPLIP Group: Hardware/Printing # Mutual RPM package requirements are meanwhile considered to be bad because @@ -236,9 +269,9 @@ do egrep -v '^\*UIConstraints:|^\*NonUIConstraints:' $p | cupstestppd - || { rm done popd # End of the general tests and adjustments for all PPDs. -# Run the script which outputs a global HAL fdi file for HP USB devices which are known to HPLIP +# Run the script which outputs a global HAL fdi file for all HP USB devices which belong to HPLIP # and install its output as /etc/hal/fdi/policy/10osvendor/70-hpmud.fdi: -bash %{SOURCE104} data/models/models.dat >70-hpmud.fdi +bash %{SOURCE104} data/rules/55-hpmud.rules >70-hpmud.fdi install -d %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor install -m644 70-hpmud.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/70-hpmud.fdi # Desktop menue entry stuff: @@ -385,6 +418,17 @@ exit 0 %{_libdir}/libhpmud.* %changelog +* Wed Apr 02 2008 jsmeix@suse.de +- Exchanged create_hal_global_fdi_from_models.dat with + create_hal_global_fdi_from_hpmud_rules which creates the + global HAL 70-hpmud.fdi file during build-time from the + 55-hpmud.rules file to be in sync with the udev rules file + and to make sure to have all possible HPLIP device IDs, see + https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782 +- Require the exact matching version of the hpijs sub-package + to have the correct libhpip and libhpmud installed. +- Require pyxml to have the xml.parsers.expat Python module, + see https://answers.launchpad.net/hplip/+question/25696 * Tue Feb 26 2008 jsmeix@suse.de - Static "hpijs" PPD files via enable-foomatic-ppd-install require foomatic-rip-hplip via their cupsFilter entries