Package: foo2zjs Version: 20090908dfsg-1 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu lucid ubuntu-patch
Hi folks, The Ubuntu version of the foo2zjs package currently contains a considerable delta relative to the Debian package, and it would be good to bring some of this delta down. Please find attached what I expect will be the first in a series of patches to that end. This patch addresses the fact that /etc/udev/rules.d/11-hplj10xx.rules doesn't comply with current policy for udev rules: - it's installed in /etc/udev/rules.d, whereas package-provided rules should be installed to /lib/udev/rules.d - BUS=="usb" and SYSFS{var} are both deprecated - the provided udev rules shadow several settings that are already handled by the core udev rules, and should be dropped to avoid duplication (NAME=, MODE=) Here are the changelog entries from the Ubuntu package that correspond to this change: - debian/control: Breaks: udev (<< 136-1) to ensure the correct udev version is used. - debian/rules, debian/85-hplj10xx.rules: move the rules from 11-hplj10xx.rules to 85-hplj10xx.rules per /etc/udev/rules.d/README, and include a number of updates, superseding 30-udev-rules.dpatch: + 'BUS=="usb"' is deprecated, replaced with 'SUBSYSTEMS=="usb"'. + Removed UDEV rule items which conflict with the general UDEV rules for USB printers: 'NAME="usb/%k"', 'MODE="0666"'. + Change SYSFS to ATTRS. Since the udev rules file is at this point a complete rewrite of the original, we've found it easier to ship a separate file under debian/ instead of continuing to patch the upstream one with dpatch; your mileage may vary. Ideally, these changes would all be pushed upstream in any event. Cheers, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -u foo2zjs-20090908dfsg/debian/rules foo2zjs-20090908dfsg/debian/rules --- foo2zjs-20090908dfsg/debian/rules +++ foo2zjs-20090908dfsg/debian/rules @@ -60,7 +60,7 @@ rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/COPYING rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/INSTALL rm -f $(CURDIR)/debian/foo2zjs/usr/share/doc/foo2zjs/INSTALL.osx - install -D -m 644 hplj10xx.rules $(CURDIR)/debian/foo2zjs/etc/udev/rules.d/11-hplj10xx.rules + install -D -m 644 debian/85-hplj10xx.rules $(CURDIR)/debian/foo2zjs/lib/udev/rules.d/85-hplj10xx.rules install -m 755 hplj1000 $(CURDIR)/debian/foo2zjs/usr/sbin/hplj1000 install -m 755 getweb $(CURDIR)/debian/foo2zjs/usr/bin/getweb touch $(CURDIR)/debian/foo2zjs/usr/share/foo2zjs/tmp/.placeholder diff -u foo2zjs-20090908dfsg/debian/control foo2zjs-20090908dfsg/debian/control --- foo2zjs-20090908dfsg/debian/control +++ foo2zjs-20090908dfsg/debian/control @@ -14,6 +14,7 @@ Depends: ${shlibs:Depends} Recommends: foomatic-db-engine, wget, tk8.4, tix Suggests: psutils, hannah-foo2zjs +Breaks: udev (<< 136-1) Description: Support for printing to ZjStream-based printers foo2zjs is an open source printer driver for printers that use the Zenographics ZjStream wire protocol for their print data, such as the only in patch2: unchanged: --- foo2zjs-20090908dfsg.orig/debian/foo2zjs.preinst +++ foo2zjs-20090908dfsg/debian/foo2zjs.preinst @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + if [ -e "/etc/udev/rules.d/11-hplj10xx.rules" ]; then + if [ "`md5sum \"/etc/udev/rules.d/11-hplj10xx.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' foo2zjs | sed -n -e \"\\\\' /etc/udev/rules.d/11-hplj10xx.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/rules.d/11-hplj10xx.rules" + fi + fi +fi + +#DEBHELPER# only in patch2: unchanged: --- foo2zjs-20090908dfsg.orig/debian/85-hplj10xx.rules +++ foo2zjs-20090908dfsg/debian/85-hplj10xx.rules @@ -0,0 +1,20 @@ +#Own udev rule for HP Laserjet 1000 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="hp LaserJet 1000", SYMLINK+="hplj1000-%n", RUN+="/usr/sbin/hplj1000" +#Own udev rule for HP Laserjet 1005 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="hp LaserJet 1005 series", SYMLINK+="hplj1005-%n", RUN+="/usr/sbin/hplj1005" +#Own udev rule for HP Laserjet 1018 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet 1018", SYMLINK+="hplj1018-%n", RUN+="/usr/sbin/hplj1018" +#Own udev rule for HP Laserjet 1020 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet 1020", SYMLINK+="hplj1020-%n", RUN+="/usr/sbin/hplj1020" +#Own udev rule for HP Laserjet P1005 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1005", SYMLINK+="hpljP1005-%n", RUN+="/usr/sbin/hpljP1005" +#Own udev rule for HP Laserjet P1006 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1006", SYMLINK+="hpljP1006-%n", RUN+="/usr/sbin/hpljP1006" +#Own udev rule for HP Laserjet P1007 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1007", SYMLINK+="hpljP1007-%n", RUN+="/usr/sbin/hpljP1007" +#Own udev rule for HP Laserjet P1008 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1008", SYMLINK+="hpljP1008-%n", RUN+="/usr/sbin/hpljP1008" +#Own udev rule for HP Laserjet P1505 +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1505", SYMLINK+="hpljP1505-%n", RUN+="/usr/sbin/hpljP1505" +#Own udev rule for HP Laserjet P1505n +KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", ATTRS{product}=="HP LaserJet P1505n", SYMLINK+="hpljP1505n-%n", RUN+="/usr/sbin/hpljP1505n"