mirror of
https://abf.rosa.ru/djam/hplip.git
synced 2025-02-23 16:32:58 +00:00
fix udev rules
This commit is contained in:
parent
3f90cd84fb
commit
749a95ddb0
3 changed files with 39 additions and 40 deletions
|
@ -1,22 +1,12 @@
|
|||
diff -Naur hplip-3.13.8/data/rules/56-hpmud.rules hplip-3.13.8.tpg/data/rules/56-hpmud.rules
|
||||
--- hplip-3.13.8/data/rules/56-hpmud.rules 2013-08-07 06:02:33.000000000 +0000
|
||||
+++ hplip-3.13.8.tpg/data/rules/56-hpmud.rules 2013-08-19 11:24:05.938453838 +0000
|
||||
Index: hplip-3.13.5/data/rules/56-hpmud.rules
|
||||
===================================================================
|
||||
--- hplip-3.13.5/data/rules/56-hpmud.rules
|
||||
+++ hplip-3.13.5/data/rules/56-hpmud.rules 2013-10-13 17:31:35.074554987 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
# HPLIP udev rules file. Notify console user if plugin support is required for this device.
|
||||
|
||||
-ACTION!="add", GOTO="hpmud_rules_end"
|
||||
+ACTION="remove", GOTO="hpmud_rules_end"
|
||||
SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0660"
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules"
|
||||
|
||||
diff -Naur hplip-3.13.8/data/rules/56-hpmud_sysfs.rules hplip-3.13.8.tpg/data/rules/56-hpmud_sysfs.rules
|
||||
--- hplip-3.13.8/data/rules/56-hpmud_sysfs.rules 2013-08-07 06:02:33.000000000 +0000
|
||||
+++ hplip-3.13.8.tpg/data/rules/56-hpmud_sysfs.rules 2013-08-19 11:23:51.843080742 +0000
|
||||
@@ -1,6 +1,6 @@
|
||||
# HPLIP udev rules file. Notify console user if plugin support is required for this device.
|
||||
|
||||
-ACTION!="add", GOTO="hpmud_rules_end"
|
||||
+ACTION="remove", GOTO="hpmud_rules_end"
|
||||
+ACTION=="remove", GOTO="hpmud_rules_end"
|
||||
SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0660"
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules"
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
diff -up hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules hplip-3.13.6/data/rules/56-hpmud.rules
|
||||
--- hplip-3.13.6/data/rules/56-hpmud.rules.udev-rules 2013-06-24 10:28:19.865301396 +0200
|
||||
+++ hplip-3.13.6/data/rules/56-hpmud.rules 2013-06-24 10:31:21.283926852 +0200
|
||||
@@ -11,8 +11,6 @@ LABEL="hpmud_usb_rules"
|
||||
ATTR{idVendor}=="03f0", ATTR{idProduct}=="????", OWNER="root", GROUP="lp", MODE="0660", ENV{sane_hpaio}="yes", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
|
||||
|
||||
|
||||
-# This rule will add the printer and install plugin
|
||||
-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
|
||||
|
||||
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
|
||||
ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
|
||||
diff -up hplip-3.13.6/Makefile.in.udev-rules hplip-3.13.6/Makefile.in
|
||||
--- hplip-3.13.6/Makefile.in.udev-rules 2013-06-24 10:28:19.868301356 +0200
|
||||
+++ hplip-3.13.6/Makefile.in 2013-06-24 10:32:21.272134161 +0200
|
||||
|
@ -10,14 +22,3 @@ diff -up hplip-3.13.6/Makefile.in.udev-rules hplip-3.13.6/Makefile.in
|
|||
@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules
|
||||
@HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_sysfs.rules
|
||||
@HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
|
||||
--- a/data/rules/56-hpmud.rules 2013-10-31 15:45:33.000000000 +0400
|
||||
+++ b/data/rules/56-hpmud.rules 2013-11-20 11:38:22.450960048 +0400
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
# This rule will add the printer and install plugin
|
||||
-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
|
||||
+# ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
|
||||
|
||||
# If sane-bankends is installed add hpaio backend support to dll.conf if needed.
|
||||
ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
|
36
hplip.spec
36
hplip.spec
|
@ -18,7 +18,7 @@
|
|||
Summary: HP printer/all-in-one driver infrastructure
|
||||
Name: hplip
|
||||
Version: 3.13.11
|
||||
Release: 5
|
||||
Release: 6
|
||||
License: GPLv2+ and MIT
|
||||
Group: System/Printing
|
||||
Url: http://hplip.sourceforge.net/
|
||||
|
@ -36,7 +36,7 @@ Source6: README.urpmi
|
|||
Patch1: hplip-3.11.3-mdv-link.patch
|
||||
# (Anssi) Apply udev rules even on ACTION=="change", otherwise the permissions
|
||||
# do not get applied in %%post on a new installation:
|
||||
# Patch2: hplip-apply-udev-rules-on-action-change.patch
|
||||
Patch2: hplip-apply-udev-rules-on-action-change.patch
|
||||
# Patch3: hplip-3.13.10-fix-systray-x.patch
|
||||
|
||||
# Fedora patches
|
||||
|
@ -59,7 +59,7 @@ Patch121: hplip-ppd-ImageableArea.patch
|
|||
Patch131: hplip-ipp-accessors.patch
|
||||
Patch132: hplip-IEEE-1284-4.patch
|
||||
Patch133: hplip-check.patch
|
||||
Patch134: hplip-3.13.10-fix-udev-rules.patch
|
||||
Patch134: hplip-udev-rules.patch
|
||||
|
||||
# Debian/Ubuntu patches
|
||||
# taken from http://patch-tracker.debian.org/package/hplip/3.11.7-1
|
||||
|
@ -253,6 +253,7 @@ flash memory cards.
|
|||
%prep
|
||||
%setup -qn %{name}-%{version}%{extraversion}
|
||||
|
||||
%patch2 -p1 -b .udev-rules-on-action-change
|
||||
# %patch3 -p1 -b .systray
|
||||
|
||||
# Fedora patches
|
||||
|
@ -320,7 +321,10 @@ sed -i.duplex-constraints \
|
|||
prnt/drv/hpcups.drv.in
|
||||
|
||||
#patch132 -p1 -b .hplip-IEEE-1284-4
|
||||
%patch134 -p1 -b .rules-fix
|
||||
|
||||
# Removed SYSFS use in udev rules and actually made them work (bug #560754).
|
||||
# Move udev rules to /lib/udev/rules.d (bug #748208).
|
||||
%patch134 -p1 -b .udev-rules
|
||||
|
||||
# Debian/Ubuntu patches
|
||||
|
||||
|
@ -396,9 +400,7 @@ WITHOUT_SANE="--without-sane"
|
|||
--enable-gui-build \
|
||||
--enable-fax-build \
|
||||
--enable-pp-build \
|
||||
--enable-qt4 \
|
||||
--disable-qt3 \
|
||||
--enable-foomatic-drv-install \
|
||||
--enable-qt4 --disable-qt3 \
|
||||
--enable-hpcups-install \
|
||||
--enable-cups-drv-install \
|
||||
--enable-cups-ppd-install \
|
||||
|
@ -436,12 +438,10 @@ rm -f %{buildroot}%{py_platsitedir}/*.la
|
|||
rm -f %{buildroot}%{_datadir}/hplip/uninstall.*
|
||||
rm -f %{buildroot}%{_bindir}/hp-uninstall
|
||||
rm -f %{buildroot}%{_datadir}/hplip/upgrade.*
|
||||
#rm -f %{buildroot}%{_bindir}/hp-upgrade
|
||||
#rm -f %{buildroot}%{_bindir}/hp-config_usb_printer
|
||||
#rm -f %{buildroot}%{_datadir}/hplip/config_usb_printer.*
|
||||
rm -f %{buildroot}%{_libdir}/*.la
|
||||
rm -rf %{buildroot}%{python_sitearch}/*.la
|
||||
rm -rf %{buildroot}%{_libdir}/sane/*.la
|
||||
rm -f %{buildroot}%{_bindir}/hp-upgrade
|
||||
rm -f %{buildroot}%{_bindir}/hp-config_usb_printer
|
||||
rm -f %{buildroot}%{_unitdir}/hplip-printer@.service
|
||||
rm -f %{buildroot}%{_datadir}/hplip/config_usb_printer.*
|
||||
|
||||
mkdir -p %{buildroot}%{_datadir}/applications
|
||||
desktop-file-install --vendor='' \
|
||||
|
@ -477,6 +477,10 @@ install -D -m 0644 48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/hp-sendfax
|
|||
install -D -m 0644 64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/hp-sendfax.png
|
||||
install -D -m 0644 %{SOURCE3} %{buildroot}%{_iconsdir}/hicolor/128x128/apps/hp-sendfax.png
|
||||
|
||||
# (cg) Correct the udev rules dir
|
||||
mkdir -p %{buildroot}/lib
|
||||
mv %{buildroot}%{_sysconfdir}/udev %{buildroot}/lib/
|
||||
|
||||
# switched to udev, no need for hal information
|
||||
rm -rf %{buildroot}%{_datadir}/hal/fdi
|
||||
|
||||
|
@ -529,9 +533,13 @@ pushd %{buildroot}%{_datadir}/%{name}
|
|||
python -m compileall .
|
||||
popd
|
||||
|
||||
# create empty /var/lip/hp/hplip.state to fix hp-plugin installation (mga#5395)
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/hp/
|
||||
touch %{buildroot}%{_localstatedir}/lib/hp/hplip.state
|
||||
|
||||
# create empty log directory so that it can be owned
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/hp/tmp
|
||||
|
||||
mkdir -p %{buildroot}%{_unitdir}
|
||||
mv -f %{buildroot}/usr/lib/systemd/system/hplip-printer@.service %{buildroot}%{_unitdir}/hplip-printer@.service
|
||||
|
||||
|
@ -731,7 +739,7 @@ fi
|
|||
%endif
|
||||
|
||||
%files model-data
|
||||
%{_sysconfdir}/udev/rules.d/*.rules
|
||||
/lib/udev/rules.d/*.rules
|
||||
%{_datadir}/hplip/data/models
|
||||
|
||||
%files gui
|
||||
|
|
Loading…
Add table
Reference in a new issue