- Format with spec-cleaner, this is just reordering, no factical
change here OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=116
This commit is contained in:
parent
0d460dff8f
commit
dc78c5095c
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 17 13:41:26 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Format with spec-cleaner, this is just reordering, no factical
|
||||||
|
change here
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 13 07:29:41 UTC 2015 - kkaempf@suse.com
|
Fri Mar 13 07:29:41 UTC 2015 - kkaempf@suse.com
|
||||||
|
|
||||||
|
179
cfengine.spec
179
cfengine.spec
@ -16,55 +16,36 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# set to 1 to enable adapter, leave 0 for minimal cfengine
|
||||||
|
%define with_mysql 0
|
||||||
|
%define with_postgresql 0
|
||||||
|
%define with_libvirt 0
|
||||||
|
%define srcname core-%{version}
|
||||||
|
%define libname libpromises
|
||||||
|
%define libsoname %{libname}3
|
||||||
|
# Yes, its not FHS conformant but in sync with cfengine documentation
|
||||||
|
# reported upstream as https://cfengine.com/dev/issues/1896
|
||||||
|
%define basedir %{_localstatedir}/%{name}
|
||||||
|
%define workdir %{basedir}
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%define have_systemd 1
|
%define have_systemd 1
|
||||||
%else
|
%else
|
||||||
%define have_systemd 0
|
%define have_systemd 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# set to 1 to enable adapter, leave 0 for minimal cfengine
|
|
||||||
%define with_mysql 0
|
|
||||||
%define with_postgresql 0
|
|
||||||
%define with_libvirt 0
|
|
||||||
|
|
||||||
Name: cfengine
|
Name: cfengine
|
||||||
Version: 3.6.5
|
Version: 3.6.5
|
||||||
Release: 0
|
Release: 0
|
||||||
%define srcname core-%{version}
|
|
||||||
%define libname libpromises
|
|
||||||
%define libsoname %{libname}3
|
|
||||||
|
|
||||||
# Yes, its not FHS conformant but in sync with cfengine documentation
|
|
||||||
# reported upstream as https://cfengine.com/dev/issues/1896
|
|
||||||
%define basedir /var/%{name}
|
|
||||||
%define workdir %{basedir}
|
|
||||||
# This is the place where workdir should be
|
# This is the place where workdir should be
|
||||||
#define basedir /var/lib/%{name}
|
#define basedir /var/lib/%{name}
|
||||||
#define workdir %{basedir}/work
|
#define workdir %{basedir}/work
|
||||||
|
|
||||||
Summary: CFEngine automates large-scale IT computing infrastructure
|
Summary: CFEngine automates large-scale IT computing infrastructure
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
Group: Productivity/Networking/System
|
Group: Productivity/Networking/System
|
||||||
Url: http://www.cfengine.org/
|
Url: http://www.cfengine.org/
|
||||||
Source: %{srcname}.tar.gz
|
Source: %{srcname}.tar.gz
|
||||||
Source1: %{name}.SuSEfirewall2
|
Source1: %{name}.SuSEfirewall2
|
||||||
|
|
||||||
# wtf? SLE_11 does not honor rpmlintrc
|
|
||||||
%if 0%{?suse_version} <= 1130
|
|
||||||
BuildRequires: -post-build-checks
|
|
||||||
%endif
|
|
||||||
%if %have_systemd
|
|
||||||
Source7: cf-execd.service
|
|
||||||
Source8: cf-monitord.service
|
|
||||||
Source9: cf-serverd.service
|
|
||||||
%else
|
|
||||||
Source7: cf-monitord
|
|
||||||
Source8: cf-execd
|
|
||||||
Source9: cf-serverd
|
|
||||||
%endif
|
|
||||||
Source10: %{name}.cron
|
Source10: %{name}.cron
|
||||||
Source11: %{name}-rpmlintrc
|
Source11: %{name}-rpmlintrc
|
||||||
|
|
||||||
# docs
|
# docs
|
||||||
Source101: http://www.cfengine.org/manuals/cf3-Reference.pdf
|
Source101: http://www.cfengine.org/manuals/cf3-Reference.pdf
|
||||||
Source102: http://www.cfengine.org/manuals/cf3-conceptguide.pdf
|
Source102: http://www.cfengine.org/manuals/cf3-conceptguide.pdf
|
||||||
@ -73,28 +54,41 @@ Source104: http://www.cfengine.org/manuals/cf3-quickstart.pdf
|
|||||||
Source105: http://www.cfengine.org/manuals/cf3-solutions.pdf
|
Source105: http://www.cfengine.org/manuals/cf3-solutions.pdf
|
||||||
Source106: http://www.cfengine.org/manuals/cf3-tutorial.pdf
|
Source106: http://www.cfengine.org/manuals/cf3-tutorial.pdf
|
||||||
Source107: http://www.verticalsysadmin.com/cfengine/primer.pdf
|
Source107: http://www.verticalsysadmin.com/cfengine/primer.pdf
|
||||||
|
|
||||||
# SLE 11 or RHEL5 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de
|
# SLE 11 or RHEL5 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de
|
||||||
Patch2: remove-am_subst_notmake.patch
|
Patch2: remove-am_subst_notmake.patch
|
||||||
|
|
||||||
# PATCH-FIX-UPSTREAM add 'suse' class for consistency with other vendor classes
|
# PATCH-FIX-UPSTREAM add 'suse' class for consistency with other vendor classes
|
||||||
# PATCH-FEATURE-UPSTREAM better /etc/SuSE-release parsing, upstream #5423
|
# PATCH-FEATURE-UPSTREAM better /etc/SuSE-release parsing, upstream #5423
|
||||||
# kkaempf@suse.de
|
# kkaempf@suse.de
|
||||||
Patch5: 0001-Simplify-and-fix-parsing-of-etc-SuSE-release-fixes-i.patch
|
Patch5: 0001-Simplify-and-fix-parsing-of-etc-SuSE-release-fixes-i.patch
|
||||||
|
|
||||||
# PATCH-FIX-SUSE
|
# PATCH-FIX-SUSE
|
||||||
# set cfengine's notion of bindir to /usr/sbin instead of /var/cfengine/bin
|
# set cfengine's notion of bindir to /usr/sbin instead of /var/cfengine/bin
|
||||||
# kkaempf@suse.de
|
# kkaempf@suse.de
|
||||||
Patch6: 0001-Set-sys.bindir-to-usr-sbin-expect-cf-components-ther.patch
|
Patch6: 0001-Set-sys.bindir-to-usr-sbin-expect-cf-components-ther.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: db-devel
|
BuildRequires: db-devel
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
BuildRequires: lmdb-devel
|
BuildRequires: lmdb-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
|
BuildRequires: pcre-devel
|
||||||
|
Requires: %{libsoname} = %{version}
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
# wtf? SLE_11 does not honor rpmlintrc
|
||||||
|
%if 0%{?suse_version} <= 1130
|
||||||
|
BuildRequires: -post-build-checks
|
||||||
|
%endif
|
||||||
|
%if %{have_systemd}
|
||||||
|
Source7: cf-execd.service
|
||||||
|
Source8: cf-monitord.service
|
||||||
|
Source9: cf-serverd.service
|
||||||
|
%else
|
||||||
|
Source7: cf-monitord
|
||||||
|
Source8: cf-execd
|
||||||
|
Source9: cf-serverd
|
||||||
|
%endif
|
||||||
#
|
#
|
||||||
# Disable mysql for SLE_11:
|
# Disable mysql for SLE_11:
|
||||||
#
|
#
|
||||||
@ -103,22 +97,18 @@ BuildRequires: pam-devel
|
|||||||
# library or disable MySQL connector. See
|
# library or disable MySQL connector. See
|
||||||
# http://bugs.mysql.com/bug.php?id=65055 for details.
|
# http://bugs.mysql.com/bug.php?id=65055 for details.
|
||||||
#
|
#
|
||||||
%if %with_mysql
|
%if %{with_mysql}
|
||||||
%if 0%{?suse_version} != 1110 && 0%{?rhel_version} == 0
|
%if 0%{?suse_version} != 1110 && 0%{?rhel_version} == 0
|
||||||
BuildRequires: mysql-devel
|
BuildRequires: mysql-devel
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libacl-devel
|
%if %{with_libvirt}
|
||||||
%if %with_libvirt
|
|
||||||
BuildRequires: libvirt-devel
|
BuildRequires: libvirt-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: openssl-devel
|
%if %{with_postgresql}
|
||||||
BuildRequires: pcre-devel
|
|
||||||
%if %with_postgresql
|
|
||||||
BuildRequires: postgresql-devel
|
BuildRequires: postgresql-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if !%{have_systemd}
|
||||||
%if !%have_systemd
|
|
||||||
# no systemd -> use cron
|
# no systemd -> use cron
|
||||||
%if 0%{?centos_version} || 0%{?rhel_version}
|
%if 0%{?centos_version} || 0%{?rhel_version}
|
||||||
Requires: vixie-cron
|
Requires: vixie-cron
|
||||||
@ -126,17 +116,11 @@ Requires: vixie-cron
|
|||||||
Requires: cron
|
Requires: cron
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
%if %{have_systemd}
|
||||||
%if %have_systemd
|
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} > 01020
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires: %{libsoname} = %{version}
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
CFEngine is the core of a configuration management system: ensuring
|
CFEngine is the core of a configuration management system: ensuring
|
||||||
@ -153,9 +137,7 @@ Summary: Shared library of cfengine
|
|||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Provides: %{libname}1 = %{version}
|
Provides: %{libname}1 = %{version}
|
||||||
Obsoletes: %{libname}1 < %{version}
|
Obsoletes: %{libname}1 < %{version}
|
||||||
%if 0%{?suse_version} == 1010
|
|
||||||
Requires: glibc
|
Requires: glibc
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n %{libsoname}
|
%description -n %{libsoname}
|
||||||
This package contains the shared libpromises (cfengine) library.
|
This package contains the shared libpromises (cfengine) library.
|
||||||
@ -163,10 +145,10 @@ This package contains the shared libpromises (cfengine) library.
|
|||||||
%package -n %{libname}-devel
|
%package -n %{libname}-devel
|
||||||
Summary: Development package for libpromises
|
Summary: Development package for libpromises
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Provides: %{name}-devel = %{version}
|
|
||||||
Obsoletes: %{name}-devel < %{version}
|
|
||||||
Requires: %{libsoname} = %{version}
|
Requires: %{libsoname} = %{version}
|
||||||
Requires: glibc-devel
|
Requires: glibc-devel
|
||||||
|
Provides: %{name}-devel = %{version}
|
||||||
|
Obsoletes: %{name}-devel < %{version}
|
||||||
|
|
||||||
%description -n %{libname}-devel
|
%description -n %{libname}-devel
|
||||||
A high-speed character set detection library
|
A high-speed character set detection library
|
||||||
@ -212,22 +194,22 @@ Lots of examples promises for CFEngine.
|
|||||||
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|' {} \;
|
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|' {} \;
|
||||||
|
|
||||||
### install extra docs
|
### install extra docs
|
||||||
%{__install} -d docs
|
install -d docs
|
||||||
cp -a $RPM_SOURCE_DIR/*pdf docs/
|
cp -a $RPM_SOURCE_DIR/*pdf docs/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fi -I m4
|
autoreconf -fi -I m4
|
||||||
# /usr/include/sys for acl.h
|
# /usr/include/sys for acl.h
|
||||||
CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
CC=gcc CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||||
%configure \
|
%configure \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-fhs \
|
--enable-fhs \
|
||||||
--datadir=/var \
|
--datadir=/var \
|
||||||
--with-workdir=%{workdir} \
|
--with-workdir=%{workdir} \
|
||||||
%if %with_postgresql
|
%if %{with_postgresql}
|
||||||
--with-postgresql \
|
--with-postgresql \
|
||||||
%endif
|
%endif
|
||||||
%if %with_mysql
|
%if %{with_mysql}
|
||||||
%if 0%{?suse_version} != 1110 && 0%{?rhel_version} == 0 && 0%{?fedora_version} != 20
|
%if 0%{?suse_version} != 1110 && 0%{?rhel_version} == 0 && 0%{?fedora_version} != 20
|
||||||
--with-mysql \
|
--with-mysql \
|
||||||
%endif
|
%endif
|
||||||
@ -238,7 +220,7 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
|||||||
--with-pthreads \
|
--with-pthreads \
|
||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pcre \
|
--with-pcre \
|
||||||
%if %with_libvirt
|
%if %{with_libvirt}
|
||||||
--with-libvirt \
|
--with-libvirt \
|
||||||
%endif
|
%endif
|
||||||
--with-libacl \
|
--with-libacl \
|
||||||
@ -248,68 +230,60 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
|
|||||||
%else if 0%{?rhel_version} >= 600
|
%else if 0%{?rhel_version} >= 600
|
||||||
--docdir=%{_docdir}/%{name}-%{version}
|
--docdir=%{_docdir}/%{name}-%{version}
|
||||||
%endif
|
%endif
|
||||||
# SLE 10 and RHEL5 don't recognize --docdir
|
|
||||||
|
|
||||||
%{__make} %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
# --datadir=/var/lib/%%{name}/inputs \
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
chmod -x ChangeLog
|
chmod -x ChangeLog
|
||||||
|
make "DESTDIR=%{buildroot}" install
|
||||||
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
|
|
||||||
[ -d %{buildroot} ] && [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
|
|
||||||
%endif
|
|
||||||
%{__make} "DESTDIR=%{buildroot}" install
|
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1110 || 0%{?rhel_version} >= 600
|
%if 0%{?suse_version} >= 1110 || 0%{?rhel_version} >= 600
|
||||||
# will appear in cfengine-examples
|
# will appear in cfengine-examples
|
||||||
rm -rf %{buildroot}/%{_docdir}/%{name}/examples
|
rm -rf %{buildroot}/%{_docdir}/%{name}/examples
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{__install} -d %{buildroot}/{usr/sbin,%{workdir}/{bin,inputs,reports}}
|
install -d %{buildroot}/{usr/sbin,%{workdir}/{bin,inputs,reports}}
|
||||||
|
|
||||||
# create dirs needed for better organizing dirs and files
|
# create dirs needed for better organizing dirs and files
|
||||||
%{__install} -d %{buildroot}/%{basedir}/{backup,failsafe,config,plugins}
|
install -d %{buildroot}/%{basedir}/{backup,failsafe,config,plugins}
|
||||||
#%%{__install} -d %{buildroot}/%%{basedir}/config/{development,production}
|
#%%{__install} -d %{buildroot}/%%{basedir}/config/{development,production}
|
||||||
|
|
||||||
%if %have_systemd
|
%if %{have_systemd}
|
||||||
# systemd: install sample cron file in docdir
|
# systemd: install sample cron file in docdir
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%{__install} -D -m0644 %{S:10} %{buildroot}/%{_docdir}/%{name}
|
install -D -m0644 %{SOURCE10} %{buildroot}/%{_docdir}/%{name}
|
||||||
%else
|
%else
|
||||||
%{__install} -D -m0644 %{S:10} %{buildroot}/%{_docdir}/%{name}-%{version}
|
install -D -m0644 %{SOURCE10} %{buildroot}/%{_docdir}/%{name}-%{version}
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
# no systemd -> use cron
|
# no systemd -> use cron
|
||||||
# install cron file
|
# install cron file
|
||||||
%{__install} -D -m0644 %{S:10} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
install -D -m0644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %have_systemd
|
%if %{have_systemd}
|
||||||
# install systemd scripts
|
# install systemd scripts
|
||||||
%{__install} -D -m 0644 %{S:7} %{buildroot}/%_unitdir/cf-execd.service
|
install -D -m 0644 %{SOURCE7} %{buildroot}/%{_unitdir}/cf-execd.service
|
||||||
%{__install} -D -m 0644 %{S:8} %{buildroot}/%_unitdir/cf-monitord.service
|
install -D -m 0644 %{SOURCE8} %{buildroot}/%{_unitdir}/cf-monitord.service
|
||||||
%{__install} -D -m 0644 %{S:9} %{buildroot}/%_unitdir/cf-serverd.service
|
install -D -m 0644 %{SOURCE9} %{buildroot}/%{_unitdir}/cf-serverd.service
|
||||||
%else
|
%else
|
||||||
# install init scripts
|
# install init scripts
|
||||||
%{__install} -d %{buildroot}/etc/init.d
|
install -d %{buildroot}%{_sysconfdir}/init.d
|
||||||
%{__install} -m 0755 %{S:7} %{S:8} %{S:9} %{buildroot}/etc/init.d/
|
install -m 0755 %{SOURCE7} %{SOURCE8} %{SOURCE9} %{buildroot}%{_initddir}/
|
||||||
%{__ln_s} -f ../../etc/init.d/cf-monitord %{buildroot}/%{_sbindir}/rccf-monitord
|
ln -s -f ../..%{_initddir}/cf-monitord %{buildroot}/%{_sbindir}/rccf-monitord
|
||||||
%{__ln_s} -f ../../etc/init.d/cf-execd %{buildroot}/%{_sbindir}/rccf-execd
|
ln -s -f ../..%{_initddir}/cf-execd %{buildroot}/%{_sbindir}/rccf-execd
|
||||||
%{__ln_s} -f ../../etc/init.d/cf-serverd %{buildroot}/%{_sbindir}/rccf-serverd
|
ln -s -f ../..%{_initddir}/cf-serverd %{buildroot}/%{_sbindir}/rccf-serverd
|
||||||
# sed @workdir@ in initscripts/cron.d
|
# sed @workdir@ in initscripts/cron.d
|
||||||
sed -i\
|
sed -i\
|
||||||
-e "s,@workdir@,%{workdir},g"\
|
-e "s,@workdir@,%{workdir},g"\
|
||||||
-e "s,@basedir@,%{basedir},g" \
|
-e "s,@basedir@,%{basedir},g" \
|
||||||
%{buildroot}/etc/init.d/cf-* %{buildroot}/etc/cron.d/%{name}
|
%{buildroot}%{_initddir}/cf-* %{buildroot}%{_sysconfdir}/cron.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# create symlinks for sbin_PROGRAMS
|
# create symlinks for sbin_PROGRAMS
|
||||||
# because: cf-promises needs to be installed in /var/cfengine/work/bin for pre-validation of full configuration
|
# because: cf-promises needs to be installed in /var/cfengine/work/bin for pre-validation of full configuration
|
||||||
for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd cf-upgrade; do
|
for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd cf-upgrade; do
|
||||||
%{__ln_s} -f ../../..%{_sbindir}/${i} %{buildroot}%{workdir}/bin/${i}
|
ln -s -f ../../..%{_sbindir}/${i} %{buildroot}%{workdir}/bin/${i}
|
||||||
done
|
done
|
||||||
|
|
||||||
rm -rf %{buildroot}/%{_libdir}/%{name}/libpromises.la
|
rm -rf %{buildroot}/%{_libdir}/%{name}/libpromises.la
|
||||||
@ -319,7 +293,7 @@ rm -rf %{buildroot}/%{_datadir}/%{name}/ChangeLog
|
|||||||
rm -rf %{buildroot}/%{_datadir}/%{name}/README
|
rm -rf %{buildroot}/%{_datadir}/%{name}/README
|
||||||
|
|
||||||
# create man pages, see https://cfengine.com/dev/issues/2989
|
# create man pages, see https://cfengine.com/dev/issues/2989
|
||||||
%{__install} -d %{buildroot}/%{_mandir}/man8
|
install -d %{buildroot}/%{_mandir}/man8
|
||||||
for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd
|
for i in cf-agent cf-execd cf-key cf-monitord cf-promises cf-runagent cf-serverd
|
||||||
do
|
do
|
||||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir}/%{name} %{buildroot}%{_sbindir}/$i -M > %{buildroot}%{_mandir}/man8/$i.8
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}/%{name} %{buildroot}%{_sbindir}/$i -M > %{buildroot}%{_mandir}/man8/$i.8
|
||||||
@ -327,15 +301,15 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1010
|
%if 0%{?suse_version} > 1010
|
||||||
install -D -m 644 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/cfengine
|
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/cfengine
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} > 01020
|
%if 0%{?suse_version} > 01020
|
||||||
%fdupes %{buildroot}/usr/share/cfengine
|
%fdupes %{buildroot}%{_datadir}/cfengine
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
%if %have_systemd
|
%if %{have_systemd}
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
# Systemd
|
# Systemd
|
||||||
@ -375,13 +349,12 @@ fi
|
|||||||
%stop_on_removal cf-execd
|
%stop_on_removal cf-execd
|
||||||
%stop_on_removal cf-serverd
|
%stop_on_removal cf-serverd
|
||||||
%else
|
%else
|
||||||
/etc/init.d/cf-execd stop
|
%{_initddir}/cf-execd stop
|
||||||
/etc/init.d/cf-monitord stop
|
%{_initddir}/cf-monitord stop
|
||||||
/etc/init.d/cf-serverd stop
|
%{_initddir}/cf-serverd stop
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post
|
%post -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?suse_version} > 1010
|
%if 0%{?suse_version} > 1010
|
||||||
@ -393,7 +366,7 @@ fi
|
|||||||
# Update ?
|
# Update ?
|
||||||
if [ ${1:-0} -eq 1 ]; then
|
if [ ${1:-0} -eq 1 ]; then
|
||||||
for i in execd monitord serverd; do
|
for i in execd monitord serverd; do
|
||||||
/etc/init.d/cf-${i} restart
|
%{_initddir}/cf-${i} restart
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
:
|
:
|
||||||
@ -419,12 +392,12 @@ fi
|
|||||||
%{_sbindir}/cf-upgrade
|
%{_sbindir}/cf-upgrade
|
||||||
%{_sbindir}/cf-runagent
|
%{_sbindir}/cf-runagent
|
||||||
%{_sbindir}/rpmvercmp
|
%{_sbindir}/rpmvercmp
|
||||||
%if %have_systemd
|
%if %{have_systemd}
|
||||||
%_unitdir/cf-execd.service
|
%{_unitdir}/cf-execd.service
|
||||||
%_unitdir/cf-monitord.service
|
%{_unitdir}/cf-monitord.service
|
||||||
%_unitdir/cf-serverd.service
|
%{_unitdir}/cf-serverd.service
|
||||||
%else
|
%else
|
||||||
%config %attr(0755,root,root) /etc/init.d/*
|
%config %attr(0755,root,root) %{_initddir}/*
|
||||||
%{_sbindir}/rccf-execd
|
%{_sbindir}/rccf-execd
|
||||||
%{_sbindir}/rccf-monitord
|
%{_sbindir}/rccf-monitord
|
||||||
%{_sbindir}/rccf-serverd
|
%{_sbindir}/rccf-serverd
|
||||||
@ -439,8 +412,8 @@ fi
|
|||||||
%dir %{workdir}
|
%dir %{workdir}
|
||||||
%{workdir}/*
|
%{workdir}/*
|
||||||
|
|
||||||
%if !%have_systemd
|
%if !%{have_systemd}
|
||||||
%config(noreplace) /etc/cron.d/%{name}
|
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n %{libsoname}
|
%files -n %{libsoname}
|
||||||
|
Loading…
Reference in New Issue
Block a user