Sync from SUSE:SLFO:Main sysctl-logger revision ce3acbcb1004d7ca77069f947e283ae4

This commit is contained in:
Adrian Schröter 2024-09-03 13:40:42 +02:00
commit 1c110bcc1e
4 changed files with 158 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

BIN
sysctl-logger-0.0.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

41
sysctl-logger.changes Normal file
View File

@ -0,0 +1,41 @@
-------------------------------------------------------------------
Wed Apr 10 03:34:05 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
- Update to v0.0.6
* Rephrase logging to clarify that it is unknown whether sysctl
change succeeded or failed
-------------------------------------------------------------------
Wed Mar 6 11:50:38 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
- Update to v0.0.5
* Show parent process info
* Improve readability with empty event values
- Use default LLVM/Clang version available (on openSUSE)
-------------------------------------------------------------------
Fri Oct 20 08:31:44 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
- Update to v0.0.4
* Detect whether CGROUP_CURRENT_FUNC_PROTO is set
* Fix compilation error due to use of host headers (bsc#1215933)
- Remove dependency on glibc-devel-32bit (bsc#1215933)
-------------------------------------------------------------------
Mon Sep 25 15:43:14 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
- Update to v0.0.3
* Implement ring buffer event passing
* Capture PID and process name
* Add workaround for reading PID and program name on pre v6.1 kernel
* Handle failures in sysctl BPF helpers
* Increase size of value buffer
* Suppress logging of unchanged paramter values
* Fix "Failed to parse resource value" error in service file
- Enforce specific Clang version (since SLES defaults to older version of
Clang)
-------------------------------------------------------------------
Wed Aug 2 10:45:35 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
- Initial commit of sysctl-logger package based on v0.0.1

91
sysctl-logger.spec Normal file
View File

@ -0,0 +1,91 @@
#
# spec file for package sysctl-logger
#
# Copyright (c) 2023 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/
#
# Use default LLVM on openSUSE
%if 0%{?suse_version} >= 1600 || 0%{?is_opensuse}
%define llvm_major_version %{nil}
%else
# Hard-code latest LLVM for SLES, the default version is too old
%if 0%{?sle_version} == 150600
%define llvm_major_version 17
%else
%if 0%{?sle_version} == 150500
%define llvm_major_version 15
%else
%if 0%{?sle_version} == 150400
%define llvm_major_version 11
%endif
%endif
%endif
%endif
Name: sysctl-logger
Version: 0.0.6
Release: 0
Summary: A sysctl monitoring tool based on BPF
License: GPL-2.0-only
Group: System/Monitoring
URL: https://github.com/shunghsiyu/sysctl-logger
Source: https://github.com/shunghsiyu/sysctl-logger/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: bpftool
BuildRequires: clang%{llvm_major_version} > 9
BuildRequires: gettext-runtime
BuildRequires: make
BuildRequires: pkgconfig(libbpf)
BuildRequires: systemd-rpm-macros
%description
sysctl-logger is a sysctl monitoring tool that tracks changes to sysctl value.
%prep
%setup -q
%autosetup -p1
%build
%set_build_flags
export LIBDIR='%{_libdir}'
export UNITDIR='%{_unitdir}'
export CLANG=%{_bindir}/clang
export FORCE_SYSTEM_LIBBPF=1
export PATH="$PATH:/usr/sbin" # So bpftool can be found
%make_build
%install
export SBINDIR='%{_sbindir}'
%make_install
%pre
%service_add_pre sysctl-logger.service
%post
%service_add_post sysctl-logger.service
%preun
%service_del_preun sysctl-logger.service
%postun
%service_del_postun sysctl-logger.service
%files
%license LICENSE
%doc README.md
%{_sbindir}/sysctl-logger
%{_unitdir}/sysctl-logger.service
%changelog