Accepting request 772199 from home:StefanBruens:branches:systemsmanagement
- Drop fakeroot build dependency, unused. - Drop python build dependency, determine-version.py is not used. - Always build with systemd, distribution versions without systemd are no longer supported by CFEngine. - Drop RHEL5/SLE11 only remove-am_subst_notmake.patch - Cleanup spec file, remove obsolete conditionals. - Make doc and examples packages noarch. OBS-URL: https://build.opensuse.org/request/show/772199 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=184
This commit is contained in:
parent
4c853334d0
commit
d2df3e87d2
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 7 17:51:06 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||
|
||||
- Drop fakeroot build dependency, unused.
|
||||
- Drop python build dependency, determine-version.py is not used.
|
||||
- Always build with systemd, distribution versions without
|
||||
systemd are no longer supported by CFEngine.
|
||||
- Drop RHEL5/SLE11 only remove-am_subst_notmake.patch
|
||||
- Cleanup spec file, remove obsolete conditionals.
|
||||
- Make doc and examples packages noarch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 3 12:08:28 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@ -22,11 +22,10 @@
|
||||
# reported upstream as https://cfengine.com/dev/issues/1896
|
||||
%define basedir %{_localstatedir}/%{name}
|
||||
%define workdir %{basedir}
|
||||
%if 0%{?suse_version} >= 1210
|
||||
%define have_systemd 1
|
||||
%else
|
||||
%define have_systemd 0
|
||||
%endif
|
||||
# This is the place where workdir should be
|
||||
#define basedir /var/lib/%%{name}
|
||||
#define workdir %%{basedir}/work
|
||||
|
||||
%if 0%{?suse_version} <= 150100
|
||||
%define with_sfw2 1
|
||||
%else
|
||||
@ -36,12 +35,10 @@
|
||||
%bcond_with mysql
|
||||
%bcond_with postgresql
|
||||
%bcond_with libvirt
|
||||
|
||||
Name: cfengine
|
||||
Version: 3.14.0.2
|
||||
Release: 0
|
||||
# This is the place where workdir should be
|
||||
#define basedir /var/lib/%%{name}
|
||||
#define workdir %%{basedir}/work
|
||||
Summary: Configuration management framework
|
||||
License: GPL-3.0-only
|
||||
Group: Productivity/Networking/System
|
||||
@ -77,12 +74,9 @@ Patch2: 0001-Simplify-and-fix-parsing-of-etc-SuSE-release-fixes-i.patch
|
||||
Patch3: 0002-Reduce-string-truncation-warnings.patch
|
||||
# PATCH-FIX-SUSE BNC#1016848, adam.majer
|
||||
Patch10: 0003-make-home-dir-for-tests.patch
|
||||
# SLE 11 or RHEL5 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de
|
||||
Patch99: remove-am_subst_notmake.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: db-devel
|
||||
BuildRequires: fakeroot
|
||||
BuildRequires: flex
|
||||
BuildRequires: libacl-devel
|
||||
BuildRequires: libtool
|
||||
@ -91,13 +85,11 @@ BuildRequires: lmdb-devel >= 0.9.17
|
||||
BuildRequires: openssl-devel >= 1.0.2e
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pcre-devel >= 8.38
|
||||
BuildRequires: python
|
||||
# for flock
|
||||
BuildRequires: util-linux
|
||||
# for llzma
|
||||
BuildRequires: xz-devel
|
||||
Requires: %{libsoname} = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with mysql}
|
||||
BuildRequires: mysql-devel
|
||||
%endif
|
||||
@ -107,23 +99,9 @@ BuildRequires: libvirt-devel
|
||||
%if %{with postgresql}
|
||||
BuildRequires: postgresql-devel
|
||||
%endif
|
||||
%if %{have_systemd}
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%else
|
||||
# Without systemd we require cron
|
||||
Requires: cron
|
||||
%if 0%{?suse_version}
|
||||
Requires(post): %insserv_prereq %fillup_prereq
|
||||
%endif
|
||||
%endif
|
||||
# FHS was a hit with sle11 so it dies out otherwise
|
||||
%if 0%{?suse_version} <= 1110
|
||||
BuildRequires: -post-build-checks
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
%if 0%{?fedora_version} == 20
|
||||
BuildRequires: perl-Exporter
|
||||
%endif
|
||||
@ -160,6 +138,7 @@ libpromises library.
|
||||
%package doc
|
||||
Summary: Documentation for CFEngine, a config management framework
|
||||
Group: Documentation/Other
|
||||
Buildarch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for cfengine.
|
||||
@ -167,6 +146,7 @@ Documentation for cfengine.
|
||||
%package examples
|
||||
Summary: CFEngine example promises
|
||||
Group: Documentation/Other
|
||||
Buildarch: noarch
|
||||
|
||||
%description examples
|
||||
Lots of example promises for CFEngine.
|
||||
@ -175,9 +155,6 @@ Lots of example promises for CFEngine.
|
||||
%setup -q -n core-3.14.0-2
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%if 0%{?suse_version} <= 1110
|
||||
%patch99 -p1
|
||||
%endif
|
||||
%patch10 -p1
|
||||
|
||||
##### rpmlint
|
||||
@ -191,7 +168,6 @@ install -d docs
|
||||
cp -a $RPM_SOURCE_DIR/*pdf docs/
|
||||
|
||||
%build
|
||||
echo %{version} > CFVERSION
|
||||
EXPLICIT_VERSION=%{version} autoreconf -fvi -I m4
|
||||
CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||
%configure \
|
||||
@ -242,35 +218,15 @@ install -d %{buildroot}/{%{_bindir},%{_sbindir},%{workdir}/{bin,inputs,reports}}
|
||||
# create dirs needed for better organizing dirs and files
|
||||
install -d %{buildroot}/%{basedir}/{backup,failsafe,config,plugins}
|
||||
|
||||
%if %{have_systemd}
|
||||
# systemd: install sample cron file in docdir
|
||||
cp %{SOURCE10} %{buildroot}/%{_docdir}/%{name}
|
||||
%else
|
||||
# no systemd -> use cron
|
||||
# install cron file
|
||||
install -D -m0644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/cron.d/%{name}
|
||||
%endif
|
||||
|
||||
%if %{have_systemd}
|
||||
# install systemd scripts
|
||||
install -d %{buildroot}%{_unitdir}
|
||||
install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{buildroot}/%{_unitdir}
|
||||
ln -s -f service %{buildroot}/%{_sbindir}/rccf-monitord
|
||||
ln -s -f service %{buildroot}/%{_sbindir}/rccf-execd
|
||||
ln -s -f service %{buildroot}/%{_sbindir}/rccf-serverd
|
||||
%else
|
||||
# install init scripts
|
||||
install -d %{buildroot}%{_initddir}
|
||||
install -m 0755 %{SOURCE5} %{SOURCE6} %{SOURCE7} %{buildroot}%{_initddir}/
|
||||
ln -s -f ../..%{_initddir}/cf-monitord %{buildroot}/%{_sbindir}/rccf-monitord
|
||||
ln -s -f ../..%{_initddir}/cf-execd %{buildroot}/%{_sbindir}/rccf-execd
|
||||
ln -s -f ../..%{_initddir}/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}%{_initddir}/cf-* %{buildroot}%{_sysconfdir}/cron.d/%{name}
|
||||
%endif
|
||||
|
||||
# create symlinks for bin_PROGRAMS
|
||||
# because: cf-promises needs to be installed in /var/cfengine/work/bin for pre-validation of full configuration
|
||||
@ -298,46 +254,23 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.
|
||||
%endif
|
||||
|
||||
# Ckeabyo dyoes
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes %{buildroot}%{_datadir}/cfengine
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%if %{have_systemd}
|
||||
%service_add_pre cf-execd.service cf-monitord.service cf-serverd.service
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if %{have_systemd}
|
||||
%service_add_post cf-execd.service cf-monitord.service cf-serverd.service
|
||||
%else
|
||||
for i in execd monitord serverd; do
|
||||
%fillup_and_insserv cf-${i}
|
||||
done
|
||||
%endif
|
||||
if [ $1 -lt 2 ]; then
|
||||
# first install, generate key pair
|
||||
cf-key
|
||||
fi
|
||||
|
||||
%preun
|
||||
%if %{have_systemd}
|
||||
%service_del_preun cf-execd.service cf-monitord.service cf-serverd.service
|
||||
%else
|
||||
for i in execd monitord serverd; do
|
||||
%stop_on_removal cf-${i}
|
||||
done
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if %{have_systemd}
|
||||
%service_del_postun cf-execd.service cf-monitord.service cf-serverd.service
|
||||
%else
|
||||
%insserv_cleanup
|
||||
for i in execd monitord serverd; do
|
||||
%restart_on_update cf-${i}
|
||||
done
|
||||
%endif
|
||||
if [ $1 -eq 0 ]; then
|
||||
# clean up inputs cache dir on removal
|
||||
rm -rf %{basedir}/inputs/*
|
||||
@ -362,13 +295,9 @@ fi
|
||||
%{_bindir}/cf-upgrade
|
||||
%{_bindir}/cf-runagent
|
||||
%{_bindir}/rpmvercmp
|
||||
%if %{have_systemd}
|
||||
%{_unitdir}/cf-execd.service
|
||||
%{_unitdir}/cf-monitord.service
|
||||
%{_unitdir}/cf-serverd.service
|
||||
%else
|
||||
%config %attr(0755,root,root) %{_initddir}/*
|
||||
%endif
|
||||
%{_sbindir}/rccf-execd
|
||||
%{_sbindir}/rccf-monitord
|
||||
%{_sbindir}/rccf-serverd
|
||||
@ -379,11 +308,7 @@ fi
|
||||
%dir %{basedir}
|
||||
%dir %{workdir}
|
||||
%{workdir}/*
|
||||
%if %{have_systemd}
|
||||
%{_docdir}/%{name}/cfengine.cron
|
||||
%else
|
||||
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
|
||||
%endif
|
||||
|
||||
%files -n %{libsoname}
|
||||
%defattr(-,root,root)
|
||||
|
@ -1,11 +0,0 @@
|
||||
diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-core-3.6.3rc-build1/configure.ac ./configure.ac
|
||||
--- ../orig-core-3.6.3rc-build1/configure.ac 2014-11-27 20:17:34.000000000 +0100
|
||||
+++ ./configure.ac 2014-11-28 10:21:03.077231135 +0100
|
||||
@@ -1328,7 +1328,6 @@
|
||||
# Populate contents of config.post.h
|
||||
#
|
||||
AC_SUBST(post_macros)
|
||||
-AM_SUBST_NOTMAKE(post_macros)
|
||||
|
||||
dnl ######################################################################
|
||||
dnl Summarize
|
Loading…
x
Reference in New Issue
Block a user