extra/cups to 2.2.1-1

This commit is contained in:
Kevin Mihelich 2016-10-04 23:33:34 +00:00
parent ae1e8313fb
commit 81bc2e2ba3
2 changed files with 4 additions and 62 deletions

View file

@ -6,8 +6,8 @@
pkgbase="cups" pkgbase="cups"
pkgname=('libcups' 'cups') pkgname=('libcups' 'cups')
pkgver=2.2.0 pkgver=2.2.1
pkgrel=4 pkgrel=1
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
license=('GPL') license=('GPL')
url="http://www.cups.org/" url="http://www.cups.org/"
@ -24,9 +24,8 @@ source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver
cups-1.6.0-fix-install-perms.patch cups-1.6.0-fix-install-perms.patch
# bugfixes # bugfixes
cups-systemd-socket.patch cups-systemd-socket.patch
fix_endless_loops.diff
) )
md5sums=('e22d943cff300411d3616dc2ee86272c' md5sums=('a94da2a1e9dbdccb4f3836a38a431931'
'fc8286f185e2cc5f7e1f6843bf193e2b' 'fc8286f185e2cc5f7e1f6843bf193e2b'
'96f82c38f3f540b53f3e5144900acf17' '96f82c38f3f540b53f3e5144900acf17'
'3ba9e3410df1dc3015463d615ef91b3b' '3ba9e3410df1dc3015463d615ef91b3b'
@ -34,8 +33,7 @@ md5sums=('e22d943cff300411d3616dc2ee86272c'
'39dd3141991c3052b73f59ece70e1ea6' '39dd3141991c3052b73f59ece70e1ea6'
'451609db34f95209d64c38474de27ce1' '451609db34f95209d64c38474de27ce1'
'5117f65342fcc69c6a506529e4daca9e' '5117f65342fcc69c6a506529e4daca9e'
'53bb3c80ee6823d36f9ab499373edfc5' '53bb3c80ee6823d36f9ab499373edfc5')
'32f6e1f907247dab466c37403d87d4e4')
validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org> validpgpkeys=('3737FD0D0E63B30172440D2DDBA3A7AB08D76223') # CUPS.org (CUPS.org PGP key) <security@cups.org>
prepare() { prepare() {
@ -56,8 +54,6 @@ prepare() {
# bug fixes # bug fixes
# make sure network is up when starting and notify systemd - FC # make sure network is up when starting and notify systemd - FC
patch -Np1 -i ${srcdir}/cups-systemd-socket.patch patch -Np1 -i ${srcdir}/cups-systemd-socket.patch
# fix endless loops; FS#50796; https://github.com/apple/cups/issues/4870
patch -Np1 -i ${srcdir}/fix_endless_loops.diff
# set MaxLogSize to 0 to prevent using cups internal log rotation # set MaxLogSize to 0 to prevent using cups internal log rotation
sed -i -e '5i\ ' conf/cupsd.conf.in sed -i -e '5i\ ' conf/cupsd.conf.in

View file

@ -1,54 +0,0 @@
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
index 6e2ad81..e9ef53e 100644
--- a/cups/http-addrlist.c
+++ b/cups/http-addrlist.c
@@ -304,6 +304,8 @@ httpAddrConnect2(
if (result > 0)
{
+ http_addrlist_t *connaddr = NULL; /* Connected address, if any */
+
for (i = 0; i < nfds; i ++)
{
# ifdef HAVE_POLL
@@ -314,7 +316,7 @@ httpAddrConnect2(
# endif /* HAVE_POLL */
{
*sock = fds[i];
- addrlist = addrs[i];
+ connaddr = addrs[i];
# ifdef DEBUG
len = sizeof(peer);
@@ -322,11 +324,29 @@ httpAddrConnect2(
DEBUG_printf(("1httpAddrConnect2: Connected to %s:%d...", httpAddrString(&peer, temp, sizeof(temp)), httpAddrPort(&peer)));
# endif /* DEBUG */
}
- else
+# ifdef HAVE_POLL
+ else if (pfds[i].revents & (POLLERR | POLLHUP))
+# else
+ else if (FD_ISSET(fds[i], &error))
+# endif /* HAVE_POLL */
+ {
+ /*
+ * Error on socket, remove from the "pool"...
+ */
+
httpAddrClose(NULL, fds[i]);
+ nfds --;
+ if (i < nfds)
+ {
+ memmove(fds + i, fds + i + 1, (size_t)(nfds - i) * (sizeof(fds[0])));
+ memmove(addrs + i, addrs + i + 1, (size_t)(nfds - i) * (sizeof(addrs[0])));
+ }
+ i --;
+ }
}
- return (addrlist);
+ if (connaddr)
+ return (connaddr);
}
#endif /* O_NONBLOCK */