cups/cups-systemd-socket.patch

69 lines
2.8 KiB
Diff
Raw Normal View History

2014-09-12 16:19:24 +00:00
diff -up cups-2.0rc1/cups/usersys.c.systemd-socket cups-2.0rc1/cups/usersys.c
--- cups-2.0rc1/cups/usersys.c.systemd-socket 2014-08-28 17:37:22.000000000 +0200
+++ cups-2.0rc1/cups/usersys.c 2014-09-12 14:35:37.462374923 +0200
@@ -1028,7 +1028,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 */
2014-09-12 16:19:24 +00:00
diff -up cups-2.0rc1/scheduler/main.c.systemd-socket cups-2.0rc1/scheduler/main.c
--- cups-2.0rc1/scheduler/main.c.systemd-socket 2014-09-12 14:59:08.000000000 +0200
+++ cups-2.0rc1/scheduler/main.c 2014-09-12 14:59:23.229299751 +0200
@@ -653,6 +653,12 @@ main(int argc, /* I - Number of comm
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
else
2014-09-12 16:19:24 +00:00
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
+#ifdef HAVE_SYSTEMD
+ sd_notifyf(0, "READY=1\n"
+ "STATUS=Scheduler is running...\n"
+ "MAINPID=%lu",
+ (unsigned long) getpid());
+#endif /* HAVE_SYSTEMD */
if (fg)
2014-09-12 16:19:24 +00:00
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
else
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.path.in
--- cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket 2014-09-12 14:42:57.942162725 +0200
+++ cups-2.0rc1/scheduler/org.cups.cupsd.path.in 2014-09-12 14:42:54.254214614 +0200
@@ -2,7 +2,7 @@
Description=CUPS Scheduler
[Path]
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
+PathExistsGlob=@CUPS_REQUESTS@/d*
2011-08-05 14:11:04 +00:00
2014-09-12 16:19:24 +00:00
[Install]
WantedBy=multi-user.target
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.service.in
--- cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket 2014-09-12 14:40:13.000000000 +0200
+++ cups-2.0rc1/scheduler/org.cups.cupsd.service.in 2014-09-12 14:43:17.534887056 +0200
@@ -2,8 +2,8 @@
Description=CUPS Scheduler
[Service]
-ExecStart=@sbindir@/cupsd -l
-Type=simple
+ExecStart=@sbindir@/cupsd -f
+Type=notify
2011-08-05 14:11:04 +00:00
2014-09-12 16:19:24 +00:00
[Install]
Also=org.cups.cupsd.socket org.cups.cupsd.path
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.socket.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.socket.in
--- cups-2.0rc1/scheduler/org.cups.cupsd.socket.in.systemd-socket 2014-03-21 17:42:53.000000000 +0100
+++ cups-2.0rc1/scheduler/org.cups.cupsd.socket.in 2014-09-12 14:43:37.510605998 +0200
@@ -3,10 +3,6 @@ Description=CUPS Scheduler
[Socket]
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
-ListenStream=[::1]:631
-ListenStream=127.0.0.1:631
-BindIPv6Only=ipv6-only
-ReusePort=true
[Install]
WantedBy=sockets.target