From 02137e342a7b8f8b3ac4208fac63e749f267269d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 5 Jan 2018 18:56:58 +0100 Subject: [PATCH] Dropped libdbi on RHEL Resolves: rhbz#1531474 --- rrdtool-1.7.0-fix-configure-parameters.patch | 49 ++++++++++++++++++++ rrdtool.spec | 20 +++++++- 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 rrdtool-1.7.0-fix-configure-parameters.patch diff --git a/rrdtool-1.7.0-fix-configure-parameters.patch b/rrdtool-1.7.0-fix-configure-parameters.patch new file mode 100644 index 0000000..97747f7 --- /dev/null +++ b/rrdtool-1.7.0-fix-configure-parameters.patch @@ -0,0 +1,49 @@ +--- ./configure.ac.orig 2017-05-16 10:32:11.000000000 +0200 ++++ ./configure.ac 2018-01-05 14:00:09.261806009 +0100 +@@ -512,7 +512,11 @@ + + have_libdbi=no + +-AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]),[],[ ++AC_ARG_ENABLE(libdbi,AS_HELP_STRING([--disable-libdbi],[do not build in support for libdbi]), ++[], ++[enable_libdbi=yes]) ++ ++AS_IF([test "x$enable_libdbi" != xno], [ + AC_CHECK_HEADER(dbi/dbi.h, [ + AC_CHECK_LIB(dbi, dbi_initialize, [ + AC_DEFINE(HAVE_LIBDBI,[1],[have got libdbi installed]) +@@ -526,7 +530,11 @@ + + have_librados=no + +-AC_ARG_ENABLE(librados,AS_HELP_STRING([--disable-librados],[do not build in support for librados]),[],[ ++AC_ARG_ENABLE(librados,AS_HELP_STRING([--disable-librados],[do not build in support for librados]), ++[], ++[enable_librados=yes]) ++ ++AS_IF([test "x$enable_librados" != xno], [ + AC_CHECK_HEADER(rados/librados.h, [ + AC_DEFINE(HAVE_LIBRADOS,[1],[have got librados installed]) + LIBS="${LIBS} -lrados" +@@ -538,7 +546,11 @@ + + have_libwrap=no + +-AC_ARG_ENABLE(libwrap, AS_HELP_STRING([--disable-libwrap], [do not build in support for libwrap (tcp wrapper)]),[],[ ++AC_ARG_ENABLE(libwrap, AS_HELP_STRING([--disable-libwrap], [do not build in support for libwrap (tcp wrapper)]), ++[], ++[enable_libwrap=yes]) ++ ++AS_IF([test "x$enable_libwrap" != xno], [ + AC_CHECK_HEADER(tcpd.h,[ + AC_CHECK_FUNCS(hosts_access, [ + AC_DEFINE(HAVE_LIBWRAP,[1],[have got libwrap installed]) +@@ -554,7 +566,6 @@ + ]) + ]) + +- + AM_CONDITIONAL(BUILD_LIBWRAP,[test $have_libwrap != no]) + + AM_CONDITIONAL(BUILD_RRDGRAPH,[test $enable_rrd_graph != no]) diff --git a/rrdtool.spec b/rrdtool.spec index b7f2ea4..dab4af6 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -3,6 +3,7 @@ %global with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1} %global with_ruby %{?_without_ruby: 0} %{?!_without_ruby: 1} %global with_lua %{?_without_lua: 0} %{?!_without_lua: 1} +%global with_dbi %{?rhel: 0} %{?!rhel: 1} %global php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) %global svnrev r1190 #global pretag 1.2.99908020600 @@ -17,7 +18,7 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool Version: 1.7.0 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ @@ -29,6 +30,8 @@ Patch2: rrdtool-1.4.7-php55.patch Patch3: rrdtool-1.6.0-ruby-2-fix.patch # enable php bindings on ppc Patch4: rrdtool-1.4.8-php-ppc-fix.patch +# https://github.com/oetiker/rrdtool-1.x/issues/861 +Patch5: rrdtool-1.7.0-fix-configure-parameters.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: dejavu-sans-mono-fonts @@ -39,7 +42,10 @@ BuildRequires: gcc-c++, openssl-devel, freetype-devel BuildRequires: libpng-devel, zlib-devel, intltool >= 0.35.0 BuildRequires: cairo-devel >= 1.4.6, pango-devel >= 1.17 BuildRequires: libtool, groff, python-setuptools -BuildRequires: gettext, libxml2-devel, libdbi-devel, systemd +BuildRequires: gettext, libxml2-devel, systemd +%if %{with_dbi} +BuildRequires: libdbi-devel +%endif BuildRequires: perl-ExtUtils-MakeMaker, perl-generators, perl-Pod-Html, perl-devel BuildRequires: automake, autoconf @@ -181,6 +187,7 @@ The %{name}-lua package includes RRDtool bindings for Lua. %patch3 -p1 -b .ruby-2-fix %endif %patch4 -p1 -b .php-ppc-fix +%patch5 -p1 -b .fix-configure-parameters # Fix to find correct python dir on lib64 perl -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \ @@ -220,6 +227,11 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/ --enable-ruby \ %else --disable-ruby \ +%endif +%if %{with_dbi} + --enable-libdbi \ +%else + --disable-libdbi \ %endif --disable-static \ --with-pic @@ -394,6 +406,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \ %endif %changelog +* Fri Jan 5 2018 Jaroslav Škarvada - 1.7.0-8 +- Dropped libdbi on RHEL + Resolves: rhbz#1531474 + * Fri Jan 05 2018 Mamoru TASAKA - 1.7.0-7 - F-28: rebuild for ruby25