2007-01-04 02:07:28 +01:00
|
|
|
#
|
2011-05-12 11:01:13 +02:00
|
|
|
# spec file for package rrdtool
|
2007-01-04 02:07:28 +01:00
|
|
|
#
|
2014-01-10 21:38:07 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-04 02:07:28 +01:00
|
|
|
#
|
2008-09-13 12:09:05 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-04 02:07:28 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-03-06 09:38:38 +01:00
|
|
|
|
2014-02-09 20:33:54 +01:00
|
|
|
%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
|
|
|
|
|
2007-01-04 02:07:28 +01:00
|
|
|
Name: rrdtool
|
2013-10-04 14:07:36 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2012-01-30 19:28:30 +01:00
|
|
|
BuildRequires: cairo-devel
|
|
|
|
BuildRequires: freetype2-devel
|
2013-10-04 14:07:36 +02:00
|
|
|
BuildRequires: gettext-tools
|
2012-01-30 19:28:30 +01:00
|
|
|
BuildRequires: glib2-devel
|
2012-10-26 17:57:50 +02:00
|
|
|
BuildRequires: groff
|
2012-01-30 19:28:30 +01:00
|
|
|
BuildRequires: intltool
|
|
|
|
BuildRequires: libart_lgpl-devel
|
|
|
|
BuildRequires: libpng-devel
|
2013-10-04 14:07:36 +02:00
|
|
|
BuildRequires: libtool
|
2012-01-30 19:28:30 +01:00
|
|
|
BuildRequires: libxml2-devel
|
2013-10-04 14:07:36 +02:00
|
|
|
BuildRequires: lua51-devel
|
2012-01-30 19:28:30 +01:00
|
|
|
BuildRequires: pango-devel
|
|
|
|
BuildRequires: python-devel
|
2010-03-31 19:54:29 +02:00
|
|
|
BuildRequires: ruby-devel
|
2013-10-04 14:07:36 +02:00
|
|
|
BuildRequires: tcl-devel
|
|
|
|
BuildRequires: tcpd-devel
|
2014-11-20 13:57:16 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2007-01-04 02:07:28 +01:00
|
|
|
Requires: perl = %{perl_version}
|
2012-03-06 09:38:38 +01:00
|
|
|
Version: 1.4.7
|
2012-01-30 19:28:30 +01:00
|
|
|
Release: 0
|
2011-05-11 20:38:53 +02:00
|
|
|
%define cgilib_version 0.7
|
2013-04-05 15:53:07 +02:00
|
|
|
Source: http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{version}.tar.gz
|
2013-07-11 09:38:09 +02:00
|
|
|
Patch1: rrdtool-lua-ruby_lib64.patch
|
2011-05-11 20:38:53 +02:00
|
|
|
Patch2: rrdtool-tclversion.patch
|
2011-05-13 19:34:23 +02:00
|
|
|
Patch3: rrdtool-tclsegfault.patch
|
2014-12-04 18:37:04 +01:00
|
|
|
# PATCH-FIX-UPSTREAM bnc#828003 kstreitova@suse.com -- adds check to the imginfo format to prevent crash or exploit
|
|
|
|
Patch4: rrdtool-1.4.7-CVE-2013-2131-imginfo_format_check.patch
|
2013-04-05 15:53:07 +02:00
|
|
|
Source1: http://www.infodrom.org/projects/cgilib/download/cgilib-%{cgilib_version}.tar.gz
|
2010-12-28 04:02:19 +01:00
|
|
|
Patch11: cgilib-fix_automake.patch
|
2013-11-18 15:14:47 +01:00
|
|
|
#PATCH FIX UPSTREAM BNC#793636
|
2013-11-18 12:57:24 +01:00
|
|
|
Patch12: rrdtool-zero_vs_nothing.patch
|
2013-10-03 16:16:18 +02:00
|
|
|
Source2: sysconfig.rrdcached
|
|
|
|
Source4: rrdcached-systemd-pre
|
|
|
|
Source5: rrdcached.service
|
2008-03-10 18:35:10 +01:00
|
|
|
Url: http://oss.oetiker.ch/rrdtool/
|
2007-01-04 02:07:28 +01:00
|
|
|
Summary: A tool for data logging and analysis
|
2012-01-30 19:28:30 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Scientific/Math
|
2008-02-21 02:00:01 +01:00
|
|
|
Requires: dejavu
|
2013-10-03 16:16:18 +02:00
|
|
|
Requires(pre): pwdutils
|
2007-01-04 02:07:28 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
2013-10-03 16:55:51 +02:00
|
|
|
%package devel
|
|
|
|
Summary: A tool for data logging and analysis - Development files
|
|
|
|
Group: Development/Libraries/Other
|
|
|
|
Requires: %name = %version
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
|
|
|
%package -n python-rrdtool
|
|
|
|
Summary: Python bindings for rrdtool
|
|
|
|
Group: Productivity/Scientific/Math
|
|
|
|
Requires: %name = %version
|
|
|
|
%py_requires
|
|
|
|
|
|
|
|
%description -n python-rrdtool
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
|
|
|
This package contains the Python bindings
|
|
|
|
|
|
|
|
|
|
|
|
%package -n lua-rrdtool
|
|
|
|
Summary: Lua bindings for rrdtool
|
|
|
|
Group: Productivity/Scientific/Math
|
|
|
|
Requires: %name = %version
|
|
|
|
|
|
|
|
%description -n lua-rrdtool
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
|
|
|
This package contains the Lua bindings
|
|
|
|
|
|
|
|
%package -n ruby-rrdtool
|
|
|
|
Summary: Ruby bindings for rrdtool
|
|
|
|
Group: Productivity/Scientific/Math
|
2014-01-13 11:55:42 +01:00
|
|
|
Requires: ruby(abi) >= %{rb_ver}
|
2013-10-03 16:55:51 +02:00
|
|
|
|
|
|
|
%description -n ruby-rrdtool
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
|
|
|
This package contains the Ruby bindings
|
|
|
|
|
|
|
|
%package -n tcl-rrdtool
|
|
|
|
Summary: Tcl bindings for rrdtool
|
|
|
|
Group: Productivity/Scientific/Math
|
|
|
|
Requires: tcl
|
|
|
|
|
|
|
|
%description -n tcl-rrdtool
|
|
|
|
A tool to log and analyze data gathered from all kinds of data sources.
|
|
|
|
The data analysis part of RRDtool is based on the ability to quickly
|
|
|
|
generate graphical representations of the data values collected over a
|
|
|
|
definable time period.
|
|
|
|
|
|
|
|
This package contains the Tcl bindings
|
|
|
|
|
|
|
|
%package cached
|
|
|
|
Summary: Data caching daemon for RRDtool
|
|
|
|
Group: Productivity/Scientific/Math
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define rrdcached_user rrdcached
|
|
|
|
%define rrdcached_group rrdcached
|
|
|
|
|
|
|
|
%description cached
|
|
|
|
rrdcached is a daemon that receives updates to existing RRD files,
|
|
|
|
accumulates them and, if enough have been received or a defined time has
|
|
|
|
passed, writes the updates to the RRD file. The daemon was written with
|
|
|
|
big setups in mind which usually runs into I/O related problems. This
|
|
|
|
daemon was written to alleviate these problems.
|
|
|
|
|
2007-01-04 02:07:28 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -a1
|
2010-12-28 04:02:19 +01:00
|
|
|
%if %{_lib}==lib64
|
|
|
|
%patch1
|
|
|
|
%endif
|
2011-05-11 20:38:53 +02:00
|
|
|
%patch2
|
2011-05-13 19:34:23 +02:00
|
|
|
%patch3
|
2014-12-04 18:37:04 +01:00
|
|
|
%patch4 -p1
|
2010-12-28 04:02:19 +01:00
|
|
|
pushd "cgilib-%{cgilib_version}"
|
|
|
|
%patch11
|
|
|
|
popd #cgilib
|
2013-11-18 12:57:24 +01:00
|
|
|
%patch12 -p1
|
2007-01-04 02:07:28 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
# first prepare cgilib
|
2010-12-28 04:02:19 +01:00
|
|
|
pushd cgilib-%{cgilib_version}
|
|
|
|
echo -n > NEWS
|
|
|
|
aclocal --force
|
|
|
|
autoreconf -fiv
|
2010-12-28 04:09:45 +01:00
|
|
|
CGILIB_CFLAGS="%{optflags} -fPIC -I."
|
|
|
|
CGILIB_CFLAGS="$CGILIB_CFLAGS -fexcess-precision=fast"
|
|
|
|
CFLAGS="$CGILIB_CFLAGS" \
|
2010-12-28 04:02:19 +01:00
|
|
|
%configure
|
|
|
|
make %{?jobs:-j %jobs}
|
|
|
|
%__mkdir_p ../lb/include
|
|
|
|
%__cp *.h ../lb/include/
|
|
|
|
%__mkdir_p ../lb/lib/
|
|
|
|
%__cp -a .libs/libcgi.so* ../lb/lib/
|
|
|
|
popd #cgilib
|
|
|
|
|
2007-01-04 02:07:28 +01:00
|
|
|
# build rrdtool
|
2009-04-23 23:30:49 +02:00
|
|
|
if [ ! -d m4 ]; then mkdir m4; fi
|
2010-07-30 15:43:46 +02:00
|
|
|
# we need getext 0.18
|
|
|
|
#autoreconf -i -f
|
2009-04-23 23:30:49 +02:00
|
|
|
export LDFLAGS="-L`pwd`/lb/lib" CPPFLAGS="-I`pwd`/lb/include" \
|
|
|
|
%configure --disable-static --with-pic --enable-shared \
|
2013-10-03 16:16:18 +02:00
|
|
|
--enable-tcl-site \
|
2007-01-04 02:07:28 +01:00
|
|
|
--with-tcllib=%{_libdir} \
|
2007-01-05 16:51:12 +01:00
|
|
|
--with-gnu-ld \
|
2013-10-03 16:16:18 +02:00
|
|
|
--enable-python \
|
|
|
|
--enable-ruby \
|
|
|
|
--enable-ruby-site-install \
|
2010-12-28 04:02:19 +01:00
|
|
|
--disable-rpath \
|
2010-03-31 19:54:29 +02:00
|
|
|
--with-rrd-default-font="monospace"
|
2010-12-28 04:02:19 +01:00
|
|
|
make %{?jobs:-j %jobs} V=1
|
2007-01-04 02:07:28 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
#eval `perl -V:installarchlib`
|
2013-06-06 09:23:49 +02:00
|
|
|
# Override hdrdir and rubyhdrdir to avoid makefile dependencies on
|
|
|
|
# installed ruby headers to be prefixed with %{buildroot}
|
2007-01-04 02:07:28 +01:00
|
|
|
make \
|
|
|
|
DESTDIR=$RPM_BUILD_ROOT \
|
|
|
|
idocdir=%{_docdir}/%{name}/txt/ \
|
|
|
|
ihtmldir=%{_docdir}/%{name}/html/ \
|
|
|
|
examplesdir=%{_docdir}/%{name}/examples/ \
|
|
|
|
libdir=%{_libdir} \
|
2011-05-11 20:38:53 +02:00
|
|
|
pkglibdir=%tcl_archdir/tclrrd%version \
|
2007-01-04 02:07:28 +01:00
|
|
|
install
|
|
|
|
# we install this later again
|
|
|
|
rm -r $RPM_BUILD_ROOT%{_prefix}/lib/perl
|
2007-01-05 16:51:12 +01:00
|
|
|
# do not install fonts (use system fonts instead)
|
|
|
|
rm -rf $RPM_BUILD_ROOT%_datadir/rrdtool/fonts
|
2007-01-04 02:07:28 +01:00
|
|
|
# install correctly perl modules
|
|
|
|
pushd bindings/perl-piped
|
|
|
|
perl Makefile.PL
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
|
|
|
popd
|
|
|
|
pushd bindings/perl-shared
|
|
|
|
perl Makefile.PL
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
|
|
|
popd
|
|
|
|
%perl_process_packlist
|
|
|
|
#fix build (it would be better to split cgilib)
|
2008-08-02 05:32:30 +02:00
|
|
|
#sed 's/[[:space:]]*-L\/usr\/src\/packages\/BUILD\/%{name}-%{version}\/lb\/lib[[:space:]]*/ /' $RPM_BUILD_ROOT/%{_libdir}/librrd.la > tmp
|
|
|
|
#mv tmp $RPM_BUILD_ROOT/%{_libdir}/librrd.la
|
|
|
|
#sed 's/[[:space:]]*-L\/usr\/src\/packages\/BUILD\/%{name}-%{version}\/lb\/lib[[:space:]]*/ /' $RPM_BUILD_ROOT/%{_libdir}/librrd_th.la > tmp
|
|
|
|
#mv tmp $RPM_BUILD_ROOT/%{_libdir}/librrd_th.la
|
2010-12-28 04:02:19 +01:00
|
|
|
find "%{buildroot}" -type f -name '*.la' -exec %__rm {} \;
|
2013-10-03 16:16:18 +02:00
|
|
|
# install ruby bindings
|
|
|
|
pushd bindings/ruby
|
2014-01-10 21:38:07 +01:00
|
|
|
mkdir -p %{buildroot}/%{rb_sitearchdir}
|
2013-10-03 16:16:18 +02:00
|
|
|
make DESTDIR=%{buildroot} install
|
|
|
|
popd
|
2007-01-04 02:07:28 +01:00
|
|
|
# documentation
|
2007-01-29 17:15:56 +01:00
|
|
|
install -m 644 CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO $RPM_BUILD_ROOT/%{_docdir}/%{name}
|
2013-10-03 16:16:18 +02:00
|
|
|
pushd doc
|
|
|
|
mkdir txt
|
|
|
|
mkdir html
|
|
|
|
mv *.txt txt/
|
|
|
|
mv *.html html/
|
|
|
|
popd
|
|
|
|
rm examples/rrdcached/Makefile*
|
|
|
|
chmod -x examples/*
|
|
|
|
chmod +x examples/rrdcached
|
|
|
|
# install rrdcached specials
|
|
|
|
install -Dm644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.rrdcached
|
|
|
|
# install systemd specific files
|
|
|
|
install -Dm755 %{SOURCE4} %{buildroot}%{_datadir}/rrdcached/rrdcached-systemd-pre
|
|
|
|
install -Dm644 %{SOURCE5} %{buildroot}%{_unitdir}/rrdcached.service
|
2014-02-09 20:33:54 +01:00
|
|
|
install -d -m 0755 %{buildroot}/%{_tmpfilesdir}
|
|
|
|
echo "d /run/rrdcached 0755 %{rrdcached_user} %{rrdcached_group}" > %{buildroot}/%{_tmpfilesdir}/rrdcached.conf
|
|
|
|
chmod 644 %{buildroot}/%{_tmpfilesdir}/rrdcached.conf
|
2007-01-04 02:07:28 +01:00
|
|
|
|
2007-05-24 02:10:24 +02:00
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
2007-01-04 02:07:28 +01:00
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc %{_docdir}/rrdtool
|
|
|
|
%doc %{_mandir}/*/*
|
2013-10-03 16:55:51 +02:00
|
|
|
%{_bindir}/*
|
2013-10-03 16:16:18 +02:00
|
|
|
%exclude %{_bindir}/rrdcached
|
2007-06-22 00:12:35 +02:00
|
|
|
%{_libdir}/librrd.so.*
|
|
|
|
%{_libdir}/librrd_th.so.*
|
2007-01-04 02:07:28 +01:00
|
|
|
%{perl_vendorlib}/RRDp.pm
|
|
|
|
%{perl_vendorarch}/RRDs.pm
|
2009-04-23 23:30:49 +02:00
|
|
|
#%{perl_vendorarch}/ntmake.pl
|
2007-01-04 02:07:28 +01:00
|
|
|
%{perl_vendorarch}/auto/*
|
2008-07-09 00:39:49 +02:00
|
|
|
#%{_datadir}/%{name}
|
2007-11-28 23:48:25 +01:00
|
|
|
|
2007-06-22 00:12:35 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-, root, root)
|
2013-10-03 16:55:51 +02:00
|
|
|
%{_includedir}/*
|
2007-06-22 00:12:35 +02:00
|
|
|
%{_libdir}/librrd_th.so
|
|
|
|
%{_libdir}/librrd.so
|
2008-10-06 19:07:19 +02:00
|
|
|
%{_libdir}/pkgconfig/librrd.pc
|
2007-11-28 23:48:25 +01:00
|
|
|
|
2007-06-22 00:12:35 +02:00
|
|
|
%files -n python-rrdtool
|
|
|
|
%defattr(-, root, root)
|
2007-05-09 15:15:21 +02:00
|
|
|
%{py_sitedir}/*
|
2007-01-04 02:07:28 +01:00
|
|
|
|
2010-12-28 04:02:19 +01:00
|
|
|
%files -n lua-rrdtool
|
|
|
|
%defattr(-, root, root)
|
2010-12-28 04:15:35 +01:00
|
|
|
%dir %{_libdir}/lua
|
|
|
|
%dir %{_libdir}/lua/*
|
2010-12-28 04:02:19 +01:00
|
|
|
%{_libdir}/lua/*/rrd.so
|
|
|
|
%{_libdir}/lua/*/rrd.so.*
|
|
|
|
|
2011-05-11 20:38:53 +02:00
|
|
|
%files -n tcl-rrdtool
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{tcl_archdir}/*
|
|
|
|
%{_libdir}/tclrrd*.so
|
|
|
|
|
2013-10-03 16:16:18 +02:00
|
|
|
#%{!?rb_sitearchdir: %define rb_sitearchdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]')}
|
2013-07-11 09:38:09 +02:00
|
|
|
|
|
|
|
%files -n ruby-rrdtool
|
|
|
|
%defattr(-, root, root)
|
2013-10-03 16:16:18 +02:00
|
|
|
%{rb_sitearchdir}/RRD.so
|
|
|
|
|
|
|
|
%files cached
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_bindir}/rrdcached
|
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.rrdcached
|
|
|
|
%{_datadir}/rrdcached
|
|
|
|
%{_datadir}/rrdcached/rrdcached-systemd-pre
|
|
|
|
%{_unitdir}/rrdcached.service
|
2014-02-09 20:33:54 +01:00
|
|
|
%{_tmpfilesdir}/rrdcached.conf
|
2013-10-03 16:16:18 +02:00
|
|
|
|
|
|
|
%pre cached
|
|
|
|
getent group %rrdcached_group >/dev/null || groupadd %rrdcached_group
|
|
|
|
getent passwd %rrdcached_user >/dev/null || useradd -s /sbin/nologin -g %rrdcached_group -c %rrdcached_user -d %{_localstatedir}/lib %rrdcached_user
|
|
|
|
%service_add_pre rrdcached.service
|
|
|
|
|
|
|
|
%post cached
|
|
|
|
%service_add_post rrdcached.service
|
2013-10-03 16:55:51 +02:00
|
|
|
%fillup_only rrdcached
|
2014-02-09 20:33:54 +01:00
|
|
|
systemd-tmpfiles --create %{_tmpfilesdir}/rrdcached.conf
|
2013-10-03 16:16:18 +02:00
|
|
|
|
|
|
|
%preun cached
|
|
|
|
%service_del_preun rrdcached.service
|
|
|
|
|
|
|
|
%postun cached
|
|
|
|
%service_del_postun rrdcached.service
|
2013-07-11 09:38:09 +02:00
|
|
|
|
2007-05-06 17:18:04 +02:00
|
|
|
%changelog
|