Summary: A systems administration tool for networks Name: cfengine Version: 3.9.0 Release: 1 License: GPLv2+ Group: Applications/System Source0: ftp://ftp.iu.hio.no/pub/cfengine/%{name}-%{version}.tar.gz Source1: cf-execd.aix.init Source2: cf-monitord.aix.init Source3: cf-serverd.aix.init Patch0: %{name}-%{version}-aix.patch URL: http://www.cfengine.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: AIX-rpm >= 5.2.0.0 BuildRequires: bison, flex, m4 BuildRequires: curl-devel >= 7.51.0-1 BuildRequires: openssl-devel >= 1.0.2j-2 BuildRequires: pcre-devel >= 8.39-1 BuildRequires: libxml2-devel >= 2.9.4-1 BuildRequires: tokyocabinet-devel >= 1.4.48-1 Requires: AIX-rpm >= 5.2.0.0 Requires: curl >= 7.51.0-1 Requires: openssl >= 1.0.2j-2 Requires: pcre >= 8.39-1 Requires: libxml2 >= 2.9.4-1 Requires: tokyocabinet >= 1.4.48-1 %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. %package doc Summary: Documentation for cfengine Group: Documentation Requires: %{name} = %{version}-%{release} %description doc This package contains the documentation for cfengine. %prep %setup -q %patch0 %build export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export CC="xlc_r -D_LARGE_FILES" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --localstatedir=/var \ --with-openssl=%{_prefix} \ --with-pcre=%{_prefix} \ --with-tokyocabinet=%{_prefix} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake install DESTDIR=${RPM_BUILD_ROOT} #/usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : # 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/bin/cfagent in scheduled intervals. Other option # would be to patch cfengine to use %{_bindir}/cfagent mkdir -p ${RPM_BUILD_ROOT}/var/%{name}/bin ln -sf %{_bindir}/cf-agent ${RPM_BUILD_ROOT}/var/%{name}/bin/ ln -sf %{_bindir}/cf-promises ${RPM_BUILD_ROOT}/var/%{name}/bin/ # All this stuff is pushed into doc/contrib directories rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name} # Startup files for cf-execd, cf-monitord and cf-serverd mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-execd cp %{SOURCE2} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-monitord cp %{SOURCE3} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/cf-serverd chmod 0755 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/* ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-execd ln -sf '../init.d/cf-execd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-execd ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-monitord ln -sf '../init.d/cf-monitord' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-monitord ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Kcf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc2.d/Scf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Kcf-serverd ln -sf '../init.d/cf-serverd' ${RPM_BUILD_ROOT}/etc/rc.d/rc3.d/Scf-serverd cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . cd ${RPM_BUILD_ROOT}%{_datadir} mkdir -p %{name} mv doc %{name}/ # create man pages, see https://cfengine.com/dev/issues/2989 mkdir -p ${RPM_BUILD_ROOT}/%{_mandir}/man8 for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd ; do LIBPATH=${RPM_BUILD_ROOT}%{_libdir}:/opt/freeware/lib:/usr/lib ${RPM_BUILD_ROOT}%{_bindir}/${i} -M > ${RPM_BUILD_ROOT}%{_mandir}/man8/${i}.8 done %post # cfagent won't run nicely, unless your host has keys. if [ ! -f /var/%{name}/ppkeys/localhost.priv ] ; then %{_bindir}/cf-key >/dev/null || : fi %preun if [ "$1" = "0" ] ; then /etc/rc.d/init.d/cf-monitord stop || : /etc/rc.d/init.d/cf-execd stop || : /etc/rc.d/init.d/cf-serverd stop || : fi %postun if [ $1 -ge 1 ] ; then /etc/rc.d/init.d/cf-monitord restart || : /etc/rc.d/init.d/cf-execd restart || : /etc/rc.d/init.d/cf-serverd restart || : fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS ChangeLog %{_bindir}/* %{_libdir}/libpromises* %{_mandir}/man8/* /etc/rc.d/init.d/cf-execd /etc/rc.d/rc2.d/Scf-execd /etc/rc.d/rc3.d/Scf-execd /etc/rc.d/rc2.d/Kcf-execd /etc/rc.d/rc3.d/Kcf-execd /etc/rc.d/init.d/cf-monitord /etc/rc.d/rc2.d/Scf-monitord /etc/rc.d/rc3.d/Scf-monitord /etc/rc.d/rc2.d/Kcf-monitord /etc/rc.d/rc3.d/Kcf-monitord /etc/rc.d/init.d/cf-serverd /etc/rc.d/rc2.d/Scf-serverd /etc/rc.d/rc3.d/Scf-serverd /etc/rc.d/rc2.d/Kcf-serverd /etc/rc.d/rc3.d/Kcf-serverd /var/%{name} /usr/bin/* %files doc %defattr(-,root,system,-) %{_datadir}/%{name} %changelog * Sun Nov 27 2016 Michael Perzl - 3.9.0-1 - updated to version 3.9.0 * Sun Nov 27 2016 Michael Perzl - 3.8.2-1 - updated to version 3.8.2 * Sun Nov 27 2016 Michael Perzl - 3.8.1-1 - updated to version 3.8.1 * Sun Nov 27 2016 Michael Perzl - 3.8.0-1 - updated to version 3.8.0 * Sun Nov 27 2016 Michael Perzl - 3.7.4-1 - updated to version 3.7.4 * Sun Nov 27 2016 Michael Perzl - 3.7.3-1 - updated to version 3.7.3 * Sun Nov 27 2016 Michael Perzl - 3.7.2-1 - updated to version 3.7.2 * Sun Nov 27 2016 Michael Perzl - 3.7.1-1 - updated to version 3.7.1 * Sun Nov 27 2016 Michael Perzl - 3.7.0-1 - updated to version 3.7.0 * Sun Nov 27 2016 Michael Perzl - 3.6.7-1 - updated to version 3.6.7 * Sun Nov 27 2016 Michael Perzl - 3.6.6-1 - updated to version 3.6.6-2 * Sun Nov 27 2016 Michael Perzl - 3.6.5-3 - recompiled against latest versions * Fri Mar 04 2016 Michael Perzl - 3.6.5-2 - recompiled against latest version of openssl * Mon Apr 13 2015 Michael Perzl - 3.6.5-1 - updated to version 3.6.5 * Mon Apr 13 2015 Michael Perzl - 3.6.4-1 - updated to version 3.6.4 * Mon Apr 13 2015 Michael Perzl - 3.6.3-1 - updated to version 3.6.3 * Mon Apr 13 2015 Michael Perzl - 3.6.2-1 - updated to version 3.6.2 * Mon Apr 13 2015 Michael Perzl - 3.6.1-1 - updated to version 3.6.1 * Mon Apr 13 2015 Michael Perzl - 3.6.0-1 - updated to version 3.6.0 * Thu Mar 27 2014 Michael Perzl - 3.5.3-1 - updated to version 3.5.3 * Thu Mar 27 2014 Michael Perzl - 3.5.2-1 - updated to version 3.5.2 * Thu Jul 25 2013 Michael Perzl - 3.5.1-1 - updated to version 3.5.1-3 * Thu Jul 25 2013 Michael Perzl - 3.5.0-1 - updated to version 3.5.0 * Thu Jul 25 2013 Michael Perzl - 3.4.5-1 - updated to version 3.4.5 * Thu Apr 04 2013 Michael Perzl - 3.4.4-1 - updated to version 3.4.4 * Wed Feb 27 2013 Michael Perzl - 3.4.3-1 - updated to version 3.4.3 * Wed Feb 27 2013 Michael Perzl - 3.4.2-1 - updated to version 3.4.2 * Tue Jan 08 2013 Michael Perzl - 3.4.1-1 - updated to version 3.4.1 * Tue Jan 08 2013 Michael Perzl - 3.4.0-1 - updated to version 3.4.0 * Tue Jan 08 2013 Michael Perzl - 3.3.9-1 - updated to version 3.3.9 * Fri Oct 19 2012 Michael Perzl - 3.3.8-1 - updated to version 3.3.8 * Mon Jul 30 2012 Michael Perzl - 3.3.5-1 - updated to version 3.3.5 * Thu Jun 21 2012 Michael Perzl - 3.3.4-1 - updated to version 3.3.4 * Tue Jun 12 2012 Michael Perzl - 3.3.3-1 - updated to version 3.3.3 * Thu May 17 2012 Michael Perzl - 3.3.2-1 - updated to version 3.3.2 * Tue May 15 2012 Michael Perzl - 3.3.1-1 - updated to version 3.3.1 * Tue Apr 10 2012 Michael Perzl - 3.3.0-1 - updated to version 3.3.0 * Tue Apr 10 2012 Michael Perzl - 3.2.4-1 - updated to version 3.2.4 * Fri Oct 28 2011 Michael Perzl - 3.2.3-1 - updated to version 3.2.3 * Fri Oct 28 2011 Michael Perzl - 3.2.1-1 - updated to version 3.2.1 * Wed May 25 2011 Michael Perzl - 3.1.5-1 - updated to version 3.1.5 * Tue Feb 15 2011 Michael Perzl - 3.1.4-1 - updated to version 3.1.4 * Tue Feb 15 2011 Michael Perzl - 3.1.1-2 - fixed the init scripts and %pre and %post scripts * Thu Nov 25 2010 Michael Perzl - 3.1.1-1 - updated to version 3.1.1 * Thu Nov 25 2010 Michael Perzl - 2.2.10-2 - fixed a typo in the %post scripts * Thu Feb 18 2010 Michael Perzl - 2.2.10-1 - first version for AIX V5.1 and higher