diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch deleted file mode 100644 index 033e7f8..0000000 --- a/cups-EAI_AGAIN.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c ---- cups-1.4.2/cups/http-addr.c.EAI_AGAIN 2010-02-23 10:39:35.038261623 +0000 -+++ cups-1.4.2/cups/http-addr.c 2010-02-23 10:41:14.684385991 +0000 -@@ -253,7 +253,7 @@ httpAddrLookup( - - if (error) - { -- if (error == EAI_FAIL) -+ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) - cg->need_res_init = 1; - - return (httpAddrString(addr, name, namelen)); diff --git a/cups-res_init.patch b/cups-res_init.patch index 22c75ba..5dccf02 100644 --- a/cups-res_init.patch +++ b/cups-res_init.patch @@ -1,12 +1,26 @@ -diff -up cups-1.4b2-svn8404/cups/http-addrlist.c.res_init cups-1.4b2-svn8404/cups/http-addrlist.c ---- cups-1.4b2-svn8404/cups/http-addrlist.c.res_init 2009-03-23 17:41:03.000000000 +0000 -+++ cups-1.4b2-svn8404/cups/http-addrlist.c 2009-03-23 17:41:26.000000000 +0000 -@@ -373,7 +373,7 @@ httpAddrGetList(const char *hostname, /* +diff -up cups-1.4.6/cups/http-addr.c.res_init cups-1.4.6/cups/http-addr.c +--- cups-1.4.6/cups/http-addr.c.res_init 2009-04-20 22:37:14.000000000 +0100 ++++ cups-1.4.6/cups/http-addr.c 2011-01-10 16:08:49.506358955 +0000 +@@ -253,7 +253,8 @@ httpAddrLookup( + + if (error) + { +- if (error == EAI_FAIL) ++ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA || ++ error == EAI_NONAME) + cg->need_res_init = 1; + + return (httpAddrString(addr, name, namelen)); +diff -up cups-1.4.6/cups/http-addrlist.c.res_init cups-1.4.6/cups/http-addrlist.c +--- cups-1.4.6/cups/http-addrlist.c.res_init 2009-04-20 22:37:14.000000000 +0100 ++++ cups-1.4.6/cups/http-addrlist.c 2011-01-10 16:08:22.375947909 +0000 +@@ -373,7 +373,8 @@ httpAddrGetList(const char *hostname, /* freeaddrinfo(results); } - else if (error == EAI_FAIL) -+ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) ++ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA || ++ error == EAI_NONAME) cg->need_res_init = 1; #else diff --git a/cups-usb-buffer-size.patch b/cups-usb-buffer-size.patch new file mode 100644 index 0000000..0f8c1c3 --- /dev/null +++ b/cups-usb-buffer-size.patch @@ -0,0 +1,22 @@ +diff -up cups-1.4.6/backend/runloop.c.usb-buffer-size cups-1.4.6/backend/runloop.c +--- cups-1.4.6/backend/runloop.c.usb-buffer-size 2011-01-10 15:37:56.885677732 +0000 ++++ cups-1.4.6/backend/runloop.c 2011-01-10 15:37:59.499623140 +0000 +@@ -45,7 +45,7 @@ backendDrainOutput(int print_fd, /* I - + fd_set input; /* Input set for reading */ + ssize_t print_bytes, /* Print bytes read */ + bytes; /* Bytes written */ +- char print_buffer[8192], /* Print data buffer */ ++ char print_buffer[512], /* Print data buffer */ + *print_ptr; /* Pointer into print data buffer */ + struct timeval timeout; /* Timeout for read... */ + +@@ -160,7 +160,7 @@ backendRunLoop( + bytes; /* Bytes written */ + int paperout; /* "Paper out" status */ + int offline; /* "Off-line" status */ +- char print_buffer[8192], /* Print data buffer */ ++ char print_buffer[512], /* Print data buffer */ + *print_ptr, /* Pointer into print data buffer */ + bc_buffer[1024]; /* Back-channel data buffer */ + struct timeval timeout; /* Timeout for select() */ +diff -up cups-1.4.6/backend/usb.c.usb-buffer-size cups-1.4.6/backend/usb.c diff --git a/cups.spec b/cups.spec index c15c89a..547c586 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -59,7 +59,6 @@ Patch25: cups-str3382.patch Patch26: cups-force-gnutls.patch Patch27: cups-serialize-gnutls.patch Patch29: cups-0755.patch -Patch30: cups-EAI_AGAIN.patch Patch31: cups-hostnamelookups.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hp-deviceid-oid.patch @@ -68,6 +67,7 @@ Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch Patch38: cups-autotype-crash.patch Patch39: cups-str3754.patch +Patch40: cups-usb-buffer-size.patch Patch100: cups-lspp.patch @@ -258,8 +258,6 @@ module. %patch27 -p1 -b .serialize-gnutls # Use mode 0755 for binaries and libraries where appropriate. %patch29 -p1 -b .0755 -# Re-initialise the resolver on failure in httpAddrLookup(). -%patch30 -p1 -b .EAI_AGAIN # Use numeric addresses for interfaces unless HostNameLookups are # turned on (bug #583054). %patch31 -p1 -b .hostnamelookups @@ -279,6 +277,8 @@ module. %patch38 -p1 -b .autotype-crash # Don't crash when job queued for printer that times out (bug #660604). %patch39 -p1 -b .str3754 +# Use a smaller buffer when writing to USB devices (bug #617208). +%patch40 -p1 -b .usb-buffer-size %if %lspp # LSPP support. @@ -576,6 +576,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Jan 10 2011 Tim Waugh 1:1.4.6-2 +- Use a smaller buffer when writing to USB devices (bug #617208). +- Handle EAI_NONAME when resolving hostnames (bug #617208). + * Fri Jan 07 2011 Jiri Popelka 1:1.4.6-1 - 1.4.6.