diff options
author | Alexey D | 2013-07-14 10:31:13 +0400 |
---|---|---|
committer | Alexey D | 2015-06-11 10:07:09 +0300 |
commit | d195a082a5ee36687570b97517beb59159e20825 (patch) | |
tree | 4b2b00e2e323801fdd38f251d4a7fc1fa4f7d7d9 | |
parent | 61d0b86164097ac1053e364fb685e968b153d4e6 (diff) | |
download | aur-d195a082a5ee36687570b97517beb59159e20825.tar.gz |
version 1.6.3-1
-rw-r--r-- | .SRCINFO | 40 | ||||
-rw-r--r-- | PKGBUILD | 165 | ||||
-rw-r--r-- | cups-1.6.2-statedir.patch | 16 | ||||
-rw-r--r-- | cups-avahi-address.patch | 75 | ||||
-rw-r--r-- | cups-dbus-utf8.patch | 106 | ||||
-rw-r--r-- | cups-enum-all.patch | 17 | ||||
-rw-r--r-- | cups-no-gcrypt.patch | 41 | ||||
-rw-r--r-- | cups-res_init.patch | 26 | ||||
-rw-r--r-- | cups.logrotate | 7 | ||||
-rw-r--r-- | cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch | 19 | ||||
-rw-r--r-- | get-ppd-file-for-statically-configured-ipp-shared-queues.patch | 31 | ||||
-rw-r--r-- | ppd-poll-with-client-conf.patch | 23 |
12 files changed, 464 insertions, 102 deletions
@@ -1,39 +1,34 @@ pkgbase = cups-nosystemd pkgdesc = The CUPS Printing System - daemon package - pkgver = 2.0.3 + pkgver = 1.6.3 pkgrel = 1 url = http://www.cups.org/ install = cups-nosystemd.install arch = i686 arch = x86_64 - groups = eudev-base license = GPL makedepends = libtiff>=4.0.0 makedepends = libpng>=1.5.7 makedepends = xdg-utils makedepends = krb5 + makedepends = gnutls>=2.8.3 makedepends = xinetd makedepends = gzip makedepends = autoconf makedepends = avahi - makedepends = gnutls - makedepends = inetutils depends = acl depends = pam - depends = libcups>=2.0.3 + depends = libcups>=1.6.3 depends = cups-filters depends = bc depends = colord + depends = libusb depends = dbus depends = hicolor-icon-theme - depends = libpaper optdepends = xdg-utils: xdg .desktop file support - optdepends = cups-openrc: cups openrc initscript - provides = cups=2.0.3 + provides = cups=1.6.3 conflicts = cups - conflicts = cups-eudev replaces = cups - replaces = cups-eudev backup = etc/cups/cupsd.conf backup = etc/cups/snmp.conf backup = etc/cups/printers.conf @@ -43,24 +38,39 @@ pkgbase = cups-nosystemd backup = etc/dbus-1/system.d/cups.conf backup = etc/logrotate.d/cups backup = etc/pam.d/cups - source = http://www.cups.org/software/2.0.3/cups-2.0.3-source.tar.bz2 + backup = etc/xinetd.d/cups-lpd + source = http://www.cups.org/software/1.6.3/cups-1.6.3-source.tar.gz source = cups source = cups.logrotate source = cups.pam source = cups-no-export-ssllibs.patch source = cups-no-gcrypt.patch source = cups-no-gzip-man.patch + source = cups-dbus-utf8.patch + source = cups-res_init.patch + source = cups-avahi-address.patch + source = cups-enum-all.patch source = cups-1.6.0-fix-install-perms.patch source = cups-1.6.2-statedir.patch - md5sums = 8d98b85edbdab7ab03739c9622f570e8 + source = cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch + source = get-ppd-file-for-statically-configured-ipp-shared-queues.patch + source = ppd-poll-with-client-conf.patch + md5sums = 3c50d396fef2ba721224fe65880fe3c3 md5sums = 9657daa21760bb0b5fa3d8b51d5e01a1 - md5sums = fc8286f185e2cc5f7e1f6843bf193e2b + md5sums = f861b18f4446c43918c8643dcbbd7f6d md5sums = 96f82c38f3f540b53f3e5144900acf17 md5sums = 3ba9e3410df1dc3015463d615ef91b3b - md5sums = 1beb4896f217bc241bc08a422274ec0c + md5sums = cc4101beccb5ed6deb1c92707a575925 md5sums = 90c30380d4c8cd48a908cfdadae1ea24 + md5sums = a2a88b3a3257c3b5fd3edcc169e6aca4 + md5sums = 8fe27d4248cacbc02824e7937cab4088 + md5sums = df0c367c0022e3c7d8e01827e8a6c5e7 + md5sums = f30c2a161caaf27854581507cde8cac6 md5sums = 5117f65342fcc69c6a506529e4daca9e - md5sums = 451609db34f95209d64c38474de27ce1 + md5sums = 9247e218eea94ebda0aebc8ee0e77db8 + md5sums = cb58bf4e0b80eaee383712e5c84a1ab4 + md5sums = b578bcd17949a7203237ba1e31f78ef9 + md5sums = 0becd6ab8782b97f19a02c1dc174c75e pkgname = cups-nosystemd @@ -2,74 +2,96 @@ # Contributor: Andreas Radke <andyrtr@archlinux.org> pkgname="cups-nosystemd" -pkgver=2.0.3 +pkgver=1.6.3 pkgrel=1 pkgdesc="The CUPS Printing System - daemon package" arch=('i686' 'x86_64') license=('GPL') url="http://www.cups.org/" -groups=('eudev-base') -depends=('acl' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' 'colord' - 'dbus' 'hicolor-icon-theme' 'libpaper') -makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'xdg-utils' 'krb5' 'xinetd' - 'gzip' 'autoconf' 'avahi' 'gnutls' 'inetutils') -optdepends=('xdg-utils: xdg .desktop file support' - 'cups-openrc: cups openrc initscript') +depends=('acl' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' 'colord' 'libusb' 'dbus' 'hicolor-icon-theme') +makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'xinetd' 'gzip' 'autoconf' 'avahi') +optdepends=('xdg-utils: xdg .desktop file support') provides=("cups=${pkgver}") -conflicts=('cups' 'cups-eudev') -replaces=('cups' 'cups-eudev') +conflicts=('cups') +replaces=('cups') install=cups-nosystemd.install backup=(etc/cups/cupsd.conf etc/cups/snmp.conf etc/cups/printers.conf etc/cups/classes.conf - etc/cups/cups-files.conf + etc/cups/cups-files.conf etc/cups/subscriptions.conf etc/dbus-1/system.d/cups.conf etc/logrotate.d/cups - etc/pam.d/cups) - #etc/xinetd.d/cups-lpd) -source=(http://www.cups.org/software/${pkgver}/cups-${pkgver}-source.tar.bz2 + etc/pam.d/cups + etc/xinetd.d/cups-lpd) +source=(http://www.cups.org/software/${pkgver}/cups-${pkgver}-source.tar.gz cups cups.logrotate cups.pam # improve build and linking cups-no-export-ssllibs.patch cups-no-gcrypt.patch cups-no-gzip-man.patch - cups-1.6.0-fix-install-perms.patch - cups-1.6.2-statedir.patch - ) -md5sums=('8d98b85edbdab7ab03739c9622f570e8' + # FC + cups-dbus-utf8.patch + cups-res_init.patch + cups-avahi-address.patch + cups-enum-all.patch + # Gentoo + 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=('3c50d396fef2ba721224fe65880fe3c3' '9657daa21760bb0b5fa3d8b51d5e01a1' - 'fc8286f185e2cc5f7e1f6843bf193e2b' + 'f861b18f4446c43918c8643dcbbd7f6d' '96f82c38f3f540b53f3e5144900acf17' '3ba9e3410df1dc3015463d615ef91b3b' - '1beb4896f217bc241bc08a422274ec0c' + 'cc4101beccb5ed6deb1c92707a575925' '90c30380d4c8cd48a908cfdadae1ea24' + 'a2a88b3a3257c3b5fd3edcc169e6aca4' + '8fe27d4248cacbc02824e7937cab4088' + 'df0c367c0022e3c7d8e01827e8a6c5e7' + 'f30c2a161caaf27854581507cde8cac6' '5117f65342fcc69c6a506529e4daca9e' - '451609db34f95209d64c38474de27ce1') + '9247e218eea94ebda0aebc8ee0e77db8' + 'cb58bf4e0b80eaee383712e5c84a1ab4' + 'b578bcd17949a7203237ba1e31f78ef9' + '0becd6ab8782b97f19a02c1dc174c75e') prepare() { cd cups-${pkgver} - # improve build and linking # Do not export SSL libs in cups-config - patch -Np1 -i "$srcdir"/cups-no-export-ssllibs.patch - # https://www.cups.org/str.php?L4399 - patch -Np1 -i "$srcdir"/cups-no-gcrypt.patch + patch -Np1 -i "${srcdir}/cups-no-export-ssllibs.patch" + + 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 + 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 + # various bugfixes (upstream reports/SVN or Fedora/Debian - # fix permissions on some files (by Gentoo) - patch -Np0 -i "$srcdir"/cups-1.6.0-fix-install-perms.patch + # Ensure attributes are valid UTF-8 in dbus notifier + patch -Np1 -i ${srcdir}/cups-dbus-utf8.patch - # set MaxLogSize to 0 to prevent using cups internal log rotation - sed -i -e '5i\ ' conf/cupsd.conf.in - sed -i -e '6i# Disable cups internal logging - use logrotate instead' conf/cupsd.conf.in - sed -i -e '7iMaxLogSize 0' conf/cupsd.conf.in + # 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 + 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 # Rebuild configure script for not zipping man-pages. aclocal -I config-scripts @@ -78,10 +100,7 @@ prepare() { build() { cd cups-${pkgver} - ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --sbindir=/usr/bin \ --libdir=/usr/lib \ --with-logdir=/var/log/cups \ @@ -91,59 +110,63 @@ build() { --enable-pam=yes \ --enable-raw-printing \ --enable-dbus --with-dbusdir=/etc/dbus-1 \ - --enable-ssl=yes \ + --enable-ssl=yes --enable-gnutls \ --enable-threads \ - --enable-avahi \ - --enable-libpaper \ + --enable-avahi\ --with-php=/usr/bin/php-cgi \ --with-optim="$CFLAGS" make } +check() { + cd "$srcdir/cups-$pkgver" + #httpAddrGetList(workstation64): FAIL + #1 TESTS FAILED! + #make[1]: *** [testhttp] Error 1 + make -k check || /bin/true +} + package() { - cd "$srcdir"/cups-${pkgver} - make BUILDROOT="$pkgdir" install-data install-exec + cd ${srcdir}/cups-${pkgver} + make BUILDROOT=${pkgdir} install-data install-exec # this one we ship in the libcups pkg - rm -f "$pkgdir"/usr/bin/cups-config + rm -f ${pkgdir}/usr/bin/cups-config # kill the sysv stuff - rm -rf "$pkgdir"/etc/rc*.d - rm -rf "$pkgdir"/etc/init.d - install -D -m755 ../cups "$pkgdir"/etc/rc.d/cupsd - install -D -m644 ../cups.logrotate "$pkgdir"/etc/logrotate.d/cups - install -D -m644 ../cups.pam "$pkgdir"/etc/pam.d/cups - + rm -rf ${pkgdir}/etc/rc*.d + rm -rf ${pkgdir}/etc/init.d + install -D -m755 ../cups ${pkgdir}/etc/rc.d/cupsd + install -D -m644 ../cups.logrotate ${pkgdir}/etc/logrotate.d/cups + install -D -m644 ../cups.pam ${pkgdir}/etc/pam.d/cups + # fix perms on /var/spool and /etc - chmod 755 "$pkgdir"/var/spool - chmod 755 "$pkgdir"/etc + chmod 755 ${pkgdir}/var/spool + chmod 755 ${pkgdir}/etc # install ssl directory where to store the certs, solves some samba issues - install -dm700 -g lp "$pkgdir"/etc/cups/ssl + install -dm700 -g lp ${pkgdir}/etc/cups/ssl # remove directory from package, we create it in cups rc.d file - rm -rf "$pkgdir"/run + rm -rf ${pkgdir}/var/run # install some more configuration files that will get filled by cupsd - touch "$pkgdir"/etc/cups/printers.conf - touch "$pkgdir"/etc/cups/classes.conf - touch "$pkgdir"/etc/cups/subscriptions.conf - chgrp -R lp "$pkgdir"/etc/cups - + touch ${pkgdir}/etc/cups/printers.conf + touch ${pkgdir}/etc/cups/classes.conf + touch ${pkgdir}/etc/cups/subscriptions.conf + chgrp lp ${pkgdir}/etc/cups/{printers.conf,classes.conf,subscriptions.conf} + # fix .desktop file - sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' "$pkgdir"/usr/share/applications/cups.desktop - + sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' ${pkgdir}/usr/share/applications/cups.desktop + # compress some driver files, adopted from Fedora - find "$pkgdir"/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f - + find ${pkgdir}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f + # remove client.conf man page - rm -f "$pkgdir"/usr/share/man/man5/client.conf.5 - + rm -f ${pkgdir}/usr/share/man/man5/client.conf.5 + # remove files now part of cups-filters - rm -v "$pkgdir"/usr/share/cups/banners/* - rm -v "$pkgdir"/usr/share/cups/data/testprint + rm -v ${pkgdir}/usr/share/cups/banners/* + rm -v ${pkgdir}/usr/share/cups/data/testprint # comment out all conversion rules which use any of the removed filters - perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' "$pkgdir"/usr/share/cups/mime/mime.convs - - # comment out unnecessary PageLogFormat entry - sed -i -e 's:PageLogFormat:#PageLogFormat:' "$pkgdir"/etc/cups/cupsd.conf* + perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' ${pkgdir}/usr/share/cups/mime/mime.convs } diff --git a/cups-1.6.2-statedir.patch b/cups-1.6.2-statedir.patch index c44ebed07c50..3e836657de8a 100644 --- a/cups-1.6.2-statedir.patch +++ b/cups-1.6.2-statedir.patch @@ -1,12 +1,12 @@ diff -ruN cups-1.6.2.orig/config-scripts/cups-directories.m4 cups-1.6.2/config-scripts/cups-directories.m4 --- cups-1.6.2.orig/config-scripts/cups-directories.m4 2012-10-01 03:55:23.000000000 +0200 +++ cups-1.6.2/config-scripts/cups-directories.m4 2013-04-02 00:11:41.000000000 +0200 -@@ -420,7 +420,7 @@ - ;; - *) - # All others -- CUPS_STATEDIR="$localstatedir/run/cups" -+ CUPS_STATEDIR="/run/cups" - ;; - esac]) +@@ -429,7 +429,7 @@ + ;; + *) + # All others +- CUPS_STATEDIR="$localstatedir/run/cups" ++ CUPS_STATEDIR="/run/cups" + ;; + esac AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR") diff --git a/cups-avahi-address.patch b/cups-avahi-address.patch new file mode 100644 index 000000000000..a03d1adbb998 --- /dev/null +++ b/cups-avahi-address.patch @@ -0,0 +1,75 @@ +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( + const char *type, /* I - Registration type */ + const char *domain, /* I - Domain (unused) */ + const char *hostTarget, /* I - Hostname */ +- const AvahiAddress *address, /* I - Address (unused) */ ++ const AvahiAddress *address, /* I - Address */ + uint16_t port, /* I - Port number */ + AvahiStringList *txt, /* I - TXT record */ + AvahiLookupResultFlags flags, /* I - Lookup flags (unused) */ +@@ -2253,36 +2253,37 @@ http_resolve_cb( + + 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) + { +- for (addr = addrlist; addr; addr = addr->next) ++ DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn)); ++ ++ if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn || ++ _cups_strcasecmp(hostptr, ".local")) + { +- int error = getnameinfo(&(addr->addr.addr), +- httpAddrLength(&(addr->addr)), +- fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD); +- +- if (!error) +- { +- DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn)); +- +- if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn || +- _cups_strcasecmp(hostptr, ".local")) +- { +- hostTarget = fqdn; +- break; +- } +- } ++ 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)); + #endif /* DEBUG */ +- } ++ } else { ++ /* ++ * Use the IP address that responded... ++ */ + +- httpAddrFreeList(addrlist); +- } ++ avahi_address_snprint (fqdn, sizeof (fqdn), address); ++ hostTarget = fqdn; + } + + /* diff --git a/cups-dbus-utf8.patch b/cups-dbus-utf8.patch new file mode 100644 index 000000000000..0bcd4a163339 --- /dev/null +++ b/cups-dbus-utf8.patch @@ -0,0 +1,106 @@ +diff -up cups-1.6.1/notifier/dbus.c.dbus-utf8 cups-1.6.1/notifier/dbus.c +--- cups-1.6.1/notifier/dbus.c.dbus-utf8 2012-01-20 19:00:32.000000000 +0000 ++++ cups-1.6.1/notifier/dbus.c 2012-10-31 11:04:47.686973616 +0000 +@@ -31,6 +31,9 @@ + #include <sys/stat.h> + #include <sys/types.h> + #include <unistd.h> ++#include <assert.h> ++#include <locale.h> ++#include <wchar.h> + + #ifdef HAVE_DBUS + # include <dbus/dbus.h> +@@ -157,10 +160,82 @@ enum + * Local functions... + */ + +-static int acquire_lock(int *fd, char *lockfile, size_t locksize); ++static int acquire_lock(int *fd, char *lockfile, size_t locksize); ++static const char *validate_utf8(const char *str); + + + /* ++ * 'validate_utf8()' - Convert to valid UTF-8 ++ */ ++ ++static const char * ++validate_utf8 (const char *str) ++{ ++ static char *buffer = NULL; ++ static size_t buflen = 0; ++ char *p; ++ size_t str_len; ++ unsigned int i; ++ mbstate_t instate, outstate; ++ ++ if (str == NULL) ++ { ++ free (buffer); ++ return (NULL); ++ } ++ ++ /* Is it already valid? */ ++ if (mbstowcs (NULL, str, 0) != (size_t) -1) ++ return str; ++ ++ /* Make sure our buffer is at least as large as the input string */ ++ str_len = strlen (str); ++ if (str_len > buflen) ++ { ++ if (buffer == NULL) ++ /* Set encoding type to UTF-8 the first time we need to */ ++ setlocale (LC_CTYPE, "en_US.UTF-8"); ++ ++ buflen = str_len + 1; ++ buffer = realloc (buffer, buflen); ++ } ++ ++ memset (&instate, '\0', sizeof (mbstate_t)); ++ memset (&outstate, '\0', sizeof (mbstate_t)); ++ p = buffer; ++ i = 0; ++ while (i < str_len) ++ { ++ wchar_t wc; ++ size_t used, written; ++ mbstate_t orig_instate = instate; ++ used = mbrtowc (&wc, str + i, str_len - i, &instate); ++ switch (used) ++ { ++ case (size_t) -2: ++ case (size_t) -1: ++ wc = L'?'; /* so replacement is never longer than original char */ ++ instate = orig_instate; ++ /* fallthru */ ++ case 0: ++ used = 1; ++ } ++ ++ written = wcrtomb (p, wc, &outstate); ++ if (written != -1) ++ { ++ p += written; ++ assert (p - buffer < buflen); ++ } ++ ++ i += used; ++ } ++ ++ *p = '\0'; ++ return buffer; ++} ++ ++/* + * 'main()' - Read events and send DBUS notifications. + */ + +@@ -366,7 +441,7 @@ main(int argc, /* I - Number of comm + attr = ippFindAttribute(msg, "notify-text", IPP_TAG_TEXT); + if (attr) + { +- const char *val = ippGetString(attr, 0, NULL); ++ const char *val = validate_utf8 (ippGetString(attr, 0, NULL)); + if (!dbus_message_iter_append_string(&iter, &val)) + goto bail; + } diff --git a/cups-enum-all.patch b/cups-enum-all.patch new file mode 100644 index 000000000000..0ac39835ea1f --- /dev/null +++ b/cups-enum-all.patch @@ -0,0 +1,17 @@ +diff -up cups-1.6.2/cups/dest.c.enum-all cups-1.6.2/cups/dest.c +--- cups-1.6.2/cups/dest.c.enum-all 2013-06-04 10:58:36.169786250 +0100 ++++ cups-1.6.2/cups/dest.c 2013-06-04 10:59:02.147900811 +0100 +@@ -2724,9 +2724,12 @@ cups_dnssd_browse_cb( + break; + + case AVAHI_BROWSER_REMOVE: +- case AVAHI_BROWSER_ALL_FOR_NOW: + case AVAHI_BROWSER_CACHE_EXHAUSTED: + break; ++ ++ case AVAHI_BROWSER_ALL_FOR_NOW: ++ avahi_simple_poll_quit(data->simple_poll); ++ break; + } + } + diff --git a/cups-no-gcrypt.patch b/cups-no-gcrypt.patch index 0cd64b191879..4eaff67ceecc 100644 --- a/cups-no-gcrypt.patch +++ b/cups-no-gcrypt.patch @@ -1,11 +1,40 @@ -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 +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 @@ dnl Then look for GNU TLS... if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then - AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config) -- AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config) + AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) +- AC_PATH_PROG(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> diff --git a/cups-res_init.patch b/cups-res_init.patch new file mode 100644 index 000000000000..94a81a457fce --- /dev/null +++ b/cups-res_init.patch @@ -0,0 +1,26 @@ +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( + + 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.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, /* + } + else + { +- if (error == EAI_FAIL) ++ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA || ++ error == EAI_NONAME) + cg->need_res_init = 1; + + _cupsSetError(IPP_INTERNAL_ERROR, gai_strerror(error), 0); diff --git a/cups.logrotate b/cups.logrotate index 19e12101be2b..9c49bbdaff9a 100644 --- a/cups.logrotate +++ b/cups.logrotate @@ -1,5 +1,8 @@ -/var/log/cups/*_log { +/var/log/cups/*log { missingok notifempty - sharedscripts + delaycompress + postrotate + /bin/kill -HUP `cat /var/run/cups.pid 2>/dev/null` 2>/dev/null || true + endscript } diff --git a/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch b/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch new file mode 100644 index 000000000000..ee36936f80c8 --- /dev/null +++ b/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch @@ -0,0 +1,19 @@ +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 <till.kamppeter@gmail.com> +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; + diff --git a/get-ppd-file-for-statically-configured-ipp-shared-queues.patch b/get-ppd-file-for-statically-configured-ipp-shared-queues.patch new file mode 100644 index 000000000000..ed132d7503de --- /dev/null +++ b/get-ppd-file-for-statically-configured-ipp-shared-queues.patch @@ -0,0 +1,31 @@ +Description: Applications could not get the PPD file for + statically-configured IPP-shared print queues +Author: Till Kamppeter <till.kamppeter@gmail.com> +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) + { diff --git a/ppd-poll-with-client-conf.patch b/ppd-poll-with-client-conf.patch new file mode 100644 index 000000000000..8985fa3be03f --- /dev/null +++ b/ppd-poll-with-client-conf.patch @@ -0,0 +1,23 @@ +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 + +--- a/cups/util.c ++++ b/cups/util.c +@@ -1085,11 +1085,13 @@ + 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"); + +- return (HTTP_SERVICE_UNAVAILABLE); +- } ++ return (HTTP_SERVICE_UNAVAILABLE); ++ } + + /* + * Get a temp file... |