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>
|
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
|
# reported upstream as https://cfengine.com/dev/issues/1896
|
||||||
%define basedir %{_localstatedir}/%{name}
|
%define basedir %{_localstatedir}/%{name}
|
||||||
%define workdir %{basedir}
|
%define workdir %{basedir}
|
||||||
%if 0%{?suse_version} >= 1210
|
# This is the place where workdir should be
|
||||||
%define have_systemd 1
|
#define basedir /var/lib/%%{name}
|
||||||
%else
|
#define workdir %%{basedir}/work
|
||||||
%define have_systemd 0
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} <= 150100
|
%if 0%{?suse_version} <= 150100
|
||||||
%define with_sfw2 1
|
%define with_sfw2 1
|
||||||
%else
|
%else
|
||||||
@ -36,12 +35,10 @@
|
|||||||
%bcond_with mysql
|
%bcond_with mysql
|
||||||
%bcond_with postgresql
|
%bcond_with postgresql
|
||||||
%bcond_with libvirt
|
%bcond_with libvirt
|
||||||
|
|
||||||
Name: cfengine
|
Name: cfengine
|
||||||
Version: 3.14.0.2
|
Version: 3.14.0.2
|
||||||
Release: 0
|
Release: 0
|
||||||
# This is the place where workdir should be
|
|
||||||
#define basedir /var/lib/%%{name}
|
|
||||||
#define workdir %%{basedir}/work
|
|
||||||
Summary: Configuration management framework
|
Summary: Configuration management framework
|
||||||
License: GPL-3.0-only
|
License: GPL-3.0-only
|
||||||
Group: Productivity/Networking/System
|
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
|
Patch3: 0002-Reduce-string-truncation-warnings.patch
|
||||||
# PATCH-FIX-SUSE BNC#1016848, adam.majer
|
# PATCH-FIX-SUSE BNC#1016848, adam.majer
|
||||||
Patch10: 0003-make-home-dir-for-tests.patch
|
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: bison
|
||||||
BuildRequires: db-devel
|
BuildRequires: db-devel
|
||||||
BuildRequires: fakeroot
|
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -91,13 +85,11 @@ BuildRequires: lmdb-devel >= 0.9.17
|
|||||||
BuildRequires: openssl-devel >= 1.0.2e
|
BuildRequires: openssl-devel >= 1.0.2e
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
BuildRequires: pcre-devel >= 8.38
|
BuildRequires: pcre-devel >= 8.38
|
||||||
BuildRequires: python
|
|
||||||
# for flock
|
# for flock
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
# for llzma
|
# for llzma
|
||||||
BuildRequires: xz-devel
|
BuildRequires: xz-devel
|
||||||
Requires: %{libsoname} = %{version}
|
Requires: %{libsoname} = %{version}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
%if %{with mysql}
|
%if %{with mysql}
|
||||||
BuildRequires: mysql-devel
|
BuildRequires: mysql-devel
|
||||||
%endif
|
%endif
|
||||||
@ -107,23 +99,9 @@ BuildRequires: libvirt-devel
|
|||||||
%if %{with postgresql}
|
%if %{with postgresql}
|
||||||
BuildRequires: postgresql-devel
|
BuildRequires: postgresql-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{have_systemd}
|
|
||||||
BuildRequires: pkgconfig(systemd)
|
BuildRequires: pkgconfig(systemd)
|
||||||
%{?systemd_requires}
|
%{?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
|
BuildRequires: fdupes
|
||||||
%endif
|
|
||||||
%if 0%{?fedora_version} == 20
|
%if 0%{?fedora_version} == 20
|
||||||
BuildRequires: perl-Exporter
|
BuildRequires: perl-Exporter
|
||||||
%endif
|
%endif
|
||||||
@ -160,6 +138,7 @@ libpromises library.
|
|||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for CFEngine, a config management framework
|
Summary: Documentation for CFEngine, a config management framework
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
|
Buildarch: noarch
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation for cfengine.
|
Documentation for cfengine.
|
||||||
@ -167,6 +146,7 @@ Documentation for cfengine.
|
|||||||
%package examples
|
%package examples
|
||||||
Summary: CFEngine example promises
|
Summary: CFEngine example promises
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
|
Buildarch: noarch
|
||||||
|
|
||||||
%description examples
|
%description examples
|
||||||
Lots of example promises for CFEngine.
|
Lots of example promises for CFEngine.
|
||||||
@ -175,9 +155,6 @@ Lots of example promises for CFEngine.
|
|||||||
%setup -q -n core-3.14.0-2
|
%setup -q -n core-3.14.0-2
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%if 0%{?suse_version} <= 1110
|
|
||||||
%patch99 -p1
|
|
||||||
%endif
|
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
|
|
||||||
##### rpmlint
|
##### rpmlint
|
||||||
@ -191,7 +168,6 @@ install -d docs
|
|||||||
cp -a $RPM_SOURCE_DIR/*pdf docs/
|
cp -a $RPM_SOURCE_DIR/*pdf docs/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
echo %{version} > CFVERSION
|
|
||||||
EXPLICIT_VERSION=%{version} autoreconf -fvi -I m4
|
EXPLICIT_VERSION=%{version} autoreconf -fvi -I m4
|
||||||
CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \
|
CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \
|
||||||
%configure \
|
%configure \
|
||||||
@ -242,35 +218,15 @@ install -d %{buildroot}/{%{_bindir},%{_sbindir},%{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}
|
||||||
|
|
||||||
%if %{have_systemd}
|
|
||||||
# systemd: install sample cron file in docdir
|
# systemd: install sample cron file in docdir
|
||||||
cp %{SOURCE10} %{buildroot}/%{_docdir}/%{name}
|
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 systemd scripts
|
||||||
install -d %{buildroot}%{_unitdir}
|
install -d %{buildroot}%{_unitdir}
|
||||||
install -m 0644 %{SOURCE2} %{SOURCE3} %{SOURCE4} %{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-monitord
|
||||||
ln -s -f service %{buildroot}/%{_sbindir}/rccf-execd
|
ln -s -f service %{buildroot}/%{_sbindir}/rccf-execd
|
||||||
ln -s -f service %{buildroot}/%{_sbindir}/rccf-serverd
|
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
|
# create symlinks for bin_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
|
||||||
@ -298,46 +254,23 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Ckeabyo dyoes
|
# Ckeabyo dyoes
|
||||||
%if 0%{?suse_version} > 1020
|
|
||||||
%fdupes %{buildroot}%{_datadir}/cfengine
|
%fdupes %{buildroot}%{_datadir}/cfengine
|
||||||
%endif
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%if %{have_systemd}
|
|
||||||
%service_add_pre cf-execd.service cf-monitord.service cf-serverd.service
|
%service_add_pre cf-execd.service cf-monitord.service cf-serverd.service
|
||||||
%endif
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{have_systemd}
|
|
||||||
%service_add_post cf-execd.service cf-monitord.service cf-serverd.service
|
%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
|
if [ $1 -lt 2 ]; then
|
||||||
# first install, generate key pair
|
# first install, generate key pair
|
||||||
cf-key
|
cf-key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%if %{have_systemd}
|
|
||||||
%service_del_preun cf-execd.service cf-monitord.service cf-serverd.service
|
%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
|
%postun
|
||||||
%if %{have_systemd}
|
|
||||||
%service_del_postun cf-execd.service cf-monitord.service cf-serverd.service
|
%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
|
if [ $1 -eq 0 ]; then
|
||||||
# clean up inputs cache dir on removal
|
# clean up inputs cache dir on removal
|
||||||
rm -rf %{basedir}/inputs/*
|
rm -rf %{basedir}/inputs/*
|
||||||
@ -362,13 +295,9 @@ fi
|
|||||||
%{_bindir}/cf-upgrade
|
%{_bindir}/cf-upgrade
|
||||||
%{_bindir}/cf-runagent
|
%{_bindir}/cf-runagent
|
||||||
%{_bindir}/rpmvercmp
|
%{_bindir}/rpmvercmp
|
||||||
%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
|
|
||||||
%config %attr(0755,root,root) %{_initddir}/*
|
|
||||||
%endif
|
|
||||||
%{_sbindir}/rccf-execd
|
%{_sbindir}/rccf-execd
|
||||||
%{_sbindir}/rccf-monitord
|
%{_sbindir}/rccf-monitord
|
||||||
%{_sbindir}/rccf-serverd
|
%{_sbindir}/rccf-serverd
|
||||||
@ -379,11 +308,7 @@ fi
|
|||||||
%dir %{basedir}
|
%dir %{basedir}
|
||||||
%dir %{workdir}
|
%dir %{workdir}
|
||||||
%{workdir}/*
|
%{workdir}/*
|
||||||
%if %{have_systemd}
|
|
||||||
%{_docdir}/%{name}/cfengine.cron
|
%{_docdir}/%{name}/cfengine.cron
|
||||||
%else
|
|
||||||
%config(noreplace) %{_sysconfdir}/cron.d/%{name}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n %{libsoname}
|
%files -n %{libsoname}
|
||||||
%defattr(-,root,root)
|
%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