* [meta-networking][PATCH 1/2] Quagga has no snmp support, unrecognized options --enable-tcp-md5
2013-03-25 15:30 [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup Aws Ismail
@ 2013-03-25 15:30 ` Aws Ismail
2013-03-25 15:30 ` [meta-networking][PATCH 2/2] Quagga: clean up whitespaces/hardtabs in recipe Aws Ismail
2013-03-26 19:56 ` [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup Joe MacDonald
2 siblings, 0 replies; 4+ messages in thread
From: Aws Ismail @ 2013-03-25 15:30 UTC (permalink / raw)
To: openembedded-devel; +Cc: joe.macdonald
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>
---
.../recipes-protocols/quagga/quagga.inc | 23 ++++++++++++++++---
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 6ee2455..9a70d18 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -9,11 +9,13 @@ HOMEPAGE = "http://www.quagga.net/"
SECTION = "network"
LICENSE = "GPL-2.0 & LGPL-2.0"
DEPENDS = "readline ncurses perl-native"
+DEPENDS += "${@base_contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
+SNMP_CONF="${@base_contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
-INC_PR = "r0"
+INC_PR = "r1"
QUAGGASUBDIR = ""
# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
@@ -46,7 +48,8 @@ EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
--enable-rtadv \
- --enable-tcp-md5"
+ --enable-linux24-tcp-md5 \
+ ${SNMP_CONF}"
do_install () {
# Install init script and default settings
@@ -57,6 +60,12 @@ do_install () {
install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+
+ # Install sample configurations for the daemons
+ for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
+ install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
+ done
+
# Install quagga
oe_runmake install DESTDIR=${D} prefix=${prefix} \
sbindir=${sbindir} \
@@ -106,17 +115,23 @@ INITSCRIPT_PARAMS_${PN} = "defaults 15 85"
INITSCRIPT_NAME_${PN}-watchquagga = "watchquagga"
INITSCRIPT_PARAMS_${PN}-watchquagga = "defaults 90 10"
+# Add quagga's user and group
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system quagga ; --system quaggavty"
USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga quagga"
pkg_postinst_${PN} () {
- for f in bgpd babeld isisd ospfd ripngd zebra ripd ospf6d; do touch ${sysconfdir}/quagga/$f.conf; done
+ if [ "x$D" != "x" ] ; then
+ exit 1
+ fi
+ for f in bgpd babeld isisd ospfd ripngd zebra ripd ospf6d; do touch ${sysconfdir}/quagga/$f.conf; done
chown quagga:quaggavty ${sysconfdir}/quagga
chown quagga:quagga ${sysconfdir}/quagga/*.conf
chmod 750 ${sysconfdir}/quagga
chown 640 ${sysconfdir}/quagga/*.conf
- ${sysconfdir}/init.d/populate-volatile.sh update
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
}
# Stop apps before uninstall
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [meta-networking][PATCH 2/2] Quagga: clean up whitespaces/hardtabs in recipe
2013-03-25 15:30 [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup Aws Ismail
2013-03-25 15:30 ` [meta-networking][PATCH 1/2] Quagga has no snmp support, unrecognized options --enable-tcp-md5 Aws Ismail
@ 2013-03-25 15:30 ` Aws Ismail
2013-03-26 19:56 ` [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup Joe MacDonald
2 siblings, 0 replies; 4+ messages in thread
From: Aws Ismail @ 2013-03-25 15:30 UTC (permalink / raw)
To: openembedded-devel; +Cc: joe.macdonald
Minor clean-up for some places where whitespaces
and hardtabs stil existed.
Signed-off-by: Aws Ismail <aws.ismail@windriver.com>
---
.../recipes-protocols/quagga/quagga.inc | 60 ++++++++++----------
1 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
index 9a70d18..b40c858 100644
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ b/meta-networking/recipes-protocols/quagga/quagga.inc
@@ -52,32 +52,32 @@ EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
${SNMP_CONF}"
do_install () {
- # Install init script and default settings
- install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
- ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
- install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
- install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
- install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
- install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
- install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
-
- # Install sample configurations for the daemons
- for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
- install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
- done
-
- # Install quagga
- oe_runmake install DESTDIR=${D} prefix=${prefix} \
- sbindir=${sbindir} \
- sysconfdir=${sysconfdir}/quagga \
- localstatedir=${localstatedir}/run/quagga
-
- # Fix hardcoded paths
- sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
- sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
- sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
- sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
- sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
+ # Install init script and default settings
+ install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
+ ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
+ install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
+ install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
+ install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
+ install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+
+ # Install sample configurations for the daemons
+ for f in bgpd vtysh babeld isisd ospfd ripngd zebra ripd ospf6d; do
+ install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
+ done
+
+ # Install quagga
+ oe_runmake install DESTDIR=${D} prefix=${prefix} \
+ sbindir=${sbindir} \
+ sysconfdir=${sysconfdir}/quagga \
+ localstatedir=${localstatedir}/run/quagga
+
+ # Fix hardcoded paths
+ sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
+ sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
+ sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
+ sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/volatiles.03_quagga
+ sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
}
# Split into a main package and separate per-protocol packages
@@ -125,10 +125,10 @@ pkg_postinst_${PN} () {
exit 1
fi
for f in bgpd babeld isisd ospfd ripngd zebra ripd ospf6d; do touch ${sysconfdir}/quagga/$f.conf; done
- chown quagga:quaggavty ${sysconfdir}/quagga
- chown quagga:quagga ${sysconfdir}/quagga/*.conf
- chmod 750 ${sysconfdir}/quagga
- chown 640 ${sysconfdir}/quagga/*.conf
+ chown quagga:quaggavty ${sysconfdir}/quagga
+ chown quagga:quagga ${sysconfdir}/quagga/*.conf
+ chmod 750 ${sysconfdir}/quagga
+ chown 640 ${sysconfdir}/quagga/*.conf
if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
${sysconfdir}/init.d/populate-volatile.sh update
fi
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup.
2013-03-25 15:30 [meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup Aws Ismail
2013-03-25 15:30 ` [meta-networking][PATCH 1/2] Quagga has no snmp support, unrecognized options --enable-tcp-md5 Aws Ismail
2013-03-25 15:30 ` [meta-networking][PATCH 2/2] Quagga: clean up whitespaces/hardtabs in recipe Aws Ismail
@ 2013-03-26 19:56 ` Joe MacDonald
2 siblings, 0 replies; 4+ messages in thread
From: Joe MacDonald @ 2013-03-26 19:56 UTC (permalink / raw)
To: Aws Ismail; +Cc: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
[[meta-networking][PATCH 0/2][V3] Quagga: deal with snmp support, and some cleanup.] On 13.03.25 (Mon 11:30) Aws Ismail wrote:
>
> *** V3 ***
> Cleanup whitespaces and hardtabs
> This is made a separate new commit
> *** V3 ***
>
> Overall, this commit introduces a set of changes to do the following:
>
> 1. Update the configure option for quagga to replace the old --enable-tcp-md5
> 2. Add snmp support based on DISTRO_FEATURES availability.
> 3. Install sample runtime configuration files for quagga and its daemons.
> 4. Make sure the post install script is executed at the right stage.
>
> Aws Ismail (2):
> Quagga has no snmp support, unrecognized options --enable-tcp-md5
> Quagga: clean up whitespaces/hardtabs in recipe
>
> .../recipes-protocols/quagga/quagga.inc | 71 ++++++++++++--------
> 1 files changed, 43 insertions(+), 28 deletions(-)
Merged, thanks.
--
-Joe MacDonald.
:wq
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread