* [PATCH 0/7] net-snmp: add ptest and several fixes
@ 2015-01-16 6:13 jackie.huang
2015-01-16 6:13 ` [PATCH 1/7] net-snmp: have mib-modules=smux enabled jackie.huang
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:13 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Tested on qemux86-64 with both systemd and sysvinit, and ptest run pass.
---
The following changes since commit 2fbc57e10562a809e20a7be93c76d9f08a88ea5f:
adduser: add new recipe (2015-01-15 16:37:56 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib jhuang0/r_net-snmp_150115_0
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/r_net-snmp_150115_0
Jackie Huang (7):
net-snmp: have mib-modules=smux enabled
net-snmp: move persistent dir to /var/lib/net-snmp
net-snmp: fix "libtool --finish"
net-snmp: add knob whether nlist.h are checked
net-snmp: init script fixes
net-snmp: move net-snmp-config to client package
net-snmp: add ptest package
.../recipes-protocols/net-snmp/files/init | 53 ++++++++++----------
.../net-snmp/net-snmp/fix-libtool-finish.patch | 25 ++++++++++
...snmp-add-knob-whether-nlist.h-are-checked.patch | 35 +++++++++++++
...p-testing-add-the-output-format-for-ptest.patch | 37 ++++++++++++++
.../recipes-protocols/net-snmp/net-snmp/run-ptest | 4 ++
.../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 57 ++++++++++++++++------
6 files changed, 172 insertions(+), 39 deletions(-)
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
create mode 100755 meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
--
1.9.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/7] net-snmp: have mib-modules=smux enabled
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
@ 2015-01-16 6:13 ` jackie.huang
2015-01-16 6:14 ` [PATCH 2/7] net-snmp: move persistent dir to /var/lib/net-snmp jackie.huang
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:13 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
According to the following commit, net-snmp needs to have
mib-modules=smux enabled:
commit f64db3011c04ada0a8ac04b9eddde05b67d21eec
Author: Aws Ismail <aws.ismail@windriver.com>
Date: Mon Mar 25 11:30:06 2013 -0400
Quagga has no snmp support, unrecognized options --enable-tcp-md5
1. Quagga's tcp-md5 has been renamed to linux24-tcp-md5
2. net-snmp needs to have mib-modules=smux enabled to enable
quagga to support snmp. Make the net-snmp option dependent
on the DISTRO_FEATURE snmp.
3. Misc: install the sample conf files for quagga. Also,
Make sure that the post install script is being run
on the target rather than during the rootfs creation
stage.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index a76de0d..07c7b60 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -36,6 +36,9 @@ EXTRA_OECONF = "--disable-embedded-perl \
--with-defaults \
${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
+# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
+EXTRA_OECONF += "--with-mib-modules=smux"
+
CACHED_CONFIGUREVARS = " \
ac_cv_header_valgrind_valgrind_h=no \
ac_cv_header_valgrind_memcheck_h=no \
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] net-snmp: move persistent dir to /var/lib/net-snmp
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
2015-01-16 6:13 ` [PATCH 1/7] net-snmp: have mib-modules=smux enabled jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
2015-01-16 6:14 ` [PATCH 3/7] net-snmp: fix "libtool --finish" jackie.huang
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Move persistent dir to /var/lib/net-snmp and fix security contexts for
them.
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta-networking/recipes-protocols/net-snmp/files/init | 2 ++
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 1 +
2 files changed, 3 insertions(+)
diff --git a/meta-networking/recipes-protocols/net-snmp/files/init b/meta-networking/recipes-protocols/net-snmp/files/init
index 434b2fa..6b02570 100755
--- a/meta-networking/recipes-protocols/net-snmp/files/init
+++ b/meta-networking/recipes-protocols/net-snmp/files/init
@@ -28,6 +28,8 @@ case "$1" in
echo -n " snmptrapd"
fi
echo "."
+
+ test ! -x /sbin/restorecon || /sbin/restorecon -FR /var/lib/net-snmp
;;
stop)
echo -n "Stopping network management services:"
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 07c7b60..3567094 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -34,6 +34,7 @@ EXTRA_OECONF = "--disable-embedded-perl \
--enable-shared \
--disable-manuals \
--with-defaults \
+ --with-persistent-directory=${localstatedir}/lib/net-snmp \
${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] net-snmp: fix "libtool --finish"
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
2015-01-16 6:13 ` [PATCH 1/7] net-snmp: have mib-modules=smux enabled jackie.huang
2015-01-16 6:14 ` [PATCH 2/7] net-snmp: move persistent dir to /var/lib/net-snmp jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
2015-01-16 6:14 ` [PATCH 4/7] net-snmp: add knob whether nlist.h are checked jackie.huang
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
LIB_LDCONFIG_CMD failed since it is using a host dir $(libdir)
which is /usr/lib64 does not exist on host when compile 64bit
image.
In fact, configuring dynamic linker run-time bindings is meaningless
at this step, If it is needed, Poky would write ldconfig scripts to
rpm-postinst for each recipe while do_package, in package.bbclass.
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../net-snmp/net-snmp/fix-libtool-finish.patch | 25 ++++++++++++++++++++++
.../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 1 +
2 files changed, 26 insertions(+)
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
new file mode 100644
index 0000000..a360c3a
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/fix-libtool-finish.patch
@@ -0,0 +1,25 @@
+LIB_LDCONFIG_CMD failed since it is using a host dir $(libdir)
+which is /usr/lib64 does not exist on host when compile 64bit
+image.
+
+In fact, configuring dynamic linker run-time bindings is meaningless
+at this step, If it is needed, Poky would write ldconfig scripts to
+rpm-postinst for each recipe while do_package, in package.bbclass.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+diff --git a/Makefile.top b/Makefile.top
+index 862fb94..ed7dcfc 100644
+--- a/Makefile.top
++++ b/Makefile.top
+@@ -86,7 +86,7 @@ LIBREVISION = 2
+ LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
+ LIB_EXTENSION = la
+ LIB_VERSION =
+-LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(INSTALL_PREFIX)$(libdir)
++LIB_LDCONFIG_CMD = echo "do not ldconfig\n"
+ LINK = $(LIBTOOL) --mode=link $(LINKCC)
+ # RANLIB = @RANLIB@
+ RANLIB = :
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 3567094..1e398d4 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -15,6 +15,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
file://snmpd.service \
file://snmptrapd.service \
file://ifmib.patch \
+ file://fix-libtool-finish.patch \
"
SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] net-snmp: add knob whether nlist.h are checked
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
` (2 preceding siblings ...)
2015-01-16 6:14 ` [PATCH 3/7] net-snmp: fix "libtool --finish" jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
2015-01-16 6:14 ` [PATCH 5/7] net-snmp: init script fixes jackie.huang
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Previously, it still was checked when there was no nlish.h in sysroots directory.
Add knob to decide whether nlist.h are checked or not.
Fixed by using PACKAGECONFIG to check elf, with default disabled set.
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
...snmp-add-knob-whether-nlist.h-are-checked.patch | 35 ++++++++++++++++++++++
.../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 4 +++
2 files changed, 39 insertions(+)
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
new file mode 100644
index 0000000..74b0c12
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-add-knob-whether-nlist.h-are-checked.patch
@@ -0,0 +1,35 @@
+net-snmp: add knob whether nlist.h are checked
+
+Previously, it still was checked when there was no nlish.h in sysroots directory.
+Add knob to decide whether nlist.h are checked or not.
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ configure.d/config_os_headers | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.d/config_os_headers b/configure.d/config_os_headers
+index d903f58..a05d30e 100644
+--- a/configure.d/config_os_headers
++++ b/configure.d/config_os_headers
+@@ -31,6 +31,7 @@ AC_CHECK_HEADERS([getopt.h pthread.h regex.h ] dnl
+ [sys/un.h ])
+
+ # Library and Agent:
++if test "x$with_elf" != "xno"; then
+ AC_CHECK_HEADERS([nlist.h],,,[
+ AC_INCLUDES_DEFAULT
+ [
+@@ -38,6 +39,7 @@ AC_INCLUDES_DEFAULT
+ #define LIBBSD_DISABLE_DEPRECATED 1
+ #endif
+ ]])
++fi
+
+ # Library:
+ AC_CHECK_HEADERS([fcntl.h io.h kstat.h ] dnl
+--
+1.7.9.5
+
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 1e398d4..6736718 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
file://snmptrapd.service \
file://ifmib.patch \
file://fix-libtool-finish.patch \
+ file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
"
SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"
@@ -41,6 +42,9 @@ EXTRA_OECONF = "--disable-embedded-perl \
# net-snmp needs to have mib-modules=smux enabled to enable quagga to support snmp
EXTRA_OECONF += "--with-mib-modules=smux"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils"
+
CACHED_CONFIGUREVARS = " \
ac_cv_header_valgrind_valgrind_h=no \
ac_cv_header_valgrind_memcheck_h=no \
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] net-snmp: init script fixes
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
` (3 preceding siblings ...)
2015-01-16 6:14 ` [PATCH 4/7] net-snmp: add knob whether nlist.h are checked jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
2015-01-16 6:14 ` [PATCH 6/7] net-snmp: move net-snmp-config to client package jackie.huang
2015-01-16 6:14 ` [PATCH 7/7] net-snmp: add ptest package jackie.huang
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Changes:
1. Add source function and status command.
2. make it possible to change the start arguments with a default file
in the same way as debian.
3. change the default INITSCRIPT_PARAMS
4. Add PIDFILE and fix restart
5. remove the postrm sicne we use the one from update-rc.d
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
.../recipes-protocols/net-snmp/files/init | 51 +++++++++++-----------
.../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 11 +----
2 files changed, 27 insertions(+), 35 deletions(-)
diff --git a/meta-networking/recipes-protocols/net-snmp/files/init b/meta-networking/recipes-protocols/net-snmp/files/init
index 6b02570..2b8fe18 100755
--- a/meta-networking/recipes-protocols/net-snmp/files/init
+++ b/meta-networking/recipes-protocols/net-snmp/files/init
@@ -1,6 +1,8 @@
#! /bin/sh
# /etc/init.d/snmpd: start snmp daemon.
+. /etc/init.d/functions
+
test -x /usr/sbin/snmpd || exit 0
test -x /usr/sbin/snmptrapd || exit 0
@@ -10,21 +12,23 @@ SNMPDRUN=yes
SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid'
TRAPDRUN=no
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
+PIDFILE=/var/run/snmpd.pid
+SPIDFILE=/var/run/snmptrapd.pid
-# Cd to / before starting any daemons.
-cd /
+# Reads config file if exists (will override defaults above)
+[ -r /etc/default/snmpd ] && . /etc/default/snmpd
case "$1" in
start)
echo -n "Starting network management services:"
- if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
- start-stop-daemon -S -x /usr/sbin/snmpd \
- -- $SNMPDOPTS
+ if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf -a ! -f "$PIDFILE" ]; then
+ start-stop-daemon -o --start --quiet --name snmpd --pidfile "$PIDFILE" \
+ --exec /usr/sbin/snmpd -- $SNMPDOPTS
echo -n " snmpd"
fi
- if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
- start-stop-daemon -S -x /usr/sbin/snmptrapd \
- -- $TRAPDOPTS
+ if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf -a ! -f "$SPIDFILE" ]; then
+ start-stop-daemon -o --start --quiet --name snmptrapd --pidfile "$SPIDFILE" \
+ --exec /usr/sbin/snmptrapd -- $TRAPDOPTS
echo -n " snmptrapd"
fi
echo "."
@@ -33,32 +37,29 @@ case "$1" in
;;
stop)
echo -n "Stopping network management services:"
- start-stop-daemon -K -x /usr/sbin/snmpd
+ if [ -f "$PIDFILE" ] ; then
+ start-stop-daemon -o --stop --quiet --pidfile $PIDFILE --name snmpd
+ fi
echo -n " snmpd"
- start-stop-daemon -K -x /usr/sbin/snmptrapd
+ if [ -f "$SPIDFILE" ] ; then
+ start-stop-daemon -o --stop --quiet --pidfile $SPIDFILE --name snmptrapd
+ rm -rf $SPIDFILE
+ fi
echo -n " snmptrapd"
echo "."
;;
+ status)
+ status /usr/sbin/snmpd;
+ exit $?
+ ;;
restart|reload|force-reload)
- echo -n "Restarting network management services:"
- start-stop-daemon -K -x /usr/sbin/snmpd
- start-stop-daemon -K -x /usr/sbin/snmptrapd
+ $0 stop
# Allow the daemons time to exit completely.
sleep 2
- if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
- start-stop-daemon -S -x /usr/sbin/snmpd -- $SNMPDOPTS
- echo -n " snmpd"
- fi
- if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
- # Allow snmpd time to start up.
- sleep 1
- start-stop-daemon -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
- echo -n " snmptrapd"
- fi
- echo "."
+ $0 start
;;
*)
- echo "Usage: /etc/init.d/snmpd {start|stop|restart|reload|force-reload}"
+ echo "Usage: /etc/init.d/snmpd {start|stop|status|restart|reload|force-reload}"
exit 1
esac
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 6736718..ecc5199 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -107,7 +107,7 @@ CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
INITSCRIPT_PACKAGES = "${PN}-server"
INITSCRIPT_NAME_${PN}-server = "snmpd"
-INITSCRIPT_PARAMS_${PN}-server = "defaults"
+INITSCRIPT_PARAMS_${PN}-server = "start 90 2 3 4 5 . stop 60 0 1 6 ."
EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
@@ -133,12 +133,3 @@ RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
LEAD_SONAME = "libnetsnmp.so"
-
-pkg_postrm_${PN}-server() {
- if test "x$D" != "x"; then
- OPT="-r $D "
- else
- OPT=""
- /etc/init.d/snmpd stop
- fi
-}
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] net-snmp: move net-snmp-config to client package
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
` (4 preceding siblings ...)
2015-01-16 6:14 ` [PATCH 5/7] net-snmp: init script fixes jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
2015-01-16 6:14 ` [PATCH 7/7] net-snmp: add ptest package jackie.huang
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Since net-snmp-config is a common tool, move it from dev package
to client package.
Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index ecc5199..ab79f45 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -100,7 +100,7 @@ FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
-FILES_${PN}-dev += "${bindir}/net-snmp-config ${bindir}/mib2c ${bindir}/mib2c-update"
+FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update"
CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] net-snmp: add ptest package
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
` (5 preceding siblings ...)
2015-01-16 6:14 ` [PATCH 6/7] net-snmp: move net-snmp-config to client package jackie.huang
@ 2015-01-16 6:14 ` jackie.huang
6 siblings, 0 replies; 8+ messages in thread
From: jackie.huang @ 2015-01-16 6:14 UTC (permalink / raw)
To: openembedded-devel
From: Jackie Huang <jackie.huang@windriver.com>
Issue: TA79430
- Change to use append for PACKAGES so that:
* ptest package is added from ptest bbcalss
* the PN is back, allow empty and add rdepends on net-snmp-client
in case the user try to add net-snmp to the image
- Add a patch to fix the output format for ptest
- Add run-ptest
- Add rdepends on perl for ptest
(LOCAL REV: NOT UPSTREAM) -- Sent to meta-networking on 20150114
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
...p-testing-add-the-output-format-for-ptest.patch | 37 ++++++++++++++++++++++
.../recipes-protocols/net-snmp/net-snmp/run-ptest | 4 +++
.../recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb | 35 ++++++++++++++++++--
3 files changed, 73 insertions(+), 3 deletions(-)
create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
create mode 100755 meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
new file mode 100644
index 0000000..9fb19b3
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-testing-add-the-output-format-for-ptest.patch
@@ -0,0 +1,37 @@
+From 4bb4024b395f19d36ab3569e2773ea80d8cc5261 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 14 Jan 2015 15:10:06 +0800
+Subject: [PATCH] testing: add the output format for ptest
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ testing/RUNTESTS | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/testing/RUNTESTS b/testing/RUNTESTS
+index e11c969..fb90f76 100755
+--- a/testing/RUNTESTS
++++ b/testing/RUNTESTS
+@@ -25,13 +25,17 @@ failed_count=0
+ rm -f failed_tests
+ for i in "${srcdir}"/testing/fulltests/default/T*$1*; do
+ echo "RUNNING $i"
++ test_name=`basename $i`
+ ${srcdir}/testing/fulltests/support/simple_run $i
+ if [ $? = 0 ]; then
++ echo "PASS: $test_name"
+ success_count=`expr $success_count + 1`
+ else
++ echo "FAIL: $test_name"
+ failed_count=`expr $failed_count + 1`
+ echo "$i" >> failed_tests
+ fi
++ echo
+ done
+
+ if [ -f failed_tests ]; then
+--
+1.7.1
+
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
new file mode 100755
index 0000000..2334217
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd testing
+./RUNTESTS
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index ab79f45..4ce15e4 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -17,12 +17,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
file://ifmib.patch \
file://fix-libtool-finish.patch \
file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \
+ file://net-snmp-testing-add-the-output-format-for-ptest.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"
SRC_URI[sha256sum] = "ac9105539971f7cfb1456a86d479e18e8a8b3712212595ad40504347ba5843da"
-inherit autotools update-rc.d siteinfo systemd
+inherit autotools update-rc.d siteinfo systemd ptest
EXTRA_OEMAKE = "INSTALL_PREFIX=${D}"
@@ -71,6 +73,24 @@ do_install_append() {
install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system
}
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}
+ for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \
+ ${B}/net-snmp-config ${S}/testing; do
+ if [ -e "$i" ]; then
+ cp -a "$i" ${D}${PTEST_PATH}
+ fi
+ done
+ echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version
+
+ rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build"
+ for i in $rmdlist; do
+ if [ -d "$i" ]; then
+ rm -rf "$i"
+ fi
+ done
+}
+
SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess"
net_snmp_sysroot_preprocess () {
@@ -80,9 +100,9 @@ net_snmp_sysroot_preprocess () {
fi
}
-PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \
- ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
+PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd"
+ALLOW_EMPTY_${PN} = "1"
ALLOW_EMPTY_${PN}-server = "1"
FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
@@ -98,6 +118,7 @@ FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
${systemd_unitdir}/system/snmptrapd.service \
"
+FILES_${PN} = ""
FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update"
@@ -117,10 +138,18 @@ SYSTEMD_PACKAGES = "${PN}-server-snmpd \
SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service"
+RDEPENDS_${PN} += "net-snmp-client"
RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd"
RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
RDEPENDS_${PN}-client += "net-snmp-mibs"
+RDEPENDS_${PN}-ptest += "perl \
+ perl-module-test \
+ perl-module-file-basename \
+ perl-module-getopt-long \
+ perl-module-file-temp \
+ perl-module-data-dumper \
+"
RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-01-16 6:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16 6:13 [PATCH 0/7] net-snmp: add ptest and several fixes jackie.huang
2015-01-16 6:13 ` [PATCH 1/7] net-snmp: have mib-modules=smux enabled jackie.huang
2015-01-16 6:14 ` [PATCH 2/7] net-snmp: move persistent dir to /var/lib/net-snmp jackie.huang
2015-01-16 6:14 ` [PATCH 3/7] net-snmp: fix "libtool --finish" jackie.huang
2015-01-16 6:14 ` [PATCH 4/7] net-snmp: add knob whether nlist.h are checked jackie.huang
2015-01-16 6:14 ` [PATCH 5/7] net-snmp: init script fixes jackie.huang
2015-01-16 6:14 ` [PATCH 6/7] net-snmp: move net-snmp-config to client package jackie.huang
2015-01-16 6:14 ` [PATCH 7/7] net-snmp: add ptest package jackie.huang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.