[5 RSB PATCH 3/3] rtems/net-snmp: Update to 5.9.3 with the RTEMS patch
chrisj at rtems.org
chrisj at rtems.org
Mon Nov 14 00:02:03 UTC 2022
From: Chris Johns <chrisj at rtems.org>
The 5.7.2.1 patch referenced in the configuration can be located
so update the version to the latest. Checked with Zynq A9 qemu
and libbsd.
Closes #4758
---
rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg | 32 -------------
rtems/config/net-mgmt/net-snmp-5.9.3.cfg | 48 ++++++++++++++++++++
rtems/config/net-mgmt/net-snmp.bset | 4 +-
source-builder/config/net-snmp-5-1.cfg | 35 ++++++++++----
4 files changed, 75 insertions(+), 44 deletions(-)
delete mode 100644 rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
create mode 100644 rtems/config/net-mgmt/net-snmp-5.9.3.cfg
diff --git a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
deleted file mode 100644
index e4fe63e..0000000
--- a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
+++ /dev/null
@@ -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
diff --git a/rtems/config/net-mgmt/net-snmp-5.9.3.cfg b/rtems/config/net-mgmt/net-snmp-5.9.3.cfg
new file mode 100644
index 0000000..9339d34
--- /dev/null
+++ b/rtems/config/net-mgmt/net-snmp-5.9.3.cfg
@@ -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
diff --git a/rtems/config/net-mgmt/net-snmp.bset b/rtems/config/net-mgmt/net-snmp.bset
index 667acaa..c564190 100644
--- a/rtems/config/net-mgmt/net-snmp.bset
+++ b/rtems/config/net-mgmt/net-snmp.bset
@@ -7,7 +7,7 @@
#
# RTEMS Version
#
-%define rtems_version 4.11
+%define rtems_version 5
#
# The RTEMS URL paths.
@@ -17,4 +17,4 @@
#
# Build NetSNMP.
#
-net-mgmt/net-snmp-5.7.2.1-1
+net-mgmt/net-snmp-5.9.3
diff --git a/source-builder/config/net-snmp-5-1.cfg b/source-builder/config/net-snmp-5-1.cfg
index c82e310..3adfc06 100644
--- a/source-builder/config/net-snmp-5-1.cfg
+++ b/source-builder/config/net-snmp-5-1.cfg
@@ -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
+#
+# 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.
#
@@ -41,26 +58,24 @@ URL: http://www.net-snmp.org/
%{host_build_flags}
- CFLAGS="${CFLAGS} %{net_snmp_cflags}"
+ CPPFLAGS="%{net_snmp_cflags} %{rtems_bsp_includes}"
LIBS="-lbsd -lm -lz -lrtemsdefaultconfig" \
../${source_dir_net_snmp}/configure \
--host=%{_host} \
+ --target=%{_host} \
--prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --exec_prefix=%{_exec_prefix} \
- --includedir=%{_includedir} \
- --libdir=%{_libdir} \
- --libexecdir=%{_libexecdir} \
- --mandir=%{_mandir} \
- --infodir=%{_infodir} \
- --datadir=%{_datadir} \
+ %{?net_snmp_with_out_modules: --with-out-mib-modules="%{net_snmp_with_out_modules}"} \
+ --enable-internal-md5 \
--disable-embedded-perl \
+ --disable-perl-cc-checks \
--disable-shared \
--without-openssl \
--without-rsaref \
--disable-ipv6 \
- --with-defaults
+ --with-defaults \
+ --without-rpm \
+ --without-pcre
#
# NetSNMP fails to build when make runs parallel jobs
--
2.37.1
More information about the devel
mailing list