[Pkg-hpijs-devel] Packaging latest version of HPLIP
Leigh Brown
leigh at solinno.co.uk
Tue Jan 5 21:32:51 UTC 2016
Hi Guys,
I just bought a new HP LaserJet and, unsurprisingly I need the latest
version of HPLIP for it to work.
For reference, there are a shit ton (technical term :-) ) of new
printers supported by 3.15.11 in
comparison to 3.14.6, not to mention fixing CVE-2015-0839.
I notice that help is needed from a maintainer perspective. I'm not a
Debian developer nor do I know
much about the process but I have knocked together an updated package
using 3.15.11. The problem is,
I don't really know how to submit the changes to you guys.
I have personally confirmed that the CVE is fixed (it now uses the full
fingerprint) and that 807427
is fixed (that affected my Phosmart Express).
So, let me know how I can help. I've attached the diff of the changes I
made at the bottom.
Regards,
Leigh.
--
diff -urN hplip-3.14.6/debian/changelog hplip-3.15.11/debian/changelog
--- hplip-3.14.6/debian/changelog 2014-06-15 08:24:19.000000000 +0100
+++ hplip-3.15.11/debian/changelog 2016-01-05 21:11:17.000000000 +0000
@@ -1,3 +1,23 @@
+hplip (3.15.11-1) unstable; urgency=high
+
+ * New upstream release
+ - Added support for many new printers
+ - HPLIP Plugin support for ARMv6,ARMv7 and aarch64 architectures
+ - Provided custom apparmor profiles and selinux policy for HPLIP
+ - Supported auto-discovery of network scanners
+ - CVE-2015-0839: hplip: Insecure binary driver verification (LP:
#1432516)
+ (Closes: #787353)
+ - Fixes "hplip: new upstream version 3.15.11 available, please
package"
+ (Closes: #807155)
+ - Fixes "hplip: new version 3.14.10" (Closes: #767325)
+ * debian/rules changes
+ - Remove unrecognised configure option --enable-udev-acl-rules
+ - Change symbolic linking of hpssd.py to be relative rather than
absolute
+ * debian/patches/fix-hpaio-local-only.patch: allow saned to detect
network
+ scanning devices (Closes: #807427)
+
+ -- Leigh Brown <leigh at solinno.co.uk> Mon, 4 Jan 2016 22:08:32 +0000
+
hplip (3.14.6-1) unstable; urgency=low
* New upstream release
diff -urN hplip-3.14.6/debian/patches/85_rebuild_python_ui.dpatch
hplip-3.15.11/debian/patches/85_rebuild_python_ui.dpatch
--- hplip-3.14.6/debian/patches/85_rebuild_python_ui.dpatch 2013-12-09
18:05:20.000000000 +0000
+++ hplip-3.15.11/debian/patches/85_rebuild_python_ui.dpatch 2016-01-05
08:40:05.000000000 +0000
@@ -5,13 +5,11 @@
## DP: No description.
@DPATCH@
-Index: hplip-3.13.10/Makefile.am
-===================================================================
---- hplip-3.13.10.orig/Makefile.am 2013-10-11 20:40:14.000000000 +1100
-+++ hplip-3.13.10/Makefile.am 2013-11-09 14:29:21.000000000 +1100
+--- a/Makefile.am
++++ b/Makefile.am
@@ -3,6 +3,11 @@
#
- # (c) 2004-2015 Copyright Hewlett-Packard Development Company, LP
+ # (c) 2004-2015 Copyright HP Development Company, LP
# Author: David Suffield, Naga Samrat Chowdary Narla, Sarbeswar Meher
+
+# Generic rules
@@ -21,14 +19,12 @@
INCLUDES = -Iip -Iio/hpmud -Iscan/sane -Iprnt/hpijs -Icommon/
CFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
CXXFLAGS+= -DCONFDIR=\"$(hplip_confdir)\"
-Index: hplip-3.13.10/configure.in
-===================================================================
---- hplip-3.13.10.orig/configure.in 2013-10-11 20:40:26.000000000 +1100
-+++ hplip-3.13.10/configure.in 2013-11-09 14:29:21.000000000 +1100
-@@ -538,6 +538,8 @@
- AC_MSG_RESULT("using $PYTHONINCLUDEDIR")
- AC_ARG_VAR(PYTHONINCLUDEDIR, [path to Python.h C header file])
- AC_CHECK_HEADERS(python$PYTHON_VERSION/Python.h,
,[AC_MSG_ERROR([cannot find python-devel support], 6)])
+--- a/configure.in
++++ b/configure.in
+@@ -558,6 +558,8 @@ if test "$hpijs_only_build" = "no" && te
+ [FOUND_HEADER=yes; break;])
+ AS_IF([test "x$FOUND_HEADER" != "xyes"],
+ [AC_MSG_ERROR([cannot find python-devel support], 6)])
+ AC_ARG_VAR([PYUIC4], [PyQT pyuic4 .ui to .py compiler command])
+ AC_CHECK_TOOLS([PYUIC4], [pyuic4])
fi
diff -urN
hplip-3.14.6/debian/patches/add-lidil-two-cartridge-modes.dpatch
hplip-3.15.11/debian/patches/add-lidil-two-cartridge-modes.dpatch
---
hplip-3.14.6/debian/patches/add-lidil-two-cartridge-modes.dpatch 2013-09-11
23:41:19.000000000 +0100
+++
hplip-3.15.11/debian/patches/add-lidil-two-cartridge-modes.dpatch 2016-01-05
08:40:28.000000000 +0000
@@ -7,7 +7,7 @@
@DPATCH@
--- a/prnt/drv/hpijs.drv.in
+++ b/prnt/drv/hpijs.drv.in
-@@ -4384,16 +4384,16 @@
+@@ -4384,16 +4384,16 @@ le=- -"
r="HEWLETT-PACKARD" -sDeviceModel="deskjet 3320""
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=300DraftColorCM&&
@@ -28,7 +28,7 @@
Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" "
-dDEVICEWIDTHPOINTS=612 -&&
dDEVICEHEIGHTPOINTS=792"
-@@ -4852,13 +4852,13 @@
+@@ -4860,13 +4860,13 @@ le=- -"
r="HEWLETT-PACKARD" -sDeviceModel="deskjet 3600""
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=300DraftColorCM&&
@@ -45,7 +45,7 @@
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray"
"Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo"
"Quality=600PhotoCMYKFul&&
-@@ -5320,13 +5320,13 @@
+@@ -5328,13 +5328,13 @@ er="HEWLETT-PACKARD" -sDeviceM
"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=600DraftColorCM&&
@@ -64,7 +64,7 @@
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo"
"Quality=600PhotoCMYKFul&&
--- a/prnt/drv/hpijs.drv.in.template
+++ b/prnt/drv/hpijs.drv.in.template
-@@ -2221,16 +2221,16 @@
+@@ -2221,16 +2221,16 @@ le=- -"
r="HEWLETT-PACKARD" -sDeviceModel="deskjet 3320""
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=300DraftColorCM&&
@@ -85,7 +85,7 @@
Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" "
-dDEVICEWIDTHPOINTS=612 -&&
dDEVICEHEIGHTPOINTS=792"
-@@ -2403,13 +2403,13 @@
+@@ -2403,13 +2403,13 @@ le=- -"
r="HEWLETT-PACKARD" -sDeviceModel="deskjet 3600""
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=300DraftColorCM&&
@@ -102,7 +102,7 @@
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray"
"Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo"
"Quality=600PhotoCMYKFul&&
-@@ -2599,13 +2599,13 @@
+@@ -2599,13 +2599,13 @@ er="HEWLETT-PACKARD" -sDeviceM
"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft"
"Quality=600DraftColorCM&&
diff -urN hplip-3.14.6/debian/patches/fix-hpaio-local-only.patch
hplip-3.15.11/debian/patches/fix-hpaio-local-only.patch
--- hplip-3.14.6/debian/patches/fix-hpaio-local-only.patch 1970-01-01
01:00:00.000000000 +0100
+++ hplip-3.15.11/debian/patches/fix-hpaio-local-only.patch 2016-01-05
18:30:31.000000000 +0000
@@ -0,0 +1,46 @@
+disable localOnly condition check due to broken saned
+--- a/scan/sane/hpaio.c
++++ b/scan/sane/hpaio.c
+@@ -278,27 +278,23 @@ static int DevDiscovery(int localOnly)
+ total += AddDevice(uri);
+ }
+
+- /* Look for Network Scan devices if localonly flag if FALSE. */
+- if (!localOnly)
++ /* Look for all-in-one scan devices for which print queue created
*/
++ cnt = GetCupsPrinters(&cups_printer);
++ for (i=0; i<cnt; i++)
+ {
+- /* Look for all-in-one scan devices for which print queue
created */
+- cnt = GetCupsPrinters(&cups_printer);
+- for (i=0; i<cnt; i++)
+- {
+- total += AddDevice(cups_printer[i]);
+- free(cups_printer[i]);
+- }
+- if (cups_printer)
+- free(cups_printer);
++ total += AddDevice(cups_printer[i]);
++ free(cups_printer[i]);
++ }
++ if (cups_printer)
++ free(cups_printer);
+
+- /* Discover NW scanners using Bonjour*/
+- bytes_read = mdns_probe_nw_scanners(message, sizeof(message),
&cnt);
+- token = strtok(message, ";");
+- while (token)
+- {
+- total += AddDevice(token);
+- token = strtok(NULL, ";");
+- }
++ /* Discover NW scanners using Bonjour*/
++ bytes_read = mdns_probe_nw_scanners(message, sizeof(message),
&cnt);
++ token = strtok(message, ";");
++ while (token)
++ {
++ total += AddDevice(token);
++ token = strtok(NULL, ";");
+ }
+
+ bugout:
diff -urN hplip-3.14.6/debian/patches/hpaio-option-duplex.diff
hplip-3.15.11/debian/patches/hpaio-option-duplex.diff
--- hplip-3.14.6/debian/patches/hpaio-option-duplex.diff 2013-12-09
18:56:43.000000000 +0000
+++ hplip-3.15.11/debian/patches/hpaio-option-duplex.diff 2016-01-05
08:40:48.000000000 +0000
@@ -1,8 +1,6 @@
-Index: hplip-3.13.11/scan/sane/sclpml.c
-===================================================================
---- hplip-3.13.11.orig/scan/sane/sclpml.c 2013-10-31 22:45:07.000000000
+1100
-+++ hplip-3.13.11/scan/sane/sclpml.c 2013-12-10 05:21:16.000000000
+1100
-@@ -1083,20 +1083,17 @@
+--- a/scan/sane/sclpml.c
++++ b/scan/sane/sclpml.c
+@@ -1084,20 +1084,17 @@ static void init_options( hpaioScanner_t
hpaio->option[OPTION_ADF_MODE].constraint_type =
SANE_CONSTRAINT_STRING_LIST;
hpaio->option[OPTION_ADF_MODE].constraint.string_list =
hpaio->adfModeList;
diff -urN
hplip-3.14.6/debian/patches/hpfax-bug-function-used-before-importing-log.dpatch
hplip-3.15.11/debian/patches/hpfax-bug-function-used-before-importing-log.dpatch
---
hplip-3.14.6/debian/patches/hpfax-bug-function-used-before-importing-log.dpatch 2012-05-26
01:25:50.000000000 +0100
+++
hplip-3.15.11/debian/patches/hpfax-bug-function-used-before-importing-log.dpatch 2016-01-05
08:40:33.000000000 +0000
@@ -5,11 +5,9 @@
## DP: No description.
@DPATCH@
-Index: hplip-3.12.4/fax/backend/hpfax.py
-===================================================================
---- hplip-3.12.4.orig/fax/backend/hpfax.py 2012-04-10
18:34:59.000000000 +1000
-+++ hplip-3.12.4/fax/backend/hpfax.py 2012-05-26 10:21:30.000000000
+1000
-@@ -52,7 +52,10 @@
+--- a/fax/backend/hpfax.py
++++ b/fax/backend/hpfax.py
+@@ -55,7 +55,10 @@ home_dir = ''
def bug(msg):
syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
diff -urN
hplip-3.14.6/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.dpatch
hplip-3.15.11/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.dpatch
---
hplip-3.14.6/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.dpatch 2013-09-11
23:41:19.000000000 +0100
+++
hplip-3.15.11/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.dpatch 2016-01-05
08:40:43.000000000 +0000
@@ -7,7 +7,7 @@
@DPATCH@
--- a/ui4/systemtray.py
+++ b/ui4/systemtray.py
-@@ -566,6 +566,9 @@
+@@ -569,6 +569,9 @@ class SystemTrayApp(QApplication):
elif reason == QSystemTrayIcon.Trigger:
#print "single click"
diff -urN
hplip-3.14.6/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.dpatch
hplip-3.15.11/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.dpatch
---
hplip-3.14.6/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.dpatch 2013-09-11
23:41:19.000000000 +0100
+++
hplip-3.15.11/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.dpatch 2016-01-05
08:40:38.000000000 +0000
@@ -7,7 +7,7 @@
@DPATCH@
--- a/ui4/systemtray.py
+++ b/ui4/systemtray.py
-@@ -434,29 +434,11 @@
+@@ -437,29 +437,11 @@ class SystemTrayApp(QApplication):
def setMenu(self):
self.menu = QMenu()
diff -urN
hplip-3.14.6/debian/patches/musb-c-do-not-crash-on-usb-failure.patch
hplip-3.15.11/debian/patches/musb-c-do-not-crash-on-usb-failure.patch
---
hplip-3.14.6/debian/patches/musb-c-do-not-crash-on-usb-failure.patch 2014-04-04
16:05:13.000000000 +0100
+++
hplip-3.15.11/debian/patches/musb-c-do-not-crash-on-usb-failure.patch 2016-01-05
08:44:30.000000000 +0000
@@ -1,86 +1,86 @@
--- a/io/hpmud/musb.c
+++ b/io/hpmud/musb.c
-@@ -689,7 +689,8 @@
- int numdevs = 0; /* number of connected devices */
- int i, conf, iface, altset ;
+@@ -695,7 +695,8 @@ static libusb_device *get_libusb_device(
+ int numdevs = 0; /* number of connected devices */
+ int i, conf, iface, altset ;
-- libusb_init(&libusb_ctx);
+- libusb_init(&libusb_ctx);
+ i = libusb_init(&libusb_ctx);
+ if (i) goto bugout;
- numdevs = libusb_get_device_list(libusb_ctx, &libusb_dev_list);
- for (i=0; i< numdevs; i++)
- {
-@@ -2033,7 +2034,8 @@
- char serial[128], mfg[128], sz[HPMUD_LINE_SIZE];
- int r, size=0;
+ numdevs = libusb_get_device_list(libusb_ctx, &libusb_dev_list);
+ for (i=0; i< numdevs; i++)
+ {
+@@ -2048,7 +2049,8 @@ int __attribute__ ((visibility ("hidden"
+ char serial[128], mfg[128], sz[HPMUD_LINE_SIZE];
+ int r, size=0;
-- libusb_init(&ctx);
+- libusb_init(&ctx);
+ i = libusb_init(&ctx);
+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
+ numdevs = libusb_get_device_list(ctx, &list);
- if (numdevs <= 0)
-@@ -2129,12 +2131,14 @@
- }//end for loop
+ if (numdevs <= 0)
+@@ -2149,12 +2151,14 @@ int __attribute__ ((visibility ("hidden"
+ }//end for loop
bugout:
-- if (!hd)
+- if (!hd)
+ if (hd)
- libusb_close(hd);
- if (confptr)
- libusb_free_config_descriptor(confptr);
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
+ libusb_close(hd);
+ if (confptr)
+ libusb_free_config_descriptor(confptr);
+- libusb_free_device_list(list, 1);
+- libusb_exit(ctx);
+ if (list)
+ libusb_free_device_list(list, 1);
+ if (ctx)
+ libusb_exit(ctx);
- return size;
+ return size;
}
-@@ -2160,7 +2164,8 @@
+@@ -2180,7 +2184,8 @@ enum HPMUD_RESULT hpmud_make_usb_uri(con
- *bytes_read=0;
+ *bytes_read=0;
-- libusb_init(&ctx);
+- libusb_init(&ctx);
+ i = libusb_init(&ctx);
+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
+ numdevs = libusb_get_device_list(ctx, &list);
- if (numdevs <= 0)
-@@ -2263,8 +2268,10 @@
- if (hd != NULL)
- libusb_close(hd);
+ if (numdevs <= 0)
+@@ -2283,8 +2288,10 @@ bugout:
+ if (hd != NULL)
+ libusb_close(hd);
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
+- libusb_free_device_list(list, 1);
+- libusb_exit(ctx);
+ if (list)
+ libusb_free_device_list(list, 1);
+ if (ctx)
+ libusb_exit(ctx);
- return stat;
+ return stat;
}
-@@ -2283,7 +2290,8 @@
+@@ -2303,7 +2310,8 @@ enum HPMUD_RESULT hpmud_make_usb_serial_
- *bytes_read=0;
+ *bytes_read=0;
-- libusb_init(&ctx);
+- libusb_init(&ctx);
+ i = libusb_init(&ctx);
+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
+ numdevs = libusb_get_device_list(ctx, &list);
- if (numdevs <= 0)
-@@ -2309,8 +2317,10 @@
- stat = HPMUD_R_OK;
+ if (numdevs <= 0)
+@@ -2329,8 +2337,10 @@ enum HPMUD_RESULT hpmud_make_usb_serial_
+ stat = HPMUD_R_OK;
bugout:
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
+- libusb_free_device_list(list, 1);
+- libusb_exit(ctx);
+ if (list)
+ libusb_free_device_list(list, 1);
+ if (ctx)
+ libusb_exit(ctx);
- return stat;
+ return stat;
}
diff -urN hplip-3.14.6/debian/patches/series
hplip-3.15.11/debian/patches/series
--- hplip-3.14.6/debian/patches/series 2014-04-04 16:05:13.000000000
+0100
+++ hplip-3.15.11/debian/patches/series 2016-01-05 18:24:49.000000000
+0000
@@ -18,3 +18,4 @@
#hp-mkuri-libnotify-so-4-support.dpatch
hpaio-option-duplex.diff
musb-c-do-not-crash-on-usb-failure.patch
+fix-hpaio-local-only.patch
diff -urN hplip-3.14.6/debian/patches/simple-scan-as-default.dpatch
hplip-3.15.11/debian/patches/simple-scan-as-default.dpatch
--- hplip-3.14.6/debian/patches/simple-scan-as-default.dpatch 2013-09-11
23:41:19.000000000 +0100
+++
hplip-3.15.11/debian/patches/simple-scan-as-default.dpatch 2016-01-05
08:40:20.000000000 +0000
@@ -7,7 +7,7 @@
@DPATCH@
--- a/base/utils.py
+++ b/base/utils.py
-@@ -556,18 +556,21 @@
+@@ -567,18 +567,21 @@ class UserSettings(object): # Note: Depr
# Scan
self.cmd_scan = ''
@@ -38,8 +38,8 @@
path = which('hp-unload')
--- a/ui4/ui_utils.py
+++ b/ui4/ui_utils.py
-@@ -141,7 +141,7 @@
-
+@@ -188,7 +188,7 @@ class UserSettings(QSettings):
+ return ''
def loadDefaults(self):
- self.cmd_scan = self.__setup(['xsane -V %SANE_URI%', 'kooka',
'xscanimage'])
diff -urN hplip-3.14.6/debian/rules hplip-3.15.11/debian/rules
--- hplip-3.14.6/debian/rules 2014-05-07 11:55:36.000000000 +0100
+++ hplip-3.15.11/debian/rules 2016-01-05 13:46:39.000000000 +0000
@@ -144,8 +144,7 @@
--enable-fax-build \
--disable-qt3 \
--enable-qt4 \
- --enable-policykit \
- --enable-udev-acl-rules
+ --enable-policykit
touch configure-stamp
@@ -267,7 +266,7 @@
done \
)
install -d ./debian/tmp/usr/sbin/
- ln -s /usr/share/hplip/hpssd.py ./debian/tmp/usr/sbin/hpssd
+ ln -s ../../usr/share/hplip/hpssd.py ./debian/tmp/usr/sbin/hpssd
# Correct Python interpreter path in all executables
for file in ./debian/tmp/usr/bin/* ./debian/tmp/usr/sbin/*
./debian/tmp/usr/lib/cups/*/*; do \
More information about the Pkg-hpijs-devel
mailing list