Summary: GNU cfengine - a systems administration tool for networks Name: cfengine Epoch: 0 Version: 2.0.8p1 Release: 1 License: GNU GPL Group: System Environment/Daemons Source0: ftp://ftp.iu.hio.no/pub/cfengine/cfengine-2.0.8p1.tar.gz Source1: cfexecd.init Source2: cfservd.init URL: http://www.cfengine.org/ BuildRequires: db4-devel,openssl-devel,gcc,tetex,bison,flex BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description Cfengine, or the configuration engine is an agent/software robot and a very high level language for building expert systems to administrate and configure large computer networks. Cfengine uses the idea of classes and a primitive form of intelligence to define and automate the configuration and maintenance of system state, for small to huge configurations. Cfengine is designed to be a part of a computer immune system. #--------------------------------------------------------------------- %prep %setup #--------------------------------------------------------------------- %build # Since /usr is managed by rpmdb, we can build stuff in there # instead of putting all this stuff under /usr/local # ./configure BERKELEY_DB_LIB=-ldb --prefix=/usr --infodir=/usr/share/info # cd %{buildroot}%;mkdir lib;ln -s /usr/lib/libcrypto.a lib # %configure BERKELEY_DB_LIB=-ldb #LIBS=-L`pwd`/lib #make dirs for compile to work. JANK! mkdir -p /usr/local/BerkeleyDB.4.0/include mkdir -p /usr/local/BerkeleyDB.4.0/lib ln -s /usr/lib/libdb-4.0.so /usr/local/BerkeleyDB.4.0/lib/libdb-4.0.so ln -s /lib/libdb-4.0.so /usr/local/BerkeleyDB.4.0/lib/libdb.so ln -s /usr/lib/libdb-4.0.so /usr/local/BerkeleyDB.4.0/lib/libdb-4.so ln -s /usr/lib/libdb-4.0.a /usr/local/BerkeleyDB.4.0/lib/libdb.a ln -s /usr/include/db4/db.h /usr/local/BerkeleyDB.4.0/include/db.h ln -s /usr/include/db4/db_cxx.h /usr/local/BerkeleyDB.4.0/include/db_cxx.h ln -s /usr/include/db4/cxx_common.h /usr/local/BerkeleyDB.4.0/include/cxx_common.h ln -s /usr/include/db4/cxx_except.h /usr/local/BerkeleyDB.4.0/include/cxx_except.h echo "/usr/local/BerkeleyDB.4.0/lib" >> /etc/ld.so.conf ldconfig %configure --prefix=/usr --infodir=/usr/share/info --with-berkeleydb BERKELEY_DB_LIB="-ldb" make -j 4 #--------------------------------------------------------------------- %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_datadir}/%{name} make -j 4 DESTDIR=%{buildroot} install # make directory tree for cfengine configs mkdir -p %{buildroot}%{_localstatedir}/%{name}/inputs mkdir -p %{buildroot}/var/cfengine/bin # It's ugly, but thats the way Mark wants to have it. :( # If we don't create this link, cfexecd will not be able to start # (hardcoded) /var/sbin/cfagent in scheduled intervals. Other option # would be to patch cfengine to use %{_sbindir}/cfagent ln -sf %{_sbindir}/cfagent %{buildroot}/var/cfengine/bin/ # Startup file for cfexecd and cfservd install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/cfexecd install -D -m 0755 %{SOURCE2} %{buildroot}%{_initrddir}/cfservd # # Appearantly this %{_infodir}/dir gets build on RH9, but it doesn't # appear in my RH8 box. Confusing situation... # if [ -f %{buildroot}%{_infodir}/dir ]; then rm -f %{buildroot}%{_infodir}/dir fi #--------------------------------------------------------------------- %post # cfagent won't run nicely, unless your host has keys. if [ ! -d /mnt/sysimage -a ! -f %{_localstatedir}/%{name}/ppkeys/localhost.priv ]; then %{_sbindir}/cfkey /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cfengine*.info* 2> /dev/null || : fi %preun if [ "$1" = 0 ]; then /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/cfengine*.info* 2> /dev/null || : fi #--------------------------------------------------------------------- %clean rm -rf %{buildroot} #--------------------------------------------------------------------- %files %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING DOCUMENTATION NEWS README TODO %doc contrib/cfengine.el %doc inputs/* %{_mandir}/man8/cfengine.8.gz %{_datadir}/%{name} %{_infodir}/cfengine* %{_sbindir}/* %{_initrddir}/cfexecd %{_initrddir}/cfservd /var/cfengine/bin %dir %{_localstatedir}/%{name} %dir %{_localstatedir}/%{name}/inputs #--------------------------------------------------------------------- %changelog * Mon Sep 29 2003 Adam Jurevicius - 0:2.0.8-1 - modified for cfengine 2.08 and added db4 libs dirs creation. * Tue Apr 22 2003 Juha Ylitalo - 0:2.0.6-0.fdr.3 - changed Group information to be valid one. * Wed Apr 09 2003 Juha Ylitalo - 0:2.0.6-0.fdr.2 - fixed URL - removed Requires as redundant - remove %{_infodir}/dir from package, if it would exist (which is not the case in RH8) * Wed Apr 09 2003 Juha Ylitalo - 0:2.0.6-0.fdr.1 - upgrade from 2.0.5 to 2.0.6 - added install-info to %post and %preun - added Epoch - changed all paths that are not hard coded into %{_sbindir}, etc. - changed ./configure to %configure - changed URL to something you can cut&paste - simplified %files list and yet added more stuff into %doc part. * Wed Mar 26 2003 Juha Ylitalo - 0:2.0.5-0.fdr.1 - upgrade from 2.0.4 to 2.0.5 - fedora related changes to spec file. * Thu Sep 05 2002 Juha Ylitalo - 2.0.4-1 - new upstream version. * Thu Jun 20 2002 Juha Ylitalo - 2.0.2-4 - added check that if we are doing initial install (meaning that /mnt/sysimage is mounted), there is no point at running cfkey until system boots up with correct root directory * Thu Jun 13 2002 Juha Ylitalo - 2.0.2-3 - fixed revision numberings to go on in sensible way - added missing man page - changed cfexecd and cfservd to start later (assuming your using chkconfig for setting things) - additional check in cfexecd start() for making sure that local cfkeys have been created. * Wed May 29 2002 Juha Ylitalo - 2.0.2-1 - version upgrade - support for clients using dynamic addresses (=DHCP) - support for ip ranges - bug fixes * Thu May 9 2002 Juha Ylitalo - 2.0.1-2 - fixed first line in init.d scripts - added chkconfig line into init.d scripts * Wed May 1 2002 Juha Ylitalo - 2.0.1-1 - first public RPM...