diff --git a/cups-usblp-quirks.patch b/cups-usblp-quirks.patch index ebf5d4c..15e0c0b 100644 --- a/cups-usblp-quirks.patch +++ b/cups-usblp-quirks.patch @@ -1,6 +1,6 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-libusb.c ---- cups-1.5.4/backend/usb-libusb.c.usblp-quirks 2012-07-16 19:16:46.000000000 +0200 -+++ cups-1.5.4/backend/usb-libusb.c 2012-10-17 16:30:58.571793169 +0200 +--- cups-1.5.4/backend/usb-libusb.c.usblp-quirks 2012-07-16 18:16:46.000000000 +0100 ++++ cups-1.5.4/backend/usb-libusb.c 2013-06-25 09:20:42.821779510 +0100 @@ -70,7 +70,7 @@ typedef struct usb_printer_s /**** USB read_endp, /* Read endpoint */ protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */ @@ -19,7 +19,7 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib #define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach the usblp kernel module */ -@@ -141,15 +143,45 @@ static const struct quirk_printer_struct +@@ -141,15 +143,47 @@ static const struct quirk_printer_struct { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */ { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut */ @@ -33,6 +33,8 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib + Printer, https://bugs.launchpad.net/bugs/1032456 */ + { 0x04a9, 0x1717, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP510 + Printer, https://bugs.launchpad.net/bugs/1050009 */ ++ { 0x04a9, 0x1730, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP540 ++ Printer, https://bugzilla.redhat.com/967873 */ + { 0x04a9, 0x173d, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP550 + Printer, http://www.cups.org/str.php?L4155 */ + { 0x04a9, 0x173e, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP560 @@ -68,7 +70,7 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib { 0, 0 } }; -@@ -256,7 +286,12 @@ print_device(const char *uri, /* I - De +@@ -256,7 +290,12 @@ print_device(const char *uri, /* I - De } g.print_fd = print_fd; @@ -82,7 +84,7 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib /* * If we are printing data from a print driver on stdin, ignore SIGTERM -@@ -772,7 +807,7 @@ close_device(usb_printer_t *printer) /* +@@ -772,7 +811,7 @@ close_device(usb_printer_t *printer) /* * Reset the device to clean up after the job */ @@ -91,7 +93,7 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib { if ((errcode = libusb_reset_device(printer->handle)) < 0) fprintf(stderr, -@@ -1288,7 +1323,7 @@ open_device(usb_printer_t *printer, /* I +@@ -1288,7 +1327,7 @@ open_device(usb_printer_t *printer, /* I } printer->usblp_attached = 0; @@ -100,7 +102,7 @@ diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-lib if (verbose) fputs("STATE: +connecting-to-device\n", stderr); -@@ -1586,7 +1621,8 @@ static unsigned int quirks(int vendor, i +@@ -1586,7 +1625,8 @@ static unsigned int quirks(int vendor, i for (i = 0; quirk_printers[i].vendorId; i++) { if (vendor == quirk_printers[i].vendorId && diff --git a/cups.spec b/cups.spec index 1cf2be5..1f943f3 100644 --- a/cups.spec +++ b/cups.spec @@ -12,7 +12,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.5.4 -Release: 28%{?dist} +Release: 29%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -282,6 +282,7 @@ Sends IPP requests to the specified URI and tests and/or displays the results. # Problem is a port reset which is done by the new USB backend of CUPS 1.5.4 and 1.6.x to clean up after the job. # This patch adds a quirk handler for this reset so that it will not be done for all printers. # (bug #847923, STR #4155, STR #4191) +# Added usblp quirk for Canon PIXMA MP540 (bug #967873). %patch24 -p1 -b .usblp-quirks # Use mode 0755 for binaries and libraries where appropriate. %patch25 -p1 -b .0755 @@ -765,6 +766,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Tue Jun 25 2013 Tim Waugh 1:1.5.4-29 +- Added usblp quirk for Canon PIXMA MP540 (bug #967873). + * Thu Jun 13 2013 Tim Waugh 1:1.5.4-28 - Prevent stringpool damage leading to memory leaks (bug #974048).