rtems/net-snmp: Update to 5.9.3 with the RTEMS patch

The 5.7.2.1 patch referenced in the configuration cannot be located
so update the version to the latest. Checked with Zynq A9 qemu
and libbsd.

Closes #4758
This commit is contained in:
Chris Johns
2022-11-14 09:29:22 +11:00
parent 5992bc9519
commit c7e85e3319
4 changed files with 75 additions and 44 deletions

View File

@@ -1,32 +0,0 @@
#
# NetSNMP 5.7.2.1
#
%if %{release} == %{nil}
%define release 1
%endif
%include %{_configdir}/rtems-bsp.cfg
#
# NetSNMP Version
#
%define net_snmp_version 5.7.2.1
%hash sha512 net-snmp-%{net_snmp_version}.tar.gz 6c4dadd145cab9572e2559ad99d6794469685086771c6d757d3667da1a061ab86746d53c28d48381c59a90d92b1812b813f3176cff156c41929177fb585299d0
#
# We need some special flags to build this version.
#
%define net_snmp_cflags -DNETSNMP_CAN_USE_SYSCTL=1 -DARP_SCAN_FOUR_ARGUMENTS=1 -DINP_IPV6=0
#
# Patch for RTEMS support.
#
%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20190704.patch
#%hash sha512 rtems-net-snmp-5.7.2.1-20140623.patch 4eb987d88c6414f2e07d725c2ebb3e88a40191c7befce879cae9ef67143dc25aa88942cfc525d36cd3683476d1cc0f5882d4a730d3bb9c53be2c7a079874d7dd
#
# NetSNMP Build configuration
#
%include %{_configdir}/net-snmp-5-1.cfg

View File

@@ -0,0 +1,48 @@
#
# NetSNMP 5.9.3
#
%if %{release} == %{nil}
%define release 1
%endif
%include %{_configdir}/rtems-bsp.cfg
#
# NetSNMP Version
#
%define net_snmp_version 5.9.3
%hash sha512 net-snmp-%{net_snmp_version}.tar.gz \
pHbfSWcCmi6wPSew4lAXB4XQqMFD1JuQDulYw8vfrM1BW3CvQPb77Zy4gZ1SLDWmBzpDEJHZCMzHwBj6CqoqvA==
#
# We need some special flags to build this version.
#
%define net_snmp_cflags \
-DNETSNMP_CAN_USE_SYSCTL=1 -DARP_SCAN_FOUR_ARGUMENTS=1 \
-D__FreeBSD_version=1200026 -Dfreebsd4=1
#
# Exclude the following modules
#
%define net_snmp_with_out_modules \
ucd-snmp \
ucd-snmp/vmstat \
ucd-snmp/memory \
hardware/memory \
hardware/memory/memory_freebsd \
hardware/cpu \
hardware/cpu/cpu_sysctl
#
# Patch for RTEMS support.
#
%patch add net-snmp https://devel.rtems.org/raw-attachment/ticket/4758/rtems-net-snmp-5.9.3-20221113.patch
%hash sha512 rtems-net-snmp-5.9.3-20221113.patch \
M+BTE1cdl6/yIYDz0iR0MGp4SJti0OzrNmdZ1zsnl4uMHsgAPc3i/S/SzXKmKipEjlBQMOJuwcP+x7wmG8BXBg==
#
# NetSNMP Build configuration
#
%include %{_configdir}/net-snmp-5-1.cfg

View File

@@ -7,7 +7,7 @@
# #
# RTEMS Version # RTEMS Version
# #
%define rtems_version 4.11 %define rtems_version 5
# #
# The RTEMS URL paths. # The RTEMS URL paths.
@@ -17,4 +17,4 @@
# #
# Build NetSNMP. # Build NetSNMP.
# #
net-mgmt/net-snmp-5.7.2.1-1 net-mgmt/net-snmp-5.9.3

View File

@@ -19,6 +19,23 @@ URL: http://www.net-snmp.org/
# #
%source set net-snmp http://downloads.sourceforge.net/project/net-snmp/net-snmp/%{net_snmp_version}/net-snmp-%{net_snmp_version}.tar.gz %source set net-snmp http://downloads.sourceforge.net/project/net-snmp/net-snmp/%{net_snmp_version}/net-snmp-%{net_snmp_version}.tar.gz
#
# NetSMP needs the have the spec stuff handled differently
#
%define bsp_specs -qrtems -B%{_libdir} --specs bsp_specs
%define host_cc %{rtems_bsp_cc} %{bsp_specs}
%define _host_cc gcc %{bsp_specs}
%define host_cxx %{rtems_bsp_cxx} %{bsp_specs}
%define _host_cxx gcc %{bsp_specs}
%define host_cflags %(echo %{rtems_bsp_cflags} | \
sed -e 's/\-qrtems//' \
-e 's/\-\-specs bsp_specs//' \
-e 's/\-B[^ ]*//g')
%define host_cxxflags %(echo %{rtems_bsp_ccflags} | \
sed -e 's/\-qrtems//' \
-e 's/\-\-specs bsp_specs//' \
-e 's/\-B[^ ]*//g')
# #
# Prepare the source code. # Prepare the source code.
# #
@@ -41,26 +58,24 @@ URL: http://www.net-snmp.org/
%{host_build_flags} %{host_build_flags}
CFLAGS="${CFLAGS} %{net_snmp_cflags}" CPPFLAGS="%{net_snmp_cflags} %{rtems_bsp_includes}"
LIBS="-lbsd -lm -lz -lrtemsdefaultconfig" \ LIBS="-lbsd -lm -lz -lrtemsdefaultconfig" \
../${source_dir_net_snmp}/configure \ ../${source_dir_net_snmp}/configure \
--host=%{_host} \ --host=%{_host} \
--target=%{_host} \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--bindir=%{_bindir} \ %{?net_snmp_with_out_modules: --with-out-mib-modules="%{net_snmp_with_out_modules}"} \
--exec_prefix=%{_exec_prefix} \ --enable-internal-md5 \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--datadir=%{_datadir} \
--disable-embedded-perl \ --disable-embedded-perl \
--disable-perl-cc-checks \
--disable-shared \ --disable-shared \
--without-openssl \ --without-openssl \
--without-rsaref \ --without-rsaref \
--disable-ipv6 \ --disable-ipv6 \
--with-defaults --with-defaults \
--without-rpm \
--without-pcre
# #
# NetSNMP fails to build when make runs parallel jobs # NetSNMP fails to build when make runs parallel jobs