summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey D2016-06-21 09:14:03 +0300
committerAlexey D2016-06-21 09:14:03 +0300
commit39d2fcb0c7d1c2f31acdef4ef4e6521abd0c650c (patch)
tree52852f57a90937e98c4a7b7167cae1556c0b02a5
parent0db6976e9379b27371cc76d054e86466397c5008 (diff)
downloadaur-39d2fcb0c7d1c2f31acdef4ef4e6521abd0c650c.tar.gz
migrating to pacman hooks; git tree cleanup
-rw-r--r--cups-avahi-address.patch75
-rw-r--r--cups-busy-loop.patch35
-rw-r--r--cups-dbus-utf8.patch106
-rw-r--r--cups-enum-all.patch17
-rw-r--r--cups-nosystemd.install25
-rw-r--r--cups-res_init.patch26
-rw-r--r--cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch19
-rw-r--r--get-ppd-file-for-statically-configured-ipp-shared-queues.patch31
-rw-r--r--ppd-poll-with-client-conf.patch23
-rw-r--r--str4495.patch26
-rw-r--r--str4500.patch17
11 files changed, 5 insertions, 395 deletions
diff --git a/cups-avahi-address.patch b/cups-avahi-address.patch
deleted file mode 100644
index a03d1adbb99..00000000000
--- a/cups-avahi-address.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-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-busy-loop.patch b/cups-busy-loop.patch
deleted file mode 100644
index 4483aa8cad6..00000000000
--- a/cups-busy-loop.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-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);
-
diff --git a/cups-dbus-utf8.patch b/cups-dbus-utf8.patch
deleted file mode 100644
index 0bcd4a16333..00000000000
--- a/cups-dbus-utf8.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-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
deleted file mode 100644
index 0ac39835ea1..00000000000
--- a/cups-enum-all.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-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-nosystemd.install b/cups-nosystemd.install
index fc015f951ba..a93197982ad 100644
--- a/cups-nosystemd.install
+++ b/cups-nosystemd.install
@@ -1,38 +1,23 @@
post_install() {
- if [ -x usr/bin/xdg-icon-resource ]; then
- xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
- fi
- echo ">> If you use an HTTPS connection to CUPS, the first time you access"
- echo ">> the interface it may take a very long time before the site comes up."
- echo ">> This is because the first request triggers the generation of the CUPS"
- echo ">> SSL certificates which can be a very time-consuming job."
+ echo ">> If you use an HTTPS connection to CUPS, the first time you access"
+ echo ">> the interface it may take a very long time before the site comes up."
+ echo ">> This is because the first request triggers the generation of the CUPS"
+ echo ">> SSL certificates which can be a very time-consuming job."
}
post_upgrade() {
- if [ -x usr/bin/xdg-icon-resource ]; then
- xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
- fi
if [ "`vercmp $2 1.4.7-2`" -lt 0 ]; then
- # important upgrade notice
echo "daemon script has been renamed to /etc/rc.d/cupsd"
echo "change your entry in /etc/rc.conf"
fi
if [ "`vercmp $2 1.6.0`" -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"
fi
- if [ "`vercmp $2 1.6.1-3`" -lt 0 ]; then
- # important upgrade notice
+ if [ "`vercmp $2 1.6.1-3`" -lt 0 ]; then
echo "> It's now safe to load usblp kernel module."
echo "> There's no more need to blacklist it."
fi
}
-
-post_remove() {
- if [ -x usr/bin/xdg-icon-resource ]; then
- xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
- fi
-}
diff --git a/cups-res_init.patch b/cups-res_init.patch
deleted file mode 100644
index 94a81a457fc..00000000000
--- a/cups-res_init.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch b/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
deleted file mode 100644
index ee36936f80c..00000000000
--- a/cupsd-no-crash-on-avahi-threaded-poll-shutdown.patch
+++ /dev/null
@@ -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 <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
deleted file mode 100644
index ed132d7503d..00000000000
--- a/get-ppd-file-for-statically-configured-ipp-shared-queues.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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
deleted file mode 100644
index 8985fa3be03..00000000000
--- a/ppd-poll-with-client-conf.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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...
diff --git a/str4495.patch b/str4495.patch
deleted file mode 100644
index e02fac93835..00000000000
--- a/str4495.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Index: conf/cups-files.conf.in
-===================================================================
---- conf/cups-files.conf.in (revision 12220)
-+++ conf/cups-files.conf.in (working copy)
-@@ -15,6 +15,7 @@
- #Group @CUPS_GROUP@
-
- # Administrator user group, used to match @SYSTEM in cupsd.conf policy rules...
-+# This cannot contain the Group value for security reasons...
- SystemGroup @CUPS_SYSTEM_GROUPS@
- @CUPS_SYSTEM_AUTHKEY@
-
-Index: scheduler/conf.c
-===================================================================
---- scheduler/conf.c (revision 12220)
-+++ scheduler/conf.c (working copy)
-@@ -995,6 +995,9 @@
-
- cupsdLogMessage(CUPSD_LOG_NOTICE,
- "Group and SystemGroup cannot use the same groups.");
-+ if (FatalErrors & (CUPSD_FATAL_CONFIG | CUPSD_FATAL_PERMISSIONS))
-+ return (0);
-+
- cupsdLogMessage(CUPSD_LOG_INFO, "Resetting Group to \"nobody\"...");
-
- group = getgrnam("nobody");
diff --git a/str4500.patch b/str4500.patch
deleted file mode 100644
index b69b559e8fc..00000000000
--- a/str4500.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -up cups-2.0.0/cups/util.c.str4500 cups-2.0.0/cups/util.c
---- cups-2.0.0/cups/util.c.str4500 2014-10-15 12:59:27.105942488 +0100
-+++ cups-2.0.0/cups/util.c 2014-10-15 13:03:38.618187112 +0100
-@@ -846,10 +846,10 @@ cupsGetPPD3(http_t *http, /* I - H
-
- snprintf(ppdname, sizeof(ppdname), "%s/ppd/%s.ppd", cg->cups_serverroot,
- name);
-- if (!stat(ppdname, &ppdinfo))
-+ if (!stat(ppdname, &ppdinfo) && !access(ppdname, R_OK))
- {
- /*
-- * OK, the file exists, use it!
-+ * OK, the file exists and is readable, use it!
- */
-
- if (buffer[0])
-