Mageia Bugzilla – Attachment 13172 Details for
Bug 10072
HPLIP doesn't upload printer firmware automatically
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to fix udev rule
56-hpmud.rules.patch (text/plain), 3.15 KB, created by
Oleg Bosis
on 2022-03-12 08:47:30 CET
(
hide
)
Description:
Patch to fix udev rule
Filename:
MIME Type:
Creator:
Oleg Bosis
Created:
2022-03-12 08:47:30 CET
Size:
3.15 KB
patch
obsolete
>--- 56-hpmud.rules.orig.back 2022-02-22 12:46:21.000000000 +0300 >+++ 56-hpmud.rules 2022-03-12 10:33:40.165243073 +0300 >@@ -1,8 +1,33 @@ > # HPLIP udev rules file. Notify console user if plugin support is required for this device. >+# >+# SUSE changed: >+# >+# Exchanged the rule to GOTO hpmud_usb_rules if SUBSYSTEM is "usb" >+# with the rule if SUBSYSTEM is "ppdev" to avoid that the "ppdev" rule >+# is needlessly processed when SUBSYSTEM is "usb". >+# >+# Added GOTO hpmud_rules_end rule to skip the hpmud_usb_rules >+# if SUBSYSTEM is not "usb" or if ENV{DEVTYPE} is not "usb_device" or if SUBSYSTEM is not "ppdev" >+# to avoid that the hpmud_usb_rules are needlessly processed. >+# >+# The rule to automatically "check ... plugin status" is disabled >+# because automated installation of non-free proprietary third-party software >+# (here the plugin from HP) should not happen and it can cause whatever kind >+# of strange behaviour see for example https://bugs.launchpad.net/bugs/1197416 >+# and https://bugs.launchpad.net/bugs/1221348 >+# while in contrast manual printer setup via hp-setup usually "just works" >+# and it is clear for the user what goes on and in case of failure what went wrong. >+# >+# Because the rule to automatically "check ... plugin status" >+# is also used to upload firmware into printers that need it >+# see https://bugs.launchpad.net/bugs/1220628 >+# a rule that only uploads firmware into printers that need it is added. >+# >+# If possible activate hpaio backend support in /etc/sane.d/dll.conf. > >-ACTION=="remove", GOTO="hpmud_rules_end" >-SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664" >+ACTION=="add", GOTO="hpmud_rules_end" > SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules" >+SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664" > GOTO="hpmud_rules_end" > > LABEL="hpmud_usb_rules" >@@ -13,6 +38,10 @@ > ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:ffcc00:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1" > > # This rule will check the smart install feature, plugin status and firmware download for the required printers. >-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'" >+#ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'" >+# This rule uploads firmware to HP USB printer devices if needed: >+ENV{hp_test}=="yes", PROGRAM="/bin/logger -p user.info udev hpmud.rules runs hp-firmware to test if HP device with USB vendor ID $attr{idVendor} and USB product ID $attr{idProduct} at USB bus ID $env{BUSNUM} and USB device ID $env{DEVNUM} needs firmware and if yes to upload it", RUN+="/usr/bin/hp-firmware -s $env{BUSNUM}:$env{DEVNUM}" > >+# If possible activate hpaio backend support in /etc/sane.d/dll.conf: >+ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -w /etc/sane.d/dll.conf ; then sed -i -e /hpaio/d /etc/sane.d/dll.conf ; echo hpaio >>/etc/sane.d/dll.conf ; fi'" > LABEL="hpmud_rules_end"
--- 56-hpmud.rules.orig.back 2022-02-22 12:46:21.000000000 +0300 +++ 56-hpmud.rules 2022-03-12 10:33:40.165243073 +0300 @@ -1,8 +1,33 @@ # HPLIP udev rules file. Notify console user if plugin support is required for this device. +# +# SUSE changed: +# +# Exchanged the rule to GOTO hpmud_usb_rules if SUBSYSTEM is "usb" +# with the rule if SUBSYSTEM is "ppdev" to avoid that the "ppdev" rule +# is needlessly processed when SUBSYSTEM is "usb". +# +# Added GOTO hpmud_rules_end rule to skip the hpmud_usb_rules +# if SUBSYSTEM is not "usb" or if ENV{DEVTYPE} is not "usb_device" or if SUBSYSTEM is not "ppdev" +# to avoid that the hpmud_usb_rules are needlessly processed. +# +# The rule to automatically "check ... plugin status" is disabled +# because automated installation of non-free proprietary third-party software +# (here the plugin from HP) should not happen and it can cause whatever kind +# of strange behaviour see for example https://bugs.launchpad.net/bugs/1197416 +# and https://bugs.launchpad.net/bugs/1221348 +# while in contrast manual printer setup via hp-setup usually "just works" +# and it is clear for the user what goes on and in case of failure what went wrong. +# +# Because the rule to automatically "check ... plugin status" +# is also used to upload firmware into printers that need it +# see https://bugs.launchpad.net/bugs/1220628 +# a rule that only uploads firmware into printers that need it is added. +# +# If possible activate hpaio backend support in /etc/sane.d/dll.conf. -ACTION=="remove", GOTO="hpmud_rules_end" -SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664" +ACTION=="add", GOTO="hpmud_rules_end" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules" +SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664" GOTO="hpmud_rules_end" LABEL="hpmud_usb_rules" @@ -13,6 +38,10 @@ ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:ffcc00:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1" # This rule will check the smart install feature, plugin status and firmware download for the required printers. -ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'" +#ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'" +# This rule uploads firmware to HP USB printer devices if needed: +ENV{hp_test}=="yes", PROGRAM="/bin/logger -p user.info udev hpmud.rules runs hp-firmware to test if HP device with USB vendor ID $attr{idVendor} and USB product ID $attr{idProduct} at USB bus ID $env{BUSNUM} and USB device ID $env{DEVNUM} needs firmware and if yes to upload it", RUN+="/usr/bin/hp-firmware -s $env{BUSNUM}:$env{DEVNUM}" +# If possible activate hpaio backend support in /etc/sane.d/dll.conf: +ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -w /etc/sane.d/dll.conf ; then sed -i -e /hpaio/d /etc/sane.d/dll.conf ; echo hpaio >>/etc/sane.d/dll.conf ; fi'" LABEL="hpmud_rules_end"
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 10072
: 13172