Skip to contentSkip to conversation

Networking recipes

PATCH Superseded Paul Eggleton 2 participants 11 messages Nov 20, 2012 – Nov 22, 2012

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Networking recipes

Changes since v1:

* Fix hardcoded paths in initscripts for tftp-hpa, quagga, radvd, xl2tpd and proftpd
* Add patch headers for tftp-hpa patches (which all come from Fedora)

The following changes since commit b69b6e04f12b2fc45a3ebac8c741bda41fea6409:

netperf: import from oe-classic and upgrade to 2.6.0 (2012-11-19 11:18:30 -0500)

are available in the git repository at:

git://git.openembedded.org/meta-openembedded-contrib paule/networking
http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/networking

Paul Eggleton (8):
tftp-hpa: add from OE-Classic, update and tidy up
tunctl: add from OE-Classic and tweak
quagga: add from OE-Classic, update and tidy-up
radvd: add from OE-Classic, update and tidy up
vblade: add from OE-Classic, update and tidy up
xl2tpd: add from OE-Classic, update and tidy up
proftpd: add from meta-baryon
mtr: add from OE-Classic, update and tidy up

 .../recipes-daemons/proftpd/files/basic.conf.patch |   21 ++
 .../recipes-daemons/proftpd/files/contrib.patch    |   42 ++++
 .../recipes-daemons/proftpd/files/default          |    9 +
 .../recipes-daemons/proftpd/files/make.patch       |   66 ++++++
 .../proftpd/files/proftpd-basic.init               |  220 ++++++++++++++++++++
 .../recipes-daemons/proftpd/proftpd_1.3.4b.bb      |   66 ++++++
 .../recipes-daemons/radvd/files/radvd.init         |  124 +++++++++++
 .../recipes-daemons/radvd/files/volatiles.03_radvd |    2 +
 meta-networking/recipes-daemons/radvd/radvd.inc    |   42 ++++
 .../recipes-daemons/radvd/radvd_1.9.1.bb           |    6 +
 .../recipes-daemons/tftp-hpa/files/default         |    3 +
 .../recipes-daemons/tftp-hpa/files/init            |  104 +++++++++
 .../tftp-hpa/files/tftp-0.40-remap.patch           |   25 +++
 .../tftp-hpa/files/tftp-0.42-tftpboot.patch        |   60 ++++++
 .../tftp-hpa/files/tftp-0.49-chk_retcodes.patch    |   21 ++
 .../tftp-hpa/files/tftp-0.49-cmd_arg.patch         |  165 +++++++++++++++
 .../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch       |   24 +++
 .../files/tftp-hpa-0.49-fortify-strcpy-crash.patch |   32 +++
 .../tftp-hpa/files/tftp-hpa-0.49-stats.patch       |   20 ++
 .../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch      |   29 +++
 .../recipes-daemons/tftp-hpa/files/tftp-xinetd     |   18 ++
 .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb       |   71 +++++++
 .../recipes-daemons/vblade/files/cross.patch       |   16 ++
 .../recipes-daemons/vblade/vblade_20.bb            |   20 ++
 .../quagga/files/fix-for-lib-inpath.patch          |   19 ++
 .../quagga/files/quagga-0.99.17-libcap.patch       |   64 ++++++
 .../recipes-protocols/quagga/files/quagga.default  |   13 ++
 .../recipes-protocols/quagga/files/quagga.init     |  200 ++++++++++++++++++
 .../quagga/files/volatiles.03_quagga               |    3 +
 .../quagga/files/watchquagga.default               |    7 +
 .../quagga/files/watchquagga.init                  |   64 ++++++
 .../recipes-protocols/quagga/quagga.inc            |  153 ++++++++++++++
 .../recipes-protocols/quagga/quagga_0.99.21.bb     |    8 +
 .../xl2tpd/xl2tpd-1.3.1/cflags.patch               |   58 ++++++
 .../recipes-protocols/xl2tpd/xl2tpd.inc            |   40 ++++
 .../recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb       |    8 +
 .../recipes-support/mtr/files/no-gtk.patch         |   31 +++
 meta-networking/recipes-support/mtr/mtr_0.82.bb    |   19 ++
 meta-networking/recipes-support/tunctl/tunctl.inc  |   15 ++
 .../recipes-support/tunctl/tunctl_1.5.bb           |    4 +
 40 files changed, 1912 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/contrib.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/default
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/make.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
 create mode 100644 meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb
 create mode 100755 meta-networking/recipes-daemons/radvd/files/radvd.init
 create mode 100644 meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
 create mode 100644 meta-networking/recipes-daemons/radvd/radvd.inc
 create mode 100644 meta-networking/recipes-daemons/radvd/radvd_1.9.1.bb
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/default
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/init
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
 create mode 100644 meta-networking/recipes-daemons/vblade/files/cross.patch
 create mode 100644 meta-networking/recipes-daemons/vblade/vblade_20.bb
 create mode 100644 meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.default
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.init
 create mode 100644 meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
 create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.default
 create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.init
 create mode 100644 meta-networking/recipes-protocols/quagga/quagga.inc
 create mode 100644 meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb
 create mode 100644 meta-networking/recipes-support/mtr/files/no-gtk.patch
 create mode 100644 meta-networking/recipes-support/mtr/mtr_0.82.bb
 create mode 100644 meta-networking/recipes-support/tunctl/tunctl.inc
 create mode 100644 meta-networking/recipes-support/tunctl/tunctl_1.5.bb
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 2/8 tunctl: add from OE-Classic and tweak

* Set SUMMARY (which sets DESCRIPTION)
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM

---
 meta-networking/recipes-support/tunctl/tunctl.inc  |   15 +++++++++++++++
 .../recipes-support/tunctl/tunctl_1.5.bb           |    4 ++++
 2 files changed, 19 insertions(+)
 create mode 100644 meta-networking/recipes-support/tunctl/tunctl.inc
 create mode 100644 meta-networking/recipes-support/tunctl/tunctl_1.5.bb
meta-networking/recipes-support/tunctl/tunctl.inc new file +15 -0
new file mode 100644
index 0000000..952af24
@@ -0,0 +1,15 @@
+SUMMARY = "Tool for controlling the Linux TUN/TAP driver"
+SECTION = "net"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://tunctl.c;startline=1;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/tunctl/tunctl-${PV}.tar.gz"
+
+do_compile() {
+	oe_runmake tunctl
+}
+
+do_install() {
+	install -d ${D}/${sbindir}
+	install -m 755 tunctl ${D}/${sbindir}
+}
meta-networking/recipes-support/tunctl/tunctl_1.5.bb new file +4 -0
new file mode 100644
index 0000000..dd26561
@@ -0,0 +1,4 @@
+require tunctl.inc
+
+SRC_URI[md5sum] = "fdbedc263b3e85bb0e087cd567414607"
+SRC_URI[sha256sum] = "aa2a6c4cc6bfacb11e0d9f62334a6638a0d435475c61230116f00b6af8b14fff"
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/8 tftp-hpa: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to 5.2
* Add patches from Fedora
* Add DESCRIPTION and better SUMMARY
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Update ALTERNATIVE_* definitions
* Handle hardcoded paths in initscript

Much of this was done by Joe MacDonald <[email protected]>.

---
 .../recipes-daemons/tftp-hpa/files/default         |    3 +
 .../recipes-daemons/tftp-hpa/files/init            |  104 ++++++++++++
 .../tftp-hpa/files/tftp-0.40-remap.patch           |   25 +++
 .../tftp-hpa/files/tftp-0.42-tftpboot.patch        |   60 +++++++
 .../tftp-hpa/files/tftp-0.49-chk_retcodes.patch    |   21 +++
 .../tftp-hpa/files/tftp-0.49-cmd_arg.patch         |  165 ++++++++++++++++++++
 .../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch       |   24 +++
 .../files/tftp-hpa-0.49-fortify-strcpy-crash.patch |   32 ++++
 .../tftp-hpa/files/tftp-hpa-0.49-stats.patch       |   20 +++
 .../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch      |   29 ++++
 .../recipes-daemons/tftp-hpa/files/tftp-xinetd     |   18 +++
 .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb       |   71 +++++++++
 12 files changed, 572 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/default
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/init
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd
 create mode 100644 meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb
meta-networking/recipes-daemons/tftp-hpa/files/default new file +3 -0
new file mode 100644
index 0000000..de2ed18
@@ -0,0 +1,3 @@
+#Defaults for tftpd-hpa
+RUN_DAEMON="yes"
+OPTIONS="-l -s /srv/tftpboot"
meta-networking/recipes-daemons/tftp-hpa/files/init new file +104 -0

104 lines not on this page · raw message

meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch new file +25 -0
new file mode 100644
index 0000000..3f69060
@@ -0,0 +1,25 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c
+--- tftp-hpa-0.49/tftpd/remap.c.zero	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/remap.c	2008-11-25 11:41:09.000000000 -0500
+@@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f)
+     int lineno = 0;
+     int err = 0;
+ 
++    memset(this_rule, '\0', sizeof(struct rule));
+     while (lineno++, fgets(line, MAXLINE, f)) {
+         rv = parseline(line, this_rule, lineno);
+         if (rv < 0)
+@@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f)
+             *last_rule = this_rule;
+             last_rule = &this_rule->next;
+             this_rule = tfmalloc(sizeof(struct rule));
++            memset(this_rule, '\0', sizeof(struct rule));
+         }
+     }
+ 
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.42-tftpboot.patch new file +60 -0

60 lines not on this page · raw message

meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch new file +21 -0
new file mode 100644
index 0000000..7ae1a87
@@ -0,0 +1,21 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.chk_retcodes	2009-01-15 15:28:50.000000000 +0100
++++ tftp-hpa-0.49/tftpd/tftpd.c	2009-01-15 15:31:36.000000000 +0100
+@@ -932,7 +932,10 @@ int main(int argc, char **argv)
+             exit(EX_OSERR);
+         }
+ #ifdef __CYGWIN__
+-        chdir("/");             /* Cygwin chroot() bug workaround */
++				if (chdir("/") < 0) {			/* Cygwin chroot() bug workaround */
++					syslog(LOG_ERR, "chroot: %m");
++					exit(EX_OSERR);
++				}
+ #endif
+     }
+ #ifdef HAVE_SETREGID
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-cmd_arg.patch new file +165 -0

165 lines not on this page · raw message

meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch new file +24 -0
new file mode 100644
index 0000000..85110eb
@@ -0,0 +1,24 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c
+--- tftp-hpa-0.49/tftpd/tftpd.c.tzfix	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftpd/tftpd.c	2008-11-25 11:45:27.000000000 -0500
+@@ -350,6 +350,14 @@ int main(int argc, char **argv)
+     const char *pidfile = NULL;
+     u_short tp_opcode;
+ 
++    time_t my_time = 0;
++    struct tm* p_tm;
++    char envtz[10];
++    my_time = time(NULL);
++    p_tm = localtime(&my_time);
++    snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
++    setenv("TZ", envtz, 0);
++
+     /* basename() is way too much of a pain from a portability standpoint */
+ 
+     p = strrchr(argv[0], '/');
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-fortify-strcpy-crash.patch new file +32 -0
new file mode 100644
index 0000000..08d2b5b
@@ -0,0 +1,32 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49.orig/tftp/tftp.c	2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftp/tftp.c	2009-08-05 09:47:18.072585848 -0400
+@@ -279,15 +279,16 @@
+             struct tftphdr *tp, const char *mode)
+ {
+     char *cp;
++    size_t len;
+ 
+     tp->th_opcode = htons((u_short) request);
+     cp = (char *)&(tp->th_stuff);
+-    strcpy(cp, name);
+-    cp += strlen(name);
+-    *cp++ = '\0';
+-    strcpy(cp, mode);
+-    cp += strlen(mode);
+-    *cp++ = '\0';
++    len = strlen(name) + 1;
++    memcpy(cp, name, len);
++    cp += len;
++    len = strlen(mode) + 1;
++    memcpy(cp, mode, len);
++    cp += len;
+     return (cp - (char *)tp);
+ }
+ 
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.49-stats.patch new file +20 -0
new file mode 100644
index 0000000..720cd69
@@ -0,0 +1,20 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-0.49/tftp/tftp.c.stats tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49/tftp/tftp.c.stats	2011-01-03 15:38:34.217918067 +0100
++++ tftp-hpa-0.49/tftp/tftp.c	2011-01-03 15:38:37.498917014 +0100
+@@ -400,8 +400,8 @@ static void printstats(const char *direc
+ {
+     double delta;
+ 
+-    delta = (tstop.tv_sec + (tstop.tv_usec / 100000.0)) -
+-        (tstart.tv_sec + (tstart.tv_usec / 100000.0));
++    delta = (tstop.tv_sec + (tstop.tv_usec / 1000000.0)) -
++        (tstart.tv_sec + (tstart.tv_usec / 1000000.0));
+     if (verbose) {
+         printf("%s %lu bytes in %.1f seconds", direction, amount, delta);
+         printf(" [%.0f bit/s]", (amount * 8.) / delta);
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch new file +29 -0
new file mode 100644
index 0000000..216349d
@@ -0,0 +1,29 @@
+Patch originally from Fedora
+
+http://pkgs.fedoraproject.org/cgit/tftp.git/
+
+Upstream-Status: Pending
+
+diff -up tftp-hpa-5.2/tftpd/recvfrom.c.test tftp-hpa-5.2/tftpd/recvfrom.c
+--- tftp-hpa-5.2/tftpd/recvfrom.c.test	2011-12-11 23:13:52.000000000 +0100
++++ tftp-hpa-5.2/tftpd/recvfrom.c	2012-01-04 10:05:17.852042256 +0100
+@@ -149,16 +149,16 @@ myrecvfrom(int s, void *buf, int len, un
+ 
+     /* Try to enable getting the return address */
+ #ifdef IP_RECVDSTADDR
+-    if (from->sa_family == AF_INET)
++    if (from->sa_family == AF_INET || !from->sa_family)
+         setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on));
+ #endif
+ #ifdef IP_PKTINFO
+-    if (from->sa_family == AF_INET)
++    if (from->sa_family == AF_INET || !from->sa_family)
+         setsockopt(s, IPPROTO_IP, IP_PKTINFO, &on, sizeof(on));
+ #endif
+ #ifdef HAVE_IPV6
+ #ifdef IPV6_RECVPKTINFO
+-    if (from->sa_family == AF_INET6)
++    if (from->sa_family == AF_INET6 || !from->sa_family)
+         setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on));
+ #endif
+ #endif
meta-networking/recipes-daemons/tftp-hpa/files/tftp-xinetd new file +18 -0
new file mode 100644
index 0000000..fe70163
@@ -0,0 +1,18 @@
+# default: off
+# description: The tftp server serves files using the trivial file transfer \
+#	protocol.  The tftp protocol is often used to boot diskless \
+#	workstations, download configuration files to network-aware printers, \
+#	and to start the installation process for some operating systems.
+service tftp
+{
+	socket_type		= dgram
+	protocol		= udp
+	wait			= yes
+	user			= root
+	server			= /usr/sbin/in.tftpd-hpa
+	server_args		= -s /var/lib/tftpboot
+	disable			= yes
+	per_source		= 11
+	cps				= 100 2
+	flags			= IPv6
+}
meta-networking/recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#6 lore raw

PATCH v2 4/8 radvd: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to 1.9.1
* Add libdaemon to DEPENDS as needed by 1.9+
* Remove empty config file (not really of much use and there's an example config in the -doc package anyway)
* Use useradd.bbclass to create user
* Handle hardcoded paths in initscript
* Add LSB headers to initscript (borrowed from openSUSE)
* Set custom LICENSE as it's BSD-Style but not actually one of the standard BSD variants
* Add LIC_FILES_CHKSUM
* Set SUMMARY (which sets DESCRIPTION)

---
 .../recipes-daemons/radvd/files/radvd.init         |  124 ++++++++++++++++++++
 .../recipes-daemons/radvd/files/volatiles.03_radvd |    2 +
 meta-networking/recipes-daemons/radvd/radvd.inc    |   42 +++++++
 .../recipes-daemons/radvd/radvd_1.9.1.bb           |    6 +
 4 files changed, 174 insertions(+)
 create mode 100755 meta-networking/recipes-daemons/radvd/files/radvd.init
 create mode 100644 meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd
 create mode 100644 meta-networking/recipes-daemons/radvd/radvd.inc
 create mode 100644 meta-networking/recipes-daemons/radvd/radvd_1.9.1.bb
meta-networking/recipes-daemons/radvd/files/radvd.init new file +124 -0
new file mode 100755
index 0000000..a48dff8
@@ -0,0 +1,124 @@
+#! /bin/sh
+#
+### BEGIN INIT INFO
+# Provides:       radvd
+# Required-Start: $remote_fs $named $syslog
+# Required-Stop:  $remote_fs $named $syslog
+# Default-Start:  3 5
+# Default-Stop:   0 1 2 6
+# Description:    router advertisement daemon
+### END INIT INFO
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/radvd
+NAME=radvd
+DESC=radvd
+CONFIG=/etc/radvd.conf
+SAVED_SETTINGS=/var/run/radvd/saved-settings
+PIDFILE=/var/run/radvd/radvd.pid
+OPTIONS="-u radvd -p $PIDFILE"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+# Check for IPv6 support in kernel
+if test \! -e /proc/sys/net/ipv6; then
+  echo "IPv6 support must be enabled in the kernel for $DESC to work."
+  exit
+fi
+
+save_settings()
+{
+    local file=$1
+    
+    rm -f $file
+    for if_conf in /proc/sys/net/ipv6/conf/*; do
+	echo -e "$if_conf/forwarding\t `cat $if_conf/forwarding`" >> $file
+    done
+    return 0
+}
+
+restore_settings()
+{
+    file=$1
+    
+    if [ ! -f $file ]; then
+	echo "$0: warning: cannot restore settings"
+	return
+    fi
+    
+    ( 
+	while read f value; do
+	    if [ -w $f ]; then
+		echo $value > $f
+	    fi
+	done
+    ) < $file
+}
+
+chkconfig() {
+    if [ ! -e $CONFIG -o ! -s $CONFIG ]; then
+        echo ""
+	echo "* $CONFIG does not exist or is empty." 
+	echo "* See /usr/share/doc/radvd/examples/simple-radvd.conf for a simple"
+	echo "* configuration suitable for most systems, and radvd.conf(5)"
+	echo "* for configuration file syntax. radvd will *not* be started."
+	exit 0
+    fi
+}
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	chkconfig
+	save_settings $SAVED_SETTINGS
+	
+        # We must enable IPv6 forwarding for radvd to work
+	echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+
+	# Check for stale pidfile; radvd won't start if one is lying around
+	if [ -f $PIDFILE ] && ! ps `cat  $PIDFILE` > /dev/null; then
+	  rm -f $PIDFILE
+	fi
+	if ! start-stop-daemon --oknodo --start --pidfile $PIDFILE \
+		--exec $DAEMON -- $OPTIONS; then
+	  echo "failed." && exit 1
+	fi
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --oknodo --stop --pidfile $PIDFILE \
+		--exec $DAEMON
+	restore_settings $SAVED_SETTINGS
+	rm -f $SAVED_SETTINGS
+	echo "$NAME."
+	;;
+  reload|force-reload)
+	echo "Reloading $DESC configuration files."
+	start-stop-daemon --stop --signal HUP --quiet --pidfile \
+	    $PIDFILE --exec $DAEMON
+	;;
+  restart)
+	chkconfig
+	echo -n "Restarting $DESC: "
+	if ! start-stop-daemon --stop --quiet --pidfile \
+		$PIDFILE --exec $DAEMON; then
+	  # stop failed, so we were not running
+	  save_settings $SAVED_SETTINGS
+	  echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+	fi
+	sleep 1
+	start-stop-daemon --start --quiet --pidfile \
+		$PIDFILE --exec $DAEMON -- $OPTIONS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
meta-networking/recipes-daemons/radvd/files/volatiles.03_radvd new file +2 -0
new file mode 100644
index 0000000..89256a4
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d radvd root 0755 /var/run/radvd none
meta-networking/recipes-daemons/radvd/radvd.inc new file +42 -0

42 lines not on this page · raw message

meta-networking/recipes-daemons/radvd/radvd_1.9.1.bb new file +6 -0
new file mode 100644
index 0000000..26d21ce
@@ -0,0 +1,6 @@
+PR = "r0"
+
+require radvd.inc
+
+SRC_URI[md5sum] = "e807ad7e9a76d46b6133df391385cd31"
+SRC_URI[sha256sum] = "54eb5704a2b710ba946fa30d2bca811fa23b1b3bfab322c38cb0c2a9619aa933"
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH v2 5/8 vblade: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to version 20
* Add LIC_FILES_CHKSUM
* Make LICENSE more accurate
* Set SUMMARY (which sets DESCRIPTION)

---
 .../recipes-daemons/vblade/files/cross.patch       |   16 ++++++++++++++++
 .../recipes-daemons/vblade/vblade_20.bb            |   20 ++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/vblade/files/cross.patch
 create mode 100644 meta-networking/recipes-daemons/vblade/vblade_20.bb
meta-networking/recipes-daemons/vblade/files/cross.patch new file +16 -0
new file mode 100644
index 0000000..481b6fa
@@ -0,0 +1,16 @@
+Remove CC and CFLAGS values, we set these ourselves
+
+Upstream-status: Inappropriate [config]
+
+diff -urN vblade-19.old//makefile vblade-19//makefile
+--- vblade-19.old//makefile	2008-10-08 22:07:40.000000000 +0100
++++ vblade-19//makefile	2008-11-18 19:07:51.700365029 +0000
+@@ -9,8 +9,6 @@
+ mandir = ${sharedir}/man
+ 
+ O=aoe.o bpf.o ${PLATFORM}.o ata.o
+-CFLAGS += -Wall -g -O2
+-CC = gcc
+ 
+ vblade: $O
+ 	${CC} -o vblade $O
meta-networking/recipes-daemons/vblade/vblade_20.bb new file +20 -0
new file mode 100644
index 0000000..2cf7e65
@@ -0,0 +1,20 @@
+SUMMARY = "Virtual EtherDrive blade AoE target"
+SECTION = "console/network"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${PN}-${PV}.tgz \
+	   file://cross.patch"
+
+SRC_URI[md5sum] = "3c80e4a6bc7d66ae0c235b88cb44bd59"
+SRC_URI[sha256sum] = "c8fe2fc4f2fba8e07e5cfdf17335982584eef2cd5c78bf8b1db93f2b56e7121d"
+
+inherit autotools
+
+do_install() {
+	install -D -m 0755 ${S}/vblade ${D}/${sbindir}/vblade
+	install -D -m 0755 ${S}/vbladed ${D}/${sbindir}/vbladed
+	install -D -m 0644 ${S}/vblade.8 ${D}/${mandir}/man8/vblade.8
+}
+
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 3/8 quagga: add from OE-Classic, update and tidy-up

In reply to Paul Eggleton

* Update to 0.99.21
* Fix SRC_URI to point to a working download location
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Add old gentoo patch to fix libcap linking errors
* Put binaries in sbindir
* Use useradd.bbclass to create user/groups
* Handle hardcoded paths in initscript
* Add LSB headers to initscript (borrowed from debian)
* Tidy up packaging and directory references
* Add SUMMARY

---
 .../quagga/files/fix-for-lib-inpath.patch          |   19 ++
 .../quagga/files/quagga-0.99.17-libcap.patch       |   64 +++++++
 .../recipes-protocols/quagga/files/quagga.default  |   13 ++
 .../recipes-protocols/quagga/files/quagga.init     |  200 ++++++++++++++++++++
 .../quagga/files/volatiles.03_quagga               |    3 +
 .../quagga/files/watchquagga.default               |    7 +
 .../quagga/files/watchquagga.init                  |   64 +++++++
 .../recipes-protocols/quagga/quagga.inc            |  153 +++++++++++++++
 .../recipes-protocols/quagga/quagga_0.99.21.bb     |    8 +
 9 files changed, 531 insertions(+)
 create mode 100644 meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.default
 create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.init
 create mode 100644 meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
 create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.default
 create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.init
 create mode 100644 meta-networking/recipes-protocols/quagga/quagga.inc
 create mode 100644 meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb
meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch new file +19 -0
new file mode 100644
index 0000000..50f0ad5
@@ -0,0 +1,19 @@
+At first this worked, then I tried a clean build in a directory that
+contained lib in it (oe/build/titan-glibc) and vtysh no longer
+worked. It's test for the lib directory was excepting anything
+containing lib.
+
+With this patch you still cannot have lib in the path anywhere, but
+at least things containing lib will now work.
+
+--- quagga-0.99.2/vtysh/extract.pl.in	2005/11/16 04:12:04	1.1
++++ quagga-0.99.2/vtysh/extract.pl.in	2005/11/16 04:12:16
+@@ -89,7 +89,7 @@
+ 	$cmd =~ s/\s+$//g;
+ 
+         # $protocol is VTYSH_PROTO format for redirection of user input
+-    	if ($file =~ /lib/) {
++    	if ($file =~ /\/lib\//) {
+            if ($file =~ /keychain.c/) {
+               $protocol = "VTYSH_RIPD";
+            }
meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch new file +64 -0

64 lines not on this page · raw message

meta-networking/recipes-protocols/quagga/files/quagga.default new file +13 -0
new file mode 100644
index 0000000..438c3b6
@@ -0,0 +1,13 @@
+# If this option is set the /etc/init.d/quagga script automatically loads
+# the config via "vtysh -b" when the servers are started.
+vtysh_enable=yes
+
+# Bind all daemons to loopback only by default
+zebra_options=" --daemon -A 127.0.0.1"
+babeld_options="-D 127.0.0.1"
+bgpd_options="  --daemon -A 127.0.0.1"
+ospfd_options=" --daemon -A 127.0.0.1"
+ospf6d_options="--daemon -A ::1"
+ripd_options="  --daemon -A 127.0.0.1"
+ripngd_options="--daemon -A ::1"
+isisd_options=" --daemon -A 127.0.0.1"
meta-networking/recipes-protocols/quagga/files/quagga.init new file +200 -0

200 lines not on this page · raw message

meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga new file +3 -0
new file mode 100644
index 0000000..cfb896a
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d quagga quagga 0755 /var/run/quagga none
+d quagga quagga 0755 /var/log/quagga none
\ No newline at end of file
meta-networking/recipes-protocols/quagga/files/watchquagga.default new file +7 -0
new file mode 100644
index 0000000..f152032
@@ -0,0 +1,7 @@
+# Watchquagga configuration
+#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
+watch_daemons="zebra"
+
+# To enable restarts, uncomment this line (but first be sure to edit
+# the WATCH_DAEMONS line to reflect the daemons you are actually using):
+watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
meta-networking/recipes-protocols/quagga/files/watchquagga.init new file +64 -0

64 lines not on this page · raw message

meta-networking/recipes-protocols/quagga/quagga.inc new file +153 -0

153 lines not on this page · raw message

meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb new file +8 -0
new file mode 100644
index 0000000..5c403a9
@@ -0,0 +1,8 @@
+require quagga.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI[quagga-0.99.21.md5sum] = "99840adbe57047c90dfba6b6ed9aec7f"
+SRC_URI[quagga-0.99.21.sha256sum] = "9b8aea9026b4771a28e254a66cbd854723bcd0d71eebd0201d11838d4eb392ee"
+
+QUAGGASUBDIR = ""
Signature · 1 line
1.7.9.5
#8 lore raw

PATCH v2 6/8 xl2tpd: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to version 1.3.1
* Fetch source from a git tag as upstream apparently no longer publishes release tarballs
* Add virtual/kernel to DEPENDS since it needs the kernel source
* Inherit update-rc.d.bbclass
* Handle hardcoded paths in initscript
* Add LIC_FILES_CHKSUM
* Set SUMMARY (which sets DESCRIPTION)
* Remove some unnecessary cruft

---
 .../xl2tpd/xl2tpd-1.3.1/cflags.patch               |   58 ++++++++++++++++++++
 .../recipes-protocols/xl2tpd/xl2tpd.inc            |   40 ++++++++++++++
 .../recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb       |    8 +++
 3 files changed, 106 insertions(+)
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc
 create mode 100644 meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb
meta-networking/recipes-protocols/xl2tpd/xl2tpd-1.3.1/cflags.patch new file +58 -0
new file mode 100644
index 0000000..3550812
@@ -0,0 +1,58 @@
+From 678d71e3b50f566776dbc29db49a1128be89caf6 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <[email protected]>
+Date: Fri, 26 Oct 2012 10:07:31 +0100
+Subject: [PATCH] Adjust CFLAGS for building within OE
+
+Updated version of cflags.patch from OE-Classic written by
+Vladimir Sorokin <[email protected]>.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Paul Eggleton <[email protected]>
+---
+ Makefile |    8 +++++---
+ 1 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 6f6481f..c7602db 100644
+--- a/Makefile
++++ b/Makefile
+@@ -62,7 +62,7 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include/
+ # are packages seperately (eg kernel-headers on Fedora)
+ # Note: 2.6.23+ support still needs some changes in the xl2tpd source
+ #
+-#OSFLAGS+= -DUSE_KERNEL
++OSFLAGS+= -DUSE_KERNEL
+ #
+ #
+ # Uncomment the next line for FreeBSD
+@@ -90,7 +90,6 @@ OSFLAGS?= -DLINUX -I$(KERNELSRC)/include/
+ 
+ IPFLAGS?= -DIP_ALLOCATION
+ 
+-CFLAGS+= $(DFLAGS) -O2 -fno-builtin -Wall -DSANITY $(OSFLAGS) $(IPFLAGS)
+ HDRS=l2tp.h avp.h misc.h control.h call.h scheduler.h file.h aaa.h md5.h
+ OBJS=xl2tpd.o pty.o misc.o control.o avp.o call.o network.o avpsend.o scheduler.o file.o aaa.o md5.o
+ SRCS=${OBJS:.o=.c} ${HDRS}
+@@ -110,6 +109,9 @@ all: $(EXEC) pfc $(CONTROL_EXEC)
+ clean:
+ 	rm -f $(OBJS) $(EXEC) pfc.o pfc $(CONTROL_EXEC)
+ 
++%.o: %.c
++	$(CC) $(CFLAGS) $(DFLAGS) -O2 -DSANITY $(OSFLAGS) $(IPFLAGS) -o $@ -c $<
++
+ $(EXEC): $(OBJS) $(HDRS)
+ 	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)
+ 
+@@ -117,7 +119,7 @@ $(CONTROL_EXEC): $(CONTROL_SRCS)
+ 	$(CC) $(CONTROL_SRCS) -o $@
+ 
+ pfc:
+-	$(CC) $(CFLAGS) -c contrib/pfc.c
++	$(CC) $(CFLAGS) $(DFLAGS) -O2 -DSANITY $(OSFLAGS) $(IPFLAGS) -c contrib/pfc.c
+ 	$(CC) $(LDFLAGS) -o pfc pfc.o -lpcap $(LDLIBS)
+ 
+ romfs:
+-- 
+1.7.1
+
meta-networking/recipes-protocols/xl2tpd/xl2tpd.inc new file +40 -0
new file mode 100644
index 0000000..cea5427
@@ -0,0 +1,40 @@
+SUMMARY = "Xelerance version of the Layer 2 Tunneling Protocol (L2TP) daemon"
+HOMEPAGE = "http://www.xelerance.com/software/xl2tpd/"
+SECTION = "network"
+DEPENDS = "ppp virtual/kernel"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+INC_PR = "r0"
+
+SRC_URI = "git://github.com/xelerance/xl2tpd.git"
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d
+
+do_compile () {
+	oe_runmake CFLAGS="${CFLAGS} -DLINUX" LDFLAGS="${LDFLAGS}" PREFIX="${prefix}" KERNELSRC=${STAGING_KERNEL_DIR} all
+}
+
+do_install () {
+	oe_runmake PREFIX="${D}${prefix}" install
+
+	install -d ${D}${sysconfdir}/init.d
+	touch ${D}${sysconfdir}/xl2tpd.conf
+	install -m 0755 debian/xl2tpd.init ${D}${sysconfdir}/init.d/xl2tpd
+	sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+	sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+	sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/xl2tpd
+	sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/xl2tpd
+
+	install -d ${D}${sysconfdir}/default
+	install -m 0644 debian/xl2tpd.default ${D}${sysconfdir}/default/xl2tpd
+}
+
+CONFFILES_${PN} += "${sysconfdir}/xl2tpd.conf ${sysconfdir}/default/xl2tpd"
+
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "xl2tpd"
+
meta-networking/recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb new file +8 -0
new file mode 100644
index 0000000..5321d6a
@@ -0,0 +1,8 @@
+require xl2tpd.inc
+PR = "${INC_PR}.0"
+
+# 95445fc9aaeaf709d54c1cd934d4bed4467e910d corresponds to 1.3.1 tag
+SRCREV = "95445fc9aaeaf709d54c1cd934d4bed4467e910d"
+
+SRC_URI += " file://cflags.patch"
+
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH v2 7/8 proftpd: add from meta-baryon

In reply to Paul Eggleton

This was originally from OE-Classic. Improvements over the OE-Classic recipe for reference:

* Update to 1.3.4b
* Add workaround for proftpd host IP resolution
* Add initscript, borrowed from Debian with some modifications for compatibility and handling for hardcoded paths
* Use autotools.bbclass and remove unnecessary configure options
* PARALLEL_MAKE = "" is no longer needed, the bug was fixed in 1.3.3c
* Set SUMMARY (which sets DESCRIPTION) and base it on the short description from the website
* Use useradd.bbclass to add ftp user/group
* Add HOMEPAGE
* Add/fix description in some patches and improve recipe indentation
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM

Some of this work was done by Dexuan Cui <[email protected]> and Kevin Strasser <[email protected]>.

---
 .../recipes-daemons/proftpd/files/basic.conf.patch |   21 ++
 .../recipes-daemons/proftpd/files/contrib.patch    |   42 ++++
 .../recipes-daemons/proftpd/files/default          |    9 +
 .../recipes-daemons/proftpd/files/make.patch       |   66 ++++++
 .../proftpd/files/proftpd-basic.init               |  220 ++++++++++++++++++++
 .../recipes-daemons/proftpd/proftpd_1.3.4b.bb      |   66 ++++++
 6 files changed, 424 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/contrib.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/default
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/make.patch
 create mode 100644 meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
 create mode 100644 meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb
meta-networking/recipes-daemons/proftpd/files/basic.conf.patch new file +21 -0
new file mode 100644
index 0000000..4967bed
@@ -0,0 +1,21 @@
+Upstream-Status: Inappropriate [configuration]
+
+proftpd tries to get the IP address from the hostname.
+Unluckily now the hostname is not properly configured in /etc/hosts.
+We can use this patch as a workaround.
+
+Author: Dexuan Cui <[email protected]>
+Tue Oct 25 12:59:27 CST 2011
+
+--- proftpd-1.3.3c.orig/sample-configurations/basic.conf
++++ proftpd-1.3.3c/sample-configurations/basic.conf
+@@ -7,6 +7,9 @@
+ ServerType			standalone
+ DefaultServer			on
+ 
++#By default we bind to all interfaces.
++DefaultAddress      0.0.0.0
++
+ # Port 21 is the standard FTP port.
+ Port				21
+ 
meta-networking/recipes-daemons/proftpd/files/contrib.patch new file +42 -0

42 lines not on this page · raw message

meta-networking/recipes-daemons/proftpd/files/default new file +9 -0
new file mode 100644
index 0000000..b31f36c
@@ -0,0 +1,9 @@
+# Defaults for proftpd initscript
+
+# Master system-wide proftpd switch. The initscript
+# will not run if it is not set to yes.
+RUN="yes"
+
+# Default options.
+# For more exhaustive logging, try "-d 3".
+OPTIONS=""
meta-networking/recipes-daemons/proftpd/files/make.patch new file +66 -0

66 lines not on this page · raw message

meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init new file +220 -0

220 lines not on this page · raw message

meta-networking/recipes-daemons/proftpd/proftpd_1.3.4b.bb new file +66 -0

66 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#10 lore raw

PATCH v2 8/8 mtr: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to 0.82
* Add ncurses to DEPENDS
* Add patch to fix configure with standard autotools_do_configure
* Add SUMMARY
* Add LIC_FILES_CHKSUM

---
 .../recipes-support/mtr/files/no-gtk.patch         |   31 ++++++++++++++++++++
 meta-networking/recipes-support/mtr/mtr_0.82.bb    |   19 ++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 meta-networking/recipes-support/mtr/files/no-gtk.patch
 create mode 100644 meta-networking/recipes-support/mtr/mtr_0.82.bb
meta-networking/recipes-support/mtr/files/no-gtk.patch new file +31 -0
new file mode 100644
index 0000000..0dbeb7a
@@ -0,0 +1,31 @@
+Disable gtk check that breaks with current autotools
+
+Ideally we would have a proper fix for this and send that upstream instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/configure.in b/configure.in
+index 8474543..5118565 100644
+--- a/configure.in
++++ b/configure.in
+@@ -48,16 +48,8 @@ AC_ARG_ENABLE(ipv6,
+ [  --disable-ipv6          Do not enable IPv6],
+ WANTS_IPV6=$enableval, WANTS_IPV6=yes)
+    
+-if test "x$WANTS_GTK" = "xyes"; then
+-        AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
+-                           LIBS="$LIBS $GTK_LIBS -lm",
+-                           AC_MSG_WARN(Building without GTK2 display support)
+-                   AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.])
+-                           GTK_OBJ="")
+-else
+-	AC_DEFINE(NO_GTK)
+-	GTK_OBJ=""
+-fi
++AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.])
++GTK_OBJ=""
+ 
+ AC_CHECK_FUNC(socket, , 
+   AC_CHECK_LIB(socket, socket, , AC_MSG_ERROR(No socket library found)))
meta-networking/recipes-support/mtr/mtr_0.82.bb new file +19 -0
new file mode 100644
index 0000000..c6d5152
@@ -0,0 +1,19 @@
+SUMMARY = "Combined traceroute and ping utility"
+DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool."
+HOMEPAGE = "http://www.bitwizard.nl/mtr/"
+DEPENDS = "ncurses"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+                    file://mtr.c;startline=5;endline=16;md5=87105f8fe9675e897e074869afaafa6f"
+
+SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz \
+           file://no-gtk.patch"
+
+SRC_URI[md5sum] = "10601ea543fda3e51545c4bce195b64c"
+SRC_URI[sha256sum] = "f3b457c9623ae03565688a7ffd49d4843a5e2505ccaf3ba8d9fbd86e3ce9b6a0"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-gtk"
+
Signature · 1 line
1.7.9.5
#4 lore raw

Re: [meta-networking][PATCH v2 3/8] quagga: add from OE-Classic, update and tidy-up

In reply to Paul Eggleton
Quoted 169 lines · Paul Eggleton

* Update to 0.99.21
* Fix SRC_URI to point to a working download location
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Add old gentoo patch to fix libcap linking errors
* Put binaries in sbindir
* Use useradd.bbclass to create user/groups
* Handle hardcoded paths in initscript
* Add LSB headers to initscript (borrowed from debian)
* Tidy up packaging and directory references
* Add SUMMARY

---
  .../quagga/files/fix-for-lib-inpath.patch          |   19 ++
  .../quagga/files/quagga-0.99.17-libcap.patch       |   64 +++++++
  .../recipes-protocols/quagga/files/quagga.default  |   13 ++
  .../recipes-protocols/quagga/files/quagga.init     |  200 ++++++++++++++++++++
  .../quagga/files/volatiles.03_quagga               |    3 +
  .../quagga/files/watchquagga.default               |    7 +
  .../quagga/files/watchquagga.init                  |   64 +++++++
  .../recipes-protocols/quagga/quagga.inc            |  153 +++++++++++++++
  .../recipes-protocols/quagga/quagga_0.99.21.bb     |    8 +
  9 files changed, 531 insertions(+)

create mode 100644 meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.default create mode 100644 meta-networking/recipes-protocols/quagga/files/quagga.init create mode 100644 meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.default create mode 100644 meta-networking/recipes-protocols/quagga/files/watchquagga.init create mode 100644 meta-networking/recipes-protocols/quagga/quagga.inc
create mode 100644 meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb

meta-networking/recipes-protocols/quagga/files/fix-for-lib-inpath.patch new file +19 -0
new file mode 100644
index 0000000..50f0ad5
@@ -0,0 +1,19 @@
+At first this worked, then I tried a clean build in a directory that
+contained lib in it (oe/build/titan-glibc) and vtysh no longer
+worked. It's test for the lib directory was excepting anything
+containing lib.
+
+With this patch you still cannot have lib in the path anywhere, but
+at least things containing lib will now work.
+
+--- quagga-0.99.2/vtysh/extract.pl.in	2005/11/16 04:12:04	1.1
++++ quagga-0.99.2/vtysh/extract.pl.in	2005/11/16 04:12:16
+@@ -89,7 +89,7 @@
+ 	$cmd =~ s/\s+$//g;
+
+         # $protocol is VTYSH_PROTO format for redirection of user input
+-    	if ($file =~ /lib/) {
++    	if ($file =~ /\/lib\//) {
+            if ($file =~ /keychain.c/) {
+               $protocol = "VTYSH_RIPD";
+            }
meta-networking/recipes-protocols/quagga/files/quagga-0.99.17-libcap.patch new file +64 -0
new file mode 100644
index 0000000..9563ea2
@@ -0,0 +1,64 @@
+From 63e97633d01908da6d3776ac61e4033e6fa91e5c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <[email protected]>
+Date: Sun, 5 Sep 2010 18:19:09 +0200
+Subject: [PATCH] build: fix linking position for libcap
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ * lib/Makefile.am: link libzebra to libcap, since it uses symbols
+   from there.
+ * zebra/Makefile.am: no need to link libcap here now, since it's not
+   used directly (libtool with apply transitive dependencies for
+   static linking).
+
+Signed-off-by: Diego Elio Pettenò <[email protected]>
+
+Imported from Gentoo by Paul Eggleton <[email protected]>
+Upstream-Status: Pending
+
+---
+ lib/Makefile.am   |    2 +-
+ zebra/Makefile.am |    5 ++---
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 315e919..6e69993 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -18,7 +18,7 @@ BUILT_SOURCES = memtypes.h route_types.h
+
+ libzebra_la_DEPENDENCIES = @LIB_REGEX@
+
+-libzebra_la_LIBADD = @LIB_REGEX@
++libzebra_la_LIBADD = @LIB_REGEX@ $(LIBCAP)
+
+ pkginclude_HEADERS = \
+ 	buffer.h checksum.h command.h filter.h getopt.h hash.h \
+diff --git a/zebra/Makefile.am b/zebra/Makefile.am
+index 542f36f..d09a209 100644
+--- a/zebra/Makefile.am
++++ b/zebra/Makefile.am
+@@ -5,7 +5,6 @@ DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DMULTIPATH_NUM=@MULTIPATH_NUM@
+ INSTALL_SDATA=@INSTALL@ -m 600
+
+ LIB_IPV6 = @LIB_IPV6@
+-LIBCAP = @LIBCAP@
+
+ ipforward = @IPFORWARD@
+ if_method = @IF_METHOD@
+@@ -39,9 +38,9 @@ noinst_HEADERS = \
+ 	connected.h ioctl.h rib.h rt.h zserv.h redistribute.h debug.h rtadv.h \
+ 	interface.h ipforward.h irdp.h router-id.h kernel_socket.h
+
+-zebra_LDADD = $(otherobj) $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
++zebra_LDADD = $(otherobj) ../lib/libzebra.la $(LIB_IPV6)
+
+-testzebra_LDADD = $(LIBCAP) $(LIB_IPV6) ../lib/libzebra.la
++testzebra_LDADD = ../lib/libzebra.la $(LIB_IPV6)
+
+ zebra_DEPENDENCIES = $(otherobj)
+
+--
+1.7.2.2
+
meta-networking/recipes-protocols/quagga/files/quagga.default new file +13 -0
new file mode 100644
index 0000000..438c3b6
@@ -0,0 +1,13 @@
+# If this option is set the /etc/init.d/quagga script automatically loads
+# the config via "vtysh -b" when the servers are started.
+vtysh_enable=yes
+
+# Bind all daemons to loopback only by default
+zebra_options=" --daemon -A 127.0.0.1"
+babeld_options="-D 127.0.0.1"
+bgpd_options="  --daemon -A 127.0.0.1"
+ospfd_options=" --daemon -A 127.0.0.1"
+ospf6d_options="--daemon -A ::1"
+ripd_options="  --daemon -A 127.0.0.1"
+ripngd_options="--daemon -A ::1"
+isisd_options=" --daemon -A 127.0.0.1"
meta-networking/recipes-protocols/quagga/files/quagga.init new file +15 -0
new file mode 100644
index 0000000..d786a5a
@@ -0,0 +1,200 @@
+#!/bin/sh
+#
+# /etc/init.d/quagga -- start/stop the Quagga routing daemons
+#
+# Based on debian version by Endre Hirling <[email protected]> and
+# Christian Hammers <[email protected]>.
+#
+
+### BEGIN INIT INFO
+# Provides: quagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga routing suite

meta-networking/recipes-protocols/quagga/files/quagga.init line 25

Quoted 10 lines
meta-networking/recipes-protocols/quagga/files/quagga.init new file +10 -0
+# Description: Quagga is a routing suite for IP routing protocols like
+#              BGP, OSPF, RIP and others. This script contols the main
+#              daemon "quagga" as well as the individual protocol daemons.
+### END INIT INFO
+
+# NOTE: sbin must be before bin so we get the iproute2 ip and not the
+# busybox ip command. The busybox one flushes all routes instead of just
+# the dynamic routes
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
+D_PATH=/usr/sbin/quagga

Shouldn't this be /usr/sbin rather than /usr/sbin/quagga. That's where the daemons are being installed, right?

Aws\

Quoted 191 lines
meta-networking/recipes-protocols/quagga/files/quagga.init new file +175 -0
+C_PATH=/etc/quagga
+
+# Keep zebra first and do not list watchquagga!
+DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd babeld"
+
+# Print the name of the pidfile.
+pidfile()
+{
+	echo "/var/run/quagga/$1.pid"
+}
+
+# Check if daemon is started by using the pidfile.
+started()
+{
+	[ -e `pidfile $1` ] && kill -0 `cat \`pidfile $1\`` 2> /dev/null && return 0
+	return 1
+}
+
+# Loads the config via vtysh -b if configured to do so.
+vtysh_b ()
+{
+	# Rember, that all variables have been incremented by 1 in convert_daemon_prios()
+	if [ "$vtysh_enable" = 2 -a -f $C_PATH/Quagga.conf ]; then
+		/usr/bin/vtysh -b
+	fi
+}
+
+# Check if the daemon is activated and if its executable and config files
+# are in place.
+# params: 	daemon name
+# returns:	0=ok, 1=error
+check_daemon()
+{
+	# If the integrated config file is used the others are not checked.
+	if [ -r "$C_PATH/Quagga.conf" ]; then
+	  return 0
+	fi
+
+	# check for config file		
+	if [ ! -r "$C_PATH/$1.conf" ]; then
+	  return 1
+	fi
+	return 0
+}
+
+# Starts the server if it's not alrady running according to the pid file.
+# The Quagga daemons creates the pidfile when starting.
+start()
+{
+	if ! check_daemon $1; then echo -n " (!$1)"; return; fi
+	echo -n " $1"
+	start-stop-daemon \
+		--start \
+		--pidfile=`pidfile $1` \
+		--exec "$D_PATH/$1" \
+		-- \
+		`eval echo "$""$1""_options"`
+		
+}
+
+# Stop the daemon given in the parameter, printing its name to the terminal.
+stop()
+{
+    if ! started "$1" ; then
+	echo -n " (!$1)"
+	return 0
+    else
+	PIDFILE=`pidfile $1`
+	PID=`cat $PIDFILE 2>/dev/null`
+	start-stop-daemon --stop --quiet --exec "$D_PATH/$1"
+	#
+	#       Now we have to wait until $DAEMON has _really_ stopped.
+	#
+	if test -n "$PID" && kill -0 $PID 2>/dev/null; then
+	    echo -n " (waiting) ."
+	    cnt=0
+	    while kill -0 $PID 2>/dev/null; do
+		cnt=`expr $cnt + 1`
+		if [ $cnt -gt 60 ]; then
+		    # Waited 120 secs now, fail.
+		    echo -n "Failed.. "
+		    break
+		fi
+		sleep 2
+		echo -n "."
+		done
+	    fi
+	echo -n " $1"
+	rm -f `pidfile $1`
+    fi
+}
+
+stop_all()
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+
+	echo -n "Stopping Quagga daemons:"
+	for daemon_name in $daemon_list; do
+		stop "$daemon_name"
+	done
+	echo "."
+}
+
+start_all()
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+
+	echo -n "Starting Quagga daemons:"
+	for daemon_name in $daemon_list; do
+		start "$daemon_name"
+	done
+	echo "."
+}
+
+status_all()
+{
+	local daemon_list
+	daemon_list=${1:-$DAEMONS}
+	res=1
+
+	echo -n "quagga: "
+	for daemon_name in $daemon_list; do
+	    if started "$daemon_name" ; then
+		id=`cat \`pidfile $daemon_name\``
+		echo -n "$daemon_name (pid $id) "
+		res=0
+	    fi
+	done
+	if [ $res -eq 0 ]; then
+	    echo "is running..."
+	else
+	    echo "is stopped..."
+	fi
+	exit $res
+}
+
+#########################################################
+# 		Main program 				#
+#########################################################
+
+# Load configuration
+test -f /etc/default/quagga && . /etc/default/quagga
+
+case "$1" in
+    start)
+	cd $C_PATH/
+	start_all $2
+	vtysh_b
+    	;;
+	
+    stop)
+  	stop_all $2
+	echo "Removing all routes made by zebra."
+	ip route flush proto zebra
+   	;;
+
+    status)
+  	status_all $2
+   	;;
+
+    restart|force-reload)
+	$0 stop $2
+	sleep 1
+	$0 start $2
+	;;
+
+    *)
+    	echo "Usage: /etc/init.d/quagga {start|stop|restart|status|force-reload} [daemon]"
+	exit 1
+	;;
+esac
+
+exit 0
meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga new file +3 -0
new file mode 100644
index 0000000..cfb896a
@@ -0,0 +1,3 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d quagga quagga 0755 /var/run/quagga none
+d quagga quagga 0755 /var/log/quagga none
\ No newline at end of file
meta-networking/recipes-protocols/quagga/files/watchquagga.default new file +0 -0
new file mode 100644
index 0000000..f152032

meta-networking/recipes-protocols/quagga/files/watchquagga.default line 7

Quoted 7 lines
meta-networking/recipes-protocols/quagga/files/watchquagga.default new file +7 -0
@@ -0,0 +1,7 @@
+# Watchquagga configuration
+#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
+watch_daemons="zebra"
+
+# To enable restarts, uncomment this line (but first be sure to edit
+# the WATCH_DAEMONS line to reflect the daemons you are actually using):
+watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"

Paul, these watch_options won't work because -A does not seem to jive when a single daemon (i.e. zebra) is being used. Recommend using something like:

watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"

Aws\

Quoted 243 lines
meta-networking/recipes-protocols/quagga/files/watchquagga.init new file +64 -0
new file mode 100644
index 0000000..5ddd94a
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: watchquagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga watchdog
+### END INIT INFO
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# Load configuration
+test -f /etc/default/watchquagga && . /etc/default/watchquagga
+
+# Check that there are daemons to be monitored.
+[ -z "$watch_daemons" ] && exit 0
+
+pidfile="/var/run/quagga/watchquagga.pid"
+
+case "$1" in
+    start)
+	echo -n "Starting quagga watchdog daemon: watchquagga"
+	start-stop-daemon --start \
+		--pidfile $pidfile \
+		--exec /usr/sbin/watchquagga \
+		-- -d $watch_options $watch_daemons
+	echo "."
+    	;;
+	
+    stop)
+	echo -n "Stopping quagga watchdog daemon: watchquagga"
+	start-stop-daemon --stop --quiet \
+		--pidfile $pidfile
+	echo "."
+	;;
+
+    status)
+	echo -n "watchquagga "
+	res=1
+	[ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null
+	if [ $? -eq 0 ]; then
+	    echo "(pid `cat $pidfile`) is running..."
+	    res=0
+	else
+	    echo "is stopped..."
+	fi
+	exit $res
+	;;
+
+    restart|force-reload)
+	$0 stop $2
+	sleep 1
+	$0 start $2
+	;;
+
+    *)
+	echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}"
+	exit 1
+	;;
+esac
+
+exit 0
meta-networking/recipes-protocols/quagga/quagga.inc new file +153 -0
new file mode 100644
index 0000000..de1cdd9
@@ -0,0 +1,153 @@
+SUMMARY = "BGP/OSPF/RIP routing daemon"
+DESCRIPTION = "Quagga is a routing software suite, providing \
+implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \
+Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
+Quagga is a fork of GNU Zebra which was developed by Kunihiro \
+Ishiguro. The Quagga tree aims to build a more involved community \
+around Quagga than the current centralised model of GNU Zebra."
+HOMEPAGE = "http://www.quagga.net/"
+SECTION = "network"
+LICENSE = "GPL-2.0 & LGPL-2.0"
+DEPENDS = "readline ncurses perl-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+                    file://COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a"
+
+INC_PR = "r0"
+
+QUAGGASUBDIR = ""
+# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
+# versions and leave it empty for recent versions.
+SRC_URI = "http://download.savannah.gnu.org/releases/quagga${QUAGGASUBDIR}/quagga-${PV}.tar.gz;name=quagga-${PV} \
+           file://fix-for-lib-inpath.patch \
+           file://quagga-0.99.17-libcap.patch \
+           file://quagga.init \
+           file://quagga.default \
+           file://watchquagga.init \
+           file://watchquagga.default \
+           file://volatiles.03_quagga"
+
+inherit autotools update-rc.d useradd
+
+EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
+                --localstatedir=${localstatedir}/run/quagga \
+                --enable-exampledir=${docdir}/quagga/examples/ \
+                --enable-vtysh \
+                --enable-isisd \
+                --enable-watchquagga \
+                --enable-ospf-te \
+                --enable-opaque-lsa \
+                --enable-ipv6 \
+                --enable-ospfclient=yes \
+                --enable-multipath=64 \
+                --enable-user=quagga \
+                --enable-group=quagga \
+                --enable-vty-group=quaggavty \
+                --enable-configfile-mask=0640 \
+                --enable-logfile-mask=0640 \
+                --enable-rtadv \
+                --enable-tcp-md5"
+
+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 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}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
+}
+
+# Split into a main package and separate per-protocol packages
+PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-babeld ${PN}-bgpd \
+                     ${PN}-ripd ${PN}-ripngd ${PN}-isisd \
+                     ${PN}-ospfclient ${PN}-watchquagga"
+
+FILES_${PN}-ospfd       = "${sbindir}/ospfd ${libdir}/libospf.so.*"
+FILES_${PN}-ospf6d      = "${sbindir}/ospf6d"
+FILES_${PN}-babeld      = "${sbindir}/babeld"
+FILES_${PN}-bgpd        = "${sbindir}/bgpd"
+FILES_${PN}-ripd        = "${sbindir}/ripd"
+FILES_${PN}-ripngd      = "${sbindir}/ripngd"
+FILES_${PN}-isisd       = "${sbindir}/isisd"
+FILES_${PN}-ospfclient  = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*"
+FILES_${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
+                           ${sysconfdir}/init.d/watchquagga"
+
+# Indicate that the default files are configuration files
+CONFFILES_${PN} = "${sysconfdir}/default/quagga"
+CONFFILES_${PN}-watchquagga = "${sysconfdir}/default/watchquagga"
+
+# Stop the names being rewritten due to the internal shared libraries
+DEBIAN_NOAUTONAME_${PN}-ospfd = "1"
+DEBIAN_NOAUTONAME_${PN}-ospfclient = "1"
+
+# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
+RDEPENDS_${PN}          += "iproute2"
+
+# Main init script starts all deamons
+# Seperate init script for watchquagga
+INITSCRIPT_PACKAGES                     = "${PN} ${PN}-watchquagga"
+INITSCRIPT_NAME_${PN}                   = "quagga"
+INITSCRIPT_PARAMS_${PN}                 = "defaults 15 85"
+INITSCRIPT_NAME_${PN}-watchquagga       = "watchquagga"
+INITSCRIPT_PARAMS_${PN}-watchquagga     = "defaults 90 10"
+
+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
+	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
+}
+
+# Stop apps before uninstall
+pkg_prerm_${PN} () {
+        ${sysconfdir}/init.d/quagga stop
+}
+
+pkg_prerm_${PN}-ospfd () {
+        ${sysconfdir}/init.d/quagga stop ospfd
+}
+
+pkg_prerm_${PN}-ospf6d () {
+        ${sysconfdir}/init.d/quagga stop ospf6d
+}
+
+pkg_prerm_${PN}-babeld () {
+        ${sysconfdir}/init.d/quagga stop babeld
+}
+
+pkg_prerm_${PN}-bgpd () {
+        ${sysconfdir}/init.d/quagga stop bgpd
+}
+
+pkg_prerm_${PN}-ripd () {
+        ${sysconfdir}/init.d/quagga stop ripd
+}
+
+pkg_prerm_${PN}-ripngd () {
+        ${sysconfdir}/init.d/quagga stop ripngd
+}
+
+pkg_prerm_${PN}-isisd () {
+        ${sysconfdir}/init.d/quagga stop isisd
+}
meta-networking/recipes-protocols/quagga/quagga_0.99.21.bb new file +8 -0
new file mode 100644
index 0000000..5c403a9
@@ -0,0 +1,8 @@
+require quagga.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI[quagga-0.99.21.md5sum] = "99840adbe57047c90dfba6b6ed9aec7f"
+SRC_URI[quagga-0.99.21.sha256sum] = "9b8aea9026b4771a28e254a66cbd854723bcd0d71eebd0201d11838d4eb392ee"
+
+QUAGGASUBDIR = ""
#5 lore raw

Re: [meta-networking][PATCH v2 3/8] quagga: add from OE-Classic, update and tidy-up

Quoted 29 lines · On Wednesday 21 November 2012 14:03:40 Aws Ismail wrote:
Quoted 28 lines · Paul Eggleton
(quoted diff) +0 -0

b/meta-networking/recipes-protocols/quagga/files/quagga.init new file mode 100644
index 0000000..d786a5a

meta-networking/recipes-protocols/quagga/files/quagga.init new file +18 -0
@@ -0,0 +1,200 @@
+#!/bin/sh
+#
+# /etc/init.d/quagga -- start/stop the Quagga routing daemons
+#
+# Based on debian version by Endre Hirling <[email protected]> and
+# Christian Hammers <[email protected]>.
+#
+
+### BEGIN INIT INFO
+# Provides: quagga
+# Required-Start: $local_fs $network $remote_fs $syslog
+# Required-Stop: $local_fs $network $remote_fs $syslog
+# Default-Start:  2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: start and stop the Quagga routing suite
+# Description: Quagga is a routing suite for IP routing protocols like
+#              BGP, OSPF, RIP and others. This script contols the main
+#              daemon "quagga" as well as the individual protocol

daemons.

meta-networking/recipes-protocols/quagga/files/quagga.init new file +2 -0
+### END INIT INFO
+
Quoted 8 lines

meta-networking/recipes-protocols/quagga/files/quagga.init line 25

Quoted 5 lines
meta-networking/recipes-protocols/quagga/files/quagga.init new file +5 -0
+# NOTE: sbin must be before bin so we get the iproute2 ip and not the
+# busybox ip command. The busybox one flushes all routes instead of just
+# the dynamic routes
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
+D_PATH=/usr/sbin/quagga

Shouldn't this be /usr/sbin rather than /usr/sbin/quagga. That's where the daemons are being installed, right?

Ah yes, looks like it should be. Thanks.

Quoted 21 lines
Quoted 8 lines

diff --git a/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/meta-networking/recipes-protocols/quagga/files/watchquagga.default new file mode 100644
index 0000000..f152032

meta-networking/recipes-protocols/quagga/files/watchquagga.default

Quoted 8 lines
meta-networking/recipes-protocols/quagga/files/watchquagga.default new file +7 -1
@@ -0,0 +1,7 @@
+# Watchquagga configuration
+#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
+watch_daemons="zebra"
+
+# To enable restarts, uncomment this line (but first be sure to edit
+# the WATCH_DAEMONS line to reflect the daemons you are actually using):
+watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s
-s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"

Paul, these watch_options won't work because -A does not seem to jive when a single daemon (i.e. zebra) is being used.
Recommend using something like:

Quoted 1 line

watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"

OK, this is something that came from the OE-Classic recipe from which this one is derived. If -A is not going to work here I will remove it.

I'll send out a v2 with these fixes.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre