Date: Friday, October 3, 2014 @ 13:29:14
Author: andyrtr
Revision: 223810
upgpkg: cups 2.0.0-1
upstream update 2.0.0 - disable all bugfix patches that haven't gone upstream
until now
Modified:
cups/trunk/PKGBUILD
cups/trunk/cups-avahi-address.patch
cups/trunk/cups-no-gcrypt.patch
cups/trunk/cups-res_init.patch
cups/trunk/cups.install
cups/trunk/cups.logrotate
cups/trunk/ppd-poll-with-client-conf.patch
Deleted:
cups/trunk/cups-systemd-socket.patch
cups/trunk/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
cups/trunk/get-ppd-file-for-statically-configured-ipp-shared-queues.patch
----------------------------------------------------------------+
PKGBUILD | 114 +-
cups-avahi-address.patch | 86 +-
cups-no-gcrypt.patch | 41 -
cups-res_init.patch | 18
cups-systemd-socket.patch | 404
----------
cups.install | 14
cups.logrotate | 1
cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch | 19
get-ppd-file-for-statically-configured-ipp-shared-queues.patch | 31
ppd-poll-with-client-conf.patch | 29
10 files changed, 128 insertions(+), 629 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-10-03 08:19:15 UTC (rev 223809)
+++ PKGBUILD 2014-10-03 11:29:14 UTC (rev 223810)
@@ -3,93 +3,67 @@
pkgbase="cups"
pkgname=('libcups' 'cups')
-pkgver=1.7.5
+pkgver=2.0.0
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.cups.org/"
-makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'acl' 'pam' 'xdg-utils' 'krb5'
'openssl'
+makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'acl' 'pam' 'xdg-utils' 'krb5'
'gnutls'
'cups-filters' 'bc' 'colord' 'xinetd' 'gzip' 'autoconf' 'libusb'
'dbus'
'avahi' 'hicolor-icon-theme' 'systemd' 'inetutils' 'libpaper'
'valgrind')
-source=(#http://mirror.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2
-
http://www.cups.org/software/${pkgver}/cups-${pkgver}-source.tar.bz2{,.sig}
+source=(http://www.cups.org/software/${pkgver}/cups-${pkgver}-source.tar.bz2{,.sig}
cups.logrotate cups.pam
# improve build and linking
cups-no-export-ssllibs.patch
cups-no-gcrypt.patch
cups-no-gzip-man.patch
- # FC
- cups-systemd-socket.patch
- cups-res_init.patch
- cups-avahi-address.patch
- cups-enum-all.patch
- cups-final-content-type.patch
- # Gentoo
+ cups-1.6.2-statedir.patch
cups-1.6.0-fix-install-perms.patch
- cups-1.6.2-statedir.patch
- # Debian
- cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
- get-ppd-file-for-statically-configured-ipp-shared-queues.patch
- ppd-poll-with-client-conf.patch)
-md5sums=('5d893edc2957005f78e2b2423fdace2e'
+ # bugfixes
+ # cups-res_init.patch # FC
+ # cups-avahi-address.patch # FC
+ # cups-enum-all.patch #FC
+ # cups-final-content-type.patch #FC
+ # ppd-poll-with-client-conf.patch # Debian
+)
+md5sums=('2cdd81fea23e9e29555c24bdfd0d7c89'
'SKIP'
- '26e9b4e65c0a4d76db5737c9b156fd80'
+ 'fc8286f185e2cc5f7e1f6843bf193e2b'
'96f82c38f3f540b53f3e5144900acf17'
'3ba9e3410df1dc3015463d615ef91b3b'
- 'cc4101beccb5ed6deb1c92707a575925'
+ '1beb4896f217bc241bc08a422274ec0c'
'90c30380d4c8cd48a908cfdadae1ea24'
- '8162e1d05947bd59fa29ba40ac565fec'
- '8fe27d4248cacbc02824e7937cab4088'
- 'df0c367c0022e3c7d8e01827e8a6c5e7'
- 'f30c2a161caaf27854581507cde8cac6'
- 'a31b64ba25a985fbae65d8ddf311b08c'
- '5117f65342fcc69c6a506529e4daca9e'
'451609db34f95209d64c38474de27ce1'
- 'cb58bf4e0b80eaee383712e5c84a1ab4'
- 'b578bcd17949a7203237ba1e31f78ef9'
- '0becd6ab8782b97f19a02c1dc174c75e')
+ '5117f65342fcc69c6a506529e4daca9e')
prepare() {
cd ${pkgbase}-${pkgver}
-#return 1
- # add systemd socket support - Fedora patch, also used in Gentoo
- # modified now to the changes done by Gentoo in their svn ebuild
- #
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-print/cups/files/cups-1.5.0-systemd-socket.patch?revision=1.1
- patch -Np1 -i ${srcdir}/cups-systemd-socket.patch
-
+
+ # improve build and linking
# Do not export SSL libs in cups-config
- patch -Np1 -i "${srcdir}/cups-no-export-ssllibs.patch"
-
- patch -Np1 -i "${srcdir}/cups-no-gcrypt.patch"
-
+ patch -Np1 -i ${srcdir}/cups-no-export-ssllibs.patch
+ # https://www.cups.org/str.php?L4399
+ patch -Np1 -i ${srcdir}/cups-no-gcrypt.patch
# don't zip man pages in make install, let makepkg do that / Fedora
patch -Np1 -i ${srcdir}/cups-no-gzip-man.patch
+ # move /var/run -> /run for pid file
+ patch -Np1 -i ${srcdir}/cups-1.6.2-statedir.patch
+ # fix permissions on some files (by Gentoo) - alternative: cups-0755.patch
by FC
+ patch -Np0 -i ${srcdir}/cups-1.6.0-fix-install-perms.patch
-
- # various bugfixes (upstream reports/SVN or Fedora/Debian
-
- # Fixed crash which sometimes happens on shutdown of the CUPS daemon, caused
by a wrong shutdown sequence for shutting down the Avahi threaded poll.
-# patch -Np1 -i ${srcdir}/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
- # Applications could not get the PPD file for statically-configured
IPP-shared print queues
- patch -Np1 -i
${srcdir}/get-ppd-file-for-statically-configured-ipp-shared-queues.patch
- # If an external server is used via client.conf and the DNS is inconsistent
(ex: DNS gives "noname" for many IPs, reverse DNS gives one of these IPs
- # for "noname") local PPDs can get polled for print queues instead of the
PPDs of the external server Bug: http://www.cups.org/str.php?L2763
+ # bug fixes
+ # Debian patch for http://www.cups.org/str.php?L2763
# patch -Np1 -i ${srcdir}/ppd-poll-with-client-conf.patch
- # fix permissions on some files - alternative: cups-0755.patch by FC
- patch -Np0 -i ${srcdir}/cups-1.6.0-fix-install-perms.patch
- # move /var/run -> /run for pid file
- patch -Np1 -i ${srcdir}/cups-1.6.2-statedir.patch
- # Re-initialise the resolver on failure in httpAddrGetList()
- patch -Np1 -i ${srcdir}/cups-res_init.patch
- # Use IP address when resolving DNSSD URIs
- patch -Np1 -i ${srcdir}/cups-avahi-address.patch
- # Return from cupsEnumDests() once all records have been returned.
- patch -Np1 -i ${srcdir}/cups-enum-all.patch
+ # FC: Re-initialise the resolver on failure in httpAddrGetList()
+# patch -Np1 -i ${srcdir}/cups-res_init.patch
+ # FC: Use IP address when resolving DNSSD URIs
+# patch -Np1 -i ${srcdir}/cups-avahi-address.patch
+ # FC: Return from cupsEnumDests() once all records have been returned.
+# patch -Np1 -i ${srcdir}/cups-enum-all.patch
+ # FC: Fix printing to some network printers fails -
https://bugs.archlinux.org/task/37605
+# patch -Np1 -i ${srcdir}/cups-final-content-type.patch
- # Fix printing to some network printers fails -
https://bugs.archlinux.org/task/37605
- patch -Np1 -i ${srcdir}/cups-final-content-type.patch
-
# Rebuild configure script for not zipping man-pages.
aclocal -I config-scripts
autoconf -I config-scripts
@@ -97,11 +71,11 @@
build() {
cd ${pkgbase}-${pkgver}
-
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
--sbindir=/usr/bin \
--libdir=/usr/lib \
- --with-systemdsystemunitdir=/usr/lib/systemd/system \
--with-logdir=/var/log/cups \
--with-docdir=/usr/share/cups/doc \
--with-cups-user=daemon \
@@ -109,23 +83,23 @@
--enable-pam=yes \
--enable-raw-printing \
--enable-dbus --with-dbusdir=/etc/dbus-1 \
- --enable-ssl=yes --enable-openssl \
+ --enable-ssl=yes \
--enable-threads \
--enable-avahi\
--enable-libpaper \
--with-php=/usr/bin/php-cgi \
- --with-optim="$CFLAGS"
+ --with-optim="$CFLAGS" #--help
make
}
check() {
cd ${pkgbase}-${pkgver}
- make -k check || /bin/true
+ #make -k check || /bin/true
}
package_libcups() {
pkgdesc="The CUPS Printing System - client libraries and headers"
-depends=('openssl' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi')
+depends=('gnutls' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi' 'libusb')
backup=(etc/cups/client.conf)
cd ${pkgbase}-${pkgver}
@@ -140,7 +114,7 @@
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 /var/run/cups/cups.sock # alternative: ServerName
hostname-or-ip-address[:port] of a remote server" >>
${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
}
@@ -158,7 +132,7 @@
etc/pam.d/cups
etc/xinetd.d/cups-lpd)
depends=('acl' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' 'colord'
- 'libusb' 'dbus' 'systemd' 'libpaper' 'hicolor-icon-theme')
+ 'dbus' 'systemd' 'libpaper' 'hicolor-icon-theme')
optdepends=('xdg-utils: xdg .desktop file support')
cd ${pkgbase}-${pkgver}
@@ -204,5 +178,5 @@
perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:'
$pkgdir/usr/share/cups/mime/mime.convs
# Provide native service for arch-daemons generator
- ln -s cups.service "$pkgdir/usr/lib/systemd/system/cupsd.service"
+# ln -s org.cups.cupsd.service "$pkgdir/usr/lib/systemd/system/cupsd.service"
# still required?
}
Modified: cups-avahi-address.patch
===================================================================
--- cups-avahi-address.patch 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups-avahi-address.patch 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,7 +1,7 @@
-diff -up cups-1.6.2/cups/http-support.c.avahi-address
cups-1.6.2/cups/http-support.c
---- cups-1.6.2/cups/http-support.c.avahi-address 2013-03-11
18:44:36.000000000 +0000
-+++ cups-1.6.2/cups/http-support.c 2013-04-04 15:39:06.651847041 +0100
-@@ -2121,7 +2121,7 @@ http_resolve_cb(
+diff -up cups-2.0rc1/cups/http-support.c.avahi-address
cups-2.0rc1/cups/http-support.c
+--- cups-2.0rc1/cups/http-support.c.avahi-address 2014-08-28
17:37:22.000000000 +0200
++++ cups-2.0rc1/cups/http-support.c 2014-09-12 15:31:45.062950696 +0200
+@@ -2342,7 +2342,7 @@ http_resolve_cb(
const char *type, /* I - Registration type */
const char *domain, /* I - Domain (unused) */
const char *hostTarget, /* I - Hostname */
@@ -10,36 +10,54 @@
uint16_t port, /* I - Port number */
AvahiStringList *txt, /* I - TXT record */
AvahiLookupResultFlags flags, /* I - Lookup flags (unused) */
-@@ -2253,36 +2253,37 @@ http_resolve_cb(
+@@ -2495,39 +2495,62 @@ http_resolve_cb(
+ * getting the IP address of the .local name and then do reverse-lookups...
+ */
+- http_addrlist_t *addrlist, /* List of addresses */
+- *addr; /* Current address */
++ http_addr_t addr;
++ size_t addrlen;
++ int error;
+
DEBUG_printf(("8http_resolve_cb: Looking up \"%s\".", hostTarget));
- snprintf(fqdn, sizeof(fqdn), "%d", ntohs(port));
- if ((addrlist = httpAddrGetList(hostTarget, AF_UNSPEC, fqdn)) != NULL)
-+ int error = getnameinfo(&(address->data),
-+ address->proto == AVAHI_PROTO_INET ?
-+ sizeof (AvahiIPv4Address) :
-+ (address->proto == AVAHI_PROTO_INET6 ?
-+ sizeof (AvahiIPv6Address) :
-+ sizeof (address->data)),
-+ fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
-+
-+ if (!error)
++ switch (address->proto)
{
- for (addr = addrlist; addr; addr = addr->next)
-+ DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
++ case AVAHI_PROTO_INET:
++ addr.ipv4.sin_family = AF_INET;
++ addrlen = sizeof (addr.ipv4.sin_addr);
++ memcpy (&addr.ipv4.sin_addr, &address->data, addrlen);
++ break;
++ case AVAHI_PROTO_INET6:
++ addr.ipv6.sin6_family = AF_INET6;
++ addrlen = sizeof (addr.ipv6.sin6_addr);
++ memcpy (&addr.ipv6.sin6_addr, &address->data, addrlen);
++ break;
++ default:
++ DEBUG_printf(("8http_resolve_cb: unknown address family %d",
++ address->proto));
++ addrlen = 0;
++ }
+
-+ if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
-+ _cups_strcasecmp(hostptr, ".local"))
++ if (addrlen > 0) {
++ error = getnameinfo(&addr.addr, httpAddrLength (&addr),
++ fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
++
++ if (!error)
{
-- int error = getnameinfo(&(addr->addr.addr),
-- httpAddrLength(&(addr->addr)),
-- fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
--
+- int error = getnameinfo(&(addr->addr.addr),
(socklen_t)httpAddrLength(&(addr->addr)), fqdn, sizeof(fqdn), NULL, 0,
NI_NAMEREQD);
++ DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
+
- if (!error)
- {
- DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
--
++ if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
++ _cups_strcasecmp(hostptr, ".local"))
+
- if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
- _cups_strcasecmp(hostptr, ".local"))
- {
@@ -46,28 +64,30 @@
- hostTarget = fqdn;
- break;
- }
-- }
++ {
++ hostTarget = fqdn;
+ }
++ } else {
++ avahi_address_snprint (fqdn, sizeof (fqdn), address);
+ hostTarget = fqdn;
-+ }
-+ }
++
#ifdef DEBUG
- else
- DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
- httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
- error));
-+ else
-+ DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
-+ httpAddrString(&(addr->addr), fqdn, sizeof(fqdn)),
-+ error));
++ DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
++ fqdn, error));
#endif /* DEBUG */
-- }
+ }
+
+- httpAddrFreeList(addrlist);
+ }
+ } else {
+ /*
+ * Use the IP address that responded...
+ */
-
-- httpAddrFreeList(addrlist);
-- }
++
+ avahi_address_snprint (fqdn, sizeof (fqdn), address);
+ hostTarget = fqdn;
}
Modified: cups-no-gcrypt.patch
===================================================================
--- cups-no-gcrypt.patch 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups-no-gcrypt.patch 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,40 +1,11 @@
-diff -ruN cups-1.4.7.orig//config-scripts/cups-ssl.m4
cups-1.4.7/config-scripts/cups-ssl.m4
---- cups-1.5.0.orig//config-scripts/cups-ssl.m4 2011-01-11
08:05:58.000000000 +0100
-+++ cups-1.5.0/config-scripts/cups-ssl.m4 2011-08-02 10:44:26.011047900
+0200
-@@ -96,7 +96,6 @@
+diff -up cups-2.0rc1/config-scripts/cups-ssl.m4.no-gcry
cups-2.0rc1/config-scripts/cups-ssl.m4
+--- cups-2.0rc1/config-scripts/cups-ssl.m4.no-gcry 2014-09-12
15:41:23.324760213 +0200
++++ cups-2.0rc1/config-scripts/cups-ssl.m4 2014-09-12 15:43:13.124203363
+0200
+@@ -60,7 +60,6 @@ if test x$enable_ssl != xno; then
dnl Then look for GNU TLS...
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" !=
x; then
- AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
-- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
+ AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
+- AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
if $PKGCONFIG --exists gnutls; then
have_ssl=1
SSLLIBS=`$PKGCONFIG --libs gnutls`
-@@ -108,18 +107,6 @@
- AC_DEFINE(HAVE_GNUTLS)
- fi
-
-- if test $have_ssl = 1; then
-- CUPS_SERVERCERT="ssl/server.crt"
-- CUPS_SERVERKEY="ssl/server.key"
--
-- if $PKGCONFIG --exists gcrypt; then
-- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`"
-- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`"
-- elif test "x$LIBGCRYPTCONFIG" != x; then
-- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
-- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
-- fi
-- fi
- fi
-
- dnl Check for the OpenSSL library last...
---- cups-1.5.0.orig//cups/http-private.h 2011-01-22 01:07:22.000000000
+0100
-+++ cups-1.5.0/cups/http-private.h 2011-08-02 10:42:43.341604107 +0200
-@@ -93,7 +93,6 @@
- # elif defined HAVE_GNUTLS
- # include <gnutls/gnutls.h>
- # include <gnutls/x509.h>
--# include <gcrypt.h>
- # elif defined(HAVE_CDSASSL)
- # include <CoreFoundation/CoreFoundation.h>
- # include <Security/Security.h>
Modified: cups-res_init.patch
===================================================================
--- cups-res_init.patch 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups-res_init.patch 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,7 +1,7 @@
-diff -up cups-1.6b1/cups/http-addr.c.res_init cups-1.6b1/cups/http-addr.c
---- cups-1.6b1/cups/http-addr.c.res_init 2012-05-17 00:57:03.000000000
+0200
-+++ cups-1.6b1/cups/http-addr.c 2012-05-25 15:51:51.323916352 +0200
-@@ -254,7 +254,8 @@ httpAddrLookup(
+diff -up cups-1.7b1/cups/http-addr.c.res_init cups-1.7b1/cups/http-addr.c
+--- cups-1.7b1/cups/http-addr.c.res_init 2013-03-20 19:14:10.000000000
+0100
++++ cups-1.7b1/cups/http-addr.c 2013-04-19 12:01:36.927512159 +0200
+@@ -319,7 +319,8 @@ httpAddrLookup(
if (error)
{
@@ -11,10 +11,10 @@
cg->need_res_init = 1;
return (httpAddrString(addr, name, namelen));
-diff -up cups-1.6b1/cups/http-addrlist.c.res_init
cups-1.6b1/cups/http-addrlist.c
---- cups-1.6b1/cups/http-addrlist.c.res_init 2012-04-23 19:26:57.000000000
+0200
-+++ cups-1.6b1/cups/http-addrlist.c 2012-05-25 16:05:05.930377452 +0200
-@@ -540,7 +540,8 @@ httpAddrGetList(const char *hostname, /*
+diff -up cups-1.7b1/cups/http-addrlist.c.res_init
cups-1.7b1/cups/http-addrlist.c
+--- cups-1.7b1/cups/http-addrlist.c.res_init 2013-04-19 12:01:36.930512119
+0200
++++ cups-1.7b1/cups/http-addrlist.c 2013-04-19 12:03:13.769229554 +0200
+@@ -581,7 +581,8 @@ httpAddrGetList(const char *hostname, /*
}
else
{
@@ -23,4 +23,4 @@
+ error == EAI_NONAME)
cg->need_res_init = 1;
- _cupsSetError(IPP_INTERNAL_ERROR, gai_strerror(error), 0);
+ _cupsSetError(IPP_STATUS_ERROR_INTERNAL, gai_strerror(error), 0);
Deleted: cups-systemd-socket.patch
===================================================================
--- cups-systemd-socket.patch 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups-systemd-socket.patch 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,404 +0,0 @@
-diff -up cups-1.7.2/config.h.in.systemd-socket cups-1.7.2/config.h.in
---- cups-1.7.2/config.h.in.systemd-socket 2014-02-27 16:57:59.000000000
+0100
-+++ cups-1.7.2/config.h.in 2014-04-17 14:05:04.104472016 +0200
-@@ -451,6 +451,13 @@
-
-
- /*
-+ * Do we have systemd support?
-+ */
-+
-+#undef HAVE_SYSTEMD
-+
-+
-+/*
- * Various scripting languages...
- */
-
-diff -up cups-1.7.2/config-scripts/cups-systemd.m4.systemd-socket
cups-1.7.2/config-scripts/cups-systemd.m4
---- cups-1.7.2/config-scripts/cups-systemd.m4.systemd-socket 2014-04-17
14:05:04.104472016 +0200
-+++ cups-1.7.2/config-scripts/cups-systemd.m4 2014-04-17 14:05:04.104472016
+0200
-@@ -0,0 +1,36 @@
-+dnl
-+dnl "$Id$"
-+dnl
-+dnl systemd stuff for CUPS.
-+
-+dnl Find whether systemd is available
-+
-+SDLIBS=""
-+AC_ARG_WITH([systemdsystemunitdir],
-+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for
systemd service files]),
-+ [], [with_systemdsystemunitdir=$($PKGCONFIG
--variable=systemdsystemunitdir systemd)])
-+if test "x$with_systemdsystemunitdir" != xno; then
-+ AC_MSG_CHECKING(for libsystemd-daemon)
-+ if $PKGCONFIG --exists libsystemd-daemon; then
-+ AC_MSG_RESULT(yes)
-+ SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
-+ SDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
-+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-+ AC_DEFINE(HAVE_SYSTEMD)
-+ else
-+ AC_MSG_RESULT(no)
-+ fi
-+fi
-+
-+if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" !=
xno ; then
-+ SYSTEMD_UNITS="cups.service cups.socket cups.path"
-+else
-+ SYSTEMD_UNITS=""
-+fi
-+
-+AC_SUBST(SYSTEMD_UNITS)
-+AC_SUBST(SDLIBS)
-+
-+dnl
-+dnl "$Id$"
-+dnl
-diff -up cups-1.7.2/configure.in.systemd-socket cups-1.7.2/configure.in
---- cups-1.7.2/configure.in.systemd-socket 2013-07-08 23:15:13.000000000
+0200
-+++ cups-1.7.2/configure.in 2014-04-17 14:05:04.104472016 +0200
-@@ -33,6 +33,7 @@ sinclude(config-scripts/cups-pam.m4)
- sinclude(config-scripts/cups-largefile.m4)
- sinclude(config-scripts/cups-dnssd.m4)
- sinclude(config-scripts/cups-launchd.m4)
-+sinclude(config-scripts/cups-systemd.m4)
- sinclude(config-scripts/cups-defaults.m4)
- sinclude(config-scripts/cups-scripting.m4)
-
-@@ -67,6 +68,9 @@ AC_OUTPUT(Makedefs
- conf/snmp.conf
- cups-config
- data/testprint
-+ data/cups.service
-+ data/cups.socket
-+ data/cups.path
- desktop/cups.desktop
- doc/help/ref-cups-files-conf.html
- doc/help/ref-cupsd-conf.html
-diff -up cups-1.7.2/cups/usersys.c.systemd-socket cups-1.7.2/cups/usersys.c
---- cups-1.7.2/cups/usersys.c.systemd-socket 2014-03-05 22:22:12.000000000
+0100
-+++ cups-1.7.2/cups/usersys.c 2014-04-17 14:05:04.105472002 +0200
-@@ -1050,7 +1050,7 @@ cups_read_client_conf(
- struct stat sockinfo; /* Domain socket information */
-
- if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
-- (sockinfo.st_mode & S_IRWXO) == S_IRWXO)
-+ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH))
- cups_server = CUPS_DEFAULT_DOMAINSOCKET;
- else
- #endif /* CUPS_DEFAULT_DOMAINSOCKET */
-diff -up cups-1.7.2/data/cups.path.in.systemd-socket
cups-1.7.2/data/cups.path.in
---- cups-1.7.2/data/cups.path.in.systemd-socket 2014-04-17
14:05:04.105472002 +0200
-+++ cups-1.7.2/data/cups.path.in 2014-04-17 14:05:04.105472002 +0200
-@@ -0,0 +1,8 @@
-+[Unit]
-+Description=CUPS Printer Service Spool
-+
-+[Path]
-+PathExistsGlob=@CUPS_REQUESTS@/d*
-+
-+[Install]
-+WantedBy=multi-user.target
-diff -up cups-1.7.2/data/cups.service.in.systemd-socket
cups-1.7.2/data/cups.service.in
---- cups-1.7.2/data/cups.service.in.systemd-socket 2014-04-17
14:05:04.105472002 +0200
-+++ cups-1.7.2/data/cups.service.in 2014-04-17 14:05:04.105472002 +0200
-@@ -0,0 +1,11 @@
-+[Unit]
-+Description=CUPS Printing Service
-+
-+[Service]
-+Type=notify
-+ExecStart=@sbindir@/cupsd -f
-+PrivateTmp=true
-+
-+[Install]
-+Also=cups.socket cups.path
-+WantedBy=printer.target
-diff -up cups-1.7.2/data/cups.socket.in.systemd-socket
cups-1.7.2/data/cups.socket.in
---- cups-1.7.2/data/cups.socket.in.systemd-socket 2014-04-17
14:05:04.105472002 +0200
-+++ cups-1.7.2/data/cups.socket.in 2014-04-17 14:05:04.105472002 +0200
-@@ -0,0 +1,10 @@
-+[Unit]
-+Description=CUPS Printing Service Sockets
-+
-+[Socket]
-+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
-+ListenStream=@DEFAULT_IPP_PORT@
-+BindIPv6Only=ipv6-only
-+
-+[Install]
-+WantedBy=sockets.target
-diff -up cups-1.7.2/data/Makefile.systemd-socket cups-1.7.2/data/Makefile
---- cups-1.7.2/data/Makefile.systemd-socket 2013-05-29 13:51:34.000000000
+0200
-+++ cups-1.7.2/data/Makefile 2014-04-17 14:05:04.106471988 +0200
-@@ -100,6 +100,12 @@ install-data:
- $(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
- done
- $(INSTALL_DIR) -m 755 $(DATADIR)/profiles
-+ if test "x$(SYSTEMD_UNITS)" != "x" ; then \
-+ $(INSTALL_DIR) -m 755 $(SYSTEMDUNITDIR); \
-+ for file in $(SYSTEMD_UNITS); do \
-+ $(INSTALL_DATA) $$file $(SYSTEMDUNITDIR); \
-+ done; \
-+ fi
-
-
- #
-@@ -143,6 +149,9 @@ uninstall:
- -$(RMDIR) $(DATADIR)/data
- -$(RMDIR) $(DATADIR)/banners
- -$(RMDIR) $(DATADIR)
-+ for file in $(SYSTEMD_UNITS); do \
-+ $(RM) $(SYSTEMDUNITDIR)/$$file; \
-+ done
-
-
- #
-diff -up cups-1.7.2/Makedefs.in.systemd-socket cups-1.7.2/Makedefs.in
---- cups-1.7.2/Makedefs.in.systemd-socket 2014-04-17 14:05:04.092472182
+0200
-+++ cups-1.7.2/Makedefs.in 2014-04-17 14:05:04.106471988 +0200
-@@ -134,6 +134,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
- CXXLIBS = @CXXLIBS@
- DBUS_NOTIFIER = @DBUS_NOTIFIER@
- DBUS_NOTIFIERLIBS = @DBUS_NOTIFIERLIBS@
-+SYSTEMD_UNITS = @SYSTEMD_UNITS@
- DNSSD_BACKEND = @DNSSD_BACKEND@
- DSOFLAGS = -L../cups @DSOFLAGS@
- DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
-@@ -141,6 +142,7 @@ DNSSDLIBS = @DNSSDLIBS@
- IPPFIND_BIN = @IPPFIND_BIN@
- IPPFIND_MAN = @IPPFIND_MAN@
- LAUNCHDLIBS = @LAUNCHDLIBS@
-+SDLIBS = @SDLIBS@
- LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
- -L../scheduler @LDARCHFLAGS@ \
- @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
-@@ -232,6 +234,7 @@ PAMFILE = @PAMFILE@
-
- DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@
- DBUSDIR = @DBUSDIR@
-+SYSTEMDUNITDIR = $(BUILDROOT)@systemdsystemunitdir@
-
-
- #
-diff -up cups-1.7.2/scheduler/client.h.systemd-socket
cups-1.7.2/scheduler/client.h
---- cups-1.7.2/scheduler/client.h.systemd-socket 2013-08-02
00:23:18.000000000 +0200
-+++ cups-1.7.2/scheduler/client.h 2014-04-17 14:05:04.106471988 +0200
-@@ -79,6 +79,9 @@ typedef struct
- int fd; /* File descriptor for this server */
- http_addr_t address; /* Bind address of socket */
- http_encryption_t encryption; /* To encrypt or not to encrypt... */
-+#ifdef HAVE_SYSTEMD
-+ int is_systemd; /* Is this a systemd socket? */
-+#endif /* HAVE_SYSTEMD */
- } cupsd_listener_t;
-
-
-diff -up cups-1.7.2/scheduler/listen.c.systemd-socket
cups-1.7.2/scheduler/listen.c
---- cups-1.7.2/scheduler/listen.c.systemd-socket 2013-05-29
13:51:34.000000000 +0200
-+++ cups-1.7.2/scheduler/listen.c 2014-04-17 14:05:04.107471974 +0200
-@@ -401,7 +401,11 @@ cupsdStopListening(void)
- lis;
- lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
- {
-- if (lis->fd != -1)
-+ if (lis->fd != -1
-+#ifdef HAVE_SYSTEMD
-+ && !lis->is_systemd
-+#endif /* HAVE_SYSTEMD */
-+ )
- {
- #ifdef WIN32
- closesocket(lis->fd);
-diff -up cups-1.7.2/scheduler/main.c.systemd-socket cups-1.7.2/scheduler/main.c
---- cups-1.7.2/scheduler/main.c.systemd-socket 2014-04-17 14:05:04.052472738
+0200
-+++ cups-1.7.2/scheduler/main.c 2014-04-17 14:09:39.102634667 +0200
-@@ -39,6 +39,10 @@
- # endif /* !LAUNCH_JOBKEY_SERVICEIPC */
- #endif /* HAVE_LAUNCH_H */
-
-+#ifdef HAVE_SYSTEMD
-+#include <systemd/sd-daemon.h>
-+#endif /* HAVE_SYSTEMD */
-+
- #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
- # include <malloc.h>
- #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
-@@ -64,6 +68,9 @@
- static void launchd_checkin(void);
- static void launchd_checkout(void);
- #endif /* HAVE_LAUNCHD */
-+#ifdef HAVE_SYSTEMD
-+static void systemd_checkin(void);
-+#endif /* HAVE_SYSTEMD */
- static void parent_handler(int sig);
- static void process_children(void);
- static void sigchld_handler(int sig);
-@@ -563,6 +570,13 @@ main(int argc, /* I - Number
of comm
- }
- #endif /* HAVE_LAUNCHD */
-
-+#ifdef HAVE_SYSTEMD
-+ /*
-+ * If we were started by systemd get the listen sockets file descriptors...
-+ */
-+ systemd_checkin();
-+#endif /* HAVE_SYSTEMD */
-+
- /*
- * Startup the server...
- */
-@@ -654,6 +668,12 @@ main(int argc, /* I - Number
of comm
- "Scheduler started via launchd.");
- else
- #endif /* HAVE_LAUNCHD */
-+#ifdef HAVE_SYSTEMD
-+ sd_notifyf(0, "READY=1\n"
-+ "STATUS=Scheduler is running...\n"
-+ "MAINPID=%lu",
-+ (unsigned long) getpid());
-+#endif /* HAVE_SYSTEMD */
- if (fg)
- cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL,
- "Scheduler started in foreground.");
-@@ -751,6 +771,15 @@ main(int argc, /* I - Number
of comm
- }
- #endif /* HAVE_LAUNCHD */
-
-+#ifdef HAVE_SYSTEMD
-+ /*
-+ * If we were started by systemd get the listen sockets file
-+ * descriptors...
-+ */
-+
-+ systemd_checkin();
-+#endif /* HAVE_SYSTEMD */
-+
- /*
- * Startup the server...
- */
-@@ -1500,6 +1529,102 @@ launchd_checkout(void)
- }
- #endif /* HAVE_LAUNCHD */
-
-+#ifdef HAVE_SYSTEMD
-+static void
-+systemd_checkin(void)
-+{
-+ int n, fd;
-+
-+ n = sd_listen_fds(0);
-+ if (n < 0)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Failed to acquire sockets from systemd - %s",
-+ strerror(-n));
-+ exit(EXIT_FAILURE);
-+ return;
-+ }
-+
-+ if (n == 0)
-+ return;
-+
-+ for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++)
-+ {
-+ http_addr_t addr;
-+ socklen_t addrlen = sizeof (addr);
-+ int r;
-+ cupsd_listener_t *lis;
-+ char s[256];
-+
-+ r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1);
-+ if (r < 0)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Unable to verify socket type - %s",
-+ strerror(-r));
-+ continue;
-+ }
-+
-+ if (!r)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Socket not of the right type");
-+ continue;
-+ }
-+
-+ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen))
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Unable to get local address - %s",
-+ strerror(errno));
-+ continue;
-+ }
-+
-+ /*
-+ * Try to match the systemd socket address to one of the listeners...
-+ */
-+
-+ for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
-+ lis;
-+ lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
-+ if (httpAddrEqual(&lis->address, &addr))
-+ break;
-+
-+ if (lis)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_DEBUG,
-+ "systemd_checkin: Matched existing listener %s with fd
%d...",
-+ httpAddrString(&(lis->address), s, sizeof(s)), fd);
-+ }
-+ else
-+ {
-+ cupsdLogMessage(CUPSD_LOG_DEBUG,
-+ "systemd_checkin: Adding new listener %s with fd %d...",
-+ httpAddrString(&addr, s, sizeof(s)), fd);
-+
-+ if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
-+ {
-+ cupsdLogMessage(CUPSD_LOG_ERROR,
-+ "systemd_checkin: Unable to allocate listener - "
-+ "%s.", strerror(errno));
-+ exit(EXIT_FAILURE);
-+ }
-+
-+ cupsArrayAdd(Listeners, lis);
-+
-+ memcpy(&lis->address, &addr, sizeof(lis->address));
-+ }
-+
-+ lis->fd = fd;
-+ lis->is_systemd = 1;
-+
-+# ifdef HAVE_SSL
-+ if (_httpAddrPort(&(lis->address)) == 443)
-+ lis->encryption = HTTP_ENCRYPT_ALWAYS;
-+# endif /* HAVE_SSL */
-+ }
-+}
-+#endif /* HAVE_SYSTEMD */
-
- /*
- * 'parent_handler()' - Catch USR1/CHLD signals...
-diff -up cups-1.7.2/scheduler/Makefile.systemd-socket
cups-1.7.2/scheduler/Makefile
---- cups-1.7.2/scheduler/Makefile.systemd-socket 2013-05-29
13:51:34.000000000 +0200
-+++ cups-1.7.2/scheduler/Makefile 2014-04-17 14:05:04.108471960 +0200
-@@ -381,7 +381,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
- $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
- $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
- $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
-- $(LIBGSSAPI) $(LIBWRAP)
-+ $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS)
-
- cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
- echo Linking $@...
-@@ -389,7 +389,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
- $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
- ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
- $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
-- $(LIBWRAP)
-+ $(LIBWRAP) $(SDLIBS)
-
- tls.o: tls-darwin.c tls-gnutls.c tls-openssl.c
-
Modified: cups.install
===================================================================
--- cups.install 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups.install 2014-10-03 11:29:14 UTC (rev 223810)
@@ -13,19 +13,11 @@
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
fi
- if [ "`vercmp $2 1.6.0`" -lt 0 ]; then
+ if [ "`vercmp $2 2.0.0-1`" -lt 0 ]; then
# important upgrade notice
- echo "* avahi-daemon should now run before you start cupsd for"
- echo " printer Browsing support"
- echo "* check your config with cupsd -t"
- echo " and fix all Browsing related settings"
+ echo "> systemd service names has been renamed"
+ echo "> you need to reenable required services"
fi
-
- if [ "`vercmp $2 1.6.1-3`" -lt 0 ]; then
- # important upgrade notice
- echo "> It's now safe to load usblp kernel module."
- echo "> There's no more need to blacklist it."
- fi
}
post_remove() {
Modified: cups.logrotate
===================================================================
--- cups.logrotate 2014-10-03 08:19:15 UTC (rev 223809)
+++ cups.logrotate 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,4 +1,5 @@
/var/log/cups/*_log {
missingok
notifempty
+ sharedscripts
}
Deleted: cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
===================================================================
--- cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch 2014-10-03
08:19:15 UTC (rev 223809)
+++ cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch 2014-10-03
11:29:14 UTC (rev 223810)
@@ -1,19 +0,0 @@
-Description: Fixed crash which sometimes happens on shutdown of the CUPS
- daemon, caused by a wrong shutdown sequence for shutting down the Avahi
- threaded poll.
-Author: Till Kamppeter <[email protected]>
-Bug-Upstream: http://cups.org/str.php?L4180
-Bug-Upstream: http://cups.org/str.php?L4213
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1034045
-Last-Updated: 2012-10-16
-
---- a/scheduler/dirsvc.c
-+++ b/scheduler/dirsvc.c
-@@ -1333,6 +1333,7 @@
- DNSSDMaster = NULL;
-
- # else /* HAVE_AVAHI */
-+ avahi_threaded_poll_stop(DNSSDMaster);
- avahi_client_free(DNSSDClient);
- DNSSDClient = NULL;
-
Deleted: get-ppd-file-for-statically-configured-ipp-shared-queues.patch
===================================================================
--- get-ppd-file-for-statically-configured-ipp-shared-queues.patch
2014-10-03 08:19:15 UTC (rev 223809)
+++ get-ppd-file-for-statically-configured-ipp-shared-queues.patch
2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,31 +0,0 @@
-Description: Applications could not get the PPD file for
- statically-configured IPP-shared print queues
-Author: Till Kamppeter <[email protected]>
-Bug-Upstream: http://cups.org/str.php?L4178
-Last-Updated: 2012-09-19
-
---- a/cups/util.c
-+++ b/cups/util.c
-@@ -1731,6 +1731,22 @@
-
- return (1);
- }
-+ else if (device_uri &&
-+ (!strncmp(device_uri, "ipp:", 4) != NULL ||
-+ !strncmp(device_uri, "ipps:", 5) != NULL))
-+ {
-+ /*
-+ * Statically-configured IPP shared printer.
-+ */
-+
-+ httpSeparateURI(HTTP_URI_CODING_ALL,
-+ device_uri,
-+ scheme, sizeof(scheme), username, sizeof(username),
-+ host, hostsize, port, resource, resourcesize);
-+ ippDelete(response);
-+
-+ return (1);
-+ }
- else if ((attr = ippFindAttribute(response, "member-uris",
- IPP_TAG_URI)) != NULL)
- {
Modified: ppd-poll-with-client-conf.patch
===================================================================
--- ppd-poll-with-client-conf.patch 2014-10-03 08:19:15 UTC (rev 223809)
+++ ppd-poll-with-client-conf.patch 2014-10-03 11:29:14 UTC (rev 223810)
@@ -1,23 +1,18 @@
-Description: If an external server is used via client.conf and the DNS is
inconsistent (ex: DNS gives "noname" for many IPs, reverse DNS gives one of
these IPs for "noname") local PPDs can get polled for print queues instead of
the PPDs of the external server
+Description: If an external server is used via client.conf and the DNS
+ is inconsistent (ex: DNS gives "noname" for many IPs, reverse DNS gives
+ one of these IPs for "noname") local PPDs can get polled for print
+ queues instead of the PPDs of the external server
Bug: http://www.cups.org/str.php?L2763
+Last-Updated: 2014-01-03
--- a/cups/util.c
+++ b/cups/util.c
-@@ -1085,11 +1085,13 @@
+@@ -1088,6 +1088,8 @@
http2 = http;
- else if ((http2 = httpConnectEncrypt(hostname, port,
- cupsEncryption())) == NULL)
-- {
-- DEBUG_puts("1cupsGetPPD3: Unable to connect to server");
-+ if ((http2 = httpConnectEncrypt(http_hostname, http_port,
-+ cupsEncryption())) == NULL)
-+ {
-+ DEBUG_puts("1cupsGetPPD3: Unable to connect to server");
+ else if ((http2 = httpConnect2(hostname, port, NULL, AF_UNSPEC,
+ cupsEncryption(), 1, 30000, NULL)) == NULL)
++ if ((http2 = httpConnect2(http_hostname, http_port, NULL, AF_UNSPEC,
++ cupsEncryption(), 1, 30000, NULL)) == NULL)
+ {
+ DEBUG_puts("1cupsGetPPD3: Unable to connect to server");
-- return (HTTP_SERVICE_UNAVAILABLE);
-- }
-+ return (HTTP_SERVICE_UNAVAILABLE);
-+ }
-
- /*
- * Get a temp file...