[arch-commits] Commit in udev/trunk (PKGBUILD cups-hplip-fix.patch)

Tobias Powalowski tpowa at archlinux.org
Sun Sep 6 16:45:58 UTC 2009


    Date: Sunday, September 6, 2009 @ 12:45:58
  Author: tpowa
Revision: 51249

Added:
  udev/trunk/cups-hplip-fix.patch
Modified:
  udev/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   15 ++++++++-------
 cups-hplip-fix.patch |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-09-06 14:57:51 UTC (rev 51248)
+++ PKGBUILD	2009-09-06 16:45:58 UTC (rev 51249)
@@ -4,7 +4,7 @@
 # Maintainer: Thomas Bächler <thomas at archlinux.org>
 pkgname=udev
 pkgver=146
-pkgrel=1
+pkgrel=2
 pkgdesc="The userspace dev tools (udev)"
 arch=(i686 x86_64)
 url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
@@ -15,16 +15,14 @@
 install=udev.install
 backup=(etc/udev/udev.conf
         etc/scsi_id.config
-        etc/udev/cdsymlinks.conf
         etc/modprobe.d/framebuffer_blacklist.conf)
-conflicts=('pcmcia-cs' 'hotplug')
+conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07')
 replaces=('devfsd')
 # older initscripts versions required start_udev
-conflicts=('initscripts<2009.07')
 options=(!makeflags !libtool)
 source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgname-$pkgver.tar.bz2
         81-arch.rules load-modules.sh resolve-modalias.c cdsymlinks.sh root-link.sh
-        arch-udev-rules.patch ignore-remove.sh)
+        arch-udev-rules.patch ignore-remove.sh cups-hplip-fix.patch)
 md5sums=('b2a8acefda4fa8a70d45642035abd718'
          'cc6406e8b67b2b8711942098a66cde6b'
          'f4951f61438d69894b728212dac7318b'
@@ -32,10 +30,13 @@
          '2e808ee78d237c478b57af2a68d43769'
          '2d6dc6842464f107bccc68cd505a6c31'
          '9be4683c480488926fdf92a34ae5963c'
-         '35fa97500243a79b2370fa4684828e69')
+         '35fa97500243a79b2370fa4684828e69'
+         '8cd53a3d91d2321a646033dc18f29217')
 
 build() {
   cd $srcdir/$pkgname-$pkgver
+  # fix raw printers, will be fixed in udev-147
+  patch -Np1 -i ../cups-hplip-fix.patch || return 1
   ./configure --prefix="" --mandir=/usr/share/man\
                           --includedir=/usr/include\
                           --libexecdir=/lib/udev\
@@ -69,7 +70,7 @@
   cd $pkgdir/lib/udev/rules.d/
   patch -Np1 -i $srcdir/arch-udev-rules.patch || return 1
   # remove .orig files
-  rm -f pkgdir/lib/udev/rules.d/*.orig
+  rm -f $pkgdir/lib/udev/rules.d/*.orig
   # disable persistent cdromsymlinks and network by default 
   # and move it to /etc/udev/rules.d
   mv $pkgdir/lib/udev/rules.d/75-persistent-net-generator.rules \

Added: cups-hplip-fix.patch
===================================================================
--- cups-hplip-fix.patch	                        (rev 0)
+++ cups-hplip-fix.patch	2009-09-06 16:45:58 UTC (rev 51249)
@@ -0,0 +1,33 @@
+From: Martin Pitt <martin.pitt at ubuntu.com>
+Date: Fri, 4 Sep 2009 15:12:28 +0000 (+0200)
+Subject: make raw USB printer devices accessible for lp
+X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=f61e72d8973cf9d889a4f1233150870085c0b3e1
+
+make raw USB printer devices accessible for lp
+
+Starting from version 1.4, cups now uses libusb and printer USB devices instead
+of the usblp generated /dev/usb/lpX ones. In order to not require the cups USB
+backend to run as root now, change raw USB printer devices to be root:lp 0660,
+similar to usblpX devices.
+
+This might also enable the hplip backend to not run as root, since this has
+always used raw device nodes.
+
+https://launchpad.net/bugs/420015
+---
+
+diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
+index 2507420..4e9a737 100644
+--- a/rules/rules.d/50-udev-default.rules
++++ b/rules/rules.d/50-udev-default.rules
+@@ -60,6 +60,10 @@ SUBSYSTEM=="ppdev",		GROUP="lp"
+ SUBSYSTEM=="usb",		KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
+ KERNEL=="lp[0-9]*",		GROUP="lp"
+ KERNEL=="irlpt[0-9]*",		GROUP="lp"
++# hplip and cups 1.4+ use raw USB devices, so permissions should be similar to
++# the ones from the old usblp kernel module
++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"
+ 
+ # block
+ SUBSYSTEM=="block", GROUP="disk"




More information about the arch-commits mailing list