ports/opt (3.1): cups: apply patch from fedora, fix for FS#1143
commit 6e33593f1ea422fce05328d1be200ce8420b47b9 Author: Juergen Daubert <jue@jue.li> Date: Sun Mar 22 16:00:43 2015 +0100 cups: apply patch from fedora, fix for FS#1143 diff --git a/cups/.md5sum b/cups/.md5sum index 9e6110e..ffd18b7 100644 --- a/cups/.md5sum +++ b/cups/.md5sum @@ -1,2 +1,3 @@ 4965028855c65ea97d8064de568e3d0d cups 6e0ea72dbafcf5baaa1cf4178e71096d cups-2.0.2-source.tar.bz2 +0325f63759c09c347622a14f4940bb86 cups-busy-loop.patch diff --git a/cups/Pkgfile b/cups/Pkgfile index 24aa9a8..906f949 100644 --- a/cups/Pkgfile +++ b/cups/Pkgfile @@ -5,13 +5,17 @@ name=cups version=2.0.2 -release=1 +release=2 source=(http://www.cups.org/software/$version/$name-$version-source.tar.bz2 - cups) + cups-busy-loop.patch cups) build () { cd $name-$version + # https://crux.nu/bugs/index.php?do=details&task_id=1143 + # http://pkgs.fedoraproject.org/cgit/cups.git/commit/?id=746dd9cf56e9522ca51c4... + patch -p1 -i $SRC/cups-busy-loop.patch + ./configure --prefix=/usr \ --sysconfdir=/etc \ --libdir=/usr/lib \ diff --git a/cups/cups-busy-loop.patch b/cups/cups-busy-loop.patch new file mode 100644 index 0000000..8c95546 --- /dev/null +++ b/cups/cups-busy-loop.patch @@ -0,0 +1,34 @@ +diff -up cups-2.0.2/scheduler/client.c.busy-loop cups-2.0.2/scheduler/client.c +--- cups-2.0.2/scheduler/client.c.busy-loop 2014-08-28 16:37:22.000000000 +0100 ++++ cups-2.0.2/scheduler/client.c 2015-03-16 17:24:32.506232983 +0000 +@@ -585,6 +585,17 @@ cupsdReadClient(cupsd_client_t *con) /* + * connection and we need to shut it down... + */ + ++ if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1) ++ { ++ /* ++ * Connection closed... ++ */ ++ ++ cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF."); ++ cupsdCloseClient(con); ++ return; ++ } ++ + cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.", + httpStateString(httpGetState(con->http))); + cupsdCloseClient(con); +@@ -1979,12 +1990,6 @@ cupsdReadClient(cupsd_client_t *con) /* + + if (httpGetState(con->http) == HTTP_STATE_POST_SEND) + { +- /* +- * Don't listen for activity until we decide to do something with this... +- */ +- +- cupsdAddSelect(httpGetFd(con->http), NULL, NULL, con); +- + if (con->file >= 0) + { + fstat(con->file, &filestats);
participants (1)
-
crux@crux.nu