[Fusionforge-commits] FusionForge branch 6.0 updated. f4c5a3bcbc22f786f78eb3895896d1147337e515

Sylvain Beucler beuc-inria at fusionforge.org
Thu May 7 11:36:42 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.0 has been updated
       via  f4c5a3bcbc22f786f78eb3895896d1147337e515 (commit)
       via  c48084e022c460d62e431dcaa21000c5699cfb73 (commit)
      from  e68925ee36d607256f261bf405fcd572d0518059 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f4c5a3bcbc22f786f78eb3895896d1147337e515
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Thu May 7 11:34:19 2015 +0200

    scmsvn: ditch obsolete log dir

diff --git a/src/plugins/scmsvn/GNUmakefile b/src/plugins/scmsvn/GNUmakefile
index 4abf273..905bfaa 100644
--- a/src/plugins/scmsvn/GNUmakefile
+++ b/src/plugins/scmsvn/GNUmakefile
@@ -5,4 +5,4 @@ all:
 
 install:
 	install -d -m 755 $(DESTDIR)$(data_path)/dumps/
-	install -d -m 755 $(DESTDIR)$(log_path)/svn/
+

commit c48084e022c460d62e431dcaa21000c5699cfb73
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Thu May 7 11:33:59 2015 +0200

    reactivity: log systasksd output

diff --git a/src/GNUmakefile b/src/GNUmakefile
index b2265e9..b830156 100644
--- a/src/GNUmakefile
+++ b/src/GNUmakefile
@@ -1,6 +1,6 @@
 # FusionForge build system
 #
-# Copyright (C) 2014  Inria (Sylvain Beucler)
+# Copyright (C) 2014, 2015  Inria (Sylvain Beucler)
 #
 # This file is part of FusionForge. FusionForge is free software;
 # you can redistribute it and/or modify it under the terms of the
@@ -79,6 +79,10 @@ install-common: install-config install-plugin-authbuiltin
 		> $(DESTDIR)$(sysconfdir)/init.d/fusionforge-systasksd
 	chmod 755 $(DESTDIR)$(sysconfdir)/init.d/fusionforge-systasksd
 	$(INSTALL) -d -m 00755 $(DESTDIR)$(log_path)/
+	if [ ! -e $(DESTDIR)$(sysconfdir)/logrotate.d/fusionforge-common ]; then \
+		sed 's, at log_path@,$(log_path),' etc/logrotate.d/fusionforge-common \
+			> $(DESTDIR)$(sysconfdir)/logrotate.d/fusionforge-common; \
+	fi
 
 install-db-local: install-db
 install-db: install-base-dirs
diff --git a/src/bin/systasksd b/src/bin/systasksd
index f293961..d3f8907 100755
--- a/src/bin/systasksd
+++ b/src/bin/systasksd
@@ -3,7 +3,7 @@
 /**
  * Small and fast system tasks trigger
  *
- * Copyright (C) 2014  Inria (Sylvain Beucler)
+ * Copyright (C) 2014, 2015  Inria (Sylvain Beucler)
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -86,6 +86,7 @@ if (isset($options['v']) or isset($options['verbose'])) {
 posix_setsid();
 chdir('/');
 umask(0);
+$log_path = forge_get_config('log_path');
 if (!$verbose) {
 	// Hack to reopen stdin/stdout/stderr, order is important
 	// https://andytson.com/blog/2010/05/daemonising-a-php-cli-script-on-a-posix-system/
@@ -94,8 +95,10 @@ if (!$verbose) {
 	fclose(STDOUT);
 	fclose(STDERR);
 	$ff_stdin = fopen('/dev/null', 'r');
-	$ff_stdout = fopen('/dev/null', 'w');
-	$ff_stderr = fopen('php://stdout', 'w');
+	//$ff_stdout = fopen('/dev/null', 'w');
+	//$ff_stderr = fopen('php://stdout', 'w');
+	$ff_stdout = fopen("$log_path/systasksd.stdout", 'w');
+	$ff_stderr = fopen("$log_path/systasksd.stderr", 'w');
 }
 // We could fork & continue in the background too, but then we'd have
 // to manage the PID file as well - best leave this to the init script
diff --git a/src/etc/logrotate.d/fusionforge-common b/src/etc/logrotate.d/fusionforge-common
new file mode 100644
index 0000000..8b74189
--- /dev/null
+++ b/src/etc/logrotate.d/fusionforge-common
@@ -0,0 +1,13 @@
+ at log_path@/systasksd.stdout @log_path@/systasksd.stderr {
+	daily
+	missingok
+	rotate 31
+	compress
+	delaycompress
+	notifempty
+	create 640 root adm
+	sharedscripts
+	postrotate
+		service fusionforge-systasksd restart > /dev/null
+	endscript
+}

-----------------------------------------------------------------------

Summary of changes:
 src/GNUmakefile                        |    6 +++++-
 src/bin/systasksd                      |    9 ++++++---
 src/etc/logrotate.d/fusionforge-common |   13 +++++++++++++
 src/plugins/scmsvn/GNUmakefile         |    2 +-
 4 files changed, 25 insertions(+), 5 deletions(-)
 create mode 100644 src/etc/logrotate.d/fusionforge-common


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list