Resolves: RHEL-132655 - add image mode support

Signed-off-by: Josef Ridky <jridky@redhat.com>
This commit is contained in:
Josef Ridky 2026-02-02 14:05:41 +01:00
parent 699b8ac910
commit 1afdbfe447
2 changed files with 11 additions and 2 deletions

1
net-snmp-tmpfilesd.conf Normal file
View File

@ -0,0 +1 @@
d /var/lib/net-snmp 0755 root root -

View File

@ -10,7 +10,7 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: 5.9.1
Release: 20%{?dist}
Release: 21%{?dist}
Epoch: 1
License: BSD
@ -26,6 +26,7 @@ Source7: net-snmp-tmpfs.conf
Source8: snmpd.service
Source9: snmptrapd.service
Source10: IETF-MIB-LICENSE.txt
Source11: net-snmp-tmpfilesd.conf
Patch1: net-snmp-5.9-pie.patch
Patch2: net-snmp-5.9-dir-fix.patch
@ -80,7 +81,7 @@ Requires: %{name}-agent-libs%{?_isa} = %{epoch}:%{version}-%{release}
# is not valid. We can use %%post because this particular %%triggerun script
# should fire just after this package is installed.
%{?systemd_requires}
BuildRequires: make
BuildRequires: make
BuildRequires: systemd
BuildRequires: gcc
BuildRequires: openssl-devel, bzip2-devel, elfutils-devel
@ -107,6 +108,8 @@ BuildRequires: perl(warnings)
BuildRequires: lm_sensors-devel >= 3
%endif
BuildRequires: autoconf, automake
# For _tmpfilesdir macro
BuildRequires: systemd-rpm-macros
%description
SNMP (Simple Network Management Protocol) is a protocol used for
@ -356,6 +359,7 @@ install -m 644 %SOURCE4 %{buildroot}%{_sysconfdir}/snmp/snmptrapd.conf
install -d %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 %SOURCE5 %{buildroot}%{_sysconfdir}/sysconfig/snmpd
install -m 644 %SOURCE6 %{buildroot}%{_sysconfdir}/sysconfig/snmptrapd
install -p -D -m 644 %SOURCE11 %{buildroot}%{_tmpfilesdir}/%{name}.conf
# prepare /var/lib/net-snmp
install -d %{buildroot}%{_localstatedir}/lib/net-snmp
@ -450,6 +454,7 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
%{_bindir}/snmpconf
%{_bindir}/net-snmp-create-v3-user
%{_sbindir}/*
%{_tmpfilesdir}/%{name}.conf
%attr(0644,root,root) %{_mandir}/man[58]/snmp*d*
%attr(0644,root,root) %{_mandir}/man5/snmp_config.5.gz
%attr(0644,root,root) %{_mandir}/man5/variables*
@ -526,6 +531,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
%{_libdir}/libnetsnmptrapd*.so.%{soname}*
%changelog
* Mon Feb 02 2026 Josef Ridky <jridky@redhat.com> - 1:5.9.1-21
- fix creation of /var/lib/net-snmp in image mode (RHEL-132655)
* Tue Jan 13 2026 Josef Ridky <jridky@redhat.com> - 1:5.9.1-20
- fix out of bound access issue (RHEL-137511)
- enable PQC (RHEL-132653)