- 3.9.8.
This commit is contained in:
parent
54976cb165
commit
58d70551fc
@ -29,3 +29,4 @@ hplip-2.8.10.tar.gz
|
||||
hplip-2.8.12.tar.gz
|
||||
hplip-3.9.2.tar.gz
|
||||
hplip-3.9.6b.tar.gz
|
||||
hplip-3.9.8.tar.gz
|
||||
|
7
hplip-3.9.8.tar.gz.asc
Normal file
7
hplip-3.9.8.tar.gz.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.4.9 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAkp4q+sACgkQhA7anpATwAWrnwCeNjw4P14Md8GsBRtbgLo+Hr6M
|
||||
nwMAoJoSt8h4xjpXdmEWuhoFie0drfBT
|
||||
=pkCz
|
||||
-----END PGP SIGNATURE-----
|
@ -1,13 +0,0 @@
|
||||
diff -up hplip-2.8.7/prnt/backend/hp.c.dbus hplip-2.8.7/prnt/backend/hp.c
|
||||
--- hplip-2.8.7/prnt/backend/hp.c.dbus 2008-12-11 10:44:30.000000000 +0000
|
||||
+++ hplip-2.8.7/prnt/backend/hp.c 2008-12-11 10:46:15.000000000 +0000
|
||||
@@ -489,6 +489,9 @@ static int device_event(const char *dev,
|
||||
DBusMessage * msg = NULL;
|
||||
int id = atoi(jobid);
|
||||
|
||||
+ if (dbus_conn == NULL)
|
||||
+ return 0;
|
||||
+
|
||||
msg = dbus_message_new_signal(DBUS_PATH, DBUS_INTERFACE, "Event");
|
||||
|
||||
if (NULL == msg)
|
@ -1,10 +0,0 @@
|
||||
diff -up hplip-2.8.5/hplip.desktop.in.desktop hplip-2.8.5/hplip.desktop.in
|
||||
--- hplip-2.8.5/hplip.desktop.in.desktop 2008-05-08 17:26:03.000000000 +0100
|
||||
+++ hplip-2.8.5/hplip.desktop.in 2008-06-03 12:03:18.000000000 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
[Desktop Entry]
|
||||
-Version=0.6
|
||||
+Encoding=UTF-8
|
||||
Type=Application
|
||||
Name=HP Device Manager
|
||||
GenericName=Printer Management Application
|
@ -1,294 +0,0 @@
|
||||
diff -up hplip-3.9.6b/io/hpmud/musb.c.device-id hplip-3.9.6b/io/hpmud/musb.c
|
||||
--- hplip-3.9.6b/io/hpmud/musb.c.device-id 2009-06-25 20:05:49.000000000 +0100
|
||||
+++ hplip-3.9.6b/io/hpmud/musb.c 2009-07-27 16:10:28.125542973 +0100
|
||||
@@ -26,6 +26,11 @@
|
||||
|
||||
#include "hpmud.h"
|
||||
#include "hpmudi.h"
|
||||
+#define LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE 1
|
||||
+#include <libudev.h>
|
||||
+
|
||||
+/* Flags for claim_interface() */
|
||||
+#define CLAIM_NO_DETACH 1
|
||||
|
||||
mud_device_vf __attribute__ ((visibility ("hidden"))) musb_mud_device_vf =
|
||||
{
|
||||
@@ -489,7 +494,8 @@ bugout:
|
||||
return -1; /* no endpoint found */
|
||||
}
|
||||
|
||||
-static int claim_interface(struct usb_device *dev, file_descriptor *pfd)
|
||||
+static int claim_interface(struct usb_device *dev, file_descriptor *pfd,
|
||||
+ int flags)
|
||||
{
|
||||
int stat=1;
|
||||
|
||||
@@ -502,7 +508,8 @@ static int claim_interface(struct usb_de
|
||||
goto bugout;
|
||||
}
|
||||
|
||||
- detach(pfd->hd, pfd->interface);
|
||||
+ if (!(flags & CLAIM_NO_DETACH))
|
||||
+ detach(pfd->hd, pfd->interface);
|
||||
|
||||
#if 0 /* hp devices only have one configuration, so far ... */
|
||||
if (usb_set_configuration(FD[fd].pHD, dev->config[config].bConfigurationValue))
|
||||
@@ -562,7 +569,7 @@ static int release_interface(file_descri
|
||||
}
|
||||
|
||||
/* Claim any open interface which is valid for device_id and device status. */
|
||||
-static int claim_id_interface(struct usb_device *dev)
|
||||
+static int claim_id_interface(struct usb_device *dev, int flags)
|
||||
{
|
||||
enum FD_ID i;
|
||||
|
||||
@@ -570,7 +577,7 @@ static int claim_id_interface(struct usb
|
||||
{
|
||||
if (get_interface(dev, i, &fd_table[i]) == 0)
|
||||
{
|
||||
- if (claim_interface(libusb_device, &fd_table[i]))
|
||||
+ if (claim_interface(libusb_device, &fd_table[i], flags))
|
||||
continue; /* interface is busy, try next interface */
|
||||
break; /* done */
|
||||
}
|
||||
@@ -1111,7 +1118,7 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
{
|
||||
/* First client. */
|
||||
|
||||
- if ((fd = claim_id_interface(libusb_device)) == MAX_FD)
|
||||
+ if ((fd = claim_id_interface(libusb_device, 0)) == MAX_FD)
|
||||
{
|
||||
stat = HPMUD_R_DEVICE_BUSY;
|
||||
goto blackout;
|
||||
@@ -1186,7 +1193,7 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
if (fd == FD_NA)
|
||||
{
|
||||
/* Device not in use. Claim interface, but release for other processes. */
|
||||
- if ((fd = claim_id_interface(libusb_device)) != MAX_FD)
|
||||
+ if ((fd = claim_id_interface(libusb_device, 0)) != MAX_FD)
|
||||
{
|
||||
*len = device_id(fd, pd->id, sizeof(pd->id)); /* get new copy and cache it */
|
||||
release_interface(&fd_table[fd]);
|
||||
@@ -1239,7 +1246,7 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
if (fd == FD_NA)
|
||||
{
|
||||
/* Device not in use. Claim interface, but release for other processes. */
|
||||
- if ((fd = claim_id_interface(libusb_device)) != MAX_FD)
|
||||
+ if ((fd = claim_id_interface(libusb_device, 0)) != MAX_FD)
|
||||
{
|
||||
r = device_status(fd, status);
|
||||
release_interface(&fd_table[fd]);
|
||||
@@ -1344,7 +1351,7 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
|
||||
get_interface(libusb_device, fd, &fd_table[fd]);
|
||||
|
||||
- if (claim_interface(libusb_device, &fd_table[fd]))
|
||||
+ if (claim_interface(libusb_device, &fd_table[fd], 0))
|
||||
goto bugout;
|
||||
|
||||
pc->fd = fd;
|
||||
@@ -1475,7 +1482,7 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
goto bugout;
|
||||
}
|
||||
|
||||
- if (claim_interface(libusb_device, &fd_table[fd]))
|
||||
+ if (claim_interface(libusb_device, &fd_table[fd], 0))
|
||||
goto bugout;
|
||||
|
||||
pc->fd = fd;
|
||||
@@ -1499,13 +1506,13 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
/* Initialize MLC transport if this is the first MLC channel. */
|
||||
if (pd->channel_cnt==1)
|
||||
{
|
||||
- if (get_interface(libusb_device, FD_7_1_3, &fd_table[FD_7_1_3]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_3]) == 0)
|
||||
+ if (get_interface(libusb_device, FD_7_1_3, &fd_table[FD_7_1_3]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_3], 0) == 0)
|
||||
fd = FD_7_1_3; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_ff_ff_ff, &fd_table[FD_ff_ff_ff]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_ff_ff]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_ff_ff_ff, &fd_table[FD_ff_ff_ff]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_ff_ff], 0) == 0)
|
||||
fd = FD_ff_ff_ff; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_ff_d4_0, &fd_table[FD_ff_d4_0]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_d4_0]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_ff_d4_0, &fd_table[FD_ff_d4_0]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_d4_0], 0) == 0)
|
||||
fd = FD_ff_d4_0; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_7_1_2, &fd_table[FD_7_1_2]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_2]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_7_1_2, &fd_table[FD_7_1_2]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_2], 0) == 0)
|
||||
fd = FD_7_1_2; /* raw, mlc, dot4 */
|
||||
else
|
||||
{
|
||||
@@ -1719,13 +1726,13 @@ enum HPMUD_RESULT __attribute__ ((visibi
|
||||
/* Initialize MLC transport if this is the first MLC channel. */
|
||||
if (pd->channel_cnt==1)
|
||||
{
|
||||
- if (get_interface(libusb_device, FD_7_1_3, &fd_table[FD_7_1_3]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_3]) == 0)
|
||||
+ if (get_interface(libusb_device, FD_7_1_3, &fd_table[FD_7_1_3]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_3], 0) == 0)
|
||||
fd = FD_7_1_3; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_ff_ff_ff, &fd_table[FD_ff_ff_ff]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_ff_ff]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_ff_ff_ff, &fd_table[FD_ff_ff_ff]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_ff_ff], 0) == 0)
|
||||
fd = FD_ff_ff_ff; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_ff_d4_0, &fd_table[FD_ff_d4_0]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_d4_0]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_ff_d4_0, &fd_table[FD_ff_d4_0]) == 0 && claim_interface(libusb_device, &fd_table[FD_ff_d4_0], 0) == 0)
|
||||
fd = FD_ff_d4_0; /* mlc, dot4 */
|
||||
- else if (get_interface(libusb_device, FD_7_1_2, &fd_table[FD_7_1_2]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_2]) == 0)
|
||||
+ else if (get_interface(libusb_device, FD_7_1_2, &fd_table[FD_7_1_2]) == 0 && claim_interface(libusb_device, &fd_table[FD_7_1_2], 0) == 0)
|
||||
fd = FD_7_1_2; /* raw, mlc, dot4 */
|
||||
else
|
||||
{
|
||||
@@ -1960,6 +1967,91 @@ bugout:
|
||||
* USB probe devices, walk the USB bus(s) looking for HP products.
|
||||
*/
|
||||
|
||||
+static void
|
||||
+get_device_id (struct usb_device *dev, const char *serial,
|
||||
+ char *id, size_t len)
|
||||
+{
|
||||
+ int try_usblp = 0;
|
||||
+ int fd;
|
||||
+
|
||||
+ *id = '\0';
|
||||
+ if (dev->descriptor.idVendor != 0x3f0)
|
||||
+ return;
|
||||
+
|
||||
+ libusb_device = dev;
|
||||
+ fd = claim_id_interface (dev, CLAIM_NO_DETACH);
|
||||
+ if (fd == MAX_FD)
|
||||
+ {
|
||||
+ try_usblp = 1;
|
||||
+ goto try_usblp_instead;
|
||||
+ }
|
||||
+
|
||||
+ if (device_id (fd, id, len) == 0)
|
||||
+ try_usblp = 1;
|
||||
+
|
||||
+ release_interface (&fd_table[fd]);
|
||||
+
|
||||
+ try_usblp_instead:
|
||||
+ if (try_usblp)
|
||||
+ {
|
||||
+ struct udev *udev = udev_new ();
|
||||
+ struct udev_enumerate *en = udev_enumerate_new (udev);
|
||||
+ struct udev_list_entry *list, *each;
|
||||
+ udev_enumerate_add_match_subsystem (en, "usb");
|
||||
+ udev_enumerate_add_match_sysattr (en, "bInterfaceClass", "07");
|
||||
+ udev_enumerate_add_match_sysattr (en, "bInterfaceSubClass", "01");
|
||||
+ udev_enumerate_scan_devices (en);
|
||||
+ list = udev_enumerate_get_list_entry (en);
|
||||
+ udev_list_entry_foreach (each, list)
|
||||
+ {
|
||||
+ const char *syspath = udev_list_entry_get_name (each);
|
||||
+ struct udev_device *parent_dev, *ddev;
|
||||
+ const char *ieee1284_id;
|
||||
+ const char *idVendor;
|
||||
+ const char *idProductStr;
|
||||
+ const char *serialstr;
|
||||
+ unsigned long idProduct;
|
||||
+ ddev = udev_device_new_from_syspath (udev, syspath);
|
||||
+ parent_dev =
|
||||
+ udev_device_get_parent_with_subsystem_devtype (ddev,
|
||||
+ "usb",
|
||||
+ "usb_device");
|
||||
+ if (!parent_dev)
|
||||
+ continue;
|
||||
+
|
||||
+ idVendor = udev_device_get_sysattr_value (parent_dev,
|
||||
+ "idVendor");
|
||||
+ if (!idVendor || strcmp (idVendor, "03f0"))
|
||||
+ continue;
|
||||
+
|
||||
+ idProductStr = udev_device_get_sysattr_value (parent_dev,
|
||||
+ "idProduct");
|
||||
+ if (!idProductStr ||
|
||||
+ strtoul (idProductStr, NULL, 16) !=
|
||||
+ dev->descriptor.idProduct)
|
||||
+ continue;
|
||||
+
|
||||
+ serialstr = udev_device_get_sysattr_value (parent_dev,
|
||||
+ "serial");
|
||||
+ if (!serialstr || strcmp (serialstr, serial))
|
||||
+ continue;
|
||||
+
|
||||
+ ieee1284_id = udev_device_get_sysattr_value (ddev,
|
||||
+ "ieee1284_id");
|
||||
+ if (!ieee1284_id)
|
||||
+ continue;
|
||||
+
|
||||
+ strncpy (id, ieee1284_id, len);
|
||||
+ id[len - 1] = '\0';
|
||||
+ }
|
||||
+
|
||||
+ udev_enumerate_unref (en);
|
||||
+ udev_unref (udev);
|
||||
+ }
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int lst_size, int *cnt)
|
||||
{
|
||||
struct usb_bus *bus;
|
||||
@@ -2007,6 +2099,7 @@ int __attribute__ ((visibility ("hidden"
|
||||
|
||||
if (model[0])
|
||||
{
|
||||
+ char device_id[1024];
|
||||
snprintf(sz, sizeof(sz), "hp:/usb/%s?serial=%s", model, serial);
|
||||
|
||||
/* See if device is supported by hplip. */
|
||||
@@ -2017,17 +2110,19 @@ int __attribute__ ((visibility ("hidden"
|
||||
continue; /* ignor, not supported */
|
||||
}
|
||||
|
||||
- /*
|
||||
- * For Cups 1.2 we append a dummy deviceid. A valid deviceid would require us to claim the USB interface, thus removing usblp.
|
||||
- * This will allow us to do discovery and not disable other CUPS backend(s) who use /dev/usb/lpx instead of libusb.
|
||||
- */
|
||||
- if (strncasecmp(rmodel, "hp ", 3) == 0)
|
||||
- size += snprintf(lst+size, lst_size-size, "direct %s \"HP %s\" \"HP %s USB %s HPLIP\" \"MFG:HP;MDL:%s;CLS:PRINTER;DES:%s;SN:%s;\"\n",
|
||||
- sz, &rmodel[3], &rmodel[3], serial, rmodel, rmodel, rserial);
|
||||
- else
|
||||
- size += snprintf(lst+size, lst_size-size, "direct %s \"HP %s\" \"HP %s USB %s HPLIP\" \"MFG:HP;MDL:%s;CLS:PRINTER;DES:%s;SN:%s;\"\n",
|
||||
- sz, rmodel, rmodel, serial, rmodel, rmodel, rserial);
|
||||
-
|
||||
+ get_device_id (dev, rserial, device_id, sizeof (device_id));
|
||||
+ if (strncasecmp(rmodel, "hp ", 3) == 0)
|
||||
+ size += snprintf(lst+size, lst_size-size,
|
||||
+ "direct %s \"HP %s\" \"HP %s USB %s "
|
||||
+ "HPLIP\" \"%s\"\n",
|
||||
+ sz, &rmodel[3], &rmodel[3], serial,
|
||||
+ device_id);
|
||||
+ else
|
||||
+ size += snprintf(lst+size, lst_size-size,
|
||||
+ "direct %s \"HP %s\" \"HP %s USB %s "
|
||||
+ "HPLIP\" \"%s\"\n",
|
||||
+ sz, rmodel, rmodel, serial,
|
||||
+ device_id);
|
||||
*cnt+=1;
|
||||
}
|
||||
}
|
||||
diff -up hplip-3.9.6b/Makefile.am.device-id hplip-3.9.6b/Makefile.am
|
||||
--- hplip-3.9.6b/Makefile.am.device-id 2009-06-25 20:05:57.000000000 +0100
|
||||
+++ hplip-3.9.6b/Makefile.am 2009-07-27 16:05:54.700543137 +0100
|
||||
@@ -67,9 +67,9 @@ libhpmud_la_SOURCES = io/hpmud/hpmud.c i
|
||||
io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/musb.h io/hpmud/pml.h io/hpmud/dot4.c \
|
||||
io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h
|
||||
if NETWORK_BUILD
|
||||
-libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -lpthread -l$(SNMPLIB) -lcrypto
|
||||
+libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -ludev -lpthread -l$(SNMPLIB) -lcrypto
|
||||
else
|
||||
-libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -lpthread
|
||||
+libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -ludev -lpthread
|
||||
endif
|
||||
libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
|
||||
|
||||
diff -up hplip-3.9.6b/Makefile.in.device-id hplip-3.9.6b/Makefile.in
|
||||
--- hplip-3.9.6b/Makefile.in.device-id 2009-06-25 21:02:19.000000000 +0100
|
||||
+++ hplip-3.9.6b/Makefile.in 2009-07-27 16:06:31.812417344 +0100
|
||||
@@ -3618,8 +3618,8 @@ cups_drv = prnt/drv/hpcups.drv
|
||||
@HPLIP_BUILD_TRUE@ io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/musb.h io/hpmud/pml.h io/hpmud/dot4.c \
|
||||
@HPLIP_BUILD_TRUE@ io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h
|
||||
|
||||
-@HPLIP_BUILD_TRUE@@NETWORK_BUILD_FALSE@libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -lpthread
|
||||
-@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -lpthread -l$(SNMPLIB) -lcrypto
|
||||
+@HPLIP_BUILD_TRUE@@NETWORK_BUILD_FALSE@libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -ludev -lpthread
|
||||
+@HPLIP_BUILD_TRUE@@NETWORK_BUILD_TRUE@libhpmud_la_LDFLAGS = -version-info 0:5:0 -lusb -ludev -lpthread -l$(SNMPLIB) -lcrypto
|
||||
@HPLIP_BUILD_TRUE@libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
|
||||
@HPLIP_BUILD_TRUE@libhpip_la_LDFLAGS = -version-info 0:1:0
|
||||
@HPLIP_BUILD_TRUE@libhpip_la_LIBADD = -lm
|
@ -1,52 +0,0 @@
|
||||
diff -up hplip-3.9.6b/prnt/hpijs/dj9xxvip.cpp.disc-media hplip-3.9.6b/prnt/hpijs/dj9xxvip.cpp
|
||||
--- hplip-3.9.6b/prnt/hpijs/dj9xxvip.cpp.disc-media 2009-06-25 21:02:29.000000000 +0100
|
||||
+++ hplip-3.9.6b/prnt/hpijs/dj9xxvip.cpp 2009-07-27 17:10:55.882543437 +0100
|
||||
@@ -500,6 +500,23 @@ DRIVER_ERROR HeaderDJ990::Send()
|
||||
QUALITY_MODE eQualityMode;
|
||||
BOOL bDeviceText;
|
||||
|
||||
+ /* select media type and media source for CD/DVD printing
|
||||
+ * as soon as this size has been selected.
|
||||
+ * This is convenient for the user. It is also necessary,
|
||||
+ * as CD/DVD cannot be selected as media type and media source
|
||||
+ * with the hplip PPD files.
|
||||
+ */
|
||||
+ switch(thePrintContext->thePaperSize)
|
||||
+ {
|
||||
+ case CDDVD_80:
|
||||
+ case CDDVD_120:
|
||||
+ thePrintContext->SetMediaType(MEDIA_CDDVD);
|
||||
+ SetMediaType(mediaCDDVD);
|
||||
+ thePrintContext->SetMediaSource (sourceTrayCDDVD);
|
||||
+ SetMediaSource (sourceTrayCDDVD);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
thePrintContext->GetPrintModeSettings (eQualityMode, eMediaType, eColorMode, bDeviceText);
|
||||
|
||||
#ifdef APDK_LINUX
|
||||
@@ -511,7 +528,9 @@ DRIVER_ERROR HeaderDJ990::Send()
|
||||
* on what was selected from ppd.
|
||||
*/
|
||||
|
||||
- SetMediaType (MediaTypeToPcl (eMediaType));
|
||||
+ /* This is causing, that CD/DVD cannot be printed at all:
|
||||
+ */
|
||||
+ // SetMediaType (MediaTypeToPcl (eMediaType));
|
||||
#endif
|
||||
|
||||
if (eMediaType == MEDIA_CDDVD)
|
||||
@@ -734,11 +753,12 @@ void HeaderDJ990::SetMediaSource(MediaSo
|
||||
msrccount=EscAmplCopy((BYTE*)mediasource,msource,'H');
|
||||
if (msource == sourceTrayCDDVD)
|
||||
{
|
||||
+ thePrintContext->SetMediaType (MEDIA_CDDVD);
|
||||
SetMediaType (mediaCDDVD);
|
||||
SetQuality (qualityPresentation);
|
||||
return;
|
||||
}
|
||||
- if (msource == sourceTray2 || msource > sourceTrayAuto)
|
||||
+ else if (msource == sourceTray2 || msource > sourceTrayAuto)
|
||||
{
|
||||
SetMediaType (mediaPlain);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
diff -up hplip-3.9.6b/Makefile.am.libsane hplip-3.9.6b/Makefile.am
|
||||
--- hplip-3.9.6b/Makefile.am.libsane 2009-07-27 16:18:54.166417989 +0100
|
||||
+++ hplip-3.9.6b/Makefile.am 2009-07-27 16:19:23.487543339 +0100
|
||||
@@ -55,7 +55,7 @@ else
|
||||
libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
|
||||
endif
|
||||
# The following is a interlibrary dependency that must be compiled first.
|
||||
-libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
|
||||
+libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl -lsane
|
||||
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
|
||||
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
|
||||
endif # SCAN_BUILD
|
||||
diff -up hplip-3.9.6b/Makefile.in.libsane hplip-3.9.6b/Makefile.in
|
||||
--- hplip-3.9.6b/Makefile.in.libsane 2009-07-27 16:18:54.174417364 +0100
|
||||
+++ hplip-3.9.6b/Makefile.in 2009-07-27 16:19:39.431417307 +0100
|
||||
@@ -3608,7 +3608,7 @@ cups_drv = prnt/drv/hpcups.drv
|
||||
@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
|
||||
@DARWIN_BUILD_TRUE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
|
||||
# The following is a interlibrary dependency that must be compiled first.
|
||||
-@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
|
||||
+@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl -lsane
|
||||
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
|
||||
@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
|
||||
|
@ -1,34 +0,0 @@
|
||||
diff -up hplip-3.9.6b/prnt/hpijs/hpcups.cpp.marker-supply hplip-3.9.6b/prnt/hpijs/hpcups.cpp
|
||||
--- hplip-3.9.6b/prnt/hpijs/hpcups.cpp.marker-supply 2009-07-27 18:43:01.724542229 +0100
|
||||
+++ hplip-3.9.6b/prnt/hpijs/hpcups.cpp 2009-07-27 18:43:09.416543072 +0100
|
||||
@@ -347,11 +347,11 @@ int HPCups::initContext (char **argv)
|
||||
case WARN_LOW_INK_YELLOW:
|
||||
case WARN_LOW_INK_MULTIPLE_PENS:
|
||||
{
|
||||
- BUG ("STATE: marker-supply-low-warning\n");
|
||||
+ BUG ("STATE: +marker-supply-low-warning\n");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
- BUG ("STATE: -marker-supply-low-warning");
|
||||
+ BUG ("STATE: -marker-supply-low-warning\n");
|
||||
}
|
||||
}
|
||||
|
||||
diff -up hplip-3.9.6b/prnt/hpijs/hpijs.cpp.marker-supply hplip-3.9.6b/prnt/hpijs/hpijs.cpp
|
||||
--- hplip-3.9.6b/prnt/hpijs/hpijs.cpp.marker-supply 2009-07-27 18:42:48.290417159 +0100
|
||||
+++ hplip-3.9.6b/prnt/hpijs/hpijs.cpp 2009-07-27 18:42:48.315417579 +0100
|
||||
@@ -630,11 +630,11 @@ int main (int argc, char *argv[], char *
|
||||
case WARN_LOW_INK_YELLOW:
|
||||
case WARN_LOW_INK_MULTIPLE_PENS:
|
||||
{
|
||||
- BUG ("STATE: marker-supply-low-warning\n");
|
||||
+ BUG ("STATE: +marker-supply-low-warning\n");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
- BUG ("STATE: -marker-supply-low-warning");
|
||||
+ BUG ("STATE: -marker-supply-low-warning\n");
|
||||
}
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff -up hplip-3.9.2/base/g.py.no-root-config hplip-3.9.2/base/g.py
|
||||
--- hplip-3.9.2/base/g.py.no-root-config 2009-02-20 00:36:51.000000000 +0000
|
||||
+++ hplip-3.9.2/base/g.py 2009-03-09 17:43:15.000000000 +0000
|
||||
@@ -111,6 +111,10 @@ class ConfigBase(object):
|
||||
|
||||
def read(self):
|
||||
if self.filename is not None:
|
||||
+ filename = self.filename
|
||||
+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
|
||||
+ # Don't try opening a file in root's home directory.
|
||||
+ return
|
||||
try:
|
||||
fp = open(self.filename, "r")
|
||||
self.conf.readfp(fp)
|
||||
@@ -120,6 +124,15 @@ class ConfigBase(object):
|
||||
|
||||
def write(self):
|
||||
if self.filename is not None:
|
||||
+ filename = self.filename
|
||||
+ if filename.startswith ("/root/") or filename.startswith ("/var/"):
|
||||
+ # Don't try writing a file in root's home directory.
|
||||
+ return
|
||||
+ elif filename.startswith ("/etc/"):
|
||||
+ # Certainly don't try writing the system-wide config file!
|
||||
+ # See bug #479178.
|
||||
+ return
|
||||
+
|
||||
try:
|
||||
fp = open(self.filename, "w")
|
||||
self.conf.write(fp)
|
@ -1,12 +0,0 @@
|
||||
diff -up hplip-3.9.6b/prnt/drv/hpcups.drv.in.resolution-405400 hplip-3.9.6b/prnt/drv/hpcups.drv.in
|
||||
--- hplip-3.9.6b/prnt/drv/hpcups.drv.in.resolution-405400 2009-06-25 21:01:45.000000000 +0100
|
||||
+++ hplip-3.9.6b/prnt/drv/hpcups.drv.in 2009-07-28 09:38:56.866872128 +0100
|
||||
@@ -1296,7 +1296,7 @@ Manufacturer "HP"
|
||||
|
||||
// cupsCompression values map to QUALITY_MODE from global_types.h
|
||||
Option "OutputMode/Print Quality" PickOne AnySetup 10.0
|
||||
- *Choice "Normal/Normal" "<</cupsCompression 0/HWResolution[300 300]>>setpagedevice"
|
||||
+ *Choice "Normal/Normal" "<</cupsCompression 0/HWResolution[600 600]>>setpagedevice"
|
||||
Choice "Draft/Draft" "<</cupsCompression 1/HWResolution[300 300]>>setpagedevice"
|
||||
Choice "Best/Best" "<</cupsCompression 2/HWResolution[600 600]>>setpagedevice"
|
||||
Choice "Photo/High-Resolution Photo" "<</cupsCompression 3/HWResolution[1200 1200]>>setpagedevice"
|
@ -1,35 +0,0 @@
|
||||
diff -up hplip-3.9.6b/prnt/hpijs/hpcups.cpp.segfault hplip-3.9.6b/prnt/hpijs/hpcups.cpp
|
||||
--- hplip-3.9.6b/prnt/hpijs/hpcups.cpp.segfault 2009-06-25 20:04:19.000000000 +0100
|
||||
+++ hplip-3.9.6b/prnt/hpijs/hpcups.cpp 2009-07-27 18:42:04.561544716 +0100
|
||||
@@ -373,9 +373,12 @@ int HPCups::initContext (char **argv)
|
||||
if (err == PLUGIN_LIBRARY_MISSING)
|
||||
{
|
||||
// call dbus here
|
||||
- SendDbusMessage (getenv ("DEVICE_URI"), getenv ("PRINTER"),
|
||||
- EVENT_PRINT_FAILED_MISSING_PLUGIN,
|
||||
- argv[2], atoi (argv[1]), argv[3]);
|
||||
+ const char *device_uri = getenv ("DEVICE_URI");
|
||||
+ const char *printer = getenv ("PRINTER");
|
||||
+ if (device_uri && printer)
|
||||
+ SendDbusMessage (device_uri, printer,
|
||||
+ EVENT_PRINT_FAILED_MISSING_PLUGIN,
|
||||
+ argv[2], atoi (argv[1]), argv[3]);
|
||||
BUG ("ERROR: unable to set device = %s, err = %d\n", attr->value, err);
|
||||
return 1;
|
||||
}
|
||||
diff -up hplip-3.9.6b/prnt/hpijs/hpijs.cpp.segfault hplip-3.9.6b/prnt/hpijs/hpijs.cpp
|
||||
--- hplip-3.9.6b/prnt/hpijs/hpijs.cpp.segfault 2009-06-25 20:04:19.000000000 +0100
|
||||
+++ hplip-3.9.6b/prnt/hpijs/hpijs.cpp 2009-07-27 18:39:46.755417388 +0100
|
||||
@@ -253,8 +253,11 @@ int hpijs_set_cb (void *set_cb_data, Ijs
|
||||
// call dbus here
|
||||
const char *user_name = " ";
|
||||
const char *title = " ";
|
||||
+ char *device_uri = getenv ("DEVICE_URI");
|
||||
+ char *printer = getenv ("PRINTER");
|
||||
int job_id = 0;
|
||||
- SendDbusMessage (getenv ("DEVICE_URI"), getenv("PRINTER"),
|
||||
+ SendDbusMessage (device_uri ? device_uri : "",
|
||||
+ printer ? printer : "",
|
||||
EVENT_PRINT_FAILED_MISSING_PLUGIN,
|
||||
user_name, job_id, title);
|
||||
BUG("unable to set device=%s, err=%d\n", svalue, r);
|
60
hplip.spec
60
hplip.spec
@ -1,7 +1,7 @@
|
||||
Summary: HP Linux Imaging and Printing Project
|
||||
Name: hplip
|
||||
Version: 3.9.6b
|
||||
Release: 5%{?dist}
|
||||
Version: 3.9.8
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+ and MIT
|
||||
Group: System Environment/Daemons
|
||||
Conflicts: system-config-printer < 0.6.132
|
||||
@ -14,17 +14,8 @@ Conflicts: selinux-policy < 3.0.3-3
|
||||
Url: http://hplip.sourceforge.net/
|
||||
Source0: http://kent.dl.sourceforge.net/sourceforge/hplip/%{name}-%{version}.tar.gz
|
||||
Source1: hplip.fdi
|
||||
Patch1: hplip-desktop.patch
|
||||
Patch2: hplip-segfault.patch
|
||||
Patch3: hplip-device-id.patch
|
||||
Patch4: hplip-marker-supply.patch
|
||||
Patch5: hplip-dbus.patch
|
||||
Patch6: hplip-strstr-const.patch
|
||||
Patch8: hplip-libsane.patch
|
||||
Patch12: hplip-no-root-config.patch
|
||||
Patch13: hplip-ui-optional.patch
|
||||
Patch14: hplip-disc-media.patch
|
||||
Patch15: hplip-resolution-405400.patch
|
||||
Patch1: hplip-strstr-const.patch
|
||||
Patch2: hplip-ui-optional.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Requires(pre): /sbin/service
|
||||
@ -106,47 +97,11 @@ SANE driver for scanners in HP's multi-function devices (from HPOJ).
|
||||
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
||||
%setup -q
|
||||
|
||||
# Fix desktop file.
|
||||
%patch1 -p1 -b .desktop
|
||||
|
||||
# Prevent crash when DEVICE_URI/PRINTER environment variables are not
|
||||
# set (bug #479808 comment 6).
|
||||
%patch2 -p1 -b .segfault
|
||||
|
||||
# Fixed device-id attributes reported by backend.
|
||||
%patch3 -p1 -b .device-id
|
||||
|
||||
# Low ink is a warning condition, not an error.
|
||||
%patch4 -p1 -b .marker-supply
|
||||
|
||||
# Prevent backend crash when D-Bus not running (bug #474362).
|
||||
%patch5 -p1 -b .dbus
|
||||
|
||||
# Fix compilation.
|
||||
%patch6 -p1 -b .strstr-const
|
||||
|
||||
# Link libsane-hpaio against libsane (bug #234813).
|
||||
%patch8 -p1 -b .libsane
|
||||
|
||||
# Prevent SELinux audit message from the CUPS backends (bug #241776)
|
||||
%patch12 -p1 -b .no-root-config
|
||||
%patch1 -p1 -b .strstr-const
|
||||
|
||||
# Make utils.checkPyQtImport() look for the gui sub-package (bug #243273).
|
||||
%patch13 -p1 -b .ui-optional
|
||||
|
||||
# Set disc media for disc page sizes (bug #495672).
|
||||
%patch14 -p1 -b .disc-media
|
||||
|
||||
# Fixed HWResolution for 'Normal' output from the hpcups driver
|
||||
# (laundpad bug #405400).
|
||||
%patch15 -p1 -b .resolution-405400
|
||||
|
||||
# Fix hpcups fax PPDs (bug #515356)
|
||||
pushd fax/ppd
|
||||
gunzip *hpcups*
|
||||
perl -pi -e 's/^(\*Product:.*\")(.*)\"/\1(\2)"/' *hpcups*
|
||||
gzip -n *hpcups*
|
||||
popd
|
||||
%patch2 -p1 -b .ui-optional
|
||||
|
||||
%build
|
||||
%configure --disable-foomatic-xml-install --disable-cups-install \
|
||||
@ -355,6 +310,9 @@ fi
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Wed Aug 5 2009 Tim Waugh <twaugh@redhat.com> 3.9.8-1
|
||||
- 3.9.8.
|
||||
|
||||
* Tue Aug 4 2009 Tim Waugh <twaugh@redhat.com> 3.9.6b-5
|
||||
- Fix hpcups fax PPDs (bug #515356)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user