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 "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=98c12372432e994a5c8310d16a6dbb9f9295043b

The branch, master has been updated
       via  98c12372432e994a5c8310d16a6dbb9f9295043b (commit)
      from  bcf64592c09e6dae7ed0a8d4310c4d267a20fce8 (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 98c12372432e994a5c8310d16a6dbb9f9295043b
Author: Fabio M. Di Nitto <[EMAIL PROTECTED]>
Date:   Fri Jul 11 08:58:17 2008 +0200

    [MISC] Create and install logrotate file
    
    With daemons writing their own log files, we want to rotate them
    properly.
    
    Add logrotate snippet in doc/ for who wants to do it manually
    
    Install it in logrotate dir (you will need to rerun configure for this
    to be set properly)
    
    Adapt build system to propagate info around
    
    Signed-off-by: Fabio M. Di Nitto <[EMAIL PROTECTED]>

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

Summary of changes:
 configure                |    7 +++++++
 doc/Makefile             |   11 ++++++++++-
 doc/cluster.logrotate.in |    8 ++++++++
 make/defines.mk.input    |    3 +++
 make/install.mk          |    4 ++++
 make/uninstall.mk        |    3 +++
 6 files changed, 35 insertions(+), 1 deletions(-)
 create mode 100644 doc/cluster.logrotate.in

diff --git a/configure b/configure
index dd77fa8..707b9b9 100755
--- a/configure
+++ b/configure
@@ -73,6 +73,7 @@ my %options = (
        sharedir => \$sharedir,
        docdir => \$docdir,
        logdir => \$logdir,
+       logrotatedir => \$logrotatedir,
        syslogfacility => \$syslogfacility,
        sysloglevel => \$sysloglevel,
        mibdir => \$mibdir,
@@ -155,6 +156,7 @@ my $err = &GetOptions (\%options,
                    'sharedir=s',
                    'docdir=s',
                    'logdir=s',
+                   'logrotatedir=s',
                    'syslogfacility=s',
                    'sysloglevel=s',
                    'mibdir=s',
@@ -201,6 +203,7 @@ if ($help || !$err) {
   print "--sharedir=\tthe base directory for misc cluster files.  (Default: 
{prefix}/share/cluster)\n";
   print "--docdir=\tthe base directory for misc cluster documentation files.  
(Default: {prefix}/share/doc/cluster)\n";
   print "--logdir=\tthe base directory for cluster logging files.  (Default: 
/var/log/cluster/)\n";
+  print "--logrotatedir=\tthe base directory for logrorate.d files.  (Default: 
/etc/logrotate.d/)\n";
   print "--syslogfacility=\tset the default syslog facility.  (Default: 
LOG_LOCAL4)\n";
   print "--sysloglevel=\tset the default syslog level.  (Default: 
LOG_LEVEL_INFO)\n";
   print "--mibdir=\tthe base directory for snmp mibs.  (Default: 
{prefix}/share/snmp/mibs)\n";
@@ -535,6 +538,9 @@ if (!$docdir) {
 if (!$logdir) {
   $logdir="/var/log/cluster";
 }
+if (!$logrotatedir) {
+  $logrotatedir="/etc/logrotate.d";
+}
 if (!$syslogfacility) {
   $syslogfacility="LOG_LOCAL4";
 }
@@ -699,6 +705,7 @@ while (<IFILE>) {
   $_ =~ s/[EMAIL PROTECTED]@/$sharedir/;
   $_ =~ s/[EMAIL PROTECTED]@/$docdir/;
   $_ =~ s/[EMAIL PROTECTED]@/$logdir/;
+  $_ =~ s/[EMAIL PROTECTED]@/$logrotatedir/;
   $_ =~ s/[EMAIL PROTECTED]@/$syslogfacility/;
   $_ =~ s/[EMAIL PROTECTED]@/$sysloglevel/;
   $_ =~ s/[EMAIL PROTECTED]@/$mibdir/;
diff --git a/doc/Makefile b/doc/Makefile
index db61e0b..0ac2075 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -7,11 +7,20 @@ DOCS =        gfs2.txt \
        COPYRIGHT \
        README.licence
 
-all:
+TARGET= cluster.logrotate
+
+LOGRORATED = $(TARGET)
+
+all: $(TARGET)
 
 include ../make/defines.mk
 include $(OBJDIR)/make/install.mk
 include $(OBJDIR)/make/uninstall.mk
 include $(OBJDIR)/make/clean.mk
 
+$(TARGET):
+       cat $(S)/$(TARGET).in | sed \
+               -e '[EMAIL PROTECTED]@#${LOGDIR}#g' \
+       > $(TARGET)
+
 clean: generalclean
diff --git a/doc/cluster.logrotate.in b/doc/cluster.logrotate.in
new file mode 100644
index 0000000..df7d94c
--- /dev/null
+++ b/doc/cluster.logrotate.in
@@ -0,0 +1,8 @@
[EMAIL PROTECTED]@/*log {
+       missingok
+       compress
+       notifempty
+       daily
+       rotate 7
+       create 0600 root root
+}
diff --git a/make/defines.mk.input b/make/defines.mk.input
index 4cb348e..c465e74 100644
--- a/make/defines.mk.input
+++ b/make/defines.mk.input
@@ -6,6 +6,7 @@ libexecdir ?= [EMAIL PROTECTED]@
 sharedir ?= [EMAIL PROTECTED]@
 docdir ?= [EMAIL PROTECTED]@
 logdir ?= [EMAIL PROTECTED]@
+logrotatedir ?= [EMAIL PROTECTED]@
 mandir ?= [EMAIL PROTECTED]@
 module_dir ?= @MODULE_DIR@
 incdir ?= [EMAIL PROTECTED]@
@@ -86,5 +87,7 @@ S=$(SRCDIR)/$(THISDIR)
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 
[EMAIL PROTECTED]@
+
 UNINSTALL = perl @SRCDIR@/scripts/uninstall.pl
 FENCEPARSE = bash @SRCDIR@/scripts/fenceparse
diff --git a/make/install.mk b/make/install.mk
index 964b72b..2140fe3 100644
--- a/make/install.mk
+++ b/make/install.mk
@@ -59,3 +59,7 @@ ifdef DOCS
        install -d ${docdir}
        install -m644 $(S)/${DOCS} ${docdir}
 endif
+ifdef LOGRORATED
+       install -d ${logrotatedir}
+       install -m644 ${LOGRORATED} ${logrotatedir}
+endif
diff --git a/make/uninstall.mk b/make/uninstall.mk
index b54ac85..fedde57 100644
--- a/make/uninstall.mk
+++ b/make/uninstall.mk
@@ -38,3 +38,6 @@ endif
 ifdef DOCS
        ${UNINSTALL} ${DOCS} ${docdir}
 endif
+ifdef LOGRORATED
+       ${UNINSTALL} ${LOGRORATED} ${logrotatedir}
+endif


hooks/post-receive
--
Cluster Project

Reply via email to