Normalize jar mtimes for reproducible builds (boo#1134568)

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/collectd?expand=0&rev=182
This commit is contained in:
2025-01-13 09:30:26 +00:00
committed by Git OBS Bridge
commit 8c3f0b52d8
23 changed files with 3944 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,174 @@
From 9e36cd85a2bbd6daa55f1f392f60f9c95573ae2c Mon Sep 17 00:00:00 2001
From: Jonathan McDowell <noodles@earth.li>
Date: Wed, 30 Aug 2017 18:48:55 +0100
Subject: [PATCH] sigrok: Update to support libsigrok 0.4
libsigrok 0.4 changes API in an incompatible manner to previous
versions. Fix up the plugin to work with this version.
Note: Compile tested only; my sigrok device has no analog channels
Closes: collectd/collectd#1574
[sbruens: adapted to 5.7 branch (ssnprintf vs snprintf)]
---
configure.ac | 2 +-
src/sigrok.c | 51 +++++++++++++++++++++++++++------------------------
2 files changed, 28 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5738974..4032d84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5058,7 +5058,7 @@ AC_SUBST([BUILD_WITH_LIBSENSORS_LIBS])
# libsigrok {{{
AC_SUBST([LIBSIGROK_CFLAGS])
AC_SUBST([LIBSIGROK_LIBS])
-PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4],
+PKG_CHECK_MODULES([LIBSIGROK], [libsigrok >= 0.4],
[with_libsigrok="yes"],
[with_libsigrok="no (pkg-config could not find libsigrok)"]
)
diff --git a/src/sigrok.c b/src/sigrok.c
index 8a325fe..a44c95e 100644
--- a/src/sigrok.c
+++ b/src/sigrok.c
@@ -127,22 +127,22 @@ static int sigrok_config(oconfig_item_t *ci) {
return 0;
}
-static const char *sigrok_value_type(const struct sr_datafeed_analog *analog) {
+static const char *sigrok_value_type(const struct sr_analog_meaning *meaning) {
const char *s;
- if (analog->mq == SR_MQ_VOLTAGE)
+ if (meaning->mq == SR_MQ_VOLTAGE)
s = "voltage";
- else if (analog->mq == SR_MQ_CURRENT)
+ else if (meaning->mq == SR_MQ_CURRENT)
s = "current";
- else if (analog->mq == SR_MQ_FREQUENCY)
+ else if (meaning->mq == SR_MQ_FREQUENCY)
s = "frequency";
- else if (analog->mq == SR_MQ_POWER)
+ else if (meaning->mq == SR_MQ_POWER)
s = "power";
- else if (analog->mq == SR_MQ_TEMPERATURE)
+ else if (meaning->mq == SR_MQ_TEMPERATURE)
s = "temperature";
- else if (analog->mq == SR_MQ_RELATIVE_HUMIDITY)
+ else if (meaning->mq == SR_MQ_RELATIVE_HUMIDITY)
s = "humidity";
- else if (analog->mq == SR_MQ_SOUND_PRESSURE_LEVEL)
+ else if (meaning->mq == SR_MQ_SOUND_PRESSURE_LEVEL)
s = "spl";
else
s = "gauge";
@@ -172,7 +172,7 @@ static void sigrok_feed_callback(const struct sr_dev_inst *sdi,
ERROR("sigrok plugin: Received data from driver \"%s\" but "
"can't find a configuration / device matching "
"it.",
- sdi->driver->name);
+ sr_dev_inst_driver_get(sdi)->name);
return;
}
@@ -191,11 +191,11 @@ static void sigrok_feed_callback(const struct sr_dev_inst *sdi,
/* Ignore all but the first sample on the first probe. */
analog = packet->payload;
- vl.values = &(value_t){.gauge = analog->data[0]};
+ vl.values = &(value_t){.gauge = ((float *) analog->data)[0]};
vl.values_len = 1;
sstrncpy(vl.plugin, "sigrok", sizeof(vl.plugin));
sstrncpy(vl.plugin_instance, cfdev->name, sizeof(vl.plugin_instance));
- sstrncpy(vl.type, sigrok_value_type(analog), sizeof(vl.type));
+ sstrncpy(vl.type, sigrok_value_type(&analog->meaning[0]), sizeof(vl.type));
plugin_dispatch_values(&vl);
cfdev->last_dispatch = cdtime();
@@ -207,6 +207,7 @@ static void sigrok_free_drvopts(struct sr_config *src) {
}
static int sigrok_init_driver(struct config_device *cfdev,
+ struct sr_session *session,
struct sr_dev_driver *drv) {
struct sr_config *src;
GSList *devlist, *drvopts;
@@ -248,21 +249,22 @@
cfdev->sdi = devlist->data;
g_slist_free(devlist);
ssnprintf(hwident, sizeof(hwident), "%s %s %s",
- cfdev->sdi->vendor ? cfdev->sdi->vendor : "",
- cfdev->sdi->model ? cfdev->sdi->model : "",
- cfdev->sdi->version ? cfdev->sdi->version : "");
+ sr_dev_inst_vendor_get(cfdev->sdi),
+ sr_dev_inst_model_get(cfdev->sdi),
+ sr_dev_inst_version_get(cfdev->sdi));
INFO("sigrok plugin: Device \"%s\" is a %s", cfdev->name, hwident);
if (sr_dev_open(cfdev->sdi) != SR_OK)
return -1;
- if (sr_session_dev_add(cfdev->sdi) != SR_OK)
+ if (sr_session_dev_add(session, cfdev->sdi) != SR_OK)
return -1;
return 1;
}
static void *sigrok_read_thread(void *arg __attribute__((unused))) {
+ struct sr_session *session;
struct sr_dev_driver *drv, **drvlist;
GSList *l;
struct config_device *cfdev;
@@ -277,11 +279,11 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) {
return NULL;
}
- if (!sr_session_new())
+ if (!sr_session_new(sr_ctx, &session))
return NULL;
num_devices = 0;
- drvlist = sr_driver_list();
+ drvlist = sr_driver_list(sr_ctx);
for (l = config_devices; l; l = l->next) {
cfdev = l->data;
drv = NULL;
@@ -296,7 +298,7 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) {
return NULL;
}
- if ((ret = sigrok_init_driver(cfdev, drv)) < 0)
+ if ((ret = sigrok_init_driver(cfdev, session, drv)) < 0)
/* Error was already logged. */
return NULL;
@@ -305,21 +307,22 @@ static void *sigrok_read_thread(void *arg __attribute__((unused))) {
if (num_devices > 0) {
/* Do this only when we're sure there's hardware to talk to. */
- if (sr_session_datafeed_callback_add(sigrok_feed_callback, NULL) != SR_OK)
+ if (sr_session_datafeed_callback_add(session, sigrok_feed_callback,
+ NULL) != SR_OK)
return NULL;
/* Start acquisition on all devices. */
- if (sr_session_start() != SR_OK)
+ if (sr_session_start(session) != SR_OK)
return NULL;
/* Main loop, runs forever. */
- sr_session_run();
+ sr_session_run(session);
- sr_session_stop();
- sr_session_dev_remove_all();
+ sr_session_stop(session);
+ sr_session_dev_remove_all(session);
}
- sr_session_destroy();
+ sr_session_destroy(session);
sr_exit(sr_ctx);

17
_service Normal file
View File

@@ -0,0 +1,17 @@
<services>
<service name="obs_scm" mode="localonly">
<param name="scm">git</param>
<param name="url">https://github.com/collectd/collectd.git</param>
<param name="revision">HEAD</param>
<param name="versionrewrite-pattern">collectd-(.*)</param>
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.g%h</param>
<param name="changesgenerate">enable</param>
<param name="submodules">disable</param>
</service>
<service name="set_version" mode="localonly"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">bz2</param>
</service>
</services>

4
_servicedata Normal file
View File

@@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/collectd/collectd.git</param>
<param name="changesrevision">4cebbfc1ed4b44644d981df996a8ca941e38e8a1</param></service></servicedata>

111
avoid-pg-config.patch Normal file
View File

@@ -0,0 +1,111 @@
diff --git a/configure.ac b/configure.ac
index 4032d84..284192d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4272,18 +4272,10 @@ AC_SUBST([PERL_LIBS])
# }}}
# --with-libpq {{{
-with_pg_config="pg_config"
AC_ARG_WITH([libpq],
- [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@], [Path to libpq.])],
+ [AS_HELP_STRING([--with-libpq], [Build using pgsql])],
[
- if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
- with_libpq="$withval"
- else
- if test -f "$withval" && test -x "$withval"; then
- with_pg_config="$withval"
- else if test -x "$withval/bin/pg_config"; then
- with_pg_config="$withval/bin/pg_config"
- fi; fi
+ if test "x$withval" != "xno" || test "x$withval" != "xyes"; then
with_libpq="yes"
fi
],
@@ -4291,66 +4283,42 @@ AC_ARG_WITH([libpq],
)
if test "x$with_libpq" = "xyes"; then
- with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
- pg_config_status=$?
-
- if test $pg_config_status -eq 0; then
- if test -n "$with_libpq_includedir"; then
- for dir in $with_libpq_includedir; do
- with_libpq_cppflags="$with_libpq_cppflags -I$dir"
- done
- fi
- else
- AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
+ $PKG_CONFIG --exists 'libpq' 2>/dev/null
+ if test $? -ne 0; then
+ with_libpq="no (pkg-config doesn't know libpq)"
fi
-
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
-
- AC_CHECK_HEADERS([libpq-fe.h],
- [with_libpq="yes"],
- [with_libpq="no (libpq-fe.h not found)"]
- )
-
- CPPFLAGS="$SAVE_CPPFLAGS"
fi
if test "x$with_libpq" = "xyes"; then
- with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
- pg_config_status=$?
-
- if test $pg_config_status -eq 0
- then
- if test -n "$with_libpq_libdir"; then
- for dir in $with_libpq_libdir; do
- with_libpq_ldflags="$with_libpq_ldflags -L$dir"
- done
- fi
- else
- AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
- fi
+ with_libpq_cflags="`$PKG_CONFIG --cflags libpq`"
+ with_libpq_ldflags="`$PKG_CONFIG --libs-only-L libpq`"
+ with_libpq_libs="`$PKG_CONFIG --libs libpq`"
+fi
- SAVE_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $with_libpq_ldflags"
+if test "x$with_libpq" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_libpq_cflags"
- AC_CHECK_LIB([pq], [PQserverVersion],
- [with_libpq="yes"],
- [with_libpq="no (symbol 'PQserverVersion' not found)"])
+ # Look for libpq-fe.h
+ AC_CHECK_HEADERS([libpq-fe.h pgsql/libpq-fe.h],
+ [with_libpq="yes"],
+ [with_libpq="no (libpq-fe.h not found)"]
+ )
- LDFLAGS="$SAVE_LDFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
if test "x$with_libpq" = "xyes"; then
- BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
+ BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cflags"
BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
- BUILD_WITH_LIBPQ_LIBS="-lpq"
+ BUILD_WITH_LIBPQ_LIBS="$with_libpq_libs"
fi
AC_SUBST([BUILD_WITH_LIBPQ_CPPFLAGS])
-AC_SUBST([BUILD_WITH_LIBPQ_LDFLAGS])
AC_SUBST([BUILD_WITH_LIBPQ_LIBS])
# }}}
+
# --with-libpqos {{{
AC_ARG_WITH([libpqos],
[AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],

View File

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

View File

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

22
collectd-fix-config.patch Normal file
View File

@@ -0,0 +1,22 @@
Index: src/collectd.conf.in
===================================================================
--- a/src/collectd.conf.in.orig
+++ b/src/collectd.conf.in
@@ -272,7 +272,7 @@
#<Plugin apache>
# <Instance "local">
# URL "http://localhost/status?auto"
-# User "www-user"
+# User "www"
# Password "secret"
# CACert "/etc/ssl/ca.crt"
# </Instance>
@@ -291,7 +291,7 @@
#<Plugin ascent>
# URL "http://localhost/ascent/status/"
-# User "www-user"
+# User "www"
# Password "secret"
# CACert "/etc/ssl/ca.crt"
#</Plugin>

View File

@@ -0,0 +1,18 @@
diff --git a/src/perl.c b/src/perl.c
index 8df8fd4..94e21d2 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -2516,7 +2516,12 @@ static int perl_config_loadplugin(pTHX_ oconfig_item_t *ci) {
log_debug("perl_config: Loading Perl plugin \"%s\"", value);
load_module(PERL_LOADMOD_NOIMPORT, newSVpv(module_name, strlen(module_name)),
- Nullsv);
+#if PERL_VERSION >= 10
+ newSViv(0)
+#else
+ Nullsv
+#endif
+ );
return 0;
} /* static int perl_config_loadplugin (oconfig_item_it *) */

View File

@@ -0,0 +1,13 @@
diff --git a/contrib/snmp-probe-host.px b/contrib/snmp-probe-host.px
index d1a7a88..bc94e5c 100755
--- a/contrib/snmp-probe-host.px
+++ b/contrib/snmp-probe-host.px
@@ -320,7 +320,7 @@ This is a bit a hack, but works for now.
=cut
my $host;
-my $file = '/etc/collectd/collectd.conf';
+my $file = '/etc/collectd.conf';
my $community = 'public';
my $conf;
my $working_data;

View File

@@ -0,0 +1,23 @@
Index: collectd-5.12.0/contrib/collection.cgi
===================================================================
--- collectd-5.12.0.orig/contrib/collection.cgi
+++ collectd-5.12.0/contrib/collection.cgi
@@ -32,7 +32,7 @@ use URI::Escape ('uri_escape');
use RRDs ();
use Data::Dumper ();
-our $Config = "/etc/collection.conf";
+our $Config = "/etc/collectd/collection.conf"
our @DataDirs = ();
our @DontShowTypes = ();
our $LibDir;
Index: collectd-5.12.0/contrib/collection.conf
===================================================================
--- collectd-5.12.0.orig/contrib/collection.conf
+++ collectd-5.12.0/contrib/collection.conf
@@ -1,3 +1,2 @@
-datadir: "/opt/collectd/var/lib/collectd/rrd/"
-libdir: "/opt/collectd/lib/collectd/"
-
+datadir: "/var/lib/collectd/"
+libdir: "@@LIBDIR@@/collectd/"

View File

@@ -0,0 +1,26 @@
Index: contrib/SpamAssassin/Collectd.pm
===================================================================
--- a/contrib/SpamAssassin/Collectd.pm.orig
+++ b/contrib/SpamAssassin/Collectd.pm
@@ -4,12 +4,6 @@
Collectd - plugin for filling collectd with stats
-=head1 INSTALLATION
-
-Just copy Collectd.pm into your SpamAssassin Plugin path
-(e.g /usr/share/perl5/Mail/SpamAssassin/Plugin/) and
-add a loadplugin call into your init.pre file.
-
=head1 SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::Collectd
@@ -47,6 +41,8 @@ often it should try.
=cut
+=back
+
=head1 DESCRIPTION
This modules uses the email plugin of collectd from Sebastian Harl to

35
collectd-js.apache2.conf Normal file
View File

@@ -0,0 +1,35 @@
<IfModule mod_cgi.c>
ScriptAlias /collectd-js /srv/www/collectd-js/index.cgi
# Access control:
<Directory "/srv/www/collectd-js">
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAll>
Require all granted
</RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>
<Directory "/srv/www/collectd-js/bin">
Options +ExecCGI
AddHandler cgi-script .cgi
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAll>
Require all granted
</RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>
</IfModule>

View File

@@ -0,0 +1,13 @@
diff --git a/Makefile.am b/Makefile.am
index 2ef2442..145e98c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2000,7 +2000,7 @@ uninstall-hook:
all-local: @PERL_BINDINGS@
install-exec-local:
- [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install )
+ [ ! -f buildperl/Makefile ] || ( cd buildperl && $(MAKE) install_vendor )
# Perl 'make uninstall' does not work as well as wanted.
# So we do the work here.

5
collectd-rpmlintrc Normal file
View File

@@ -0,0 +1,5 @@
addFilter('non-etc-or-var-file-marked-as-conffile .*/spamassassin/99_collectd.cf')
addFilter('non-etc-or-var-file-marked-as-conffile .*/collectd/postgresql_default.conf')
addFilter('macro-in-comment')

10
collectd-version.patch Normal file
View File

@@ -0,0 +1,10 @@
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.60])
-AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
+AC_INIT([collectd],[@@VERSION@@])
AC_CONFIG_SRCDIR(src/target_set.c)
AC_CONFIG_HEADERS(src/config.h)
AC_CONFIG_AUX_DIR([build-aux])

19
collectd.apache2.conf Normal file
View File

@@ -0,0 +1,19 @@
<IfModule mod_cgi.c>
ScriptAlias /collectd /srv/www/collectd/collection.cgi
# Access control:
<Directory "/srv/www/collectd">
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAll>
Require all granted
</RequireAll>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>
</IfModule>

2287
collectd.changes Normal file

File diff suppressed because it is too large Load Diff

4
collectd.obsinfo Normal file
View File

@@ -0,0 +1,4 @@
name: collectd
version: 5.12.0.134.g4cebbfc
mtime: 1677501884
commit: 4cebbfc1ed4b44644d981df996a8ca941e38e8a1

1014
collectd.spec Normal file

File diff suppressed because it is too large Load Diff

95
collectd.suse.init Normal file
View File

@@ -0,0 +1,95 @@
#! /bin/sh
# Author: Pascal Bleser <guru@unixtech.be>
# Please send feedback to guru@unixtech.be
#
# /etc/init.d/collectd
# and its symbolic link
# /usr/sbin/rccollectd
#
### BEGIN INIT INFO
# Provides: collectd
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Collectd daemon collecting system statistics
# Description: Start Collectd to collect system statistics
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
COLLECTD_BIN=/usr/sbin/collectd
test -x $COLLECTD_BIN || { echo "$COLLECTD_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
COLLECTD_CONFIG=/etc/collectd.conf
test -r $COLLECTD_CONFIG || { echo "$COLLECTD_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
SERVICENAME=collectd
. /etc/rc.status
# Reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting $SERVICENAME "
/sbin/startproc "$COLLECTD_BIN"
rc_status -v
;;
stop)
echo -n "Shutting down $SERVICENAME "
/sbin/killproc -TERM "$COLLECTD_BIN"
rc_status -v
;;
try-restart|condrestart)
## Do a restart only if the service was active before.
## Note: try-restart is now part of LSB (as of 1.9).
## RH has a similar command named condrestart.
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload)
echo -n "Reload service $SERVICENAME "
$0 try-restart
rc_status
;;
reload)
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for service $SERVICENAME "
/sbin/checkproc $COLLECTD_BIN
rc_status -v
;;
probe)
## Optional: Probe for the necessity of a reload, print out the
## argument to this init script which is required for a reload.
## Note: probe is not (yet) part of LSB (as of 1.9)
test "$COLLECTD_CONFIG" -nt "/var/run/collectd.pid" && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit

View File

@@ -0,0 +1,24 @@
Index: collectd-5.12.0/contrib/systemd.collectd.service
===================================================================
--- collectd-5.12.0.orig/contrib/systemd.collectd.service
+++ collectd-5.12.0/contrib/systemd.collectd.service
@@ -5,6 +5,19 @@ After=local-fs.target network-online.tar
Requires=local-fs.target network-online.target
[Service]
+# added automatically, for details please see
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
+ProtectSystem=full
+ProtectHome=true
+PrivateDevices=true
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictRealtime=true
+# end of automatic additions
ExecStart=/usr/sbin/collectd
EnvironmentFile=-/etc/sysconfig/collectd
EnvironmentFile=-/etc/default/collectd