diff --git a/net-snmp-tmpfilesd.conf b/net-snmp-tmpfilesd.conf new file mode 100644 index 0000000..7130bce --- /dev/null +++ b/net-snmp-tmpfilesd.conf @@ -0,0 +1 @@ +d /var/lib/net-snmp 0755 root root - diff --git a/net-snmp.spec b/net-snmp.spec index fd50002..f8a2ea8 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -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 - 1:5.9.1-21 +- fix creation of /var/lib/net-snmp in image mode (RHEL-132655) + * Tue Jan 13 2026 Josef Ridky - 1:5.9.1-20 - fix out of bound access issue (RHEL-137511) - enable PQC (RHEL-132653)