SHA256
1
0
forked from pool/collectd
Pascal Bleser 2013-08-23 05:31:49 +00:00 committed by Git OBS Bridge
parent db6122f28d
commit ff1ee825cb
15 changed files with 97 additions and 400 deletions

View File

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

3
collectd-5.3.0.tar.bz2 Normal file
View File

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

View File

@ -1,124 +0,0 @@
--- contrib/collection3/bin/graph.cgi.orig 2009-10-07 23:29:32.000000000 +0200
+++ contrib/collection3/bin/graph.cgi 2009-10-07 23:51:50.000000000 +0200
@@ -2,10 +2,9 @@
use strict;
use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
use utf8;
-use FindBin ('$RealBin');
use Carp (qw(confess cluck));
use CGI (':cgi');
use RRDs ();
@@ -49,7 +48,7 @@
HTTP
}
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
if ($GraphWidth)
{
--- contrib/collection3/bin/index.cgi.orig 2009-10-07 23:30:27.000000000 +0200
+++ contrib/collection3/bin/index.cgi 2009-10-07 23:52:09.000000000 +0200
@@ -17,11 +17,10 @@
use strict;
use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
use utf8;
use Carp (qw(cluck confess));
-use FindBin ('$RealBin');
use CGI (':cgi');
use CGI::Carp ('fatalsToBrowser');
use HTML::Entities ('encode_entities');
@@ -59,7 +58,7 @@
exit 1;
}
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
$Actions{$action}->();
exit (0);
@@ -144,9 +143,9 @@
print <<HTML;
<head>
<title>collection.cgi, Version 3</title>
- <link rel="icon" href="../share/shortcut-icon.png" type="image/png" />
- <link rel="stylesheet" href="../share/style.css" type="text/css" />
- <script type="text/javascript" src="../share/navigate.js"></script>
+ <link rel="icon" href="shortcut-icon.png" type="image/png" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
+ <script type="text/javascript" src="navigate.js"></script>
</head>
<body onload="nav_init ($begin, $end);">
HTML
--- contrib/collection3/bin/json.cgi.orig 2009-10-07 23:30:58.000000000 +0200
+++ contrib/collection3/bin/json.cgi 2009-10-07 23:51:33.000000000 +0200
@@ -17,10 +17,9 @@
use strict;
use warnings;
-use lib ('../lib');
+use lib ('/usr/lib/collectd-js');
use utf8;
-use FindBin ('$RealBin');
use CGI (':cgi');
use CGI::Carp ('fatalsToBrowser');
use URI::Escape ('uri_escape');
@@ -36,7 +35,7 @@
our $Debug = param ('debug') ? 1 : 0;
our $ServerName = 'collect.noris.net';
-gc_read_config ("$RealBin/../etc/collection.conf");
+gc_read_config ("/etc/collectd/collection-js.conf");
if ($Debug)
{
--- contrib/collection3/etc/collection.conf.orig 2009-10-07 23:52:29.000000000 +0200
+++ contrib/collection3/etc/collection.conf 2009-10-07 23:52:34.000000000 +0200
@@ -1,4 +1,4 @@
-#DataDir "/var/lib/collectd/rrd"
+#DataDir "/var/lib/collectd"
GraphWidth 400
#UnixSockAddr "/var/run/collectd-unixsock"
<Type apache_bytes>
--- contrib/collection3/lib/Collectd/Graph/Common.pm.orig 2009-10-07 23:36:33.000000000 +0200
+++ contrib/collection3/lib/Collectd/Graph/Common.pm 2009-10-07 23:36:39.000000000 +0200
@@ -44,7 +44,7 @@
flush_files
));
-our $DefaultDataDir = '/var/lib/collectd/rrd';
+our $DefaultDataDir = '/var/lib/collectd';
return (1);
--- contrib/collection3/lib/Collectd/Graph/Config.pm.orig 2009-10-07 23:35:15.000000000 +0200
+++ contrib/collection3/lib/Collectd/Graph/Config.pm 2009-10-07 23:35:31.000000000 +0200
@@ -57,7 +57,7 @@
return (1);
}
- $file ||= "etc/collection.conf";
+ $file ||= "/etc/collectd/collection-js.conf";
%conf = ParseConfig (-ConfigFile => $file,
-LowerCaseNames => 1,
--- contrib/collection3/lib/Collectd/Config.pm.orig 2009-10-07 23:32:23.000000000 +0200
+++ contrib/collection3/lib/Collectd/Config.pm 2009-10-07 23:34:57.000000000 +0200
@@ -58,7 +58,7 @@
return (1);
}
- $file ||= "etc/collection.conf";
+ $file ||= "/etc/collectd/collection-js.conf";
%conf = ParseConfig (-ConfigFile => $file,
-LowerCaseNames => 1,

View File

@ -1,21 +1,6 @@
--- src/collectd.conf.in.orig 2012-01-26 01:12:16.191115559 +0100
+++ src/collectd.conf.in 2012-01-26 01:13:39.662112590 +0100
@@ -12,10 +12,10 @@
#Hostname "localhost"
#FQDNLookup true
-#BaseDir "@prefix@/var/lib/@PACKAGE_NAME@"
-#PIDFile "@prefix@/var/run/@PACKAGE_NAME@.pid"
-#PluginDir "@prefix@/lib/@PACKAGE_NAME@"
-#TypesDB "@prefix@/share/@PACKAGE_NAME@/types.db"
+#BaseDir "/var/lib/@PACKAGE_NAME@"
+#PIDFile "/var/run/@PACKAGE_NAME@.pid"
+#PluginDir "@libdir@/@PACKAGE_NAME@"
+#TypesDB "@libdir@/@PACKAGE_NAME@/types.db"
#Interval 10
#Timeout 2
#ReadThreads 5
@@ -173,7 +173,7 @@
--- src/collectd.conf.in.orig 2013-06-04 02:22:35.386712789 +0200
+++ src/collectd.conf.in 2013-06-04 02:24:33.579744915 +0200
@@ -211,7 +211,7 @@
#<Plugin apache>
# <Instance "local">
# URL "http://localhost/status?auto"
@ -24,7 +9,7 @@
# Password "secret"
# CACert "/etc/ssl/ca.crt"
# </Instance>
@@ -186,7 +186,7 @@
@@ -225,7 +225,7 @@
#<Plugin ascent>
# URL "http://localhost/ascent/status/"
@ -33,46 +18,3 @@
# Password "secret"
# CACert "/etc/ssl/ca.crt"
#</Plugin>
@@ -211,7 +211,7 @@
#</Plugin>
#<Plugin csv>
-# DataDir "@prefix@/var/lib/@PACKAGE_NAME@/csv"
+# DataDir "/var/lib/@PACKAGE_NAME@/csv"
# StoreRates false
#</Plugin>
@@ -324,7 +324,7 @@
#</Plugin>
#<Plugin email>
-# SocketFile "@prefix@/var/run/@PACKAGE_NAME@-email"
+# SocketFile "/var/run/@PACKAGE_NAME@-email"
# SocketGroup "collectd"
# SocketPerms "0770"
# MaxConns 5
@@ -786,13 +786,13 @@
#<Plugin rrdcached>
# DaemonAddress "unix:/tmp/rrdcached.sock"
-# DataDir "@prefix@/var/lib/@PACKAGE_NAME@/rrd"
+# DataDir "/var/lib/@PACKAGE_NAME@/rrd"
# CreateFiles true
# CollectStatistics true
#</Plugin>
#<Plugin rrdtool>
-# DataDir "@prefix@/var/lib/@PACKAGE_NAME@/rrd"
+# DataDir "/var/lib/@PACKAGE_NAME@/rrd"
# CacheTimeout 120
# CacheFlush 900
#</Plugin>
@@ -913,7 +913,7 @@
#</Plugin>
#<Plugin unixsock>
-# SocketFile "@prefix@/var/run/@PACKAGE_NAME@-unixsock"
+# SocketFile "/var/run/@PACKAGE_NAME@-unixsock"
# SocketGroup "collectd"
# SocketPerms "0660"
# DeleteSocket false

View File

@ -1,20 +1,20 @@
--- src/netlink.c.orig 2009-02-17 12:56:09.000000000 +0100
+++ src/netlink.c 2009-02-17 12:56:44.000000000 +0100
@@ -573,7 +573,7 @@
}
--- src/netlink.c.orig 2013-06-04 02:27:05.160790797 +0200
+++ src/netlink.c 2013-06-04 02:27:36.463800911 +0200
@@ -568,7 +568,7 @@
#ifdef RTNL_DUMP_FILTER_FIVE_ARGS
if (rtnl_dump_filter (&rth, link_filter, /* arg1 = */ NULL,
- NULL, NULL) != 0)
+ (rtnl_filter_t)NULL, NULL) != 0)
{
ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed.");
return (-1);
@@ -611,7 +611,7 @@
}
#elif defined(RTNL_DUMP_FILTER_THREE_ARGS)
if (rtnl_dump_filter (&rth, link_filter, /* arg = */ NULL) != 0)
#else
@@ -612,7 +612,7 @@
#ifdef RTNL_DUMP_FILTER_FIVE_ARGS
if (rtnl_dump_filter (&rth, qos_filter, (void *) &ifindex,
- NULL, NULL) != 0)
+ (rtnl_filter_t)NULL, NULL) != 0)
{
ERROR ("netlink plugin: ir_read: rtnl_dump_filter failed.");
continue;
#elif defined(RTNL_DUMP_FILTER_THREE_ARGS)
if (rtnl_dump_filter (&rth, qos_filter, /* arg = */ &ifindex) != 0)
#else

View File

@ -1,19 +1,19 @@
--- Makefile.in.orig 2012-01-26 01:15:11.357109327 +0100
+++ Makefile.in 2012-01-26 01:15:34.625108499 +0100
@@ -342,7 +342,7 @@
--- Makefile.in.orig 2013-06-04 02:28:14.547813510 +0200
+++ Makefile.in 2013-06-04 02:28:22.270816101 +0200
@@ -346,7 +346,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-ACLOCAL_AMFLAGS = -I libltdl/m4
+ACLOCAL_AMFLAGS = -I libltdl
SUBDIRS = libltdl src bindings
SUBDIRS = libltdl src bindings .
INCLUDES = $(LTDLINCL)
EXTRA_DIST = contrib version-gen.sh
--- Makefile.am.orig 2012-01-26 01:15:36.301108441 +0100
+++ Makefile.am 2012-01-26 01:15:41.577108253 +0100
--- Makefile.am.orig 2013-06-04 02:28:28.047818050 +0200
+++ Makefile.am 2013-06-04 02:28:32.101819418 +0200
@@ -1,4 +1,4 @@
-ACLOCAL_AMFLAGS = -I libltdl/m4
+ACLOCAL_AMFLAGS = -I libltdl
SUBDIRS = libltdl src bindings
SUBDIRS = libltdl src bindings .

View File

@ -1,73 +0,0 @@
--- src/owniptc/libiptc.c.orig 2012-02-19 17:40:40.717235267 +0100
+++ src/owniptc/libiptc.c 2012-02-19 17:43:13.324229837 +0100
@@ -81,7 +81,7 @@
};
/* Convenience structures */
-struct ipt_error_target
+struct x_ipt_error_target
{
STRUCT_ENTRY_TARGET t;
char error[TABLE_MAXNAMELEN];
@@ -1007,10 +1007,10 @@
/* Convenience structures */
struct iptcb_chain_start{
STRUCT_ENTRY e;
- struct ipt_error_target name;
+ struct x_ipt_error_target name;
};
#define IPTCB_CHAIN_START_SIZE (sizeof(STRUCT_ENTRY) + \
- ALIGN(sizeof(struct ipt_error_target)))
+ ALIGN(sizeof(struct x_ipt_error_target)))
struct iptcb_chain_foot {
STRUCT_ENTRY e;
@@ -1021,10 +1021,10 @@
struct iptcb_chain_error {
STRUCT_ENTRY entry;
- struct ipt_error_target target;
+ struct x_ipt_error_target target;
};
#define IPTCB_CHAIN_ERROR_SIZE (sizeof(STRUCT_ENTRY) + \
- ALIGN(sizeof(struct ipt_error_target)))
+ ALIGN(sizeof(struct x_ipt_error_target)))
@@ -1069,7 +1069,7 @@
head->e.next_offset = IPTCB_CHAIN_START_SIZE;
strcpy(head->name.t.u.user.name, ERROR_TARGET);
head->name.t.u.target_size =
- ALIGN(sizeof(struct ipt_error_target));
+ ALIGN(sizeof(struct x_ipt_error_target));
strcpy(head->name.error, c->name);
} else {
repl->hook_entry[c->hooknum-1] = c->head_offset;
@@ -1113,7 +1113,7 @@
if (!iptcc_is_builtin(c)) {
/* Chain has header */
*offset += sizeof(STRUCT_ENTRY)
- + ALIGN(sizeof(struct ipt_error_target));
+ + ALIGN(sizeof(struct x_ipt_error_target));
(*num)++;
}
@@ -1153,7 +1153,7 @@
/* Append one error rule at end of chain */
num++;
offset += sizeof(STRUCT_ENTRY)
- + ALIGN(sizeof(struct ipt_error_target));
+ + ALIGN(sizeof(struct x_ipt_error_target));
/* ruleset size is now in offset */
*size = offset;
@@ -1177,7 +1177,7 @@
error->entry.target_offset = sizeof(STRUCT_ENTRY);
error->entry.next_offset = IPTCB_CHAIN_ERROR_SIZE;
error->target.t.u.user.target_size =
- ALIGN(sizeof(struct ipt_error_target));
+ ALIGN(sizeof(struct x_ipt_error_target));
strcpy((char *)&error->target.t.u.user.name, ERROR_TARGET);
strcpy((char *)&error->target.error, "ERROR");

View File

@ -1,24 +0,0 @@
--- lib/utils.c.orig 2008-04-17 19:12:54.000000000 +0200
+++ lib/utils.c 2008-05-08 00:20:27.000000000 +0200
@@ -33,6 +33,10 @@
#include "utils.h"
+#ifndef HZ
+#define HZ sysconf(_SC_CLK_TCK)
+#endif
+
int get_integer(int *val, const char *arg, int base)
{
long res;
@@ -430,8 +434,8 @@
int inet_addr_match(const inet_prefix *a, const inet_prefix *b, int bits)
{
- const __u32 *a1 = a->data;
- const __u32 *a2 = b->data;
+ const __u32 *a1 = (__u32*)a->data;
+ const __u32 *a2 = (__u32*)b->data;
int words = bits >> 0x05;
bits &= 0x1f;

View File

@ -1,11 +1,11 @@
--- bindings/Makefile.am.orig 2008-01-22 09:16:05.000000000 +0100
+++ bindings/Makefile.am 2008-01-22 09:16:18.000000000 +0100
@@ -3,7 +3,7 @@
all-local: @PERL_BINDINGS@
--- bindings/Makefile.am.orig 2013-06-04 02:26:20.688776802 +0200
+++ bindings/Makefile.am 2013-06-04 02:26:33.551780804 +0200
@@ -29,7 +29,7 @@
install-exec-local:
- [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install )
+ [ ! -f perl/Makefile ] || ( cd perl && $(MAKE) install_vendor )
- [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
+ [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install_vendor )
clean-local:
[ ! -f perl/Makefile ] || ( cd perl && $(MAKE) realclean )
# Perl 'make uninstall' does not work as well as wanted.
# So we do the work here.

View File

@ -1,5 +1,5 @@
--- contrib/README.orig 2009-10-07 22:17:58.000000000 +0200
+++ contrib/README 2009-10-07 22:45:41.000000000 +0200
--- contrib/README.orig 2013-06-04 02:29:18.736835454 +0200
+++ contrib/README 2013-06-04 02:29:59.160849717 +0200
@@ -28,22 +28,6 @@
`/var/lib/collectd/' and generate an HTML file and a directory containing
several PNG files which are graphs of the RRD files found.
@ -51,7 +51,7 @@
snmp-data.conf
--------------
Sample configuration for the SNMP plugin. This config includes a few standard
@@ -97,7 +67,3 @@
@@ -97,11 +67,6 @@
whatever people have send in. If you have some more definitions please send
them in, so others can profit from it.
@ -59,3 +59,7 @@
------------
- Manifest file for the Solaris SMF system and detailed information on how to
-register collectd as a service with this system.
-
collectd.service
----------------
Service file for systemd. Please ship this file as

View File

@ -1,9 +1,9 @@
--- configure.in.orig 2012-01-26 01:14:21.392111105 +0100
+++ configure.in 2012-01-26 01:14:41.350110395 +0100
--- configure.in.orig 2013-06-04 02:25:25.850760151 +0200
+++ configure.in 2013-06-04 02:25:50.593767582 +0200
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
+AC_INIT(collectd, @@VERSION@@)
-AC_INIT(collectd, [m4_esyscmd(./version-gen.sh)])
+AC_INIT(collectd, [@@VERSION@@])
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_AUX_DIR([libltdl/config])

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Fri Aug 23 05:26:54 UTC 2013 - pascal.bleser@opensuse.org
- update to 5.3.0:
* collectd: The "Include" statements can now be limited to include
only matching files in a directory
* collectd: Dispatches / writes are now handled by a thread pool. This
improves reliability and throughput for instances configured to act
as a "server"
* aggregation plugin: Selection of value lists is now possible using
regular expressions. Parts of the identifier of the resulting metric
can now be set via the configuration file.
* apcups plugin: The "ReportSeconds" option has been implemented.
* curl* plugins: Support for POST requests and custom request headers
has been added
* curl_xml plugin: Support for XML namespaces has been added.
* dbi plugin: Support for numeric options has been added. The
"Host" option has been added.
* disk plugin: Support for systems with >256 has been fixed
* libvirt plugin: Support for memory allocation has been added.
* netapp plugin: Support for "SnapVault", "VFiler" and deduplication /
compression and quota metrics.
* postgresql plugin: The reconnection logic has been improved.
* rrdtool, rrdcached plugins: The "CreateFilesAsync" option has been
implemented. When enabled, new RRD files will be created
asynchronously, which improved throughput of "server" instances.
* tail_csv plugin: This new plugins allows to read metrics from CSV
files, such as Snort's statistics file.
* write_mongodb plugin: Authentication options have been added.
* write_riemann plugin: This new plugin allows sending metrics to
Riemann, a stream processing and alerting tool.
- dropped own copy of iproute2, builds properly with the one provided
by the system
-------------------------------------------------------------------
Thu Aug 1 08:54:24 UTC 2013 - tchvatal@suse.com

View File

@ -3,7 +3,7 @@
# spec file for package collectd
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2005-2012 Pascal Bleser <pascal.bleser@opensuse.org>
# Copyright (c) 2005-2013 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,9 +18,6 @@
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?_with_xmms:1}0
%define xmms 1
%else
@ -110,13 +107,10 @@
%define ipvs_plugin ipvs
%define libnetlink_version 2.6.37
%define intree_netlink 1
%define plugins apache apcups battery %{expand:%bind_plugin} curl %{expand:%curl_json_plugin} %{expand:%curl_xml_plugin} conntrack contextswitch cpu cpufreq csv df disk dns email entropy exec filecount fscache hddtemp interface %{expand:%ipvs_plugin} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%memcached_plugin} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool sensors serial swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%ascent_plugin} %{expand:%iptables_plugin} %{expand:%madwifi_plugin} %{expand:%rrdcached_plugin}
%define plugins apache apcups battery %{expand:%bind_plugin} curl %{expand:%curl_json_plugin} %{expand:%curl_xml_plugin} conntrack contextswitch cpu cpufreq csv df disk dns email entropy exec filecount fscache hddtemp interface %{expand:%ipvs_plugin} irq load logfile match_empty_counter match_hashed match_regex match_timediff match_value mbmon %{expand:%memcached_plugin} memory multimeter netlink network nfs nginx ntpd olsrd openvpn perl ping protocols powerdns processes rrdtool sensors serial swap syslog table tail target_notification target_replace target_scale target_set target_v5upgrade tcpconns teamspeak2 ted thermal threshold unixsock uptime users uuid vmem vserver wireless write_http %{expand:%ascent_plugin} %{expand:%iptables_plugin} %{expand:%madwifi_plugin} %{expand:%rrdcached_plugin} aggregation ethstat md numa tail_csv write_graphite write_riemann
Name: collectd
Version: 5.0.4
Version: 5.3.0
Release: 0
Summary: Statistics Collection Daemon for filling RRD Files
License: GPL-2.0
@ -125,10 +119,6 @@ Source: http://collectd.org/files/collectd-%{version}.tar.bz2
Source1: collectd.suse.init
Source2: collectd.apache2.conf
Source3: collectd-js.apache2.conf
# bundled/in-tree libnetlink.a, see http://mailman.verplant.org/pipermail/collectd/2007-October/001210.html
# Can't use download url as upstream changed download layout and provide only versions 3.0 and newer.
# https://www.kernel.org/pub/linux/utils/net/iproute2/
Source10: iproute2-%{libnetlink_version}.tar.bz2
# workaround for missing pthread.pc on openSUSE, required by OpenIPMIpthread.pc
# see https://bugzilla.novell.com/show_bug.cgi?id=388026
Source20: collectd-pthread.pc
@ -141,29 +131,27 @@ Patch10: collectd-perl-vendor.patch
# see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=467072
Patch11: collectd-fix_broken_perl-5.10.patch
Patch12: collectd-fix-warnings.patch
Patch14: collectd-iproute2-HZ.patch
Patch16: iproute2-optflags.patch
Patch17: collectd-fix_libltdl_autoreconf.patch
Patch18: collectd-fix_collection_cgi.patch
Patch19: collectd-fix_spamassassin_doc.patch
Patch20: collectd-split_README.patch
Patch21: collectd-fix_collectd_config_path_in_snmp_probe.patch
Patch22: collectd-collection3.patch
Patch23: collectd-javac_target.patch
Patch24: collectd-pkgconfig_libnotify_add_gtk.patch
Patch25: collectd-df-remove-duplicates.patch
Patch26: collectd-fix_own_iptc.patch
Url: http://collectd.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rrdtool
Requires: sensors
BuildConflicts: libnetlink-devel
#BuildConflicts: libnetlink-devel
BuildRequires: bind-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: gettext
BuildRequires: gettext-devel
BuildRequires: intltool
BuildRequires: libevent-devel
BuildRequires: libnetlink-devel
#BuildRequires: libmodbus-devel
BuildRequires: libpng-devel
BuildRequires: libstatgrab-devel
@ -512,19 +500,19 @@ Requires: perl-spamassassin
Plugin for filling %{name} with statistics from the
SpamAsssassin anti-spam engine.
%package -n libcollectdclient0
%package -n libcollectdclient1
Summary: Library for %{name} clients
Group: System/Monitoring
Provides: libcollectdclient = %{version}-%{release}
%description -n libcollectdclient0
%description -n libcollectdclient1
Library which abstracts communication with the %{name}
unixsock plugin for clients.
%package -n libcollectdclient-devel
Summary: Development Environment for %{name} clients
Group: Development/Libraries/C and C++
Requires: libcollectdclient0 = %{version}-%{release}
Requires: libcollectdclient1 = %{version}-%{release}
%description -n libcollectdclient-devel
Library which abstracts communication with the %{name}
@ -533,7 +521,7 @@ This package contains the required development environment
to write %{name} unixsock clients.
%prep
%setup -q -n "collectd-%{version}" -a 10
%setup -q -n "collectd-%{version}"
%if "%{_lib}"=="lib64"
%patch4
%endif
@ -543,19 +531,13 @@ to write %{name} unixsock clients.
%patch11
%patch12
%patch17
pushd "iproute2-%{libnetlink_version}"
%patch14
%patch16
popd #iproute2
%patch18
%patch19
%patch20
%patch21
%patch22
%patch23
%patch24
%patch25
%patch26
%__sed -i 's|@@VERSION@@|%{version}|g' configure.in
@ -578,23 +560,6 @@ find . -name 'configure*' -o -name 'Makefile*' -exec %__sed -i 's|-Werror||g' {}
%build
export SUSE_ASNEEDED=0
%if %intree_netlink
# build in-tree libnetlink.a
pushd "iproute2-%{libnetlink_version}"
LIBNETLINK_CFLAGS="%{optflags}"
%ifarch x86_64 ia64 ppc64 ppc64 s390x
# only add -fPIC on 64bit, to avoid performance drawback on non-64bit archs:
LIBNETLINK_CFLAGS="$LIBNETLINK_CFLAGS -fPIC"
%endif
%__make %{?jobs:-j%{jobs}} \
SUBDIRS="lib" \
CC="%__cc" \
OPTFLAGS="$LIBNETLINK_CFLAGS"
%__rm -f lib/*.so.* lib/*.so
%__ln_s lib lib64
popd #iproute2
%endif #%intree_netlink
autoreconf -fiv
# set JAVA_HOME properly
@ -603,8 +568,6 @@ autoreconf -fiv
[ -n "$JRE_HOME" -a -d "$JRE_HOME" ] || export JRE_HOME="$JAVA_HOME"
export PATH="$JDK_HOME/bin:$JRE_HOME/bin:$JAVA_HOME/bin:$PATH"
# add /usr/src/linux to include path to find net/ip_vs.h:
#export CFLAGS="%{optflags} -I$PWD/iproute2-%{libnetlink_version}/include/ -fno-strict-aliasing"
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
# workaround for missing pthread.pc on openSUSE, required by OpenIPMIpthread.pc
@ -621,7 +584,6 @@ export KERNEL_DIR=/usr/src/linux
--with-librrd \
%if %iptables
--enable-iptables \
--with-libiptc=shipped \
%else
--disable-iptables \
--without-iptc \
@ -652,9 +614,6 @@ export KERNEL_DIR=/usr/src/linux
%else
--disable-memcached \
%endif #memcachec
%if %intree_netlink
--with-libnetlink="$PWD/iproute2-%{libnetlink_version}/" \
%endif
%if %suse_version < 930
--disable-mysql \
%endif
@ -690,13 +649,6 @@ export KERNEL_DIR=/usr/src/linux
%__mkdir_p _rpmdoc_/java
%__mv contrib/GenericJMX.conf _rpmdoc_/java/
# fix bogus dependency in netlink.la, as it has been built against
# a static netlink library:
%if %intree_netlink
%__sed -i "/^dependency_libs=/s/=.*/=''/" \
"%{buildroot}%{_libdir}/collectd/netlink.la"
%endif
# fix permissions:
%__chmod 0755 "%{buildroot}%{_libdir}/collectd"/*.so
%__chmod 0644 "%{buildroot}%{_libdir}/collectd"/*.la
@ -827,9 +779,9 @@ EOF
%service_add_post %{name}.service
%endif
%post -n libcollectdclient0 -p /sbin/ldconfig
%post -n libcollectdclient1 -p /sbin/ldconfig
%postun -n libcollectdclient0 -p /sbin/ldconfig
%postun -n libcollectdclient1 -p /sbin/ldconfig
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
@ -840,6 +792,7 @@ EOF
%doc contrib
%config(noreplace) %{_sysconfdir}/collectd.conf
%dir %{_sysconfdir}/collectd
%{_bindir}/collectd-tg
%{_bindir}/collectd-nagios
%{_bindir}/collectdctl
%{_bindir}/cussh
@ -859,6 +812,7 @@ EOF
%doc %{_mandir}/man1/collectd.1%{ext_man}
%doc %{_mandir}/man1/collectdctl.1%{ext_man}
%doc %{_mandir}/man1/collectdmon.1%{ext_man}
%doc %{_mandir}/man1/collectd-tg.1%{ext_man}
%doc %{_mandir}/man1/collectd-nagios.1%{ext_man}
%doc %{_mandir}/man1/cussh.1%{ext_man}
%doc %{_mandir}/man5/collectd.conf.5%{ext_man}
@ -1010,10 +964,10 @@ EOF
%defattr(-,root,root)
%doc README.plugins-all
%files -n libcollectdclient0
%files -n libcollectdclient1
%defattr(-,root,root)
%{_libdir}/libcollectdclient.so.0
%{_libdir}/libcollectdclient.so.0.*.*
%{_libdir}/libcollectdclient.so.1
%{_libdir}/libcollectdclient.so.1.*.*
%files -n libcollectdclient-devel
%defattr(-,root,root)

View File

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

View File

@ -1,14 +0,0 @@
--- Makefile.orig 2009-05-13 21:06:21.000000000 +0200
+++ Makefile 2009-05-13 21:06:44.000000000 +0200
@@ -22,8 +22,9 @@
CC = gcc
HOSTCC = gcc
-CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
+OPTFLAGS = -O2 -g
+CCOPTS = -D_GNU_SOURCE -Wstrict-prototypes -Wall
+CFLAGS = $(CCOPTS) -I../include $(DEFINES) $(OPTFLAGS)
YACCFLAGS = -d -t -v
LDLIBS += -L../lib -lnetlink -lutil