moved into main repo for pisi 2.0
This commit is contained in:
@@ -0,0 +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])
|
||||
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-ssl.m4
|
||||
--- cups-1.6.2/config-scripts/cups-ssl.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200
|
||||
+++ cups-1.6.2/config-scripts/cups-ssl.m4 2011-05-23 17:47:27.000000000 +0200
|
||||
@@ -180,7 +180,7 @@
|
||||
AC_SUBST(SSLFLAGS)
|
||||
AC_SUBST(SSLLIBS)
|
||||
|
||||
-EXPORT_SSLLIBS="$SSLLIBS"
|
||||
+EXPORT_SSLLIBS=""
|
||||
AC_SUBST(EXPORT_SSLLIBS)
|
||||
|
||||
dnl
|
||||
@@ -0,0 +1,11 @@
|
||||
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_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
- AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
if $PKGCONFIG --exists gnutls; then
|
||||
have_ssl=1
|
||||
SSLLIBS=`$PKGCONFIG --libs gnutls`
|
||||
@@ -0,0 +1,18 @@
|
||||
diff -up cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.5b1/config-scripts/cups-manpages.m4
|
||||
--- cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man 2011-05-12 07:21:56.000000000 +0200
|
||||
+++ cups-1.5b1/config-scripts/cups-manpages.m4 2011-05-23 17:25:50.000000000 +0200
|
||||
@@ -69,10 +69,10 @@ case "$uname" in
|
||||
;;
|
||||
Linux* | GNU* | Darwin*)
|
||||
# Linux, GNU Hurd, and OS X
|
||||
- MAN1EXT=1.gz
|
||||
- MAN5EXT=5.gz
|
||||
- MAN7EXT=7.gz
|
||||
- MAN8EXT=8.gz
|
||||
+ MAN1EXT=1
|
||||
+ MAN5EXT=5
|
||||
+ MAN7EXT=7
|
||||
+ MAN8EXT=8
|
||||
MAN8DIR=8
|
||||
;;
|
||||
*)
|
||||
@@ -0,0 +1,5 @@
|
||||
/var/log/cups/*_log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
}
|
||||
+31
@@ -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)
|
||||
{
|
||||
@@ -0,0 +1,95 @@
|
||||
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-06-28 13:42:15.834715511 +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) */
|
||||
@@ -2248,41 +2248,59 @@ 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)
|
||||
+ switch (address->proto)
|
||||
{
|
||||
- for (addr = addrlist; addr; addr = addr->next)
|
||||
+ 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 (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);
|
||||
+ DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
- if (!error)
|
||||
+ if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
+ _cups_strcasecmp(hostptr, ".local"))
|
||||
{
|
||||
- DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
-
|
||||
- if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
- _cups_strcasecmp(hostptr, ".local"))
|
||||
- {
|
||||
- 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));
|
||||
+ DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
+ fqdn, error));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
-
|
||||
- httpAddrFreeList(addrlist);
|
||||
}
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * Use the IP address that responded...
|
||||
+ */
|
||||
+
|
||||
+ avahi_address_snprint (fqdn, sizeof (fqdn), address);
|
||||
+ hostTarget = fqdn;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
diff -up cups-1.6.4/scheduler/job.c.final-content-type cups-1.6.4/scheduler/job.c
|
||||
--- cups-1.6.4/scheduler/job.c.final-content-type 2013-09-27 16:58:13.934775402 +0100
|
||||
+++ cups-1.6.4/scheduler/job.c 2013-09-27 17:00:57.716549576 +0100
|
||||
@@ -692,12 +692,7 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
||||
|
||||
if (!job->printer->remote)
|
||||
{
|
||||
- for (filter = (mime_filter_t *)cupsArrayLast(filters);
|
||||
- filter && filter->dst;
|
||||
- filter = (mime_filter_t *)cupsArrayPrev(filters))
|
||||
- if (strcmp(filter->dst->super, "printer") ||
|
||||
- strcmp(filter->dst->type, job->printer->name))
|
||||
- break;
|
||||
+ filter = (mime_filter_t *)cupsArrayLast(filters);
|
||||
|
||||
if (filter && filter->dst)
|
||||
{
|
||||
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
{
|
||||
- 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.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
|
||||
{
|
||||
- if (error == EAI_FAIL)
|
||||
+ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA ||
|
||||
+ error == EAI_NONAME)
|
||||
cg->need_res_init = 1;
|
||||
|
||||
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, gai_strerror(error), 0);
|
||||
@@ -0,0 +1,47 @@
|
||||
*PPD-Adobe: "4.3"
|
||||
*%
|
||||
*% Text-only printer definition
|
||||
*%
|
||||
*FormatVersion: "4.3"
|
||||
*FileVersion: "1.1"
|
||||
*LanguageVersion: English
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*PCFileName: "TEXTONLY.PPD"
|
||||
*Manufacturer: "Generic"
|
||||
*Product: "(Generic)"
|
||||
*cupsVersion: 1.0
|
||||
*cupsManualCopies: True
|
||||
*cupsModelNumber: 2
|
||||
*cupsFilter: "text/plain 0 textonly"
|
||||
*ModelName: "Generic text-only printer"
|
||||
*ShortNickName: "Generic text-only printer"
|
||||
*NickName: "Generic text-only printer"
|
||||
*PSVersion: "(2017.000) 0"
|
||||
*LanguageLevel: "2"
|
||||
*ColorDevice: False
|
||||
*DefaultColorSpace: Gray
|
||||
*FileSystem: False
|
||||
*Throughput: "8"
|
||||
*LandscapeOrientation: Plus90
|
||||
*VariablePaperSize: False
|
||||
*TTRasterizer: Type42
|
||||
*DefaultImageableArea: Letter
|
||||
*ImageableArea Letter/US Letter: "18 36 594 756"
|
||||
*DefaultPaperDimension: Letter
|
||||
*PaperDimension Letter/Letter: "612 792"
|
||||
*OpenUI *PageSize/Media Size: PickOne
|
||||
*OrderDependency: 10 AnySetup *PageSize
|
||||
*DefaultPageSize: Letter
|
||||
*PageSize Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageSize
|
||||
*OpenUI *PageRegion: PickOne
|
||||
*OrderDependency: 10 AnySetup *PageRegion
|
||||
*DefaultPageRegion: Letter
|
||||
*PageRegion Letter/Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageRegion
|
||||
|
||||
*OpenUI *SendFF: Boolean
|
||||
*DefaultSendFF: False
|
||||
*SendFF True/True: ""
|
||||
*SendFF False/False: ""
|
||||
*CloseUI: *SendFF
|
||||
@@ -0,0 +1,25 @@
|
||||
Index: Makedefs.in
|
||||
===================================================================
|
||||
--- Makedefs.in (Revision 10520)
|
||||
+++ Makedefs.in (Arbeitskopie)
|
||||
@@ -40,14 +40,14 @@
|
||||
# Installation programs...
|
||||
#
|
||||
|
||||
-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
|
||||
-INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@
|
||||
+INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@
|
||||
+INSTALL_COMPDATA = $(INSTALL) -c -m 644 @INSTALL_GZIP@
|
||||
INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
|
||||
-INSTALL_DATA = $(INSTALL) -c -m 444
|
||||
+INSTALL_DATA = $(INSTALL) -c -m 644
|
||||
INSTALL_DIR = $(INSTALL) -d
|
||||
-INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
|
||||
-INSTALL_MAN = $(INSTALL) -c -m 444
|
||||
-INSTALL_SCRIPT = $(INSTALL) -c -m 555
|
||||
+INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@
|
||||
+INSTALL_MAN = $(INSTALL) -c -m 644
|
||||
+INSTALL_SCRIPT = $(INSTALL) -c -m 755
|
||||
|
||||
#
|
||||
# Default user, group, and system groups for the scheduler...
|
||||
@@ -0,0 +1,25 @@
|
||||
From 7bb9184b40bea3c4b9f46362642e5d40053a3ae1 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Maier <tamiko@kyomu.43-1.org>
|
||||
Date: Wed, 19 Nov 2014 18:44:33 +0100
|
||||
Subject: [PATCH] fix compilation
|
||||
|
||||
---
|
||||
test/ippserver.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/ippserver.c b/test/ippserver.c
|
||||
index c785e5f..1c64668 100644
|
||||
--- a/test/ippserver.c
|
||||
+++ b/test/ippserver.c
|
||||
@@ -421,7 +421,7 @@ static int valid_job_attributes(_ipp_client_t *client);
|
||||
|
||||
# ifdef HAVE_DNSSD
|
||||
static DNSServiceRef DNSSDMaster = NULL;
|
||||
-# else /* HAVE_AVAHI */
|
||||
+# elif defined(HAVE_AVAHI)
|
||||
static AvahiThreadedPoll *DNSSDMaster = NULL;
|
||||
static AvahiClient *DNSSDClient = NULL;
|
||||
# endif /* HAVE_DNSSD */
|
||||
--
|
||||
2.0.4
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/cups/usersys.c
|
||||
+++ b/cups/usersys.c
|
||||
@@ -1044,7 +1044,9 @@
|
||||
options = 0;
|
||||
}
|
||||
|
||||
+#ifdef HAVE_SSL
|
||||
_httpTLSSetOptions(options);
|
||||
+#endif /* HAVE_SSL */
|
||||
}
|
||||
}
|
||||
|
||||
--- a/scheduler/conf.c
|
||||
+++ b/scheduler/conf.c
|
||||
@@ -2975,7 +2975,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef HAVE_SSL
|
||||
_httpTLSSetOptions(options);
|
||||
+#endif /* HAVE_SSL */
|
||||
}
|
||||
else if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")
|
||||
#ifdef HAVE_SSL
|
||||
@@ -0,0 +1,73 @@
|
||||
From 33e0d4c8e450fe69b195422c0880aaa96ca9478d Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Maier <tamiko@kyomu.43-1.org>
|
||||
Date: Wed, 19 Nov 2014 18:00:06 +0100
|
||||
Subject: [PATCH] change systemd service files to gentoo naming scheme
|
||||
|
||||
---
|
||||
scheduler/Makefile | 10 +++++-----
|
||||
scheduler/org.cups.cupsd.path.in | 2 +-
|
||||
scheduler/org.cups.cupsd.service.in | 2 +-
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/scheduler/Makefile b/scheduler/Makefile
|
||||
index 3e0884a..b354420 100644
|
||||
--- a/scheduler/Makefile
|
||||
+++ b/scheduler/Makefile
|
||||
@@ -203,11 +203,11 @@ install-data:
|
||||
if test "x$(SYSTEMD_DIR)" != x; then \
|
||||
echo Installing systemd configuration files...; \
|
||||
$(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \
|
||||
- $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \
|
||||
- $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \
|
||||
- $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
|
||||
- $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \
|
||||
- $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \
|
||||
+ $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR)/cups.path; \
|
||||
+ $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR)/cups.service; \
|
||||
+ $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups.socket; \
|
||||
+ $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd@.service; \
|
||||
+ $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd.socket; \
|
||||
elif test "x$(XINETD)" != x; then \
|
||||
echo Installing xinetd configuration file for cups-lpd...; \
|
||||
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
|
||||
diff --git a/scheduler/org.cups.cupsd.path.in b/scheduler/org.cups.cupsd.path.in
|
||||
index 1bccc6f..90c8576 100644
|
||||
--- a/scheduler/org.cups.cupsd.path.in
|
||||
+++ b/scheduler/org.cups.cupsd.path.in
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=CUPS Scheduler
|
||||
|
||||
[Path]
|
||||
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
||||
+PathExists=@CUPS_CACHEDIR@/d*
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in
|
||||
index 0a27c76..7a04248 100644
|
||||
--- a/scheduler/org.cups.cupsd.service.in
|
||||
+++ b/scheduler/org.cups.cupsd.service.in
|
||||
@@ -7,5 +7,5 @@ ExecStart=@sbindir@/cupsd -l
|
||||
Type=simple
|
||||
|
||||
[Install]
|
||||
-Also=org.cups.cupsd.socket org.cups.cupsd.path
|
||||
+Also=cups.socket cups.path
|
||||
WantedBy=printer.target
|
||||
diff --git a/scheduler/org.cups.cupsd.socket.in b/scheduler/org.cups.cupsd.socket.in
|
||||
--- a/scheduler/org.cups.cupsd.socket.in
|
||||
+++ a/scheduler/org.cups.cupsd.socket.in
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
[Socket]
|
||||
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
|
||||
+ListenStream=[::1]:631
|
||||
+ListenStream=127.0.0.1:631
|
||||
+BindIPv6Only=ipv6-only
|
||||
+ReusePort=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
--
|
||||
2.0.4
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
diff -Nuar cups-1.6.1.orig/config.h.in cups-1.6.1/config.h.in
|
||||
--- cups-1.6.1.orig/config.h.in 2012-07-16 21:21:43.000000000 +0300
|
||||
+++ cups-1.6.1/config.h.in 2013-03-13 18:46:13.805434622 +0200
|
||||
@@ -127,7 +127,7 @@
|
||||
#define CUPS_SBINDIR "/usr/sbin"
|
||||
#define CUPS_SERVERBIN "/usr/lib/cups"
|
||||
#define CUPS_SERVERROOT "/etc/cups"
|
||||
-#define CUPS_STATEDIR "/var/run/cups"
|
||||
+#define CUPS_STATEDIR "/run/cups"
|
||||
|
||||
|
||||
/*
|
||||
diff -Nuar cups-1.6.1.orig/doc/help/security.html cups-1.6.1/doc/help/security.html
|
||||
--- cups-1.6.1.orig/doc/help/security.html 2011-04-29 00:20:12.000000000 +0300
|
||||
+++ cups-1.6.1/doc/help/security.html 2013-03-13 18:45:47.222433880 +0200
|
||||
@@ -53,7 +53,7 @@
|
||||
<LI>Local certificate authentication passes 128-bit
|
||||
"certificates" that identify an authenticated user.
|
||||
Certificates are created on-the-fly from random data and
|
||||
- stored in files under <VAR>/var/run/cups/certs</VAR>.
|
||||
+ stored in files under <VAR>/run/cups/certs</VAR>.
|
||||
They have restricted read permissions: root +
|
||||
system-group(s) for the root certificate, and lp + lp
|
||||
for CGI certificates.
|
||||
diff -Nuar cups-1.6.1.orig/scheduler/org.cups.cupsd.plist cups-1.6.1/scheduler/org.cups.cupsd.plist
|
||||
--- cups-1.6.1.orig/scheduler/org.cups.cupsd.plist 2011-04-20 21:15:44.000000000 +0300
|
||||
+++ cups-1.6.1/scheduler/org.cups.cupsd.plist 2013-03-13 18:44:26.286431623 +0200
|
||||
@@ -54,7 +54,7 @@
|
||||
<key>SockPathMode</key>
|
||||
<integer>49663</integer>
|
||||
<key>SockPathName</key>
|
||||
- <string>/private/var/run/cupsd</string>
|
||||
+ <string>/run/cupsd</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
diff -Nuar cups-1.6.1.orig/xcode/config.h cups-1.6.1/xcode/config.h
|
||||
--- cups-1.6.1.orig/xcode/config.h 2012-07-16 21:21:43.000000000 +0300
|
||||
+++ cups-1.6.1/xcode/config.h 2013-03-13 18:43:13.618429596 +0200
|
||||
@@ -100,7 +100,7 @@
|
||||
* Do we have domain socket support, and if so what is the default one?
|
||||
*/
|
||||
|
||||
-#define CUPS_DEFAULT_DOMAINSOCKET "/private/var/run/cupsd"
|
||||
+#define CUPS_DEFAULT_DOMAINSOCKET "/run/cupsd"
|
||||
|
||||
|
||||
/*
|
||||
@@ -0,0 +1,37 @@
|
||||
--- cups-config.in~ 2014-01-18 13:56:12.423297761 +0100
|
||||
+++ cups-config.in 2014-01-18 13:56:59.459964275 +0100
|
||||
@@ -50,7 +50,7 @@ else
|
||||
CFLAGS="$CFLAGS -I$includedir"
|
||||
fi
|
||||
|
||||
- if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib64; then
|
||||
+ if test $libdir != /usr/lib -a $libdir != /usr/lib32 -a $libdir != /usr/lib; then
|
||||
LDFLAGS="$LDFLAGS -L$libdir"
|
||||
fi
|
||||
fi
|
||||
--- config-scripts/cups-directories.m4~ 2014-01-18 13:56:23.529964393 +0100
|
||||
+++ config-scripts/cups-directories.m4 2014-01-18 13:57:40.706630807 +0100
|
||||
@@ -103,8 +103,8 @@ dnl Fix "libdir" variable...
|
||||
if test "$libdir" = "\${exec_prefix}/lib"; then
|
||||
case "$uname" in
|
||||
Linux*)
|
||||
- if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
|
||||
- libdir="$exec_prefix/lib64"
|
||||
+ if test -d /usr/lib -a ! -d /usr/lib/fakeroot; then
|
||||
+ libdir="$exec_prefix/lib"
|
||||
fi
|
||||
;;
|
||||
HP-UX*)
|
||||
--- configure~ 2014-01-18 13:56:32.346631030 +0100
|
||||
+++ configure 2014-01-18 13:57:12.076630898 +0100
|
||||
@@ -5893,8 +5893,8 @@ fi
|
||||
if test "$libdir" = "\${exec_prefix}/lib"; then
|
||||
case "$uname" in
|
||||
Linux*)
|
||||
- if test -d /usr/lib64 -a ! -d /usr/lib64/fakeroot; then
|
||||
- libdir="$exec_prefix/lib64"
|
||||
+ if test -d /usr/lib -a ! -d /usr/lib/fakeroot; then
|
||||
+ libdir="$exec_prefix/lib"
|
||||
fi
|
||||
;;
|
||||
HP-UX*)
|
||||
@@ -0,0 +1,26 @@
|
||||
Index: cups-1.4.4/config-scripts/cups-compiler.m4
|
||||
===================================================================
|
||||
--- cups-1.4.4.orig/config-scripts/cups-compiler.m4
|
||||
+++ cups-1.4.4/config-scripts/cups-compiler.m4
|
||||
@@ -30,7 +30,7 @@ dnl For debugging, keep symbols, otherwi
|
||||
if test x$enable_debug = xyes; then
|
||||
OPTIM="-g"
|
||||
else
|
||||
- INSTALL_STRIP="-s"
|
||||
+ INSTALL_STRIP=""
|
||||
fi
|
||||
|
||||
dnl Debug printfs can slow things down, so provide a separate option for that
|
||||
Index: cups-1.4.4/configure
|
||||
===================================================================
|
||||
--- cups-1.4.4.orig/configure
|
||||
+++ cups-1.4.4/configure
|
||||
@@ -10978,7 +10978,7 @@ fi
|
||||
if test x$enable_debug = xyes; then
|
||||
OPTIM="-g"
|
||||
else
|
||||
- INSTALL_STRIP="-s"
|
||||
+ INSTALL_STRIP=""
|
||||
fi
|
||||
|
||||
if test x$enable_debug_printfs = xyes; then
|
||||
@@ -0,0 +1,22 @@
|
||||
--- config-scripts/cups-network.m4~ 2014-01-18 14:05:51.353295869 +0100
|
||||
+++ config-scripts/cups-network.m4 2014-01-18 14:07:25.179962227 +0100
|
||||
@@ -45,7 +45,7 @@ if test x$enable_domainsocket != xno -a
|
||||
case "$uname" in
|
||||
Darwin*)
|
||||
# Darwin and MaxOS X do their own thing...
|
||||
- CUPS_DEFAULT_DOMAINSOCKET="$localstatedir/run/cupsd"
|
||||
+ CUPS_DEFAULT_DOMAINSOCKET="/run/cupsd"
|
||||
;;
|
||||
*)
|
||||
# All others use FHS standard...
|
||||
--- config-scripts/cups-directories.m4~ 2014-01-18 14:05:59.609962507 +0100
|
||||
+++ config-scripts/cups-directories.m4 2014-01-18 14:07:13.516628933 +0100
|
||||
@@ -420,7 +420,7 @@ AC_ARG_WITH(rundir, [ --with-rundir
|
||||
;;
|
||||
*)
|
||||
# All others
|
||||
- CUPS_STATEDIR="$localstatedir/run/cups"
|
||||
+ CUPS_STATEDIR="/run/cups"
|
||||
;;
|
||||
esac])
|
||||
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
||||
@@ -0,0 +1,95 @@
|
||||
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 */
|
||||
- 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) */
|
||||
@@ -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)
|
||||
+ switch (address->proto)
|
||||
{
|
||||
- for (addr = addrlist; addr; addr = addr->next)
|
||||
+ 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 (addrlen > 0) {
|
||||
+ error = getnameinfo(&addr.addr, httpAddrLength (&addr),
|
||||
+ fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
|
||||
+
|
||||
+ if (!error)
|
||||
{
|
||||
- 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"))
|
||||
- {
|
||||
- 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));
|
||||
+ DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
+ fqdn, error));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
- httpAddrFreeList(addrlist);
|
||||
}
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * Use the IP address that responded...
|
||||
+ */
|
||||
+
|
||||
+ avahi_address_snprint (fqdn, sizeof (fqdn), address);
|
||||
+ hostTarget = fqdn;
|
||||
}
|
||||
|
||||
/*
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
d /run/cups 0755 root lp
|
||||
d /run/cups/certs 0755 lp lpadmin
|
||||
Reference in New Issue
Block a user