forked from pool/telegraf
Accepting request 1184371 from home:darix:apps
- Update to version 1.31.1: OBS-URL: https://build.opensuse.org/request/show/1184371 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/telegraf?expand=0&rev=85
This commit is contained in:
commit
b1424845bf
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
10
_constraints
Normal file
10
_constraints
Normal file
@ -0,0 +1,10 @@
|
||||
<constraints>
|
||||
<hardware>
|
||||
<memory>
|
||||
<size unit="G">6</size>
|
||||
</memory>
|
||||
<disk>
|
||||
<size unit="G">4</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</constraints>
|
21
_service
Normal file
21
_service
Normal file
@ -0,0 +1,21 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="manual">
|
||||
<param name="url">https://github.com/influxdata/telegraf</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="revision">v1.31.1</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
</service>
|
||||
<service name="set_version" mode="manual">
|
||||
<param name="basename">telegraf</param>
|
||||
</service>
|
||||
<service name="recompress" mode="manual">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="go_modules" mode="manual">
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/influxdata/telegraf</param>
|
||||
<param name="changesrevision">99fcdc283bdca2bb00c1fa8c59172a69d9c2137d</param></service></servicedata>
|
24
harden_telegraf.service.patch
Normal file
24
harden_telegraf.service.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/scripts/telegraf.service b/scripts/telegraf.service
|
||||
index 94cd26a5..c741bd59 100644
|
||||
--- a/scripts/telegraf.service
|
||||
+++ b/scripts/telegraf.service
|
||||
@@ -5,6 +5,19 @@ After=network-online.target
|
||||
Wants=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
|
||||
Type=notify
|
||||
NotifyAccess=all
|
||||
EnvironmentFile=-/etc/default/telegraf
|
3
telegraf-1.31.1.tar.xz
Normal file
3
telegraf-1.31.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:55b47cd97eb752251d04a5d4e8aab3370c806f1a17143375476ebe1118cd4f2e
|
||||
size 3236140
|
6423
telegraf.changes
Normal file
6423
telegraf.changes
Normal file
File diff suppressed because it is too large
Load Diff
91
telegraf.spec
Normal file
91
telegraf.spec
Normal file
@ -0,0 +1,91 @@
|
||||
#
|
||||
# spec file for package telegraf
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define _config_dir %{_sysconfdir}/%{name}
|
||||
Name: telegraf
|
||||
Version: 1.31.1
|
||||
Release: 0
|
||||
Summary: The plugin-driven server agent for collecting & reporting metrics
|
||||
License: MIT
|
||||
Group: System/Monitoring
|
||||
URL: https://github.com/influxdata/telegraf
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
Source1: vendor.tar.xz
|
||||
Patch0: harden_telegraf.service.patch
|
||||
BuildRequires: git-core
|
||||
BuildRequires: golang-packaging
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: golang(API) >= 1.22
|
||||
%{?systemd_ordering}
|
||||
|
||||
%description
|
||||
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
|
||||
|
||||
Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can
|
||||
easily add support for collecting metrics from local or remote services.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -T -D -a 1
|
||||
%patch -P 0 -p1
|
||||
|
||||
%build
|
||||
# Build the binary.
|
||||
go build \
|
||||
-mod=vendor \
|
||||
%ifnarch ppc64 ppc64le
|
||||
-buildmode=pie \
|
||||
%endif
|
||||
./cmd/telegraf;
|
||||
./telegraf config > etc/telegraf.conf
|
||||
|
||||
%install
|
||||
# Install the binary.
|
||||
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
|
||||
|
||||
mkdir -p %{buildroot}/%{_config_dir}
|
||||
mkdir -p %{buildroot}/%{_config_dir}/%{name}.d
|
||||
install -m644 etc/%{name}.conf %{buildroot}/%{_config_dir}
|
||||
|
||||
install -D -m 644 scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
||||
sed -i '/User=/d' %{buildroot}%{_unitdir}/%{name}.service
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
|
||||
%pre
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post
|
||||
%service_add_post %{name}.service
|
||||
|
||||
%preun
|
||||
%service_del_preun %{name}.service
|
||||
|
||||
%postun
|
||||
%service_del_postun %{name}.service
|
||||
|
||||
%files
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
||||
%license LICENSE
|
||||
%dir %{_config_dir}
|
||||
%config(noreplace) %{_config_dir}/%{name}.conf
|
||||
%{_bindir}/%{name}
|
||||
|
||||
%changelog
|
3
vendor.tar.xz
Normal file
3
vendor.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5fe7ad40a1bd7b03f160a7f3b734c672221a79f5aaf746e8b3f9e8e8ed20642e
|
||||
size 26264612
|
Loading…
Reference in New Issue
Block a user