mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
extra/cups to 2.2.0-3
This commit is contained in:
parent
bd951d094f
commit
f0b48ad90f
5 changed files with 83 additions and 17 deletions
|
@ -6,15 +6,15 @@
|
||||||
|
|
||||||
pkgbase="cups"
|
pkgbase="cups"
|
||||||
pkgname=('libcups' 'cups')
|
pkgname=('libcups' 'cups')
|
||||||
pkgver=2.1.4
|
pkgver=2.2.0
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
url="http://www.cups.org/"
|
url="http://www.cups.org/"
|
||||||
makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls'
|
makedepends=('libtiff' 'libpng' 'acl' 'pam' 'xdg-utils' 'krb5' 'gnutls'
|
||||||
'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb' 'dbus'
|
'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb' 'dbus'
|
||||||
'avahi' 'hicolor-icon-theme' 'systemd' 'inetutils' 'libpaper')
|
'avahi' 'hicolor-icon-theme' 'systemd' 'inetutils' 'libpaper')
|
||||||
source=(https://github.com/apple/cups/releases/download/release-${pkgver}/cups-${pkgver}-source.tar.gz
|
source=(https://github.com/apple/cups/releases/download/v${pkgver}/cups-${pkgver}-source.tar.gz
|
||||||
cups.logrotate cups.pam
|
cups.logrotate cups.pam
|
||||||
# improve build and linking
|
# improve build and linking
|
||||||
cups-no-export-ssllibs.patch
|
cups-no-export-ssllibs.patch
|
||||||
|
@ -24,16 +24,20 @@ source=(https://github.com/apple/cups/releases/download/release-${pkgver}/cups-$
|
||||||
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
|
||||||
|
start_cups_by_port631.diff
|
||||||
|
fix_endless_loops.diff
|
||||||
)
|
)
|
||||||
md5sums=('9f9bf6e3b9c20a3519b4dc409666d6e7'
|
md5sums=('e22d943cff300411d3616dc2ee86272c'
|
||||||
'fc8286f185e2cc5f7e1f6843bf193e2b'
|
'fc8286f185e2cc5f7e1f6843bf193e2b'
|
||||||
'96f82c38f3f540b53f3e5144900acf17'
|
'96f82c38f3f540b53f3e5144900acf17'
|
||||||
'3ba9e3410df1dc3015463d615ef91b3b'
|
'3ba9e3410df1dc3015463d615ef91b3b'
|
||||||
'1beb4896f217bc241bc08a422274ec0c'
|
'1beb4896f217bc241bc08a422274ec0c'
|
||||||
'90c30380d4c8cd48a908cfdadae1ea24'
|
'39dd3141991c3052b73f59ece70e1ea6'
|
||||||
'451609db34f95209d64c38474de27ce1'
|
'451609db34f95209d64c38474de27ce1'
|
||||||
'5117f65342fcc69c6a506529e4daca9e'
|
'5117f65342fcc69c6a506529e4daca9e'
|
||||||
'25a618201dd4bbc73ba800da425000f1')
|
'53bb3c80ee6823d36f9ab499373edfc5'
|
||||||
|
'f75c17b1b2d446a27b629f63622b9468'
|
||||||
|
'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() {
|
||||||
|
|
||||||
|
@ -54,6 +58,10 @@ 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
|
||||||
|
# make sure cupsd starts when requested via web interface
|
||||||
|
patch -Np1 -i ${srcdir}/start_cups_by_port631.diff
|
||||||
|
# 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
|
||||||
|
@ -96,7 +104,6 @@ check() {
|
||||||
package_libcups() {
|
package_libcups() {
|
||||||
pkgdesc="The CUPS Printing System - client libraries and headers"
|
pkgdesc="The CUPS Printing System - client libraries and headers"
|
||||||
depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb')
|
depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb')
|
||||||
backup=(etc/cups/client.conf)
|
|
||||||
|
|
||||||
cd ${pkgbase}-${pkgver}
|
cd ${pkgbase}-${pkgver}
|
||||||
make BUILDROOT=${pkgdir} install-headers install-libs
|
make BUILDROOT=${pkgdir} install-headers install-libs
|
||||||
|
@ -107,11 +114,6 @@ backup=(etc/cups/client.conf)
|
||||||
# install client.conf man page and config file
|
# install client.conf man page and config file
|
||||||
install -dm755 ${pkgdir}/usr/share/man/man5
|
install -dm755 ${pkgdir}/usr/share/man/man5
|
||||||
install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/man/client.conf.5 ${pkgdir}/usr/share/man/man5/
|
install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/man/client.conf.5 ${pkgdir}/usr/share/man/man5/
|
||||||
install -dm755 -g lp ${pkgdir}/etc/cups
|
|
||||||
touch ${pkgdir}/etc/cups/client.conf
|
|
||||||
echo "# see 'man client.conf'" >> ${pkgdir}/etc/cups/client.conf
|
|
||||||
echo "ServerName /run/cups/cups.sock # alternative: ServerName hostname-or-ip-address[:port] of a remote server" >> ${pkgdir}/etc/cups/client.conf
|
|
||||||
chgrp -R lp ${pkgdir}/etc/cups
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package_cups() {
|
package_cups() {
|
||||||
|
|
|
@ -4,7 +4,7 @@ diff -up cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.5b1/confi
|
||||||
@@ -69,10 +69,10 @@ case "$uname" in
|
@@ -69,10 +69,10 @@ case "$uname" in
|
||||||
;;
|
;;
|
||||||
Linux* | GNU* | Darwin*)
|
Linux* | GNU* | Darwin*)
|
||||||
# Linux, GNU Hurd, and OS X
|
# Linux, GNU Hurd, and macOS
|
||||||
- MAN1EXT=1.gz
|
- MAN1EXT=1.gz
|
||||||
- MAN5EXT=5.gz
|
- MAN5EXT=5.gz
|
||||||
- MAN7EXT=7.gz
|
- MAN7EXT=7.gz
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
|
diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
|
||||||
--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100
|
--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100
|
||||||
+++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100
|
+++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100
|
||||||
@@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm
|
@@ -690,8 +690,15 @@ main(int argc, /* I - Number of comm
|
||||||
|
|
||||||
#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
|
#if defined(HAVE_ONDEMAND)
|
||||||
if (OnDemand)
|
if (OnDemand)
|
||||||
+ {
|
+ {
|
||||||
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
||||||
|
@ -15,7 +15,7 @@ diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c
|
||||||
+ (unsigned long) getpid());
|
+ (unsigned long) getpid());
|
||||||
+# endif /* HAVE_SYSTEMD */
|
+# endif /* HAVE_SYSTEMD */
|
||||||
+ } else
|
+ } else
|
||||||
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
#endif /* HAVE_ONDEMAND */
|
||||||
if (fg)
|
if (fg)
|
||||||
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
||||||
diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
|
diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in
|
||||||
|
|
54
extra/cups/fix_endless_loops.diff
Normal file
54
extra/cups/fix_endless_loops.diff
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
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 */
|
||||||
|
|
10
extra/cups/start_cups_by_port631.diff
Normal file
10
extra/cups/start_cups_by_port631.diff
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- cups-2.2.0/scheduler/org.cups.cupsd.socket.in 2016-09-14 01:39:47.000000000 +0200
|
||||||
|
+++ cups-2.2.0/scheduler/org.cups.cupsd.socket.in.new 2016-09-17 14:43:49.237741189 +0200
|
||||||
|
@@ -3,6 +3,7 @@
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
|
||||||
|
+ListenStream=631
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
Loading…
Reference in a new issue