Update to 1.1.0 release.

This commit is contained in:
Alex Dupre 2017-11-23 13:14:48 +00:00
parent 3c88dff788
commit 477cad181e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=454758
5 changed files with 40 additions and 33 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= commons-daemon PORTNAME= commons-daemon
PORTVERSION= 1.0.15 PORTVERSION= 1.1.0
CATEGORIES= devel java CATEGORIES= devel java
MASTER_SITES= APACHE_COMMONS_SOURCE:src \ MASTER_SITES= APACHE_COMMONS_SOURCE:src \
APACHE_COMMONS_BINARIES:bin APACHE_COMMONS_BINARIES:bin
@ -13,10 +13,10 @@ DISTFILES= ${PORTNAME}-${PORTVERSION}-native-src${EXTRACT_SUFX}:src \
MAINTAINER= ale@FreeBSD.org MAINTAINER= ale@FreeBSD.org
COMMENT= Wrapper code to start/stop a Java application as a daemon COMMENT= Wrapper code to start/stop a Java application as a daemon
BROKEN_armv6= fails to compile: 'jni_md.h' file not found
LICENSE= APACHE20 LICENSE= APACHE20
BROKEN_armv6= fails to compile: 'jni_md.h' file not found
OPTIONS_DEFINE= DOCS OPTIONS_DEFINE= DOCS
USE_JAVA= yes USE_JAVA= yes

View file

@ -1,4 +1,5 @@
SHA256 (commons-daemon-1.0.15-native-src.tar.gz) = e98d96c7c71e02d1a05ce1c417eedb588678ccecc55ba2e9ae2969e4ea910a90 TIMESTAMP = 1511441946
SIZE (commons-daemon-1.0.15-native-src.tar.gz) = 204944 SHA256 (commons-daemon-1.1.0-native-src.tar.gz) = 11962bc602619fd2eeb840f74a8c63cc1055221f0cc385a1fa906e758d39888d
SHA256 (commons-daemon-1.0.15-bin.tar.gz) = 0dab09bd0d2028000367a6d5c1592b92c71b561a3f98838f6162ae1623e139d8 SIZE (commons-daemon-1.1.0-native-src.tar.gz) = 207125
SIZE (commons-daemon-1.0.15-bin.tar.gz) = 232233 SHA256 (commons-daemon-1.1.0-bin.tar.gz) = 0e2c282da674cc5d351b4d7884997eb63472f03f37bf54b210cdef62d07120d7
SIZE (commons-daemon-1.1.0-bin.tar.gz) = 199681

View file

@ -1,6 +1,6 @@
--- man/jsvc.1.xml.orig 2012-06-13 12:42:23.000000000 +0200 --- man/jsvc.1.xml.orig 2017-11-15 11:59:37 UTC
+++ man/jsvc.1.xml 2012-06-13 12:43:29.000000000 +0200 +++ man/jsvc.1.xml
@@ -142,7 +142,6 @@ @@ -143,7 +143,6 @@
<term><option>-wait</option> waittime</term> <term><option>-wait</option> waittime</term>
<listitem> <listitem>
<para>wait up to waittime seconds for the service to start <para>wait up to waittime seconds for the service to start

View file

@ -1,15 +1,15 @@
--- native/arguments.c.orig 2012-02-24 00:24:02.000000000 +0100 --- native/arguments.c.orig 2017-11-02 13:10:04 UTC
+++ native/arguments.c 2012-06-13 13:15:57.000000000 +0200 +++ native/arguments.c
@@ -158,7 +158,7 @@ @@ -157,7 +157,7 @@ static arg_data *parse(int argc, char *a
args->help = false; /* Don't display help */ args->help = false; /* Don't display help */
args->chck = false; /* Don't do a check-only startup */ args->chck = false; /* Don't do a check-only startup */
args->stop = false; /* Stop a running jsvc */ args->stop = false; /* Stop a running jsvc */
- args->wait = 0; /* Wait until jsvc has started the JVM */ - args->wait = 0; /* Wait until jsvc has started the JVM */
+ args->wait = 10; /* Wait until jsvc has started the JVM */ + args->wait = 10; /* Wait until jsvc has started the JVM */
args->restarts = -1; /* Infinite restarts by default */
args->install = false; /* Don't install as a service */ args->install = false; /* Don't install as a service */
args->remove = false; /* Don't remove the installed service */ args->remove = false; /* Don't remove the installed service */
args->service = false; /* Don't run as a service */ @@ -270,10 +270,6 @@ static arg_data *parse(int argc, char *a
@@ -262,10 +262,6 @@
temp = optional(argc, argv, x++); temp = optional(argc, argv, x++);
if (temp) if (temp)
args->wait = atoi(temp); args->wait = atoi(temp);
@ -18,5 +18,5 @@
- return NULL; - return NULL;
- } - }
} }
else if (!strcmp(argv[x], "-umask")) { else if (!strcmp(argv[x], "-restarts")) {
temp = optional(argc, argv, x++); temp = optional(argc, argv, x++);

View file

@ -1,6 +1,6 @@
--- native/jsvc-unix.c.orig 2012-02-24 00:24:02.000000000 +0100 --- native/jsvc-unix.c.orig 2017-11-15 11:51:22 UTC
+++ native/jsvc-unix.c 2012-06-13 12:40:54.000000000 +0200 +++ native/jsvc-unix.c
@@ -621,18 +621,13 @@ @@ -717,18 +717,13 @@ static void remove_tmp_file(arg_data *ar
*/ */
static int wait_child(arg_data *args, int pid) static int wait_child(arg_data *args, int pid)
{ {
@ -21,7 +21,7 @@
while (count > 0) { while (count > 0) {
sleep(1); sleep(1);
/* check if the controler is still running */ /* check if the controler is still running */
@@ -671,7 +666,6 @@ @@ -767,7 +762,6 @@ static int wait_child(arg_data *args, in
} }
} }
} }
@ -29,7 +29,7 @@
count--; count--;
} }
/* It takes more than the wait time to start, /* It takes more than the wait time to start,
@@ -801,11 +795,11 @@ @@ -901,11 +895,11 @@ static int child(arg_data *args, home_da
create_tmp_file(args); create_tmp_file(args);
while (!stopping) { while (!stopping) {
#if defined(OSD_POSIX) #if defined(OSD_POSIX)
@ -43,7 +43,7 @@
#endif #endif
if(doreopen) { if(doreopen) {
doreopen = false; doreopen = false;
@@ -824,7 +818,7 @@ @@ -924,7 +918,7 @@ static int child(arg_data *args, home_da
return 6; return 6;
if (doreload == true) if (doreload == true)
@ -52,19 +52,25 @@
else else
ret = 0; ret = 0;
@@ -1212,12 +1206,12 @@ @@ -1341,10 +1335,10 @@ static int run_controller(arg_data *args
if (args->vers != true && args->chck != true && status != 122) if (args->vers != true && args->chck != true && status != 122)
unlink(args->pidf); remove_pid_file(args, pid);
- /* If the child got out with 123 he wants to be restarted */ - /* If the child got out with 123 he wants to be restarted */
+ /* If the child got out with 123 or 124 he wants to be restarted */ + /* If the child got out with 123 or 124 he wants to be restarted */
/* See java_abort123 (we use this return code to restart when the JVM aborts) */ /* See java_abort123 (we use this return code to restart when the JVM aborts) */
- if (status == 123) { if (!stopping) {
+ if (status == 123 || status == 124) { - if (status == 123) {
log_debug("Reloading service"); + if (status == 123 || status == 124) {
/* prevent looping */ if (args->restarts == 0) {
- if (laststart + 60 > time(NULL)) { log_debug("Service failure, restarts disabled");
+ if (status == 123 && laststart + 60 > time(NULL)) { return 1;
log_debug("Waiting 60 s to prevent looping"); @@ -1356,7 +1350,7 @@ static int run_controller(arg_data *args
sleep(60); log_debug("Reloading service");
} restarts++;
/* prevent looping */
- if (laststart + 60 > time(NULL)) {
+ if (status == 123 && laststart + 60 > time(NULL)) {
log_debug("Waiting 60 s to prevent looping");
sleep(60);
}