From 72c1d757e290e1d3a43025c39181585505cd5b1ef842e49acba5b95d313df9a4 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Tue, 15 Nov 2011 15:28:15 +0000 Subject: [PATCH 1/7] Accepting request 91611 from home:computersalat:devel:sysmgmnt update to 3.2.3 OBS-URL: https://build.opensuse.org/request/show/91611 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=11 --- cfengine-3.2.1.tar.gz | 3 --- cfengine-3.2.3.tar.gz | 3 +++ cfengine.changes | 11 +++++++++++ cfengine.spec | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) delete mode 100644 cfengine-3.2.1.tar.gz create mode 100644 cfengine-3.2.3.tar.gz diff --git a/cfengine-3.2.1.tar.gz b/cfengine-3.2.1.tar.gz deleted file mode 100644 index d215f35..0000000 --- a/cfengine-3.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88110d9be61240f4b2bd7976258538d650044b04e07821fbb9ad4f43587ab196 -size 1101587 diff --git a/cfengine-3.2.3.tar.gz b/cfengine-3.2.3.tar.gz new file mode 100644 index 0000000..4e45dc8 --- /dev/null +++ b/cfengine-3.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20748f2d10ec4e3623138c2ae1cf7d78d147b8c5c15be42965c3155d0762792d +size 1128462 diff --git a/cfengine.changes b/cfengine.changes index 2ca0225..c2ec9f4 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Nov 15 15:02:19 UTC 2011 - chris@computersalat.de + +- update to 3.2.3 + * A few tiny memory leaks fixed + * Improved performance of cf-serverd under heavy load with + TokyoCabinet database + * Full list of issues fixed is available on + https://cfengine.com/bugtracker/changelog_page.php +- fix License: GPLv2+ -> GPLv3 + ------------------------------------------------------------------- Tue Oct 11 09:24:22 UTC 2011 - chris@computersalat.de diff --git a/cfengine.spec b/cfengine.spec index 59a5eec..8987e8f 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -22,9 +22,9 @@ Name: cfengine %define libsoname %{libname}1 Summary: A Tool to Maintain Complicated Networks -Version: 3.2.1 +Version: 3.2.3 Release: 1 -License: GPLv2+ +License: GPLv3 Group: Productivity/Networking/System Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz From e675c4f5cb0d8563c9eb8b862c984fbde605ae555e58bd3d9c622573f8e83b8c Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Tue, 24 Jan 2012 14:32:07 +0000 Subject: [PATCH 2/7] Accepting request 101360 from home:computersalat:devel:sysmgmnt fix init scripts, subpkg server OBS-URL: https://build.opensuse.org/request/show/101360 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=12 --- cf-execd | 12 ++++++++ cf-monitord | 12 ++++++++ cf-serverd | 12 ++++++++ cfengine.changes | 12 ++++++++ cfengine.spec | 75 ++++++++++++++++++++++++++++++++++++++---------- 5 files changed, 108 insertions(+), 15 deletions(-) diff --git a/cf-execd b/cf-execd index 20b6f7f..e9ea7e7 100644 --- a/cf-execd +++ b/cf-execd @@ -69,6 +69,18 @@ test -x $CF_EXE_BIN || { echo "$CF_EXE_BIN not installed"; ## Read config #. $FOO_CONFIG +## Check for promises file +CF_PROMISES=/var/lib/cfengine/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 +test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + # some VARS CF_PIDFILE="/var/run/cf-execd.pid" SVC_NAME="cfengine's execution agent" diff --git a/cf-monitord b/cf-monitord index c3c1da8..de3a64b 100644 --- a/cf-monitord +++ b/cf-monitord @@ -70,6 +70,18 @@ test -x $CF_MON_BIN || { echo "$CF_MON_BIN not installed"; ## Read config #. $FOO_CONFIG +## Check for promises file +CF_PROMISES=/var/lib/cfengine/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 +test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + # some VARS CF_PIDFILE="/var/run/cf-monitord.pid" SVC_NAME="cfengine's monitoring agent" diff --git a/cf-serverd b/cf-serverd index c5a27c4..177fd72 100644 --- a/cf-serverd +++ b/cf-serverd @@ -69,6 +69,18 @@ test -x $CF_SRV_BIN || { echo "$CF_SRV_BIN not installed"; ## Read config #. $FOO_CONFIG +## Check for promises file +CF_PROMISES=/var/lib/cfengine/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 +test -r $CF_FAILSAFE || { echo "$CF_FAILSAFE not existing"; + if [ "$1" = "stop" ]; then exit 0; + else exit 6; fi; } + # some VARS CF_PIDFILE="/var/run/cf-serverd.pid" SVC_NAME="cfengine's server agent" diff --git a/cfengine.changes b/cfengine.changes index c2ec9f4..28e93c6 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jan 24 14:27:49 UTC 2012 - chris@computersalat.de + +- move "server" stuff to subpkg + +------------------------------------------------------------------- +Fri Jan 13 13:34:32 UTC 2012 - chris@computersalat.de + +- fix init scripts + * check for existing "promises.cf, failsafe.cf" +- create symlinks for sbin_PROGRAMS + ------------------------------------------------------------------- Tue Nov 15 15:02:19 UTC 2011 - chris@computersalat.de diff --git a/cfengine.spec b/cfengine.spec index 8987e8f..2362acc 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -1,7 +1,7 @@ # # spec file for package cfengine # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,16 @@ # - Name: cfengine %define libname libpromises %define libsoname %{libname}1 +%define workdir /var/lib/%{name} Summary: A Tool to Maintain Complicated Networks -Version: 3.2.3 -Release: 1 -License: GPLv3 +License: GPL-3.0 Group: Productivity/Networking/System +Version: 3.2.3 +Release: 0 Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz Source1: http://www.cfengine.org/manuals/cf3-Reference.pdf @@ -77,12 +77,22 @@ Summary: A Tool to Maintain Complicated Networks (docs) Group: Productivity/Networking/System %if 0%{?rhel_version} || 0%{?centos_version} BuildRequires: texinfo -BuildRequires: tetex tetex-dvips tetex-latex +BuildRequires: tetex +BuildRequires: tetex-dvips +BuildRequires: tetex-latex %endif %description doc Full documentation for cfengine +%package server +Summary: Files needed for cfengine server +Group: Productivity/Networking/System +Requires: %{name} = %{version}-%{release} + +%description server +This package contains the files of the cfengine server. + %prep %setup -q @@ -92,6 +102,15 @@ Full documentation for cfengine ### http://www.fsf.org/about/contact/ find ./examples -type f -name "*.cf" -exec perl -p -i -e 's|\r\n|\n|,s|^# Foundation.*|# Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA|' {} \; +### FIXME +# there are 3 different cfengine_stdlib.cf +## as of 3.2.3 +# ./examples/cfengine_stdlib.cf - Rev: 95 +# ./examples/example_config/cfengine_stdlib.cf - Rev: 61 +# ./masterfiles/cfengine_stdlib.cf - Rev: 84 +%{__cp} -a ./examples/cfengine_stdlib.cf ./examples/example_config/ +%{__cp} -a ./examples/cfengine_stdlib.cf ./masterfiles/ + %build %if 0%{?suse_version} %{suse_update_config -f} @@ -99,9 +118,10 @@ find ./examples -type f -name "*.cf" -exec perl -p -i -e 's|\r\n|\n|,s|^# Founda #autoreconf -fi CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ %configure \ - --disable-static \ - --docdir=%{_docdir}/%{name} \ - --with-workdir=/var/lib/%{name} + --disable-static \ + --datadir=/var/lib \ + --docdir=%{_docdir}/%{name} \ + --with-workdir=%{workdir} %{__make} %{?_smp_mflags} # --datadir=/var/lib/%{name}/inputs \ @@ -111,7 +131,7 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ [ -d %{buildroot} ] && [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %endif %{__make} "DESTDIR=%{buildroot}" install -%{__install} -d %{buildroot}/{usr/sbin,etc/init.d,/var/lib/%{name}/bin} +%{__install} -d %{buildroot}/{usr/sbin,etc/init.d,%{workdir}/bin} # install missing AUTHORS LICENSE {S:1} %{__install} -m0644 AUTHORS LICENSE %{S:1} %{buildroot}/%{_docdir}/%{name}/ @@ -121,7 +141,17 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ %{__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 -%{__ln_s} -f ../../../..%{_sbindir}/cf-promises %{buildroot}/var/lib/%{name}/bin/cf-promises + +# 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} +done + +# mv all masterfiles/*.cf to masterfiles/*.cf.default +pushd %{buildroot}%{workdir}/masterfiles +for j in $(ls -1); do + mv ${j} ${j}.default +done ## FIXME: what is the purpose of theses libs ? ## are they really needed ? @@ -130,7 +160,6 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ %preun %stop_on_removal cf-monitord -%stop_on_removal cf-serverd %stop_on_removal cf-execd %post @@ -161,6 +190,12 @@ for i in execd monitord serverd; do %restart_on_update cf-${i} done +%preun server +%stop_on_removal cf-serverd + +%postun server +%restart_on_update cf-serverd + %post -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig @@ -174,11 +209,14 @@ done %exclude %{_docdir}/%{name}/example_config %exclude %{_docdir}/%{name}/examples /usr/sbin/* -%{_datadir}/%{name} +%exclude /usr/sbin/cf-serverd +%exclude /usr/sbin/rccf-serverd %{_mandir}/man?/* -%dir /var/lib/%{name} -/var/lib/%{name}/* +%dir %{workdir} +%{workdir}/* +%exclude %{workdir}/bin/cf-serverd %config %attr(0755,root,root) /etc/init.d/* +%exclude /etc/init.d/cf-serverd %files -n %{libsoname} %defattr(-,root,root) @@ -194,4 +232,11 @@ done %{_docdir}/%{name} %exclude %{_docdir}/%{name}/LICENSE +%files server +%defattr(-,root,root) +/usr/sbin/cf-serverd +/usr/sbin/rccf-serverd +%{workdir}/bin/cf-serverd +/etc/init.d/cf-serverd + %changelog From 1619e36516c58d5affd1b2103c1e628b39a75a18ed578ba2401f09d41895e125 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Mon, 30 Jan 2012 19:10:38 +0000 Subject: [PATCH 3/7] 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 --- cf-execd | 4 ++-- cf-monitord | 4 ++-- cf-serverd | 4 ++-- cfengine.changes | 14 ++++++++++++++ cfengine.cron | 5 +++++ cfengine.spec | 33 ++++++++++++++++++++++++++++----- 6 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 cfengine.cron diff --git a/cf-execd b/cf-execd index e9ea7e7..6bbe6b7 100644 --- a/cf-execd +++ b/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; } diff --git a/cf-monitord b/cf-monitord index de3a64b..97b0744 100644 --- a/cf-monitord +++ b/cf-monitord @@ -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; } diff --git a/cf-serverd b/cf-serverd index 177fd72..7078024 100644 --- a/cf-serverd +++ b/cf-serverd @@ -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; } diff --git a/cfengine.changes b/cfengine.changes index 28e93c6..76698db 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -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 diff --git a/cfengine.cron b/cfengine.cron new file mode 100644 index 0000000..61de798 --- /dev/null +++ b/cfengine.cron @@ -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 diff --git a/cfengine.spec b/cfengine.spec index 2362acc..3616a88 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -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 From 4567b0ffd657203d0b8700c26ee3c61e1b531412d4a2f1926066eaac6080dc01 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Tue, 7 Feb 2012 12:27:12 +0000 Subject: [PATCH 4/7] Accepting request 103023 from home:computersalat:devel:sysmgmnt fix dpes for CentOS/RHEL OBS-URL: https://build.opensuse.org/request/show/103023 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=14 --- cfengine.changes | 6 ++++++ cfengine.spec | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/cfengine.changes b/cfengine.changes index 76698db..69697c2 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 7 12:20:19 UTC 2012 - chris@computersalat.de + +- fix deps for CentOS/RHEL (cron) + * Req vixie-cron + ------------------------------------------------------------------- Mon Jan 30 09:26:01 UTC 2012 - chris@computersalat.de diff --git a/cfengine.spec b/cfengine.spec index 3616a88..797e8b5 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -43,7 +43,11 @@ BuildRequires: mysql-devel BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: postgresql-devel +%if 0%{?centos_version} || 0%{?rhel_version} +Requires: vixie-cron +%else Requires: cron +%endif %if 0%{?suse_version} PreReq: %install_info_prereq From dd60137393702838ccdeafa63ed679ebc44b7f7f5a1da0a6f3cdb5e9becd80ee Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Wed, 8 Feb 2012 12:40:10 +0000 Subject: [PATCH 5/7] Accepting request 103304 from home:computersalat:devel:sysmgmnt fix pre/post scripts OBS-URL: https://build.opensuse.org/request/show/103304 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=15 --- cfengine.changes | 6 ++++++ cfengine.spec | 27 ++++++++++++++++++++++----- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/cfengine.changes b/cfengine.changes index 69697c2..97760e3 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 8 11:03:06 UTC 2012 - chris@computersalat.de + +- fix pre/post scripts + * RHEL/CentOS does not know "SuSE macros" :( + ------------------------------------------------------------------- Tue Feb 7 12:20:19 UTC 2012 - chris@computersalat.de diff --git a/cfengine.spec b/cfengine.spec index 797e8b5..e80e3c0 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -16,6 +16,7 @@ # + Name: cfengine %define libname libpromises %define libsoname %{libname}1 @@ -178,8 +179,13 @@ done #{__rm} -rf %{buildroot}/%{_libdir}/libpromises.a %preun +%if 0%{?suse_version} %stop_on_removal cf-monitord %stop_on_removal cf-execd +%else +/etc/init.d/cf-execd stop +/etc/init.d/cf-monitord stop +%endif %post %if 0%{?suse_version} @@ -195,6 +201,10 @@ done %postun %if 0%{?suse_version} +%insserv_cleanup +for i in execd monitord; do + %restart_on_update cf-${i} +done %if 0%{?suse_version} > 1010 %install_info_delete --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %else @@ -202,18 +212,25 @@ done %endif %else %install_info_delete --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz -%endif -%insserv_cleanup -/sbin/ldconfig -for i in execd monitord serverd; do - %restart_on_update cf-${i} +for i in execd monitord; do + /etc/init.d/cf-${i} restart done +%endif +/sbin/ldconfig %preun server +%if 0%{?suse_version} %stop_on_removal cf-serverd +%else +/etc/init.d/cf-serverd stop +%endif %postun server +%if 0%{?suse_version} %restart_on_update cf-serverd +%else +/etc/init.d/cf-serverd restart +%endif %post -n %{libsoname} -p /sbin/ldconfig From 5d14955f3f0531e0b5c254d925ddc0b57e424a070edcf266d464f54be1687a69 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Wed, 8 Feb 2012 15:13:48 +0000 Subject: [PATCH 6/7] Accepting request 103358 from home:computersalat:devel:sysmgmnt fix pre/post scripts OBS-URL: https://build.opensuse.org/request/show/103358 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=16 --- cfengine.changes | 2 +- cfengine.spec | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/cfengine.changes b/cfengine.changes index 97760e3..37b8315 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Wed Feb 8 11:03:06 UTC 2012 - chris@computersalat.de +Wed Feb 8 15:03:01 UTC 2012 - chris@computersalat.de - fix pre/post scripts * RHEL/CentOS does not know "SuSE macros" :( diff --git a/cfengine.spec b/cfengine.spec index e80e3c0..404bb3d 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -16,7 +16,6 @@ # - Name: cfengine %define libname libpromises %define libsoname %{libname}1 @@ -189,32 +188,26 @@ done %post %if 0%{?suse_version} -%if 0%{?suse_version} > 1010 %install_info --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz -%else -: -%endif -%else -%install_info --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %endif /sbin/ldconfig %postun %if 0%{?suse_version} -%insserv_cleanup -for i in execd monitord; do - %restart_on_update cf-${i} -done -%if 0%{?suse_version} > 1010 %install_info_delete --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz +%insserv_cleanup + for i in execd monitord; do + %restart_on_update cf-${i} + done %else + # Update ? + if [ ${1:-0} -eq 1 ]; then + for i in execd monitord; do + /etc/init.d/cf-${i} restart + done + else : -%endif -%else -%install_info_delete --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz -for i in execd monitord; do - /etc/init.d/cf-${i} restart -done + fi %endif /sbin/ldconfig @@ -229,7 +222,12 @@ done %if 0%{?suse_version} %restart_on_update cf-serverd %else -/etc/init.d/cf-serverd restart + # Update ? + if [ ${1:-0} -eq 1 ]; then + /etc/init.d/cf-serverd restart + else +: + fi %endif %post -n %{libsoname} -p /sbin/ldconfig From 5b1cdbbfd19768a25b7e138ad3631117e574b27af8cbe90d208fbf527274ece7 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Wed, 15 Feb 2012 15:14:26 +0000 Subject: [PATCH 7/7] Accepting request 105246 from home:computersalat:devel:sysmgmnt update to 3.2.4 OBS-URL: https://build.opensuse.org/request/show/105246 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=17 --- cfengine-3.2.3.tar.gz | 3 --- cfengine-3.2.4.tar.gz | 3 +++ cfengine.changes | 12 ++++++++++++ cfengine.spec | 14 +++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) delete mode 100644 cfengine-3.2.3.tar.gz create mode 100644 cfengine-3.2.4.tar.gz diff --git a/cfengine-3.2.3.tar.gz b/cfengine-3.2.3.tar.gz deleted file mode 100644 index 4e45dc8..0000000 --- a/cfengine-3.2.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20748f2d10ec4e3623138c2ae1cf7d78d147b8c5c15be42965c3155d0762792d -size 1128462 diff --git a/cfengine-3.2.4.tar.gz b/cfengine-3.2.4.tar.gz new file mode 100644 index 0000000..feea3f1 --- /dev/null +++ b/cfengine-3.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:261cd300c0a8e22dfdb215da81633d80f3c4579e659f186f0da3d09fd2e4f272 +size 1134299 diff --git a/cfengine.changes b/cfengine.changes index 37b8315..6d9881f 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Feb 15 13:49:18 UTC 2012 - chris@computersalat.de + +- update to 3.2.4 + * Fixed failure in network transfer in case of misbehaving peer + * A few tiny memory leaks on error paths fixed +- fix post/-un for SLE_10 (install_info) +- fix deps for SLE_10 + * {libsoname} Req glibc +- provide default *.cf files in inputs DIR + otherwise init scripts will fail + ------------------------------------------------------------------- Wed Feb 8 15:03:01 UTC 2012 - chris@computersalat.de diff --git a/cfengine.spec b/cfengine.spec index 404bb3d..38caabe 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -25,7 +25,7 @@ Name: cfengine Summary: A Tool to Maintain Complicated Networks License: GPL-3.0 Group: Productivity/Networking/System -Version: 3.2.3 +Version: 3.2.4 Release: 0 Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz @@ -63,6 +63,9 @@ networks. %package -n %{libsoname} Summary: Shared library of cfengine Group: System/Libraries +%if 0%{?suse_version} == 1010 +Requires: glibc +%endif %description -n %{libsoname} This package contains the shared libpromises (cfengine) library. @@ -111,7 +114,7 @@ find ./examples -type f -name "*.cf" -exec perl -p -i -e 's|\r\n|\n|,s|^# Founda ### FIXME # there are 3 different cfengine_stdlib.cf -## as of 3.2.3 +## as of 3.2.4 # ./examples/cfengine_stdlib.cf - Rev: 95 # ./examples/example_config/cfengine_stdlib.cf - Rev: 61 # ./masterfiles/cfengine_stdlib.cf - Rev: 84 @@ -138,7 +141,7 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ [ -d %{buildroot} ] && [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %endif %{__make} "DESTDIR=%{buildroot}" install -%{__install} -d %{buildroot}/{usr/sbin,etc/init.d,%{workdir}/bin} +%{__install} -d %{buildroot}/{usr/sbin,etc/init.d,%{workdir}/{bin,inputs}} # create dirs needed for better organizing dirs and files %{__install} -d %{buildroot}/%{basedir}/{backup,failsafe,config} @@ -169,6 +172,7 @@ done # mv all masterfiles/*.cf to masterfiles/*.cf.default pushd %{buildroot}%{basedir}/masterfiles for j in $(ls -1); do + cp -a * ../work/inputs/ mv ${j} ${j}.default done @@ -187,13 +191,13 @@ done %endif %post -%if 0%{?suse_version} +%if 0%{?suse_version} > 1010 %install_info --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %endif /sbin/ldconfig %postun -%if 0%{?suse_version} +%if 0%{?suse_version} > 1010 %install_info_delete --name=%{name} --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %insserv_cleanup for i in execd monitord; do