Accepting request 102101 from home:computersalat:devel:sysmgmnt
folder changes, add cron file, some init script fixes OBS-URL: https://build.opensuse.org/request/show/102101 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=13
This commit is contained in:
parent
e675c4f5cb
commit
1619e36516
4
cf-execd
4
cf-execd
@ -70,13 +70,13 @@ test -x $CF_EXE_BIN || { echo "$CF_EXE_BIN not installed";
|
||||
#. $FOO_CONFIG
|
||||
|
||||
## Check for promises file
|
||||
CF_PROMISES=/var/lib/cfengine/inputs/promises.cf
|
||||
CF_PROMISES=@workdir@/inputs/promises.cf
|
||||
test -r $CF_PROMISES || { echo "$CF_PROMISES not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
## Check for failsafe file
|
||||
CF_FAILSAFE=/var/lib/cfengine/inputs/failsafe.cf
|
||||
CF_FAILSAFE=@workdir@/inputs/failsafe.cf
|
||||
test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
@ -71,13 +71,13 @@ test -x $CF_MON_BIN || { echo "$CF_MON_BIN not installed";
|
||||
#. $FOO_CONFIG
|
||||
|
||||
## Check for promises file
|
||||
CF_PROMISES=/var/lib/cfengine/inputs/promises.cf
|
||||
CF_PROMISES=@workdir@/inputs/promises.cf
|
||||
test -r $CF_PROMISES || { echo "$CF_PROMISES not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
## Check for failsafe file
|
||||
CF_FAILSAFE=/var/lib/cfengine/inputs/failsafe.cf
|
||||
CF_FAILSAFE=@workdir@/inputs/failsafe.cf
|
||||
test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
@ -70,13 +70,13 @@ test -x $CF_SRV_BIN || { echo "$CF_SRV_BIN not installed";
|
||||
#. $FOO_CONFIG
|
||||
|
||||
## Check for promises file
|
||||
CF_PROMISES=/var/lib/cfengine/inputs/promises.cf
|
||||
CF_PROMISES=@workdir@/inputs/promises.cf
|
||||
test -r $CF_PROMISES || { echo "$CF_PROMISES not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
## Check for failsafe file
|
||||
CF_FAILSAFE=/var/lib/cfengine/inputs/failsafe.cf
|
||||
CF_FAILSAFE=@workdir@/inputs/failsafe.cf
|
||||
test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 30 09:26:01 UTC 2012 - chris@computersalat.de
|
||||
|
||||
- fix cron file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 15:52:31 UTC 2012 - chris@computersalat.de
|
||||
|
||||
- change workdir to /var/lib/cfengine/work
|
||||
* adapt init scripts
|
||||
* add new dirs
|
||||
o /var/lib/cfengine/{backup,failsafe,config}
|
||||
- add cron file as Source10
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 24 14:27:49 UTC 2012 - chris@computersalat.de
|
||||
|
||||
|
5
cfengine.cron
Normal file
5
cfengine.cron
Normal file
@ -0,0 +1,5 @@
|
||||
# This cron will start cf-agent if not yet running
|
||||
# and it would repair via failsafe a broken cfengine config
|
||||
#
|
||||
|
||||
#15 */2 * * * root @workdir@/bin/cf-agent || @basedir@/failsafe/bin/cf-failsafe.sh
|
@ -19,7 +19,8 @@
|
||||
Name: cfengine
|
||||
%define libname libpromises
|
||||
%define libsoname %{libname}1
|
||||
%define workdir /var/lib/%{name}
|
||||
%define basedir /var/lib/%{name}
|
||||
%define workdir %{basedir}/work
|
||||
|
||||
Summary: A Tool to Maintain Complicated Networks
|
||||
License: GPL-3.0
|
||||
@ -32,6 +33,7 @@ Source1: http://www.cfengine.org/manuals/cf3-Reference.pdf
|
||||
Source2: cf-monitord
|
||||
Source3: cf-execd
|
||||
Source4: cf-serverd
|
||||
Source10: %{name}.cron
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: bison
|
||||
BuildRequires: db-devel
|
||||
@ -41,6 +43,7 @@ BuildRequires: mysql-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: postgresql-devel
|
||||
Requires: cron
|
||||
|
||||
%if 0%{?suse_version}
|
||||
PreReq: %install_info_prereq
|
||||
@ -133,22 +136,34 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
||||
%{__make} "DESTDIR=%{buildroot}" install
|
||||
%{__install} -d %{buildroot}/{usr/sbin,etc/init.d,%{workdir}/bin}
|
||||
|
||||
# create dirs needed for better organizing dirs and files
|
||||
%{__install} -d %{buildroot}/%{basedir}/{backup,failsafe,config}
|
||||
#%{__install} -d %{buildroot}/%{basedir}/config/{development,production}
|
||||
|
||||
# install missing AUTHORS LICENSE {S:1}
|
||||
%{__install} -m0644 AUTHORS LICENSE %{S:1} %{buildroot}/%{_docdir}/%{name}/
|
||||
|
||||
# install cron file
|
||||
%{__install} -D -m0644 %{S:10} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
||||
|
||||
# install init scripts
|
||||
%{__install} -m 0755 %{S:2} %{S:3} %{S:4} %{buildroot}/etc/init.d/
|
||||
%{__ln_s} -f ../../etc/init.d/cf-monitord %{buildroot}/%{_sbindir}/rccf-monitord
|
||||
%{__ln_s} -f ../../etc/init.d/cf-execd %{buildroot}/%{_sbindir}/rccf-execd
|
||||
%{__ln_s} -f ../../etc/init.d/cf-serverd %{buildroot}/%{_sbindir}/rccf-serverd
|
||||
# sed @workdir@ in initscripts/cron.d
|
||||
sed -i\
|
||||
-e "s,@workdir@,%{workdir},g"\
|
||||
-e "s,@basedir@,%{basedir},g" \
|
||||
%{buildroot}/etc/init.d/cf-* %{buildroot}/etc/cron.d/%{name}
|
||||
|
||||
# create symlinks for sbin_PROGRAMS
|
||||
for i in cf-agent cf-execd cf-key cf-know cf-monitord cf-promises cf-report cf-runagent cf-serverd; do
|
||||
%{__ln_s} -f ../../../..%{_sbindir}/${i} %{buildroot}%{workdir}/bin/${i}
|
||||
%{__ln_s} -f ../../../../..%{_sbindir}/${i} %{buildroot}%{workdir}/bin/${i}
|
||||
done
|
||||
|
||||
# mv all masterfiles/*.cf to masterfiles/*.cf.default
|
||||
pushd %{buildroot}%{workdir}/masterfiles
|
||||
pushd %{buildroot}%{basedir}/masterfiles
|
||||
for j in $(ls -1); do
|
||||
mv ${j} ${j}.default
|
||||
done
|
||||
@ -212,9 +227,15 @@ done
|
||||
%exclude /usr/sbin/cf-serverd
|
||||
%exclude /usr/sbin/rccf-serverd
|
||||
%{_mandir}/man?/*
|
||||
%dir %{workdir}
|
||||
%{workdir}/*
|
||||
%dir %{basedir}
|
||||
%{basedir}
|
||||
#%dir %{workdir}
|
||||
#%{workdir}/*
|
||||
%exclude %{basedir}/backup
|
||||
%exclude %{basedir}/config
|
||||
#%exclude %{basedir}/failsafe
|
||||
%exclude %{workdir}/bin/cf-serverd
|
||||
%config(noreplace) /etc/cron.d/%{name}
|
||||
%config %attr(0755,root,root) /etc/init.d/*
|
||||
%exclude /etc/init.d/cf-serverd
|
||||
|
||||
@ -234,6 +255,8 @@ done
|
||||
|
||||
%files server
|
||||
%defattr(-,root,root)
|
||||
%{basedir}/backup
|
||||
%{basedir}/config
|
||||
/usr/sbin/cf-serverd
|
||||
/usr/sbin/rccf-serverd
|
||||
%{workdir}/bin/cf-serverd
|
||||
|
Loading…
x
Reference in New Issue
Block a user