diff --git a/cfexecd b/cf-execd similarity index 88% rename from cfexecd rename to cf-execd index 095716d..52ea7b0 100644 --- a/cfexecd +++ b/cf-execd @@ -5,27 +5,27 @@ # # Author: Petr Ostadal, feedback to http://www.suse.de/feedback # -# /etc/init.d/cfexecd +# /etc/init.d/cf-execd # # and its symbolic link # -# /usr/sbin/rccfexecd +# /usr/sbin/rccf-execd # ### BEGIN INIT INFO -# Provides: cfexecd +# Provides: cf-execd # Required-Start: $local_fs $remote_fs # Should-Start: $time sendmail # Required-Stop: $local_fs $remote_fs # Should-Stop: $time sendmail # Default-Start: 3 5 # Default-Stop: 0 1 2 6 -# Short-Description: cfexecd daemon is a wrapper for local execution of cfagent -# Description: The cfexecd is a wrapper for local execution of cfagent. +# Short-Description: cf-execd daemon is a wrapper for local execution of cfagent +# Description: The cf-execd is a wrapper for local execution of cfagent. # It may be used to capture cfagent output and send it as mail when run # cron cron, e.g. ### END INIT INFO -cfexecd_BIN=/usr/sbin/cfexecd +cfexecd_BIN=/usr/sbin/cf-execd test -x $cfexecd_BIN || exit 5 . /etc/rc.status @@ -51,7 +51,7 @@ rc_reset case "$1" in start) - echo -n "Starting cfexecd " + echo -n "Starting cf-execd " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. @@ -62,7 +62,7 @@ case "$1" in rc_status -v ;; stop) - echo -n "Shutting down cfexecd " + echo -n "Shutting down cf-execd " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. @@ -92,7 +92,7 @@ case "$1" in exit 3 ;; status) - echo -n "Checking for service cfexecd " + echo -n "Checking for service cf-execd " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. diff --git a/cfenvd b/cf-monitord similarity index 84% rename from cfenvd rename to cf-monitord index 8e24c21..2432b3b 100644 --- a/cfenvd +++ b/cf-monitord @@ -5,29 +5,29 @@ # # Author: Petr Ostadal, feedback to http://www.suse.de/feedback # -# /etc/init.d/cfenvd +# /etc/init.d/cf-monitord # # and its symbolic link # -# /usr/sbin/rccfenvd +# /usr/sbin/rccf-monitord # ### BEGIN INIT INFO -# Provides: cfenvd +# Provides: cf-monitord # Required-Start: $local_fs $remote_fs # Should-Start: $time sendmail # Required-Stop: $local_fs $emote_fs # Should-Stop: $time sendmail # Default-Start: 3 5 # Default-Stop: 0 1 2 6 -# Short-Description: cfenvd daemon for collecting random events -# Description: Start cfenvd to allow collecting random events, +# Short-Description: cf-monitord daemon for collecting random events +# Description: Start cf-monitord to allow collecting random events, # which are an excellent source of entropy for random number generation. # It is used by cfkey program to produce random number from this source # of randomness. ### END INIT INFO -cfenvd_BIN=/usr/sbin/cfenvd -test -x $cfenvd_BIN || exit 5 +cfmonitord_BIN=/usr/sbin/cf-monitord +test -x $cfmonitord_BIN || exit 5 . /etc/rc.status @@ -52,22 +52,22 @@ rc_reset case "$1" in start) - echo -n "Starting cfenvd " + echo -n "Starting cf-monitord " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. - eval startproc $cfenvd_BIN + eval startproc $cfmonitord_BIN # Remember status and be verbose rc_status -v ;; stop) - echo -n "Shutting down cfenvd " + echo -n "Shutting down cf-monitord " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. - killproc -TERM $cfenvd_BIN + killproc -TERM $cfmonitord_BIN # Remember status and be verbose rc_status -v @@ -93,7 +93,7 @@ case "$1" in exit 3 ;; status) - echo -n "Checking for service cfenvd " + echo -n "Checking for service cf-monitord " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. @@ -106,7 +106,7 @@ case "$1" in # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. - checkproc $cfenvd_BIN + checkproc $cfmonitord_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v diff --git a/cfservd b/cf-serverd similarity index 84% rename from cfservd rename to cf-serverd index 1b1d2c6..4b91f28 100644 --- a/cfservd +++ b/cf-serverd @@ -5,28 +5,28 @@ # # Author: Petr Ostadal, feedback to http://www.suse.de/feedback # -# /etc/init.d/cfservd +# /etc/init.d/cf-serverd # # and its symbolic link # -# /usr/sbin/rccfservd +# /usr/sbin/rccf-serverd # ### BEGIN INIT INFO -# Provides: cfservd +# Provides: cf-serverd # Required-Start: $local_fs $remote_fs # Should-Start: $time sendmail # Required-Stop: $local_fs $remote_fs # Should-Stop: $time sendmail # Default-Start: 3 5 # Default-Stop: 0 1 2 6 -# Short-Description: cfservd daemon for starting cfengine remotely -# Description: The cfservd is a file server and protective wrapper for +# Short-Description: cf-serverd daemon for starting cfengine remotely +# Description: The cf-serverd is a file server and protective wrapper for # starting cfengine remotely. It performs access control based on RSA # authentication and IP address. ### END INIT INFO -cfservd_BIN=/usr/sbin/cfservd -test -x $cfservd_BIN || exit 5 +cfserverd_BIN=/usr/sbin/cf-serverd +test -x $cfserverd_BIN || exit 5 . /etc/rc.status @@ -51,22 +51,22 @@ rc_reset case "$1" in start) - echo -n "Starting cfservd " + echo -n "Starting cf-serverd " ## Start daemon with startproc(8). If this fails ## the return value is set appropriately by startproc. - eval startproc $cfservd_BIN + eval startproc $cfserverd_BIN # Remember status and be verbose rc_status -v ;; stop) - echo -n "Shutting down cfservd " + echo -n "Shutting down cf-serverd " ## Stop daemon with killproc(8) and if this fails ## killproc sets the return value according to LSB. - killproc -TERM $cfservd_BIN + killproc -TERM $cfserverd_BIN # Remember status and be verbose rc_status -v @@ -92,7 +92,7 @@ case "$1" in exit 3 ;; status) - echo -n "Checking for service cfservd " + echo -n "Checking for service cf-serverd " ## Check status with checkproc(8), if process is running ## checkproc will return with exit status 0. @@ -105,7 +105,7 @@ case "$1" in # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) # NOTE: checkproc returns LSB compliant status values. - checkproc $cfservd_BIN + checkproc $cfserverd_BIN # NOTE: rc_status knows that we called this init script with # "status" option and adapts its messages accordingly. rc_status -v diff --git a/cfengine-2.2.8-automake.dif b/cfengine-2.2.8-automake.dif deleted file mode 100644 index 3c1bb36..0000000 --- a/cfengine-2.2.8-automake.dif +++ /dev/null @@ -1,10 +0,0 @@ ---- doc/Makefile.am -+++ doc/Makefile.am -@@ -11,6 +11,7 @@ - - htmldir = $(pkgdatadir)/html - html_DATA = $(htmlfiles) -+AM_MAKEINFOHTMLFLAGS = --no-split - - # Info used in building and installing Postscript files - psfiles = $(info_TEXINFOS:.texinfo=.ps) diff --git a/cfengine-2.2.8-chflags.dif b/cfengine-2.2.8-chflags.dif deleted file mode 100644 index 5a3ae46..0000000 --- a/cfengine-2.2.8-chflags.dif +++ /dev/null @@ -1,38 +0,0 @@ ---- src/filedir.c -+++ src/filedir.c -@@ -128,7 +128,7 @@ - unsigned char digest2[EVP_MAX_MD_SIZE+1]; - enum fileactions action = ptr->action; - --#if defined HAVE_CHFLAGS -+#if defined HAVE_CHFLAGS && ! defined __linux__ - u_long newflags; - #endif - -@@ -150,7 +150,7 @@ - - Debug("%s: Checking fs-object %s\n",VPREFIX,file); - --#if defined HAVE_CHFLAGS -+#if defined HAVE_CHFLAGS && ! defined __linux__ - if (ptr != NULL) - { - Debug("CheckExistingFile(+%o,-%o,+%o,-%o)\n",ptr->plus,ptr->minus,ptr->plus_flags,ptr->minus_flags); -@@ -417,7 +417,7 @@ - } - } - --#ifndef HAVE_CHFLAGS -+#if ! defined HAVE_CHFLAGS || defined __linux__ - if (((newperm & 07777) == (dstat->st_mode & 07777)) && (action != touch)) /* file okay */ - { - Debug("File okay, newperm = %o, stat = %o\n",(newperm & 07777),(dstat->st_mode & 07777)); -@@ -572,7 +572,7 @@ - } - - --#if defined HAVE_CHFLAGS /* BSD special flags */ -+#if defined HAVE_CHFLAGS && ! defined __linux__ /* BSD special flags */ - - if (ptr != NULL) - { diff --git a/cfengine-2.2.8-closedir.diff b/cfengine-2.2.8-closedir.diff deleted file mode 100644 index 52984c9..0000000 --- a/cfengine-2.2.8-closedir.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- src/link.c -+++ src/link.c -@@ -230,7 +230,8 @@ - } - } - } -- -+ -+ closedir(dirh); - if (matched) return; - } - } diff --git a/cfengine-2.2.8-free.diff b/cfengine-2.2.8-free.diff deleted file mode 100644 index 89a4048..0000000 --- a/cfengine-2.2.8-free.diff +++ /dev/null @@ -1,34 +0,0 @@ ---- src/cfenvgraph.c -+++ src/cfenvgraph.c -@@ -777,6 +777,7 @@ - { - Verbose("Can't open directory %s\n",CFWORKDIR); - perror("opendir"); -+ free(array); - return; - } - -@@ -793,6 +794,7 @@ - if ((ERRNO = db_create(&dbp,dbenv,0)) != 0) - { - Verbose("Couldn't open arrivals database %s\n",database); -+ free(array); - return; - } - -@@ -875,6 +877,7 @@ - { - Verbose("Unable to open %s for writing\n",filename); - perror("fopen"); -+ free(array); - return; - } - -@@ -898,6 +901,7 @@ - } - - closedir(dirh); -+free(array); - } - - /***************************************************************/ diff --git a/cfengine-2.2.8-ia64.dif b/cfengine-2.2.8-ia64.dif deleted file mode 100644 index 8fe83fa..0000000 --- a/cfengine-2.2.8-ia64.dif +++ /dev/null @@ -1,11 +0,0 @@ ---- src/crypto.c -+++ src/crypto.c -@@ -290,7 +290,7 @@ - - Verbose("...\n"); - --snprintf(buffer,CF_BUFSIZE,"%d%d%25s",(int)CFSTARTTIME,(int)digest,VFQNAME); -+snprintf(buffer,CF_BUFSIZE,"%d%d%25s",(int)CFSTARTTIME,(long int)digest,VFQNAME); - - EVP_DigestUpdate(&context,buffer,CF_BUFSIZE); - diff --git a/cfengine-2.2.8-overflow.diff b/cfengine-2.2.8-overflow.diff deleted file mode 100644 index 8061031..0000000 --- a/cfengine-2.2.8-overflow.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- src/cf.defs.h -+++ src/cf.defs.h -@@ -462,7 +462,7 @@ - #define CF_PERSISTENCE 30 - #define LDT_BUFSIZE 10 - #define CF_GRAINS 64 --#define ATTR 11 -+#define ATTR 20 - #define CF_NETATTR 7 /* icmp udp dns tcpsyn tcpfin tcpack */ - #define PH_LIMIT 10 - #define CF_WEEK (7.0*24.0*3600.0) ---- src/instrument.c -+++ src/instrument.c -@@ -547,7 +547,7 @@ - - tthen = (time_t)then; - -- snprintf(datebuf,CF_BUFSIZE-1,"%s",ctime(&tthen)); -+ snprintf(datebuf,sizeof(datebuf),"%s",ctime(&tthen)); - datebuf[strlen(datebuf)-9] = '\0'; /* Chop off second and year */ - - snprintf(addr,15,"%s",hostname+1); diff --git a/cfengine-2.2.8-printf.diff b/cfengine-2.2.8-printf.diff deleted file mode 100644 index 56382c9..0000000 --- a/cfengine-2.2.8-printf.diff +++ /dev/null @@ -1,33 +0,0 @@ ---- src/edittools.c -+++ src/edittools.c -@@ -1368,7 +1368,7 @@ - { - if (ptr->warn == 'y') - { -- snprintf(OUTPUT,CF_BUFSIZE,"File %s did not exist and was marked for editing"); -+ snprintf(OUTPUT,CF_BUFSIZE,"File %s did not exist and was marked for editing",fname); - CfLog(cferror,OUTPUT,""); - } - return false; ---- src/functions.c -+++ src/functions.c -@@ -984,7 +984,7 @@ - - if (list->next != NULL && list->next->name != NULL) - { -- Debug("Setting %s[%s] = %s\n",lvalue,list->next->name); -+ Debug("Setting %s = %s\n",lvalue,list->next->name); - InstallControlRValue(lvalue,list->next->name); - } - else ---- src/log.c -+++ src/log.c -@@ -183,7 +183,7 @@ - } - else - { -- snprintf(OUTPUT,CF_BUFSIZE,"Outcome of version %s: Promises observed to be kept %.0f%%, Promises repaired %.0f%%, Promises not repaired %.0f\%\n", -+ snprintf(OUTPUT,CF_BUFSIZE,"Outcome of version %s: Promises observed to be kept %.0f%%, Promises repaired %.0f%%, Promises not repaired %.0f%%\n", - sp, - (double)PR_KEPT/total, - (double)PR_REPAIRED/total, diff --git a/cfengine-2.2.8-strict-aliasing-fix.diff b/cfengine-2.2.8-strict-aliasing-fix.diff deleted file mode 100644 index c3306ac..0000000 --- a/cfengine-2.2.8-strict-aliasing-fix.diff +++ /dev/null @@ -1,42 +0,0 @@ ---- src/link.c -+++ src/link.c -@@ -393,6 +393,10 @@ - { struct stat buf,savebuf; - char to[CF_BUFSIZE],linkbuf[CF_BUFSIZE],saved[CF_BUFSIZE],absto[CF_BUFSIZE],*lastnode; - struct UidList fakeuid; -+ union { -+ struct UidList *uifakeuid; -+ struct GidList *gifakeuid; -+ } ufakeuid = { &fakeuid }; - struct Image ip; - char stamp[CF_BUFSIZE]; - time_t STAMPNOW; -@@ -436,7 +440,7 @@ - ip.plus = CF_SAMEMODE; - ip.minus = CF_SAMEMODE; - ip.uid = &fakeuid; -- ip.gid = (struct GidList *) &fakeuid; -+ ip.gid = ufakeuid.gifakeuid; - ip.action = "do"; - ip.recurse = 0; - ip.type = 't'; -@@ -869,6 +873,10 @@ - { struct stat frombuf,tobuf; - char saved[CF_BUFSIZE], *lastnode; - struct UidList fakeuid; -+ union { -+ struct UidList *uifakeuid; -+ struct GidList *gifakeuid; -+ } ufakeuid = { &fakeuid }; - struct Image ip; - char stamp[CF_BUFSIZE]; - time_t STAMPNOW; -@@ -899,7 +907,7 @@ - ip.plus = CF_SAMEMODE; - ip.minus = CF_SAMEMODE; - ip.uid = &fakeuid; -- ip.gid = (struct GidList *) &fakeuid; -+ ip.gid = ufakeuid.gifakeuid; - ip.action = "do"; - ip.recurse = 0; - ip.type = 't'; diff --git a/cfengine-2.2.8.tar.bz2 b/cfengine-2.2.8.tar.bz2 deleted file mode 100644 index 4cda1da..0000000 --- a/cfengine-2.2.8.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2997ec935c87ecc00b94110fe3f0e4525c50dbc74ce66a84c83fbc59e812f0fe -size 2310228 diff --git a/cfengine-3.0.2.tar.bz2 b/cfengine-3.0.2.tar.bz2 new file mode 100644 index 0000000..69b5d30 --- /dev/null +++ b/cfengine-3.0.2.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:302004af89dd736b28f346017d8c270d72a3b6b5d7482ddaf36c2c306bb08d8f +size 1803218 diff --git a/cfengine.changes b/cfengine.changes index b3a6c5f..7ebb8de 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Dec 14 14:30:46 CET 2009 - anicka@suse.cz + +- update to 3.02 + * cfengine3 is a major rewrite, much simpler but with many + new features +- added new init scripts +- remove all the patches + ------------------------------------------------------------------- Mon Sep 7 20:53:22 CEST 2009 - anicka@suse.cz diff --git a/cfengine.spec b/cfengine.spec index 73ddd05..8b7afb3 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -1,5 +1,5 @@ # -# spec file for package cfengine (Version 2.2.8) +# spec file for package cfengine (Version 3.0.2) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,26 +19,18 @@ Name: cfengine -BuildRequires: bison db-devel flex openssl-devel texlive -License: GPL v2 or later +BuildRequires: bison db-devel flex mysql-devel openssl-devel pcre-devel texlive +License: GPLv2+ Group: Productivity/Networking/System AutoReqProv: on -Version: 2.2.8 -Release: 7 +Version: 3.0.2 +Release: 1 Summary: A Tool to Maintain Complicated Networks Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.bz2 -Source2: cfenvd -Source3: cfexecd -Source4: cfservd -Patch: %{name}-%{version}-ia64.dif -Patch3: %{name}-%{version}-chflags.dif -Patch4: %{name}-%{version}-automake.dif -Patch5: %{name}-%{version}-strict-aliasing-fix.diff -Patch7: %{name}-%{version}-printf.diff -Patch9: %{name}-%{version}-overflow.diff -Patch10: %{name}-%{version}-free.diff -Patch11: %{name}-%{version}-closedir.diff +Source2: cf-monitord +Source3: cf-execd +Source4: cf-serverd BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %install_info_prereq @@ -56,61 +48,58 @@ Authors: %prep %setup -q -%patch -%patch3 -%patch4 -%patch5 -%patch7 -%patch9 -%patch10 -%patch11 %build %{suse_update_config -f} autoreconf -fi CC=gcc CFLAGS="$RPM_OPT_FLAGS" \ ./configure --prefix=/usr \ - --with-docs \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ - --datadir=%{_defaultdocdir} + --datadir=/var/lib/cfengine/inputs \ + --docdir=%{_docdir}/cfengine \ + --with-workdir=/var/lib/cfengine make -chmod a-x inputs/cf.preconf.example %install make "DESTDIR=$RPM_BUILD_ROOT" install install -d $RPM_BUILD_ROOT/{usr/sbin,etc/init.d} install -m 744 %{S:2} %{S:3} %{S:4} $RPM_BUILD_ROOT/etc/init.d/ -ln -sf ../../etc/init.d/cfenvd $RPM_BUILD_ROOT/%{_sbindir}/rccfenvd -ln -sf ../../etc/init.d/cfexecd $RPM_BUILD_ROOT/%{_sbindir}/rccfexecd -ln -sf ../../etc/init.d/cfservd $RPM_BUILD_ROOT/%{_sbindir}/rccfservd -rm $RPM_BUILD_ROOT/%{_libdir}/libcfengine.la -rm $RPM_BUILD_ROOT/%{_libdir}/libcfengine.a +ln -sf ../../etc/init.d/cf-monitord $RPM_BUILD_ROOT/%{_sbindir}/rccf-monitord +ln -sf ../../etc/init.d/cf-execd $RPM_BUILD_ROOT/%{_sbindir}/rccf-execd +ln -sf ../../etc/init.d/cf-serverd $RPM_BUILD_ROOT/%{_sbindir}/rccf-serverd +mkdir -p $RPM_BUILD_ROOT/var/lib/cfengine/bin +ln -sf ../../../../usr/sbin/cf-promises $RPM_BUILD_ROOT/var/lib/cfengine/bin/cf-promises +rm -rf $RPM_BUILD_ROOT/%{_libdir}/libpromises.la +rm -rf $RPM_BUILD_ROOT/%{_libdir}/libpromises.a +mkdir -p $RPM_BUILD_ROOT/var/lib/cfengine/inputs/ +cp $RPM_BUILD_ROOT/usr/share/doc/packages/cfengine/inputs/* $RPM_BUILD_ROOT/var/lib/cfengine/inputs/ +chmod 0644 $RPM_BUILD_ROOT/var/lib/cfengine/inputs/* %clean [ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot} %post -%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz -%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz +%install_info --name=cfengine --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %postun -%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz -%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz +%install_info_delete --name=cfengine --info-dir=%{_infodir} %{_infodir}/cf3-reference.info.gz %insserv_cleanup %preun -%stop_on_removal cfenvd -%stop_on_removal cfservd -%stop_on_removal cfexecd +%stop_on_removal cf-monitord +%stop_on_removal cf-serverd +%stop_on_removal cf-execd %files %defattr(-,root,root) -%doc AUTHORS ChangeLog NEWS README COPYING TODO inputs/*.example +%doc AUTHORS ChangeLog README COPYING docs/cf3-Reference.pdf docs/ContributorStatement.pdf /usr/sbin/* %{_mandir}/man?/* -%{_infodir}/*.info* +%dir /var/lib/cfengine +/var/lib/cfengine/* +%config(noreplace) /var/lib/cfengine/inputs/* %attr(0755,root,root) %config /etc/init.d/* %changelog