[pkg-java] r12862 - in trunk/commons-daemon/debian: . patches

Damien Raude-Morvan drazzib at alioth.debian.org
Wed Aug 4 17:18:16 UTC 2010


Author: drazzib
Date: 2010-08-04 17:18:15 +0000 (Wed, 04 Aug 2010)
New Revision: 12862

Added:
   trunk/commons-daemon/debian/patches/hurd_support.diff
Modified:
   trunk/commons-daemon/debian/changelog
   trunk/commons-daemon/debian/control
   trunk/commons-daemon/debian/patches/series
   trunk/commons-daemon/debian/patches/syslog.diff
Log:
* New upstream release.
* d/pacthes/syslog.diff: Updated to keep timestamp when SYSLOG support
  is not enabled.
* d/patches/hurd_support.diff: tentative support for GNU/Hurd OS.
* d/control: B-D on libcap-dev for all Linux OS.

Modified: trunk/commons-daemon/debian/changelog
===================================================================
--- trunk/commons-daemon/debian/changelog	2010-08-04 13:53:09 UTC (rev 12861)
+++ trunk/commons-daemon/debian/changelog	2010-08-04 17:18:15 UTC (rev 12862)
@@ -1,10 +1,14 @@
 commons-daemon (1.0.3-1) UNRELEASED; urgency=low
 
-  * New upstream release (UNRELEASED).
+  * New upstream release.
     - debian/patches/old_capabilities.diff: merged upstream.
     - no more prebuilt ELF objects in source tarball.
+  * d/pacthes/syslog.diff: Updated to keep timestamp when SYSLOG support
+    is not enabled.
+  * d/patches/hurd_support.diff: tentative support for GNU/Hurd OS.
+  * d/control: B-D on libcap-dev for all Linux OS.
 
- -- Damien Raude-Morvan <drazzib at debian.org>  Sat, 31 Jul 2010 19:24:37 +0200
+ -- Damien Raude-Morvan <drazzib at debian.org>  Wed, 04 Aug 2010 19:17:48 +0200
 
 commons-daemon (1.0.2-2) unstable; urgency=low
 

Modified: trunk/commons-daemon/debian/control
===================================================================
--- trunk/commons-daemon/debian/control	2010-08-04 13:53:09 UTC (rev 12861)
+++ trunk/commons-daemon/debian/control	2010-08-04 17:18:15 UTC (rev 12862)
@@ -4,7 +4,8 @@
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Michael Koch <konqueror at gmx.de>, Marcus Better <marcus at better.se>,
  Damien Raude-Morvan <drazzib at debian.org>
-Build-Depends: debhelper (>= 7.0.50~), autoconf, autotools-dev, default-jdk, xsltproc, docbook-xsl, ant
+Build-Depends: debhelper (>= 7.0.50~), autoconf, autotools-dev, default-jdk,
+ xsltproc, docbook-xsl, ant, libcap-dev [linux-any]
 Build-Conflicts: autoconf2.13
 Standards-Version: 3.9.1
 Homepage: http://commons.apache.org/daemon/

Added: trunk/commons-daemon/debian/patches/hurd_support.diff
===================================================================
--- trunk/commons-daemon/debian/patches/hurd_support.diff	                        (rev 0)
+++ trunk/commons-daemon/debian/patches/hurd_support.diff	2010-08-04 17:18:15 UTC (rev 12862)
@@ -0,0 +1,17 @@
+Description: Add support for Hurd OS
+Last-Update: 2010-08-03
+
+--- a/src/native/unix/support/apsupport.m4
++++ b/src/native/unix/support/apsupport.m4
+@@ -74,6 +74,11 @@
+     supported_os="kfreebsd-gnu"
+     LIBS="$LIBS -ldl -lpthread"
+     ;;
++  hurd*)
++    CFLAGS="$CFLAGS -pthread"
++    supported_os="hurd-gnu"
++    LIBS="$LIBS -ldl -lpthread"
++    ;;
+   *)
+     AC_MSG_RESULT([failed])
+     AC_MSG_ERROR([Unsupported operating system "$host_os"])

Modified: trunk/commons-daemon/debian/patches/series
===================================================================
--- trunk/commons-daemon/debian/patches/series	2010-08-04 13:53:09 UTC (rev 12861)
+++ trunk/commons-daemon/debian/patches/series	2010-08-04 17:18:15 UTC (rev 12862)
@@ -4,4 +4,5 @@
 powerpcspe_support.diff
 hppa_support.diff
 arm_support.diff
+hurd_support.diff
 syslog.diff

Modified: trunk/commons-daemon/debian/patches/syslog.diff
===================================================================
--- trunk/commons-daemon/debian/patches/syslog.diff	2010-08-04 13:53:09 UTC (rev 12861)
+++ trunk/commons-daemon/debian/patches/syslog.diff	2010-08-04 17:18:15 UTC (rev 12862)
@@ -9,48 +9,39 @@
 Forwared: yes, https://issues.apache.org/jira/browse/DAEMON-80
 --- a/src/native/unix/native/debug.c
 +++ b/src/native/unix/native/debug.c
-@@ -15,10 +15,8 @@
-  */
- 
- /* @version $Id: debug.c 921765 2010-03-11 10:03:32Z mturk $ */
-+#include <stdio.h>
- #include "jsvc.h"
--#include <sys/types.h>
--#include <unistd.h>
--#include <time.h>
- 
+@@ -23,6 +23,12 @@
  /* Wether debug is enabled or not */
  bool log_debug_flag = false;
-@@ -30,21 +28,11 @@
- void log_debug(const char *fmt, ...)
- {
-     va_list ap;
--    time_t now;
--    struct tm *nowtm;
--    char buff[80];
  
-     if (log_debug_flag == false)
++/* Wether SYSLOG logging (for stderr) is enable or not. */
++bool log_stderr_syslog_flag;
++
++/* Wether SYSLOG logging (for stdout) is enable or not. */
++bool log_stdout_syslog_flag;
++
+ /* The name of the jsvc binary. */
+ char *log_prog = "jsvc";
+ 
+@@ -39,12 +45,13 @@
+     if (fmt == NULL)
          return;
--    if (fmt == NULL)
--        return;
--
+ 
 -    now   = time(NULL);
 -    nowtm = localtime(&now);
 -    strftime(buff, sizeof(buff), "%d/%m/%Y %T", nowtm);
- 
+-
      va_start(ap, fmt);
 -    fprintf(stderr, "%s %d %s debug: ", buff, getpid(), log_prog);
++    if (log_stderr_syslog_flag != false) {
++        now   = time(NULL);
++        nowtm = localtime(&now);
++        strftime(buff, sizeof(buff), "%d/%m/%Y %T", nowtm);
++        fprintf(stderr, "%s %d %s debug: ", buff, getpid(), log_prog);
++    }
      vfprintf(stderr, fmt, ap);
      fprintf(stderr, "\n");
      fflush(stderr);
-@@ -55,19 +43,11 @@
- void log_error(const char *fmt, ...)
- {
-     va_list ap;
--    time_t now;
--    struct tm *nowtm;
--    char buff[80];
- 
+@@ -62,12 +69,13 @@
      if (fmt == NULL)
          return;
  
@@ -60,6 +51,12 @@
 -
      va_start(ap, fmt);
 -    fprintf(stderr, "%s %d %s error: ", buff, getpid(), log_prog);
++    if (log_stderr_syslog_flag != false) {
++        now   = time(NULL);
++        nowtm = localtime(&now);
++        strftime(buff, sizeof(buff), "%d/%m/%Y %T", nowtm);
++        fprintf(stderr, "%s %d %s error: ", buff, getpid(), log_prog);
++    }
      vfprintf(stderr, fmt, ap);
      fprintf(stderr, "\n");
      fflush(stderr);
@@ -159,7 +156,7 @@
      if (redirectstdin == true) {
          freopen("/dev/null", "r", stdin);
      }
-@@ -760,11 +819,29 @@
+@@ -760,11 +819,31 @@
      if (strcmp(outfile, "&2") == 0 && strcmp(errfile, "&1") == 0) {
          outfile = "/dev/null";
      }
@@ -172,6 +169,7 @@
 +                      strerror(errno));
 +        } else {
 +            fork_needed = 1;
++            log_stdout_syslog_flag = true;
 +        }
 +    } else if (strcmp(outfile, "&2") != 0) {
          loc_freopen(outfile, "a", stdout);
@@ -186,12 +184,13 @@
 +                      strerror(errno));
 +        } else {
 +            fork_needed = 1;
++            log_stderr_syslog_flag = true;
 +        }
 +    } else if (strcmp(errfile, "&1") != 0) {
          loc_freopen(errfile, "a", stderr);
      }
      else {
-@@ -775,17 +852,43 @@
+@@ -775,17 +854,43 @@
          close(1);
          dup(2);
      }
@@ -237,18 +236,9 @@
  
      /* Parse command line arguments */
      args = arguments(argc, argv);
-@@ -811,7 +914,7 @@
-         return 0;
+@@ -890,11 +995,27 @@
      }
  
--#ifdef OS_LINUX
-+#if OS_LINUX
-     /* On some UNIX operating systems, we need to REPLACE this current
-        process image with another one (thru execve) to allow the correct
-        loading of VMs (notably this is for Linux). Set, replace, and go. */
-@@ -890,11 +993,27 @@
-     }
- 
      envmask = umask(0077);
 -    set_output(args->outfile, args->errfile, args->redirectstdin);
 +    set_output(args->outfile, args->errfile, args->redirectstdin, args->procname);
@@ -275,7 +265,7 @@
          /* We forked (again), if this is the child, we go on normally */
          if (pid == 0)
              exit(child(args, data, uid, gid));
-@@ -975,4 +1094,3 @@
+@@ -975,4 +1096,3 @@
      log_debug("Killing self with TERM signal");
      kill(controlled, SIGTERM);
  }
@@ -306,3 +296,18 @@
          </listitem>
        </varlistentry>
        <varlistentry>
+--- a/src/native/unix/native/debug.h
++++ b/src/native/unix/native/debug.h
+@@ -26,6 +26,12 @@
+  */
+ extern bool log_debug_flag;
+ 
++/* Wether SYSLOG logging (for stderr) is enable or not. */
++extern bool log_stderr_syslog_flag;
++
++/* Wether SYSLOG logging (for stdout) is enable or not. */
++extern bool log_stdout_syslog_flag;
++
+ /**
+  * The name of the jsvc binary.
+  */




More information about the pkg-java-commits mailing list