[Pkg-cups-devel] r26 - in cupsys/branches/cups-1.2/debian: . patches
Kenshi Muto
kmuto at costa.debian.org
Thu Nov 3 12:44:27 UTC 2005
Author: kmuto
Date: Thu Nov 3 12:44:25 2005
New Revision: 26
Modified:
cupsys/branches/cups-1.2/debian/README.Debian
cupsys/branches/cups-1.2/debian/changelog
cupsys/branches/cups-1.2/debian/patches/47_pid.dpatch
Log:
add pid file directive. (#337093)
Modified: cupsys/branches/cups-1.2/debian/README.Debian
==============================================================================
--- cupsys/branches/cups-1.2/debian/README.Debian (original)
+++ cupsys/branches/cups-1.2/debian/README.Debian Thu Nov 3 12:44:25 2005
@@ -235,6 +235,10 @@
foomatic-filters package (this package will be installed when you
install foomatic-filters-ppds package).
+ - Default location of pid file is /var/run/cups/cupsd.pid.
+ If you'd like to change this, you can modify by using
+ "PidFile <filepath>" directive at your /etc/cups/cupsd.conf.
+
Enjoy!
- -- Jeff Licquia <licquia at debian.org>
+ -- Jeff Licquia <licquia at debian.org> and Kenshi Muto <kmuto at debian.org>
Modified: cupsys/branches/cups-1.2/debian/changelog
==============================================================================
--- cupsys/branches/cups-1.2/debian/changelog (original)
+++ cupsys/branches/cups-1.2/debian/changelog Thu Nov 3 12:44:25 2005
@@ -1,3 +1,12 @@
+cupsys (1.1.99.b1.r4748-3) experimental; urgency=low
+
+ * EXPERIMENTAL
+ * 47_pid.dpatch: Modified to allow to configure location of pid file.
+ (closes: #337093)
+ You can change this location by PidFile directive at your cupsd.conf.
+
+ -- Kenshi Muto <kmuto at debian.org> Thu, 3 Nov 2005 11:39:07 +0000
+
cupsys (1.1.99.b1.r4748-2) experimental; urgency=medium
* EXPERIMENTAL
Modified: cupsys/branches/cups-1.2/debian/patches/47_pid.dpatch
==============================================================================
--- cupsys/branches/cups-1.2/debian/patches/47_pid.dpatch (original)
+++ cupsys/branches/cups-1.2/debian/patches/47_pid.dpatch Thu Nov 3 12:44:25 2005
@@ -5,9 +5,41 @@
## DP: No description.
@DPATCH@
+diff -urNad cupsys-1.1.99.b1.r4748~/scheduler/conf.c cupsys-1.1.99.b1.r4748/scheduler/conf.c
+--- cupsys-1.1.99.b1.r4748~/scheduler/conf.c 2005-11-03 11:41:59.474629247 +0000
++++ cupsys-1.1.99.b1.r4748/scheduler/conf.c 2005-11-03 12:27:49.102031706 +0000
+@@ -155,7 +155,8 @@
+ { "ServerRoot", &ServerRoot, CUPSD_VARTYPE_STRING },
+ { "StateDir", &StateDir, CUPSD_VARTYPE_STRING },
+ { "TempDir", &TempDir, CUPSD_VARTYPE_STRING },
+- { "Timeout", &Timeout, CUPSD_VARTYPE_INTEGER }
++ { "Timeout", &Timeout, CUPSD_VARTYPE_INTEGER },
++ { "PidFile", &PidFile, CUPSD_VARTYPE_STRING }
+ };
+ #define NUM_VARS (sizeof(variables) / sizeof(variables[0]))
+
+@@ -290,6 +291,7 @@
+ cupsdSetString(&RemoteRoot, "remroot");
+ cupsdSetString(&ServerHeader, "CUPS/1.1");
+ cupsdSetString(&StateDir, CUPS_STATEDIR);
++ cupsdSetString(&PidFile, "/var/run/cups/cupsd.pid");
+
+ strlcpy(temp, ConfigurationFile, sizeof(temp));
+ if ((slash = strrchr(temp, '/')) != NULL)
+diff -urNad cupsys-1.1.99.b1.r4748~/scheduler/conf.h cupsys-1.1.99.b1.r4748/scheduler/conf.h
+--- cupsys-1.1.99.b1.r4748~/scheduler/conf.h 2005-09-28 21:12:44.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/scheduler/conf.h 2005-11-03 12:17:17.895936632 +0000
+@@ -189,6 +189,7 @@
+ /* Array containing certificates */
+ # endif /* HAVE_LIBSSL || HAVE_GNUTLS */
+ #endif /* HAVE_SSL */
++VAR char *PidFile VALUE(NULL); /* Debian CUPS pid file */
+
+
+ /*
diff -urNad cupsys-1.1.99.b1.r4748~/scheduler/main.c cupsys-1.1.99.b1.r4748/scheduler/main.c
---- cupsys-1.1.99.b1.r4748~/scheduler/main.c 2005-10-05 12:59:54.000000000 +0000
-+++ cupsys-1.1.99.b1.r4748/scheduler/main.c 2005-10-05 13:01:48.059763190 +0000
+--- cupsys-1.1.99.b1.r4748~/scheduler/main.c 2005-11-03 11:41:30.000000000 +0000
++++ cupsys-1.1.99.b1.r4748/scheduler/main.c 2005-11-03 12:28:48.083074561 +0000
@@ -69,7 +69,8 @@
static void sigterm_handler(int sig);
static long select_timeout(int fds);
@@ -48,7 +80,7 @@
+ FILE *f;
+ int fd;
+ int pid;
-+ if (((fd = open("/var/run/cups/cupsd.pid", O_RDWR|O_CREAT, 0644)) == -1)
++ if (((fd = open(PidFile, O_RDWR|O_CREAT, 0644)) == -1)
+ || ((f = fdopen(fd, "r+")) == NULL) ) {
+ return 0;
+ }
@@ -64,7 +96,7 @@
+}
+
+int remove_pid() {
-+ return unlink("/var/run/cups/cupsd.pid");
++ return unlink(PidFile);
+}
+
More information about the Pkg-cups-devel
mailing list