From bb106502f7d9b1b8bcf5c5a2259b1e27f7211d32be449425e337a4f6b2afdecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Fri, 2 Aug 2013 07:14:58 +0000 Subject: [PATCH 1/2] - Fix SLE 11 build Add remove-am_subst_notmake.patch OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=57 --- cfengine.changes | 6 ++++++ cfengine.spec | 8 +++++++- remove-am_subst_notmake.patch | 11 +++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 remove-am_subst_notmake.patch diff --git a/cfengine.changes b/cfengine.changes index 70f50d7..0c3d3e3 100644 --- a/cfengine.changes +++ b/cfengine.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 2 07:14:21 UTC 2013 - kkaempf@suse.com + +- Fix SLE 11 build + Add remove-am_subst_notmake.patch + ------------------------------------------------------------------- Thu Jul 11 11:30:59 UTC 2013 - kkaempf@suse.com diff --git a/cfengine.spec b/cfengine.spec index 2420fa1..5b921f6 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -32,8 +32,11 @@ Version: 3.5.1 Release: 0 Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz -# there's no /usr/include/acl.h in SUSE +# there's no /usr/include/acl.h in SUSE, kkaempf@suse.de Patch1: libacl-headers.patch +# SLE 11 autoconf does not support AM_SUBST_NOTMAKE, kkaempf@suse.de +Patch2: remove-am_subst_notmake.patch + Source1: http://www.cfengine.org/manuals/cf3-Reference.pdf Source2: http://www.cfengine.org/manuals/cf3-conceptguide.pdf Source3: http://www.cfengine.org/manuals/cf3-glossary.pdf @@ -152,6 +155,9 @@ This package contains the files of the cfengine server. %setup -q -n %{name}-%{version} %if 0%{?suse_version} %patch1 -p1 +%if 0%{?suse_version} < 1120 +%patch2 -p1 +%endif %endif ##### rpmlint #### wrong-file-end-of-line-encoding diff --git a/remove-am_subst_notmake.patch b/remove-am_subst_notmake.patch new file mode 100644 index 0000000..699ab00 --- /dev/null +++ b/remove-am_subst_notmake.patch @@ -0,0 +1,11 @@ +diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x autom4te.cache -x .deps -x .libs ../orig-cfengine-3.5.1/configure.ac ./configure.ac +--- ../orig-cfengine-3.5.1/configure.ac 2013-07-11 10:26:03.000000000 +0200 ++++ ./configure.ac 2013-08-02 09:10:37.318396099 +0200 +@@ -1024,7 +1024,6 @@ + # Populate contents of config.post.h + # + AC_SUBST(post_macros) +-AM_SUBST_NOTMAKE(post_macros) + + dnl ###################################################################### + dnl Summarize From 542ac7fe919ca9e16560a602f1273c8ea4a230596b0546cbe2d76ab41e55730b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Fri, 2 Aug 2013 08:46:05 +0000 Subject: [PATCH 2/2] fix Fedora and RHEL builds OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=58 --- cfengine.spec | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/cfengine.spec b/cfengine.spec index 5b921f6..d33ce0f 100644 --- a/cfengine.spec +++ b/cfengine.spec @@ -32,9 +32,9 @@ Version: 3.5.1 Release: 0 Url: http://www.cfengine.org/ Source: %{name}-%{version}.tar.gz -# there's no /usr/include/acl.h in SUSE, kkaempf@suse.de +# there's no /usr/include/acl.h in SUSE or Fedora, kkaempf@suse.de Patch1: libacl-headers.patch -# SLE 11 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 Source1: http://www.cfengine.org/manuals/cf3-Reference.pdf @@ -153,12 +153,16 @@ This package contains the files of the cfengine server. %prep %setup -q -n %{name}-%{version} -%if 0%{?suse_version} +%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?rhel_version} %patch1 -p1 -%if 0%{?suse_version} < 1120 +%endif +%if 0%{?suse_version} > 0 && 0%{?suse_version} <= 1110 %patch2 -p1 %endif +%if 0%{?rhel_version} >= 500 && 0%{?rhel_version} < 600 +%patch2 -p1 %endif + ##### rpmlint #### wrong-file-end-of-line-encoding #### incorrect-fsf-address @@ -174,7 +178,6 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ --enable-fhs \ --with-libxml2 \ --datadir=/var \ - --docdir=%{_docdir}/%{name} \ --with-workdir=%{workdir} \ --with-postgresql \ --with-pthreads \ @@ -182,7 +185,12 @@ CC=gcc CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ --with-pcre \ --with-libvirt \ --with-libacl \ - --with-libxml2 + --with-libxml2 \ +%if 0%{?suse_version} >= 1110 || 0%{?rhel_version} >= 600 + --docdir=%{_docdir}/%{name} +%endif +# SLE 10 and RHEL5 don't recognize --docdir + %{__make} %{?_smp_mflags} # --datadir=/var/lib/%%{name}/inputs \