initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,146 @@
|
||||
From bd59be8e4e339870a1400f6866a7b73ca11f6460 Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
Date: Wed, 12 Sep 2018 20:16:39 +0200
|
||||
Subject: [PATCH] configure, static linking: Fix SSL checks
|
||||
|
||||
During checking of DTLS_method, the stub program is linked only with -ssl
|
||||
libssl.a lacks some function from -lcrypto:
|
||||
RAND_*()
|
||||
ERR_*()
|
||||
BUF_MEM_*()
|
||||
etc.
|
||||
and -lz:
|
||||
- inflate()
|
||||
- deflate()
|
||||
|
||||
Append -lcrypto and -lz to LIBS variable when checking DTLS_method.
|
||||
|
||||
See also https://sourceforge.net/p/net-snmp/patches/1374/.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
[bvanassche: Edited subject / rewrote this patch]
|
||||
[yann.morin.1998@free.fr:
|
||||
- use an actual backport of bd59be8e4e339870a1400f6866a7b73ca11f6460
|
||||
]
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
configure | 52 ++++++++++++++++++++++++++++++++++---
|
||||
configure.d/config_os_libs2 | 14 +++++++---
|
||||
2 files changed, 58 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6504a8e58a..1116cecaad 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -23228,16 +23228,60 @@ fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5
|
||||
$as_echo "$ac_cv_lib_crypto_EVP_md5" >&6; }
|
||||
if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then :
|
||||
- CRYPTO="crypto"
|
||||
+ CRYPTO="crypto"; LIBCRYPTO="-lcrypto"
|
||||
+else
|
||||
+
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5
|
||||
+$as_echo_n "checking for EVP_md5 in -lcrypto... " >&6; }
|
||||
+if ${ac_cv_lib_crypto_EVP_md5+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ ac_check_lib_save_LIBS=$LIBS
|
||||
+LIBS="-lcrypto -lz $LIBS"
|
||||
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char EVP_md5 ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return EVP_md5 ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+if ac_fn_c_try_link "$LINENO"; then :
|
||||
+ ac_cv_lib_crypto_EVP_md5=yes
|
||||
+else
|
||||
+ ac_cv_lib_crypto_EVP_md5=no
|
||||
+fi
|
||||
+rm -f core conftest.err conftest.$ac_objext \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+LIBS=$ac_check_lib_save_LIBS
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_md5" >&5
|
||||
+$as_echo "$ac_cv_lib_crypto_EVP_md5" >&6; }
|
||||
+if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then :
|
||||
+ CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"
|
||||
+fi
|
||||
+
|
||||
+
|
||||
fi
|
||||
|
||||
- fi
|
||||
+ else
|
||||
+ LIBCRYPTO="-l${CRYPTO}"
|
||||
+ fi
|
||||
|
||||
if test x$CRYPTO != x; then
|
||||
|
||||
$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
|
||||
|
||||
- LIBCRYPTO="-l${CRYPTO}"
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
LIBS="$LIBCRYPTO"
|
||||
for ac_func in AES_cfb128_encrypt EVP_sha224 EVP_sha384 EVP_MD_CTX_create EVP_MD_CTX_destroy EVP_MD_CTX_new EVP_MD_CTX_free DH_set0_pqg DH_get0_pqg DH_get0_key ASN1_STRING_get0_data X509_NAME_ENTRY_get_object X509_NAME_ENTRY_get_data X509_get_signature_nid
|
||||
@@ -23291,7 +23335,7 @@ _ACEOF
|
||||
LIBS="$netsnmp_save_LIBS"
|
||||
fi
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
- LIBS="-lssl"
|
||||
+ LIBS="-lssl $LIBCRYPTO"
|
||||
for ac_func in TLS_method TLSv1_method DTLS_method DTLSv1_method SSL_library_init SSL_load_error_strings ERR_get_error_all
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
|
||||
index 4a1ad1551f..75214cfff3 100644
|
||||
--- a/configure.d/config_os_libs2
|
||||
+++ b/configure.d/config_os_libs2
|
||||
@@ -306,13 +306,19 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
|
||||
LIBS="$netsnmp_save_LIBS"
|
||||
|
||||
if test x$CRYPTO = x; then
|
||||
- AC_CHECK_LIB([crypto], [EVP_md5], [CRYPTO="crypto"])
|
||||
- fi
|
||||
+ AC_CHECK_LIB([crypto], [EVP_md5],
|
||||
+ [CRYPTO="crypto"; LIBCRYPTO="-lcrypto"], [
|
||||
+ AC_CHECK_LIB([crypto], [EVP_md5],
|
||||
+ [CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"], [],
|
||||
+ [-lz])
|
||||
+ ])
|
||||
+ else
|
||||
+ LIBCRYPTO="-l${CRYPTO}"
|
||||
+ fi
|
||||
|
||||
if test x$CRYPTO != x; then
|
||||
AC_DEFINE(HAVE_LIBCRYPTO, 1,
|
||||
[Define to 1 if you have the OpenSSL library (-lcrypto or -leay32).])
|
||||
- LIBCRYPTO="-l${CRYPTO}"
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
LIBS="$LIBCRYPTO"
|
||||
AC_CHECK_FUNCS([AES_cfb128_encrypt]dnl
|
||||
@@ -342,7 +348,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
|
||||
LIBS="$netsnmp_save_LIBS"
|
||||
fi
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
- LIBS="-lssl"
|
||||
+ LIBS="-lssl $LIBCRYPTO"
|
||||
AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl
|
||||
[SSL_library_init SSL_load_error_strings])
|
||||
LIBS="$netsnmp_save_LIBS"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From 13da2bcde8e22dd0127a668374fdf79bed04d353 Mon Sep 17 00:00:00 2001
|
||||
From: Bart Van Assche <bvanassche@acm.org>
|
||||
Date: Mon, 17 Sep 2018 07:33:34 -0700
|
||||
Subject: [PATCH] configure: Fix -lcrypto -lz test
|
||||
|
||||
Avoid that the second crypto library test uses the cached result from
|
||||
the first test by explicitly clearing the cached test result.
|
||||
|
||||
[yann.morin.1998@free.fr:
|
||||
- use an actual backport of 13da2bcde8e22dd0127a668374fdf79bed04d353
|
||||
]
|
||||
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.d/config_os_libs2 | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 1116cecaad..33b8c93e57 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -23231,6 +23231,7 @@ if test "x$ac_cv_lib_crypto_EVP_md5" = xyes; then :
|
||||
CRYPTO="crypto"; LIBCRYPTO="-lcrypto"
|
||||
else
|
||||
|
||||
+ unset ac_cv_lib_crypto_EVP_md5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EVP_md5 in -lcrypto" >&5
|
||||
$as_echo_n "checking for EVP_md5 in -lcrypto... " >&6; }
|
||||
if ${ac_cv_lib_crypto_EVP_md5+:} false; then :
|
||||
diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
|
||||
index 75214cfff3..81788a2096 100644
|
||||
--- a/configure.d/config_os_libs2
|
||||
+++ b/configure.d/config_os_libs2
|
||||
@@ -308,6 +308,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
|
||||
if test x$CRYPTO = x; then
|
||||
AC_CHECK_LIB([crypto], [EVP_md5],
|
||||
[CRYPTO="crypto"; LIBCRYPTO="-lcrypto"], [
|
||||
+ unset ac_cv_lib_crypto_EVP_md5
|
||||
AC_CHECK_LIB([crypto], [EVP_md5],
|
||||
[CRYPTO="crypto"; LIBCRYPTO="-lcrypto -lz"], [],
|
||||
[-lz])
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 8e273c688aa235ed9c68570a700d31596bac14df Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
Date: Mon, 15 Oct 2018 19:07:05 +0200
|
||||
Subject: [PATCH 1/2] configure: fix AC_CHECK_FUNCS(EVP_sha224 EVP_sha384 ...)
|
||||
failure on static linking
|
||||
|
||||
If building as static lib, AC_CHECK_FUNCS(EVP_sha224 EVP_sha384 ...)
|
||||
fails due to missing -lz in $LIBS.
|
||||
At the moment, $LIBS contains $LIBCRYPTO only discarding previous $LIBS
|
||||
content.
|
||||
|
||||
Add $LIBS to:
|
||||
LIBS="$LIBCRYPTO"
|
||||
as:
|
||||
LIBS="$LIBCRYPTO $LIBS"
|
||||
This way $LIBS will contain -lz at the end of linking command that in
|
||||
static linking build is mandatory.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
---
|
||||
configure.d/config_os_libs2 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
|
||||
index 81788a209..93044000b 100644
|
||||
--- a/configure.d/config_os_libs2
|
||||
+++ b/configure.d/config_os_libs2
|
||||
@@ -321,7 +321,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
|
||||
AC_DEFINE(HAVE_LIBCRYPTO, 1,
|
||||
[Define to 1 if you have the OpenSSL library (-lcrypto or -leay32).])
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
- LIBS="$LIBCRYPTO"
|
||||
+ LIBS="$LIBCRYPTO $LIBS"
|
||||
AC_CHECK_FUNCS([AES_cfb128_encrypt]dnl
|
||||
[EVP_sha224 EVP_sha384 ]dnl
|
||||
[EVP_MD_CTX_create EVP_MD_CTX_destroy]dnl
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
From 1ab6e3fc3cf61fa5a7b7363e59095e868474524b Mon Sep 17 00:00:00 2001
|
||||
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
Date: Mon, 15 Oct 2018 19:34:26 +0200
|
||||
Subject: [PATCH 2/2] configure: fix AC_CHECK_FUNCS(TLS_method TLSv1_method
|
||||
...) failure on static linking
|
||||
|
||||
If building as static lib, AC_CHECK_FUNCS(TLS_method TLSv1_method ...)
|
||||
fails due to missing -lz in $LIBS.
|
||||
At the moment, $LIBS contains "-lssl $LIBCRYPTO" only discarding
|
||||
previous $LIBS content.
|
||||
|
||||
Add $LIBS to:
|
||||
LIBS="-lssl $LIBCRYPTO"
|
||||
as:
|
||||
LIBS="-lssl $LIBCRYPTO $LIBS"
|
||||
This way $LIBS will contain -lz at the end of linking command that in
|
||||
static linking build is mandatory.
|
||||
|
||||
Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
|
||||
---
|
||||
configure.d/config_os_libs2 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.d/config_os_libs2 b/configure.d/config_os_libs2
|
||||
index 93044000b..c811c63ec 100644
|
||||
--- a/configure.d/config_os_libs2
|
||||
+++ b/configure.d/config_os_libs2
|
||||
@@ -349,7 +349,7 @@ if test "x$tryopenssl" != "xno" -a "x$tryopenssl" != "xinternal"; then
|
||||
LIBS="$netsnmp_save_LIBS"
|
||||
fi
|
||||
netsnmp_save_LIBS="$LIBS"
|
||||
- LIBS="-lssl $LIBCRYPTO"
|
||||
+ LIBS="-lssl $LIBCRYPTO $LIBS"
|
||||
AC_CHECK_FUNCS([TLS_method TLSv1_method DTLS_method DTLSv1_method]dnl
|
||||
[SSL_library_init SSL_load_error_strings]dnl
|
||||
[ERR_get_error_all])
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
config BR2_PACKAGE_NETSNMP
|
||||
bool "netsnmp"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES if BR2_PACKAGE_LIBOPENSSL
|
||||
help
|
||||
Suite of applications used to implement SNMP v1, SNMP v2c, and
|
||||
SNMP v3 using both IPv4 and IPv6.
|
||||
|
||||
http://net-snmp.sourceforge.net/
|
||||
|
||||
if BR2_PACKAGE_NETSNMP
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_SERVER
|
||||
bool "server"
|
||||
default y
|
||||
help
|
||||
The snmpd server.
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_CLIENTS
|
||||
bool "clients"
|
||||
default y
|
||||
help
|
||||
The net-snmp clients (snmpget, snmpwalk, etc).
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_ENABLE_MIBS
|
||||
bool "Install MIB files on target and enable MIB loading code"
|
||||
default y
|
||||
help
|
||||
The net-snmp package contains a selection of MIB files.
|
||||
Say yes if you want those MIB files installed on the target
|
||||
and enable the code that parses the MIB files.
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES
|
||||
string "Build with these MIB modules"
|
||||
default "host ucd-snmp/dlmod agentx" if !BR2_STATIC_LIBS
|
||||
default "host agentx" if BR2_STATIC_LIBS
|
||||
help
|
||||
Specify which MIB modules to include.
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES
|
||||
string "Build without these MIB modules"
|
||||
default "disman/event disman/schedule utilities"
|
||||
help
|
||||
Specify which MIB modules to exclude.
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING
|
||||
bool "Enable debugging code"
|
||||
help
|
||||
By default net-snmp is compiled without debugging support
|
||||
(--disable-debugging). Enable this options if you need
|
||||
debugging support, including the ability to log with
|
||||
DEBUGMSG(), DEBUGMSGTL() and companion macros.
|
||||
|
||||
config BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL
|
||||
bool "Enable minimal internal OpenSSL code"
|
||||
depends on !BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
Enable a minimal internal copy of OpenSSL usable for USM
|
||||
security. It will not enable the usage of SNMP over (D)TLS.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,104 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: snmpd snmptrapd
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop: $network $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 6
|
||||
# Short-Description: SNMP agents
|
||||
# Description: NET SNMP (Simple Network Management Protocol) Agents
|
||||
### END INIT INFO
|
||||
#
|
||||
# Author: Jochen Friedrich <jochen@scram.de>
|
||||
#
|
||||
|
||||
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
# Defaults
|
||||
export MIBDIRS=/usr/share/snmp/mibs
|
||||
SNMPDRUN=yes
|
||||
SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid 127.0.0.1'
|
||||
TRAPDRUN=no
|
||||
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
|
||||
|
||||
# Reads config file (will override defaults above)
|
||||
[ -r /etc/default/snmpd ] && . /etc/default/snmpd
|
||||
|
||||
ssd_oknodo="-o"
|
||||
|
||||
# Cd to / before starting any daemons.
|
||||
cd /
|
||||
|
||||
# Create compatibility link to old AgentX socket location
|
||||
if [ "$SNMPDCOMPAT" = "yes" ]; then
|
||||
ln -sf /var/agentx/master /var/run/agentx
|
||||
fi
|
||||
|
||||
start() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Starting SNMP daemon: "
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Starting SNMP trap daemon: "
|
||||
start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Stopping SNMP daemon: "
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Stopping SNMP trap daemon: "
|
||||
start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
reload() {
|
||||
if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
|
||||
printf "Reloading SNMP daemon: "
|
||||
start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
|
||||
if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
|
||||
printf "Reloading SNMP trap daemon: "
|
||||
start-stop-daemon -q -K -s 1 -p /var/run/snmptrapd.pid -x /usr/sbin/snmptrapd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
|
||||
restart)
|
||||
stop
|
||||
# Allow the daemons time to exit completely.
|
||||
sleep 2
|
||||
start
|
||||
;;
|
||||
|
||||
reload|force-reload)
|
||||
reload
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,7 @@
|
||||
# Locally calculated after checking pgp signature at
|
||||
# https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9/net-snmp-5.9.tar.gz.asc
|
||||
# using key D0F8F495DA6160C44EFFBF10F07B9D2DACB19FD6
|
||||
sha256 04303a66f85d6d8b16d3cc53bde50428877c82ab524e17591dfceaeb94df6071 net-snmp-5.9.tar.gz
|
||||
|
||||
# Hash for license file
|
||||
sha256 ed869ea395a1f125819a56676385ab0557a21507764bf56f2943302011381e59 COPYING
|
||||
@@ -0,0 +1,110 @@
|
||||
################################################################################
|
||||
#
|
||||
# netsnmp
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NETSNMP_VERSION = 5.9
|
||||
NETSNMP_SITE = https://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION)
|
||||
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
|
||||
NETSNMP_LICENSE = Various BSD-like
|
||||
NETSNMP_LICENSE_FILES = COPYING
|
||||
NETSNMP_CPE_ID_VENDOR = net-snmp
|
||||
NETSNMP_CPE_ID_PRODUCT = $(NETSNMP_CPE_ID_VENDOR)
|
||||
NETSNMP_SELINUX_MODULES = snmp
|
||||
NETSNMP_INSTALL_STAGING = YES
|
||||
NETSNMP_CONF_ENV = \
|
||||
ac_cv_NETSNMP_CAN_USE_SYSCTL=no \
|
||||
ac_cv_path_PSPROG=/bin/ps
|
||||
NETSNMP_CONF_OPTS = \
|
||||
--with-persistent-directory=/var/lib/snmp \
|
||||
--with-defaults \
|
||||
--enable-mini-agent \
|
||||
--without-rpm \
|
||||
--with-logfile=none \
|
||||
--without-kmem-usage \
|
||||
--enable-as-needed \
|
||||
--without-perl-modules \
|
||||
--disable-embedded-perl \
|
||||
--disable-perl-cc-checks \
|
||||
--disable-scripts \
|
||||
--with-default-snmp-version="1" \
|
||||
--enable-silent-libtool \
|
||||
--enable-mfd-rewrites \
|
||||
--with-sys-contact="root@localhost" \
|
||||
--with-sys-location="Unknown" \
|
||||
--with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \
|
||||
--with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \
|
||||
--disable-manuals
|
||||
NETSNMP_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIB_LDCONFIG_CMD=true install
|
||||
NETSNMP_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIB_LDCONFIG_CMD=true install
|
||||
NETSNMP_MAKE = $(MAKE1)
|
||||
NETSNMP_CONFIG_SCRIPTS = net-snmp-config
|
||||
NETSNMP_AUTORECONF = YES
|
||||
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
NETSNMP_CONF_OPTS += --with-endianness=big
|
||||
else
|
||||
NETSNMP_CONF_OPTS += --with-endianness=little
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBNL),y)
|
||||
NETSNMP_DEPENDENCIES += host-pkgconf libnl
|
||||
NETSNMP_CONF_OPTS += --with-nl
|
||||
else
|
||||
NETSNMP_CONF_OPTS += --without-nl
|
||||
endif
|
||||
|
||||
# OpenSSL
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
NETSNMP_DEPENDENCIES += host-pkgconf openssl
|
||||
NETSNMP_CONF_OPTS += \
|
||||
--with-openssl=$(STAGING_DIR)/usr/include/openssl \
|
||||
--with-security-modules="tsm,usm" \
|
||||
--with-transports="DTLSUDP,TLSTCP"
|
||||
NETSNMP_CONF_ENV += LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl`
|
||||
else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y)
|
||||
NETSNMP_CONF_OPTS += --with-openssl=internal
|
||||
else
|
||||
NETSNMP_CONF_OPTS += --without-openssl
|
||||
endif
|
||||
|
||||
# There's no option to forcibly enable or disable it
|
||||
ifeq ($(BR2_PACKAGE_PCIUTILS),y)
|
||||
NETSNMP_DEPENDENCIES += pciutils
|
||||
endif
|
||||
|
||||
# For ucd-snmp/lmsensorsMib
|
||||
ifeq ($(BR2_PACKAGE_LM_SENSORS),y)
|
||||
NETSNMP_DEPENDENCIES += lm-sensors
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y)
|
||||
NETSNMP_CONF_OPTS += --disable-mib-loading
|
||||
NETSNMP_CONF_OPTS += --disable-mibs
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
|
||||
NETSNMP_CONF_OPTS += --disable-debugging
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
|
||||
NETSNMP_CONF_OPTS += --enable-agent
|
||||
else
|
||||
NETSNMP_CONF_OPTS += --disable-agent
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP_CLIENTS),y)
|
||||
NETSNMP_CONF_OPTS += --enable-applications
|
||||
else
|
||||
NETSNMP_CONF_OPTS += --disable-applications
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y)
|
||||
define NETSNMP_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \
|
||||
$(TARGET_DIR)/etc/init.d/S59snmpd
|
||||
endef
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user