diff -Nru cups-1.5.3/debian/changelog cups-1.5.3/debian/changelog --- cups-1.5.3/debian/changelog 2012-12-05 21:23:53.000000000 +0100 +++ cups-1.5.3/debian/changelog 2013-05-10 19:51:53.000000000 +0200 @@ -1,3 +1,22 @@ +cups (1.5.3-0ubuntu8) precise-proposed; urgency=low + + * debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch: + Add patch to test suite to ignore the newly introduced warning message. + This message gets regularly issued on build servers which use virtual + machines without access to the host's USB and so the test suite fails due + to an extra warning. Due to this there was a FTBFS in the previous release + (LP: #1108719). + + -- Till Kamppeter Fri, 10 May 2013 19:51:56 +0200 + +cups (1.5.3-0ubuntu7) precise-proposed; urgency=low + + * debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch: + Added more error handling to the libusb-based USB backend, especially to + avoid a crash when USB is disabled in the BIOS (LP: #1108719). + + -- Till Kamppeter Thu, 25 Apr 2013 12:34:56 +0200 + cups (1.5.3-0ubuntu6) precise-proposed; urgency=low * debian/patches/airprint-support.patch: Made AirPrint support also working diff -Nru cups-1.5.3/debian/patches/series cups-1.5.3/debian/patches/series --- cups-1.5.3/debian/patches/series 2012-11-30 16:12:45.000000000 +0100 +++ cups-1.5.3/debian/patches/series 2013-04-25 20:41:45.000000000 +0200 @@ -6,6 +6,7 @@ # patches sent upstream usb-backend-reset-after-job-only-for-specific-devices.patch +usb-backend-do-not-crash-if-usb-disabled-in-bios.patch pidfile.patch ppd-poll-with-client-conf.patch # no answer yet, po4a might not be appropriate diff -Nru cups-1.5.3/debian/patches/tests-ignore-warnings.patch cups-1.5.3/debian/patches/tests-ignore-warnings.patch --- cups-1.5.3/debian/patches/tests-ignore-warnings.patch 2012-05-23 15:26:27.000000000 +0200 +++ cups-1.5.3/debian/patches/tests-ignore-warnings.patch 2013-05-10 19:46:05.000000000 +0200 @@ -1,16 +1,14 @@ Description: Ignore warnings from colord and Avahi in the tests, as they change the expected number of warnings. Author: Martin Pitt -Index: cups-1.5.2/test/run-stp-tests.sh -=================================================================== ---- cups-1.5.2.orig/test/run-stp-tests.sh 2012-03-01 07:16:41.180825081 +0100 -+++ cups-1.5.2/test/run-stp-tests.sh 2012-03-01 07:17:29.660827422 +0100 +--- a/test/run-stp-tests.sh ++++ b/test/run-stp-tests.sh @@ -764,7 +764,7 @@ fi # Warning log messages --count=`$GREP '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'` -+count=`$GREP '^W ' /tmp/cups-$user/log/error_log | grep -v 'org.freedesktop.ColorManager' | grep -v 'Avahi client failed: -26' | wc -l | awk '{print $1}'` +-count=`$GREP '^W ' /tmp/cups-$user/log/error_log | grep -v 'Unable to initialize USB access via libusb, libusb error' | wc -l | awk '{print $1}'` ++count=`$GREP '^W ' /tmp/cups-$user/log/error_log | grep -v 'Unable to initialize USB access via libusb, libusb error' | grep -v 'org.freedesktop.ColorManager' | grep -v -E 'Avahi client failed: -(1|26)' | wc -l | awk '{print $1}'` if test $count != 9; then echo "FAIL: $count warning messages, expected 9." $GREP '^W ' /tmp/cups-$user/log/error_log diff -Nru cups-1.5.3/debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch cups-1.5.3/debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch --- cups-1.5.3/debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch 1970-01-01 01:00:00.000000000 +0100 +++ cups-1.5.3/debian/patches/usb-backend-do-not-crash-if-usb-disabled-in-bios.patch 2013-05-10 19:45:12.000000000 +0200 @@ -0,0 +1,54 @@ +Description: Add more error handling to the libusb-based USB backend, + especially to avoid a crash when USB is disabled in the BIOS. Also + discard that error when counting warning messages. +Author: Till Kamppeter +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1108719 +Last-Update: 2013-05-03 +--- a/backend/usb-libusb.c ++++ b/backend/usb-libusb.c +@@ -824,7 +824,8 @@ + /* Pointer to current alternate setting */ + const struct libusb_endpoint_descriptor *endpptr = NULL; + /* Pointer to current endpoint */ +- ssize_t numdevs, /* number of connected devices */ ++ ssize_t err = 0, ++ numdevs, /* number of connected devices */ + i = 0; + uint8_t conf, /* Current configuration */ + iface, /* Current interface */ +@@ -843,7 +844,13 @@ + * Initialize libusb... + */ + +- libusb_init(NULL); ++ err = libusb_init(NULL); ++ if (err) ++ { ++ fprintf(stderr, "WARNING: Unable to initialize USB access via libusb, libusb error %i\n", err); ++ return (NULL); ++ } ++ + numdevs = libusb_get_device_list(NULL, &list); + fprintf(stderr, "DEBUG: libusb_get_device_list=%d\n", (int)numdevs); + +@@ -1006,7 +1013,8 @@ + * Clean up .... + */ + +- libusb_free_device_list(list, 1); ++ if (numdevs >= 0) ++ libusb_free_device_list(list, 1); + libusb_exit(NULL); + + return (NULL); +--- a/test/run-stp-tests.sh ++++ b/test/run-stp-tests.sh +@@ -763,7 +763,7 @@ + fi + + # Warning log messages +-count=`$GREP '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'` ++count=`$GREP '^W ' /tmp/cups-$user/log/error_log | grep -v 'Unable to initialize USB access via libusb, libusb error' | wc -l | awk '{print $1}'` + if test $count != 9; then + echo "FAIL: $count warning messages, expected 9." + $GREP '^W ' /tmp/cups-$user/log/error_log