diff options
Diffstat (limited to 'abs/extra/cups/cups-systemd-socket.patch')
-rw-r--r-- | abs/extra/cups/cups-systemd-socket.patch | 123 |
1 files changed, 65 insertions, 58 deletions
diff --git a/abs/extra/cups/cups-systemd-socket.patch b/abs/extra/cups/cups-systemd-socket.patch index cfbe933..2eef708 100644 --- a/abs/extra/cups/cups-systemd-socket.patch +++ b/abs/extra/cups/cups-systemd-socket.patch @@ -1,6 +1,6 @@ -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 +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 @@ @@ -15,9 +15,9 @@ diff -up cups-1.7rc1/config.h.in.systemd-socket cups-1.7rc1/config.h.in * 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 +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$" @@ -55,9 +55,9 @@ diff -up cups-1.7rc1/config-scripts/cups-systemd.m4.systemd-socket cups-1.7rc1/c +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 +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) @@ -76,10 +76,10 @@ diff -up cups-1.7rc1/configure.in.systemd-socket cups-1.7rc1/configure.in 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( +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) && @@ -88,9 +88,9 @@ diff -up cups-1.7rc1/cups/usersys.c.systemd-socket cups-1.7rc1/cups/usersys.c 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 +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 @@ -100,35 +100,38 @@ diff -up cups-1.7rc1/data/cups.path.in.systemd-socket cups-1.7rc1/data/cups.path + +[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 @@ +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.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,8 @@ +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.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 +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 @@ -152,9 +155,9 @@ diff -up cups-1.7rc1/data/Makefile.systemd-socket cups-1.7rc1/data/Makefile # -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 +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@ @@ -171,7 +174,7 @@ diff -up cups-1.7rc1/Makedefs.in.systemd-socket cups-1.7rc1/Makedefs.in LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \ -L../scheduler @LDARCHFLAGS@ \ @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) -@@ -231,6 +233,7 @@ PAMFILE = @PAMFILE@ +@@ -232,6 +234,7 @@ PAMFILE = @PAMFILE@ DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@ DBUSDIR = @DBUSDIR@ @@ -179,10 +182,10 @@ diff -up cups-1.7rc1/Makedefs.in.systemd-socket cups-1.7rc1/Makedefs.in # -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 +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... */ @@ -192,9 +195,9 @@ diff -up cups-1.7rc1/scheduler/client.h.systemd-socket cups-1.7rc1/scheduler/cli } 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 +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)) @@ -208,19 +211,10 @@ diff -up cups-1.7rc1/scheduler/listen.c.systemd-socket cups-1.7rc1/scheduler/lis { #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 -@@ -26,6 +26,8 @@ - * launchd_checkin() - Check-in with launchd and collect the listening - * fds. - * launchd_checkout() - Update the launchd KeepAlive file as needed. -+ * systemd_checkin() - Check-in with systemd and collect the -+ * listening fds. - * parent_handler() - Catch USR1/CHLD signals... - * process_children() - Process all dead children... - * select_timeout() - Calculate the select timeout value. -@@ -62,6 +64,10 @@ +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 */ @@ -231,7 +225,7 @@ diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main. #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) # include <malloc.h> #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -@@ -83,6 +89,9 @@ +@@ -64,6 +68,9 @@ static void launchd_checkin(void); static void launchd_checkout(void); #endif /* HAVE_LAUNCHD */ @@ -241,7 +235,7 @@ diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main. 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 +@@ -563,6 +570,13 @@ main(int argc, /* I - Number of comm } #endif /* HAVE_LAUNCHD */ @@ -255,7 +249,20 @@ diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main. /* * Startup the server... */ -@@ -762,6 +778,15 @@ main(int argc, /* I - Number of comm +@@ -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 */ @@ -271,7 +278,7 @@ diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main. /* * Startup the server... */ -@@ -1511,6 +1536,102 @@ launchd_checkout(void) +@@ -1500,6 +1529,102 @@ launchd_checkout(void) } #endif /* HAVE_LAUNCHD */ @@ -374,9 +381,9 @@ diff -up cups-1.7rc1/scheduler/main.c.systemd-socket cups-1.7rc1/scheduler/main. /* * '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 +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) \ |