From 04cdd861ad9428fa5204d5bbbb0ab86159d36ba4840f85a90faba69b8814aa20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 17 Jun 2015 13:29:35 +0000 Subject: [PATCH 1/4] - Fix Fedora/RHEL builds OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=126 --- cfengine.changes | 5 +++++ cfengine.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cfengine.changes b/cfengine.changes index 93d8851..ec3745c 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 17 13:09:09 UTC 2015 - kkaempf@suse.com + +- Fix Fedora/RHEL builds + ------------------------------------------------------------------- Mon Mar 23 10:19:37 UTC 2015 - tchvatal@suse.com diff --git a/cfengine.spec b/cfengine.spec index bca3aa3..946ee10 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -69,7 +69,6 @@ Patch7: cfengine-fips.patch Patch8: 0001-Do-not-use-insecure-MD5-but-rather-SHA256.patch BuildRequires: bison BuildRequires: db-devel -BuildRequires: fdupes BuildRequires: flex BuildRequires: libacl-devel BuildRequires: libtool @@ -78,6 +77,8 @@ BuildRequires: lmdb-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pcre-devel +# for testing +BuildRequires: fakeroot Requires: %{libsoname} = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{have_systemd} @@ -104,13 +105,19 @@ BuildRequires: systemd %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 + %description CFEngine is the core of a configuration management system: ensuring the availability, security and compliance of mission-critical @@ -245,7 +252,7 @@ ln -s -f service %{buildroot}/%{_sbindir}/rccf-execd ln -s -f service %{buildroot}/%{_sbindir}/rccf-serverd %else # install init scripts -install -d %{buildroot}%{_sysconfdir}/init.d +install -d %{buildroot}%{_initddir} install -m 0755 %{SOURCE7} %{SOURCE8} %{SOURCE9} %{buildroot}%{_initddir}/ ln -s -f ../..%{_initddir}/cf-monitord %{buildroot}/%{_sbindir}/rccf-monitord ln -s -f ../..%{_initddir}/cf-execd %{buildroot}/%{_sbindir}/rccf-execd @@ -281,7 +288,9 @@ done install -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/cfengine # Ckeabyo dyoes +%if 0%{?suse_version} > 1020 %fdupes %{buildroot}%{_datadir}/cfengine +%endif %pre %if %{have_systemd} From a5afc14d15cd78ba487e8f20a3a3fd7aa9c59f7d4e429b77ae582e5b8c36a845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 17 Jun 2015 14:22:50 +0000 Subject: [PATCH 2/4] SLES does not have fakeroot OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=127 --- cfengine.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cfengine.spec b/cfengine.spec index 946ee10..6865ed3 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -77,8 +77,10 @@ BuildRequires: lmdb-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pcre-devel -# for testing +%if 0%{?suse_version} == 0 +# for testing on RHEL/Fedora BuildRequires: fakeroot +%endif Requires: %{libsoname} = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{have_systemd} @@ -113,10 +115,12 @@ Requires(post): %insserv_prereq %fillup_prereq %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 %description CFEngine is the core of a configuration management system: ensuring From 1dffd69fb28c95103bc6e706db455a8b041cb2a027e5a8a8db2fc38205222c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Wed, 17 Jun 2015 15:20:39 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=128 --- cfengine.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cfengine.spec b/cfengine.spec index 6865ed3..1cfd77d 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -118,7 +118,7 @@ BuildRequires: -post-build-checks %if 0%{?suse_version} > 1020 BuildRequires: fdupes %endif -%if 0{?fedora_version} == 20 +%if 0%{?fedora_version} == 20 BuildRequires: perl-Exporter %endif From 38c52a00a92bfc7acaa76444cf49cdb21c9f3e4c5a70c9c66a567268f07a1524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Thu, 18 Jun 2015 06:36:54 +0000 Subject: [PATCH 4/4] fix RHEL6 build OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=129 --- cfengine.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cfengine.spec b/cfengine.spec index 1cfd77d..4c978b1 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -216,7 +216,11 @@ CC=cc CFLAGS="%{optflags} -fno-strict-aliasing" \ %endif --with-libacl \ --with-libxml2 \ +%if 0%{?rhel_version} > 0 && 0%{?rhel_version} < 700 + --docdir=%{_docdir}/%{name}-%{version} \ +%else --docdir=%{_docdir}/%{name} \ +%endif --with-pam make %{?_smp_mflags}