Accepting request 886679 from systemsmanagement

OBS-URL: https://build.opensuse.org/request/show/886679
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cfengine?expand=0&rev=77
This commit is contained in:
Dominique Leuenberger 2021-04-19 19:06:30 +00:00 committed by Git OBS Bridge
commit 622b93df54
5 changed files with 83 additions and 47 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4256e6e1ca04776a9fd48f1388a30edfa8d11fdcf870ba62ce5b0ad62a87372
size 3137694

View File

@ -1,3 +1,41 @@
-------------------------------------------------------------------
Sun Apr 18 02:27:07 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
- Fixed SPEC file: Replaced broken URL with current upstream
- Update to 3.17.0
* cf-agent can now simulate the changes done to files in a chroot, printing
diff or manifest information about what it would do in a normal evaluation.
Use the new command line option: `--simulate=diff` or `--simulate=manifest`.
Please note that only files and packages promises are simulated currently.
* Custom promise types can now be added using promise modules
* cf-monitord now uses /proc/net/* files to get network information if
possible
* Added new policy function execresult_as_data()
* Added optional argument to execresult for choosing between stdout and
stderr
* Outcome classes are now always defined for promiser in files promises
* and(), or(), not() now return boolean and cannot be used directly in
slist vars. They can now be used in other places where a boolean is
expected. (Most notably and / or promise attributes). The return values
can be converted to strings using concat(), if necessary (CFE-3470)
* Backgrounded commands are now correctly executed in the child process
* CFEngine policy bodies can now be completely empty
* Directory listings in files changes monitoring are now only updated
when there is a change
* Promises with 'action => bg()' no longer break reporting data (ENT-6042)
* Spaces inside square brackets (slist/data index) are now allowed in
class expressions (CFE-3320)
* Variables specifying data/list names in @() references are now expanded
* Added warnings when trying to use to expand containers in mustache
templates (CFE-3457, CFE-3489)
* Limited unqualified host and domain name to 511 characters (CFE-3409)
* AVCs are no longer produced for CFEngine processes accessing /proc/net
* Fixed how we check for `--cols` argument to `ps` (ENT-6098)
* Fixed a memory leak in users promises
* Fixed a small memory leak in cf-promises (CFE-3461)
* Fixed expansion of variables in data/list references (CFE-3299)
- FHS issue upstream resolved, can be installed accoring to FHS
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 23 08:34:55 UTC 2020 - Klaus Kämpf <kkaempf@suse.com> Wed Sep 23 08:34:55 UTC 2020 - Klaus Kämpf <kkaempf@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package cfengine # spec file for package cfengine
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,13 +18,13 @@
%define libname libpromises %define libname libpromises
%define libsoname %{libname}3 %define libsoname %{libname}3
# Yes, its not FHS conformant but in sync with cfengine documentation # 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 basedir %{_localstatedir}/%{name} %define workdir %{basedir}
%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 %%{_localstatedir}/lib/%%{name}
#define workdir %%{basedir}/work #%%define workdir %%{basedir}/work
%if 0%{?suse_version} < 1500 %if 0%{?suse_version} < 1500
# assume SuSEfirewall2 # assume SuSEfirewall2
@ -33,33 +33,33 @@
# assume firewalld # assume firewalld
%define with_sfw2 0 %define with_sfw2 0
%endif %endif
# Version of libntech needed (see git repo of core)
%define libntech_hash 4e9efcb84172110fa92742836b8d34688983c2e7
# pass --with-bla to enable the build # pass --with-bla to enable the build
%bcond_with mysql %bcond_with mysql
%bcond_with postgresql %bcond_with postgresql
%bcond_with libvirt %bcond_with libvirt
Name: cfengine Name: cfengine
Version: 3.16.0 Version: 3.17.0
Release: 0 Release: 0
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
URL: http://www.cfengine.org/ URL: https://cfengine.com/
Source: https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-%{version}.tar.gz Source0: https://github.com/cfengine/core/archive/refs/tags/%{version}.tar.gz#/core-%{version}.tar.gz
Source1: %{name}.SuSEfirewall2 Source1: https://github.com/cfengine/libntech/archive/%{libntech_hash}.tar.gz#/libntech-%{libntech_hash}.tar.gz
Source2: cf-execd.service Source11: %{name}.SuSEfirewall2
Source3: cf-monitord.service Source12: cf-execd.service
Source4: cf-serverd.service Source13: cf-monitord.service
Source5: cf-monitord Source14: cf-serverd.service
Source6: cf-execd Source15: cf-monitord
Source7: cf-serverd Source16: cf-execd
Source10: %{name}.cron Source17: cf-serverd
Source11: %{name}-rpmlintrc Source20: %{name}.cron
Source21: %{name}-rpmlintrc
Recommends: %{name}-documentation
BuildRequires: bison BuildRequires: bison
BuildRequires: db-devel BuildRequires: db-devel
BuildRequires: fdupes
BuildRequires: flex BuildRequires: flex
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libtool BuildRequires: libtool
@ -68,11 +68,15 @@ 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: pkgconfig
# for flock # for flock
BuildRequires: util-linux BuildRequires: util-linux
# for llzma # for llzma
BuildRequires: xz-devel BuildRequires: xz-devel
BuildRequires: pkgconfig(systemd)
Requires: %{libsoname} = %{version} Requires: %{libsoname} = %{version}
Recommends: %{name}-documentation
%{?systemd_requires}
%if !%{with_sfw2} %if !%{with_sfw2}
BuildRequires: firewall-macros BuildRequires: firewall-macros
%endif %endif
@ -85,9 +89,6 @@ BuildRequires: libvirt-devel
%if %{with postgresql} %if %{with postgresql}
BuildRequires: postgresql-devel BuildRequires: postgresql-devel
%endif %endif
BuildRequires: pkgconfig(systemd)
%{?systemd_requires}
BuildRequires: fdupes
%if 0%{?fedora_version} == 20 %if 0%{?fedora_version} == 20
BuildRequires: perl-Exporter BuildRequires: perl-Exporter
%endif %endif
@ -130,13 +131,12 @@ BuildArch: noarch
Lots of example promises for CFEngine. Lots of example promises for CFEngine.
%prep %prep
%setup -q %setup -q -n core-%{version} -a 1
[ -d libntech ] && rmdir -v libntech
ln -s libntech-%{libntech_hash} libntech
##### rpmlint ##### rpmlint
#### wrong-file-end-of-line-encoding #### wrong-file-end-of-line-encoding
#### incorrect-fsf-address find ./examples -type f -name "*.cf" -exec perl -p -i -e 's|\r\n|\n|' {} \;
### http://www.fsf.org/about/contact/
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|' {} \;
%build %build
EXPLICIT_VERSION=%{version} autoreconf -fvi -I m4 EXPLICIT_VERSION=%{version} autoreconf -fvi -I m4
@ -145,7 +145,7 @@ CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \
--disable-static \ --disable-static \
--disable-silent-rules \ --disable-silent-rules \
--enable-fhs \ --enable-fhs \
--datadir=/var \ --datadir=%{_localstatedir} \
--with-workdir=%{workdir} \ --with-workdir=%{workdir} \
%if %{with postgresql} %if %{with postgresql}
--with-postgresql \ --with-postgresql \
@ -171,15 +171,15 @@ CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \
%endif %endif
--with-pam --with-pam
make %{?_smp_mflags} %make_build
%check %check
# FAIL: process_test # FAIL: process_test
make check %{?_smp_mflags} || : %make_build check || :
%install %install
chmod -x ChangeLog chmod -x ChangeLog
make "DESTDIR=%{buildroot}" install %make_install
# will appear in cfengine-examples # will appear in cfengine-examples
rm -rf %{buildroot}/%{_docdir}/%{name}/examples rm -rf %{buildroot}/%{_docdir}/%{name}/examples
@ -190,11 +190,11 @@ install -d %{buildroot}/{%{_bindir},%{_sbindir},%{workdir}/{bin,inputs,reports}}
install -d %{buildroot}/%{basedir}/{backup,failsafe,config,plugins} install -d %{buildroot}/%{basedir}/{backup,failsafe,config,plugins}
# systemd: install sample cron file in docdir # systemd: install sample cron file in docdir
cp %{SOURCE10} %{buildroot}/%{_docdir}/%{name} cp %{SOURCE20} %{buildroot}/%{_docdir}/%{name}
# 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 %{SOURCE12} %{SOURCE13} %{SOURCE14} %{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
@ -202,7 +202,7 @@ ln -s -f service %{buildroot}/%{_sbindir}/rccf-serverd
# 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
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 ../../..%{_bindir}/${i} %{buildroot}%{workdir}/bin/${i} ln -s -f %{_bindir}/${i} %{buildroot}%{workdir}/bin/${i}
done done
rm -rf %{buildroot}/%{_libdir}/%{name}/libpromises.la rm -rf %{buildroot}/%{_libdir}/%{name}/libpromises.la
@ -221,7 +221,7 @@ done
# Firewall # Firewall
%if %{with_sfw2} %if %{with_sfw2}
install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/cfengine install -D -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/cfengine
%endif %endif
# Ckeabyo dyoes # Ckeabyo dyoes
@ -254,13 +254,11 @@ fi
%endif %endif
%post -n %{libsoname} -p /sbin/ldconfig %post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig %postun -n %{libsoname} -p /sbin/ldconfig
%files %files
%defattr(-,root,root)
%doc ChangeLog README.md
%license LICENSE %license LICENSE
%doc ChangeLog README.md
%{_bindir}/cf-agent %{_bindir}/cf-agent
%{_bindir}/cf-check %{_bindir}/cf-check
%{_bindir}/cf-execd %{_bindir}/cf-execd
@ -292,16 +290,13 @@ fi
%{_docdir}/%{name}/cfengine.cron %{_docdir}/%{name}/cfengine.cron
%files -n %{libsoname} %files -n %{libsoname}
%defattr(-,root,root)
%dir %{_libdir}/%{name} %dir %{_libdir}/%{name}
%{_libdir}/%{name}/%{libname}.so.* %{_libdir}/%{name}/%{libname}.so.*
%files -n %{libname}-devel %files -n %{libname}-devel
%defattr(-,root,root)
%{_libdir}/%{name}/%{libname}.so %{_libdir}/%{name}/%{libname}.so
%files examples %files examples
%defattr(-,root,root)
%doc examples/*cf %doc examples/*cf
%changelog %changelog

3
core-3.17.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab5634ad6e3fe262209b54ccb49ea06da00872cfb320a802756ee50ab9c7b8a7
size 2291995

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:342fe2cd05f8e79cd438dea144bb53b357c06255030b94e9870dd3b9b8eb97cf
size 365588