cups: update to 2.0.1.

This commit is contained in:
Juan RP 2014-11-24 12:28:21 +01:00
parent 6abaa410d1
commit 7f3aab949a
11 changed files with 37 additions and 647 deletions

View file

@ -1,390 +0,0 @@
diff -up cups-1.7rc1/config.h.in.systemd-socket cups-1.7rc1/config.h.in
--- cups-1.7rc1/config.h.in.systemd-socket 2013-05-29 13:51:34.000000000 +0200
+++ cups-1.7rc1/config.h.in 2013-07-12 11:16:53.257546263 +0200
@@ -451,6 +451,13 @@
/*
+ * Do we have systemd support?
+ */
+
+#undef HAVE_SYSTEMD
+
+
+/*
* Various scripting languages...
*/
diff -up cups-1.7rc1/config-scripts/cups-systemd.m4.systemd-socket cups-1.7rc1/config-scripts/cups-systemd.m4
--- cups-1.7rc1/config-scripts/cups-systemd.m4.systemd-socket 2013-07-12 11:16:53.257546263 +0200
+++ cups-1.7rc1/config-scripts/cups-systemd.m4 2013-07-12 11:16:53.257546263 +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)
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+ if $PKGCONFIG --exists libsystemd-daemon; then
+ AC_MSG_RESULT(yes)
+ SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
+ SDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
+ 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.7rc1/configure.in.systemd-socket cups-1.7rc1/configure.in
--- cups-1.7rc1/configure.in.systemd-socket 2013-07-08 23:15:13.000000000 +0200
+++ cups-1.7rc1/configure.in 2013-07-12 11:16:53.257546263 +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.7rc1/cups/usersys.c.systemd-socket cups-1.7rc1/cups/usersys.c
--- cups-1.7rc1/cups/usersys.c.systemd-socket 2013-07-10 16:08:39.000000000 +0200
+++ cups-1.7rc1/cups/usersys.c 2013-07-12 11:16:53.258546249 +0200
@@ -1046,7 +1046,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.7rc1/data/cups.path.in.systemd-socket cups-1.7rc1/data/cups.path.in
--- cups-1.7rc1/data/cups.path.in.systemd-socket 2013-07-12 11:16:53.258546249 +0200
+++ cups-1.7rc1/data/cups.path.in 2013-07-12 11:16:53.258546249 +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.7rc1/data/cups.service.in.systemd-socket cups-1.7rc1/data/cups.service.in
--- cups-1.7rc1/data/cups.service.in.systemd-socket 2013-07-12 11:16:53.258546249 +0200
+++ cups-1.7rc1/data/cups.service.in 2013-07-12 11:16:53.258546249 +0200
@@ -0,0 +1,10 @@
+[Unit]
+Description=CUPS Printing Service
+
+[Service]
+ExecStart=@sbindir@/cupsd -f
+PrivateTmp=true
+
+[Install]
+Also=cups.socket cups.path
+WantedBy=printer.target
diff -up cups-1.7rc1/data/cups.socket.in.systemd-socket cups-1.7rc1/data/cups.socket.in
--- cups-1.7rc1/data/cups.socket.in.systemd-socket 2013-07-12 11:16:53.259546235 +0200
+++ cups-1.7rc1/data/cups.socket.in 2013-07-12 11:16:53.259546235 +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.7rc1/data/Makefile.systemd-socket cups-1.7rc1/data/Makefile
--- cups-1.7rc1/data/Makefile.systemd-socket 2013-05-29 13:51:34.000000000 +0200
+++ cups-1.7rc1/data/Makefile 2013-07-12 11:16:53.259546235 +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.7rc1/Makedefs.in.systemd-socket cups-1.7rc1/Makedefs.in
--- cups-1.7rc1/Makedefs.in.systemd-socket 2013-07-12 11:16:53.246546416 +0200
+++ cups-1.7rc1/Makedefs.in 2013-07-12 11:17:49.327768742 +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)
@@ -231,6 +233,7 @@ PAMFILE = @PAMFILE@
DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@
DBUSDIR = @DBUSDIR@
+SYSTEMDUNITDIR = $(BUILDROOT)@systemdsystemunitdir@
#
diff -up cups-1.7rc1/scheduler/client.h.systemd-socket cups-1.7rc1/scheduler/client.h
--- cups-1.7rc1/scheduler/client.h.systemd-socket 2013-05-29 13:51:34.000000000 +0200
+++ cups-1.7rc1/scheduler/client.h 2013-07-12 11:16:53.260546222 +0200
@@ -77,6 +77,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.7rc1/scheduler/listen.c.systemd-socket cups-1.7rc1/scheduler/listen.c
--- cups-1.7rc1/scheduler/listen.c.systemd-socket 2013-05-29 13:51:34.000000000 +0200
+++ cups-1.7rc1/scheduler/listen.c 2013-07-12 11:16:53.260546222 +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.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main.c
--- cups-1.7rc1/scheduler/main.c.systemd-socket 2013-07-12 11:16:53.212546887 +0200
+++ cups-1.7rc1/scheduler/main.c 2013-07-12 11:16:53.261546208 +0200
@@ -62,6 +64,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 */
@@ -83,6 +89,9 @@
static void launchd_checkin(void);
static void launchd_checkout(void);
#endif /* HAVE_LAUNCHD */
+#ifdef HAVE_SYSTEMD
+static int systemd_checkin(void);
+#endif /* HAVE_SYSTEMD */
static void parent_handler(int sig);
static void process_children(void);
static void sigchld_handler(int sig);
@@ -574,6 +583,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...
*/
@@ -762,6 +778,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...
*/
@@ -1511,6 +1536,102 @@ launchd_checkout(void)
}
#endif /* HAVE_LAUNCHD */
+#ifdef HAVE_SYSTEMD
+static int
+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.7rc1/scheduler/Makefile.systemd-socket cups-1.7rc1/scheduler/Makefile
--- cups-1.7rc1/scheduler/Makefile.systemd-socket 2013-05-29 13:51:34.000000000 +0200
+++ cups-1.7rc1/scheduler/Makefile 2013-07-12 11:16:53.261546208 +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

View file

@ -1,14 +0,0 @@
# Source: Gentoo
diff -urN cups-1.4.4/config-scripts/cups-compiler.m4 cups-1.4.4.new/config-scripts/cups-compiler.m4
--- cups-1.4.4/config-scripts/cups-compiler.m4 2009-05-17 02:13:47.000000000 +0200
+++ cups-1.4.4.new/config-scripts/cups-compiler.m4 2010-08-12 19:19:45.937020635 +0200
@@ -30,7 +30,7 @@
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

View file

@ -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
@@ -429,7 +429,7 @@
;;
*)
# All others
- CUPS_STATEDIR="$localstatedir/run/cups"
+ CUPS_STATEDIR="/run/cups"
;;
esac
@@ -420,7 +420,7 @@
;;
*)
# All others
- CUPS_STATEDIR="$localstatedir/run/cups"
+ CUPS_STATEDIR="/run/cups"
;;
esac])
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")

View file

@ -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;
}
/*

View file

@ -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;
}
}

View file

@ -1,18 +0,0 @@
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)
{

View file

@ -1,11 +0,0 @@
--- cups-1.6.1/man/Makefile.orig 2013-05-06 16:12:40.176012866 +0200
+++ cups-1.6.1/man/Makefile 2013-05-06 16:13:12.895184815 +0200
@@ -232,7 +232,7 @@ html: $(MAN1) $(MAN5) $(MAN7) $(MAN8) ma
done
mantohtml: mantohtml.o
- $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ mantohtml.o
+ cc -I/usr/include -I../ -L/usr/lib mantohtml.c -o mantohtml
#

View file

@ -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>

View file

@ -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);

View file

@ -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)
{

View file

@ -1,19 +1,19 @@
# Template file for 'cups'
pkgname=cups
version=1.7.5
revision=3
version=2.0.1
revision=1
patch_args="-Np1"
short_desc="Common Unix Printing System"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.cups.org/"
license="GPL-2"
distfiles="http://www.cups.org/software/${version}/cups-${version}-source.tar.gz"
checksum=0bf2680ee191a6caf5a8ac5c231a75312e5c41a02dfbf48a32db4bf974d111c0
checksum=59a6260f464c29bb727b23b490f47bd7fb04231e2fd305d5f73b54c867416ccd
hostmakedepends="automake pkg-config poppler-utils"
makedepends="
acl-devel libjpeg-turbo-devel libpng-devel>=1.5.10 tiff-devel
libressl-devel pam-devel poppler-devel libusb-devel avahi-libs-devel"
hostmakedepends="automake pkg-config poppler-utils gnutls-devel avahi-libs-devel"
makedepends="acl-devel libjpeg-turbo-devel libpng-devel>=1.5.10 tiff-devel
gnutls-devel pam-devel poppler-devel libusb-devel avahi-libs-devel
$(vopt_if systemd systemd-devel)"
depends="libcups>=${version}_${revision} cups-filters bc xdg-utils"
conf_files="
/etc/cups/cupsd.conf
@ -25,45 +25,44 @@ conf_files="
/etc/pam.d/cups"
make_dirs="
/var/cache/cups/rss 0750 root lp
/var/run/cups/certs 0750 root lp
/var/log/cups 0750 root root
/var/spool/cups 0755 root lp
/etc/cups/ssl 0700 root lp"
replaces="runit-void<20141013_2"
# Package build options
build_options="systemd"
if [ "$build_option_systemd" ]; then
makedepends+=" systemd-devel"
configure_args+=" --with-systemdsystemunitdir=/usr/lib/systemd/system"
systemd_services="cups.socket on"
fi
pre_configure() {
aclocal -I config-scripts
autoconf -I config-scripts
}
do_configure() {
if [ "$CROSS_BUILD" ]; then
CC=cc AR= RANLIB= CFLAGS=-Os LDFLAGS= ./configure
make -C cups libcups.a
make -C man mantohtml
mkdir cross-tools
cp man/mantohtml cross-tools
make clean
fi
./configure ${configure_args} --libdir=/usr/lib \
--enable-acl --enable-dbus --enable-raw-printing \
--enable-threads --with-logdir=/var/log/cups \
--with-docdir=/usr/share/cups/doc --disable-gssapi \
--with-cups-user=daemon --with-cups-group=lp --enable-relro \
--enable-avahi --enable-pam --enable-openssl --disable-gnutls \
--with-menudir=/usr/share/applications \
--with-optim="${CFLAGS}"
--enable-avahi --enable-pam --enable-ssl \
--with-menudir=/usr/share/applications --with-xinetd=/etc/xinetd.d \
--with-optim="${CFLAGS}" $(vopt_with systemd) \
--without-perl --without-php --without-python
}
do_build() {
# Do not run genstrings binary in cross builds.
if [ "$CROSS_BUILD" ]; then
sed -e '/.\/genstrings.*/d' -i ppdc/Makefile
sed -e "s,./mantohtml,${wrksrc}/cross-tools/mantohtml,g" -i man/Makefile
fi
make ${makejobs}
}
do_install() {
make BUILDROOT=${DESTDIR} install
# Remove sysvinit scripts.
@ -93,14 +92,16 @@ do_install() {
# comment out all conversion rules which use any of the removed filters
perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' \
${DESTDIR}/usr/share/cups/mime/mime.convs
# comment out unnecessary PageLogFormat entry
sed -i -e 's:PageLogFormat:#PageLogFormat:' ${DESTDIR}/etc/cups/cupsd.conf*
# runit service
vsv cupsd
}
libcups_package() {
short_desc+=" - client runtime shared libraries"
conf_files="/etc/cups/client.conf"
replaces="cups<1.6.0_1"
pkg_install() {
vmove "usr/lib/*.so.*"
vmove etc/cups/client.conf