From 0a1576ccad0ab92c7a96e26a6eb1333f4c4138c1 Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Tue, 8 Sep 2015 18:20:53 +0800 Subject: [PATCH] Tweak the spec file of xCAT to add support for rsyslog configuration files and logrotate configuration file. --- makerpm | 1 + xCAT/xCAT.spec | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/makerpm b/makerpm index 14a4d7c02..76a800688 100755 --- a/makerpm +++ b/makerpm @@ -100,6 +100,7 @@ function makexcat { tar --exclude .svn -czf $RPMROOT/SOURCES/prescripts.tar.gz prescripts tar --exclude .svn -czf $RPMROOT/SOURCES/templates.tar.gz templates tar --exclude .svn -czf $RPMROOT/SOURCES/winpostscripts.tar.gz winpostscripts + tar --exclude .svn -czf $RPMROOT/SOURCES/etc.tar.gz etc cp xcat.conf $RPMROOT/SOURCES cp xcat.conf.apach24 $RPMROOT/SOURCES cp xCATMN $RPMROOT/SOURCES diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 54bea22d2..eda01d993 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -18,6 +18,7 @@ Source5: xCATMN %ifos linux Source4: prescripts.tar.gz Source6: winpostscripts.tar.gz +Source8: etc.tar.gz %endif Source7: xcat.conf.apach24 @@ -86,6 +87,7 @@ hardware management and software management. tar zxf %{SOURCE2} tar zxf %{SOURCE4} tar zxf %{SOURCE6} +tar zxf %{SOURCE8} %else rm -rf postscripts cp %{SOURCE2} /opt/freeware/src/packages/BUILD @@ -125,6 +127,8 @@ fi mkdir -p $RPM_BUILD_ROOT/etc/xcat/conf.orig mkdir -p $RPM_BUILD_ROOT/etc/apache2/conf.d mkdir -p $RPM_BUILD_ROOT/etc/httpd/conf.d +mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d +mkdir -p $RPM_BUILD_ROOT/etc/rsyslog.d mkdir -p $RPM_BUILD_ROOT/install/postscripts mkdir -p $RPM_BUILD_ROOT/install/prescripts mkdir -p $RPM_BUILD_ROOT/install/kdump @@ -140,6 +144,13 @@ tar -xf templates.tar rm templates.tar %endif +cd - +cd $RPM_BUILD_ROOT + +%ifos linux +tar zxf %{SOURCE8} +%endif + cd - cd $RPM_BUILD_ROOT/install @@ -190,6 +201,8 @@ then cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf fi +# Lets rsyslogd perform close all open files +kill -HUP $(/dev/null 2>&1 %endif # create dir for the current pid @@ -232,6 +245,9 @@ exit 0 /install/postscripts /install/prescripts %ifos linux +/etc/logrotate.d/xcat +/etc/rsyslog.d/xcat-cluster.conf +/etc/rsyslog.d/xcat-compute.conf /install/winpostscripts %endif %defattr(-,root,root)