Skip to contentSkip to conversation

Networking recipes

PATCH Superseded Paul Eggleton 3 participants 15 messages Nov 19, 2012

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Networking recipes

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      |   61 ++++++
 .../recipes-daemons/radvd/files/radvd.init         |  124 +++++++++++
 .../recipes-daemons/radvd/files/volatiles.03_radvd |    2 +
 meta-networking/recipes-daemons/radvd/radvd.inc    |   37 ++++
 .../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           |   19 ++
 .../tftp-hpa/files/tftp-0.42-tftpboot.patch        |   54 +++++
 .../tftp-hpa/files/tftp-0.49-chk_retcodes.patch    |   15 ++
 .../tftp-hpa/files/tftp-0.49-cmd_arg.patch         |  159 ++++++++++++++
 .../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch       |   18 ++
 .../files/tftp-hpa-0.49-fortify-strcpy-crash.patch |   26 +++
 .../tftp-hpa/files/tftp-hpa-0.49-stats.patch       |   14 ++
 .../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch      |   23 ++
 .../recipes-daemons/tftp-hpa/files/tftp-xinetd     |   18 ++
 .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb       |   66 ++++++
 .../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            |  146 +++++++++++++
 .../recipes-protocols/quagga/quagga_0.99.21.bb     |    8 +
 .../xl2tpd/xl2tpd-1.3.1/cflags.patch               |   58 ++++++
 .../recipes-protocols/xl2tpd/xl2tpd.inc            |   35 ++++
 .../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, 1837 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
#3 lore raw

PATCH 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 1/8 tftp-hpa: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

* Update to 5.2
* Add patches
* Add DESCRIPTION and better SUMMARY
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Update ALTERNATIVE_* definitions

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           |   19 +++
 .../tftp-hpa/files/tftp-0.42-tftpboot.patch        |   54 +++++++
 .../tftp-hpa/files/tftp-0.49-chk_retcodes.patch    |   15 ++
 .../tftp-hpa/files/tftp-0.49-cmd_arg.patch         |  159 ++++++++++++++++++++
 .../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch       |   18 +++
 .../files/tftp-hpa-0.49-fortify-strcpy-crash.patch |   26 ++++
 .../tftp-hpa/files/tftp-hpa-0.49-stats.patch       |   14 ++
 .../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch      |   23 +++
 .../recipes-daemons/tftp-hpa/files/tftp-xinetd     |   18 +++
 .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb       |   66 ++++++++
 12 files changed, 519 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 +19 -0
new file mode 100644
index 0000000..755a307
@@ -0,0 +1,19 @@
+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 +54 -0

54 lines not on this page · raw message

meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch new file +15 -0
new file mode 100644
index 0000000..6d63571
@@ -0,0 +1,15 @@
+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 +159 -0

159 lines not on this page · raw message

meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch new file +18 -0
new file mode 100644
index 0000000..ded02ef
@@ -0,0 +1,18 @@
+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 +26 -0
new file mode 100644
index 0000000..e9b70d4
@@ -0,0 +1,26 @@
+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 +14 -0
new file mode 100644
index 0000000..b6c9d05
@@ -0,0 +1,14 @@
+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 +23 -0
new file mode 100644
index 0000000..d1fa75c
@@ -0,0 +1,23 @@
+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 +66 -0

66 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#4 lore raw

PATCH 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
* Add LSB headers to init script (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            |  146 ++++++++++++++
 .../recipes-protocols/quagga/quagga_0.99.21.bb     |    8 +
 9 files changed, 524 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 +146 -0

146 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 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
* 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    |   37 ++++++
 .../recipes-daemons/radvd/radvd_1.9.1.bb           |    6 +
 4 files changed, 169 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 +37 -0
new file mode 100644
index 0000000..4b3e47b
@@ -0,0 +1,37 @@
+SUMMARY = "IPv6 router advertisement daemon"
+HOMEPAGE = "http://www.litech.org/radvd/"
+SECTION = "console/network"
+DEPENDS = "flex-native libdaemon"
+
+# License is BSD-Style (with advertising clause) but also has an additional 0th clause
+LICENSE = "radvd"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=73ebbf7182ae996e65e8fadc9a8c45db"
+
+SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \
+           file://radvd.init \
+           file://volatiles.03_radvd"
+
+inherit autotools update-rc.d useradd
+
+do_install_append () {
+        install -m 0755 -d ${D}${sysconfdir}/init.d \
+                           ${D}${sysconfdir}/default/volatiles \
+                           ${D}${docdir}/radvd
+        # Install init script and volatiles
+        install -m 0755 ${WORKDIR}/radvd.init ${D}${sysconfdir}/init.d/radvd
+        install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd
+        # Documentation
+        for i in radvd.conf.example README; do \
+            install -m 0644 $i ${D}${docdir}/radvd; \
+        done
+}
+
+INITSCRIPT_NAME = "radvd"
+INITSCRIPT_PARAMS = "defaults 20 80"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd"
+
+pkg_postinst_${PN} () {
+        ${sysconfdir}/init.d/populate-volatile.sh update
+}
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
#10 lore raw

PATCH 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
* 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            |   35 ++++++++++++
 .../recipes-protocols/xl2tpd/xl2tpd_1.3.1.bb       |    8 +++
 3 files changed, 101 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 +35 -0
new file mode 100644
index 0000000..f54ab8d
@@ -0,0 +1,35 @@
+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
+	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
#11 lore raw

PATCH 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
* 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      |   61 ++++++
 6 files changed, 419 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 +61 -0

61 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#13 lore raw

PATCH 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
#9 lore raw

PATCH 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
#5 lore raw

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

In reply to Paul Eggleton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-11-12 18:11, Paul Eggleton schreef:

Quoted 8 lines

* 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 * Add LSB headers to init script (borrowed from debian) * Tidy up packaging and directory references * Add SUMMARY

dd94a

Quoted 9 lines

--- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/watchquagga.init @@ -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

hardcoded $sysconfdir

Quoted 2 lines

+ +# Check that there are daemons to be monitored. +[ -z "$watch_daemons" ] && exit 0 + +pidfile="/var/run/quagga/watchquagga.pid"

hardcoded $localstatedir

Quoted 3 lines

+ +case "$1" in + start) + echo -n "Starting quagga watchdog daemon:
watchquagga" + start-stop-daemon --start \ + --pidfile $pidfile \ +
--exec /usr/sbin/watchquagga \

hardcoded $sbindir

[..]

etc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQqnKVMkyGM64RGpERAk0CAJ4jE0qiE8nK07yULhEyK1CnQQD/cACeJqF2 YZ2NT+afhKPlhw+J3brUhe0=
=GWC7
-----END PGP SIGNATURE-----

#12 lore raw

Re: [meta-networking][PATCH 7/8] proftpd: add from meta-baryon

In reply to Paul Eggleton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-11-12 18:11, Paul Eggleton schreef:

Quoted 26 lines

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 * 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]>.

diff --git a/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init b/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init new file mode 100644 index 0000000..01c998c --- /dev/null +++ b/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init @@ -0,0 +1,220 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides:
proftpd +# Required-Start: $remote_fs $syslog $local_fs $network +#
Required-Stop: $remote_fs $syslog $local_fs $network +# Should-Start:
$named +# Should-Stop: $named +# Default-Start: 2 3 4 5 +#

Quoted 4 lines
Default-Stop:      0 1 6 +# Short-Description: Starts ProFTPD daemon +#
Description:       This script runs the FTP service offered +#

by the ProFTPD daemon +### END INIT INFO + +# Start the proftpd FTP daemon. + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/proftpd

hardcoded $sbindir

Review

Quoted 2 lines
(quoted diff) +2 -0
+NAME=proftpd + +# Defaults +RUN="no" +OPTIONS="" 
+CONFIG_FILE=/etc/proftpd.conf

hardcoded $sysconfigdur

Quoted 2 lines

+ +PIDFILE=grep -i '^pidfile' $CONFIG_FILE|awk '{ print $2 }' +if [
"x$PIDFILE" = "x" ]; +then + PIDFILE=/var/run/proftpd.pid

hardcoded $localstatedir

Quoted 2 lines

+fi + +# Read config (will override defaults) +[ -r /etc/default/proftpd ] && . /etc/default/proftpd

hardcoded $sysconfigdir and a lot more in the rest of the file. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQqnMkMkyGM64RGpERAna2AJ0cUe2Knjk1jKzdpYtWmgGH8JHc4ACcDcEw kxu7B1yYizf2inquugwLEJw=
=HsG/
-----END PGP SIGNATURE-----

#6 lore raw

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

In reply to Koen Kooi
Quoted 36 lines · On Monday 19 November 2012 18:55:33 Koen Kooi wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-11-12 18:11, Paul Eggleton schreef:

Quoted 8 lines

* 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 * Add LSB headers to init script (borrowed from debian) * Tidy up packaging and directory references * Add SUMMARY

dd94a

Quoted 9 lines

--- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/watchquagga.init @@ -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

hardcoded $sysconfdir

Quoted 2 lines

+ +# Check that there are daemons to be monitored. +[ -z "$watch_daemons" ] && exit 0 + +pidfile="/var/run/quagga/watchquagga.pid"

hardcoded $localstatedir

Quoted 3 lines

+ +case "$1" in + start) + echo -n "Starting quagga watchdog daemon:
watchquagga" + start-stop-daemon --start \ + --pidfile $pidfile \ +
--exec /usr/sbin/watchquagga \

Quoted 5 lines

hardcoded $sbindir

[..]

etc.

Sure I can fix these, but you're aware there are a ton of these in meta-oe...?

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

#7 lore raw

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

Op 19 nov. 2012, om 19:00 heeft Paul Eggleton <[email protected]> het volgende geschreven:

Quoted 37 lines · On Monday 19 November 2012 18:55:33 Koen Kooi wrote:
Quoted 36 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-11-12 18:11, Paul Eggleton schreef:

Quoted 8 lines

* 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 * Add LSB headers to init script (borrowed from debian) * Tidy up packaging and directory references * Add SUMMARY

dd94a

Quoted 9 lines

--- /dev/null +++ b/meta-networking/recipes-protocols/quagga/files/watchquagga.init @@ -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

hardcoded $sysconfdir

Quoted 2 lines

+ +# Check that there are daemons to be monitored. +[ -z "$watch_daemons" ] && exit 0 + +pidfile="/var/run/quagga/watchquagga.pid"

hardcoded $localstatedir

Quoted 3 lines

+ +case "$1" in + start) + echo -n "Starting quagga watchdog daemon:
watchquagga" + start-stop-daemon --start \ + --pidfile $pidfile \ +
--exec /usr/sbin/watchquagga \

Quoted 7 lines
Quoted 5 lines

hardcoded $sbindir

[..]

etc.

Sure I can fix these, but you're aware there are a ton of these in meta-oe...?

Sadly, yes. I try to fix them when I run into those, but it's slow going and most of the time I just add native systemd support to fix startup.

regards,

Koen

#14 lore raw
In reply to Paul Eggleton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 19-11-12 18:11, Paul Eggleton schreef:

Quoted 11 lines

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

Quoted 6 lines

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

Most of the initscripts will break if you set $prefix="" in your distro.conf.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFQqnNuMkyGM64RGpERAm/GAJ9/vff0dDvJMor3nwO9Gn94p6I0tgCfVQ8d 2pr46MnFVAwTX5BICuG5ziQ=
=BZC/
-----END PGP SIGNATURE-----

#2 lore raw

Re: [meta-networking][PATCH 1/8] tftp-hpa: add from OE-Classic, update and tidy up

In reply to Paul Eggleton

A few of these need clean-up (attribution, up-stream status, etc.) that Paul and I were discussing, forgot about, and are now focused on again.

I'm still sorting that part out, so there's an update coming from me for the tftp-hpa patches before they get merged.

-J.

Quoted 628 lines · [[oe] [meta-networking][PATCH 1/8] tftp-hpa: add from OE-Classic, update and…

* Update to 5.2
* Add patches
* Add DESCRIPTION and better SUMMARY
* Make LICENSE more accurate
* Add LIC_FILES_CHKSUM
* Update ALTERNATIVE_* definitions

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           |   19 +++
 .../tftp-hpa/files/tftp-0.42-tftpboot.patch        |   54 +++++++
 .../tftp-hpa/files/tftp-0.49-chk_retcodes.patch    |   15 ++
 .../tftp-hpa/files/tftp-0.49-cmd_arg.patch         |  159 ++++++++++++++++++++
 .../tftp-hpa/files/tftp-hpa-0.39-tzfix.patch       |   18 +++
 .../files/tftp-hpa-0.49-fortify-strcpy-crash.patch |   26 ++++
 .../tftp-hpa/files/tftp-hpa-0.49-stats.patch       |   14 ++
 .../tftp-hpa/files/tftp-hpa-5.2-pktinfo.patch      |   23 +++
 .../recipes-daemons/tftp-hpa/files/tftp-xinetd     |   18 +++
 .../recipes-daemons/tftp-hpa/tftp-hpa_5.2.bb       |   66 ++++++++
 12 files changed, 519 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
new file mode 100644
index 0000000..5ad8c52
@@ -0,0 +1,104 @@
+#! /bin/sh
+#
+# Author:	Jaakko Niemi <[email protected]>
+# Modified from skeleton file in sarge
+
+### BEGIN INIT INFO
+# Provides:          tftp-hpa
+# Required-Start:    $local_fs $remote_fs $syslog $network
+# Required-Stop:     $local_fs $remote_fs $syslog $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      1
+# Short-Description: HPA's tftp client 
+# Description:       tftp server to allow booting clients which support
+#                    the PXE protocol.
+### END INIT INFO
+
+set -e
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="HPA's tftpd"
+NAME=in.tftpd
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/tftpd-hpa
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+# Read config file if it is present.
+if [ -r /etc/default/tftpd-hpa ]
+then
+	. /etc/default/tftpd-hpa
+fi
+
+if [ "$RUN_DAEMON" != "yes" ] ; then
+         echo "tftpd-hpa disabled in /etc/default/tftpd-hpa"
+	 exit 0
+fi
+
+#
+#	Function that starts the daemon/service.
+#
+d_start() {
+	start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS
+}
+
+#
+#	Function that stops the daemon/service.
+#
+d_stop() {
+	start-stop-daemon --stop --quiet --name $NAME
+}
+
+#
+#	Function that sends a SIGHUP to the daemon/service.
+#
+d_reload() {
+	start-stop-daemon --stop --quiet --name $NAME --signal 1
+}
+
+case "$1" in
+  start)
+	echo  "Starting $DESC: $NAME"
+	d_start
+	echo "."
+	;;
+  stop)
+	echo  "Stopping $DESC: $NAME"
+	d_stop
+	echo "."
+	;;
+  #reload)
+	#
+	#	If the daemon can reload its configuration without
+	#	restarting (for example, when it is sent a SIGHUP),
+	#	then implement that here.
+	#
+	#	If the daemon responds to changes in its config file
+	#	directly anyway, make this an "exit 0".
+	#
+	# echo -n "Reloading $DESC configuration..."
+	# d_reload
+	# echo "done."
+  #;;
+  restart|force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart".
+	#
+	echo "Restarting $DESC: $NAME"
+	d_stop
+	sleep 1
+	d_start
+	echo "."
+	;;
+  *)
+	# echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.40-remap.patch new file +19 -0
new file mode 100644
index 0000000..755a307
@@ -0,0 +1,19 @@
+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 +54 -0
new file mode 100644
index 0000000..a0de58d
@@ -0,0 +1,54 @@
+diff -up tftp-hpa-0.48/tftp-xinetd.tftpboot tftp-hpa-0.48/tftp-xinetd
+--- tftp-hpa-0.48/tftp-xinetd.tftpboot	2007-01-31 00:51:05.000000000 +0100
++++ tftp-hpa-0.48/tftp-xinetd	2008-05-20 12:05:53.000000000 +0200
+@@ -10,7 +10,7 @@ service tftp
+ 	wait			= yes
+ 	user			= root
+ 	server			= /usr/sbin/in.tftpd
+-	server_args		= -s /tftpboot
++	server_args		= -s /var/lib/tftpboot
+ 	disable			= yes
+ 	per_source		= 11
+ 	cps			= 100 2
+diff -up tftp-hpa-0.48/README.security.tftpboot tftp-hpa-0.48/README.security
+--- tftp-hpa-0.48/README.security.tftpboot	2008-05-29 17:36:32.000000000 +0200
++++ tftp-hpa-0.48/README.security	2008-05-29 17:37:21.000000000 +0200
+@@ -17,10 +17,10 @@ probably the following:
+ 
+ 1. Create a separate "tftpd" user and group only used for tftpd;
+ 2. Have all your boot files in a single directory tree (usually called 
+-   /tftpboot).
+-3. Specify "-p -u tftpd -s /tftpboot" on the tftpd command line; if
++   /var/lib/tftpboot).
++3. Specify "-p -u tftpd -s /var/lib/tftpboot" on the tftpd command line; if
+    you want clients to be able to create files use
+-   "-p -c -U 002 -u tftpd -s /tftpboot" (replace 002 with whatever
++   "-p -c -U 002 -u tftpd -s /var/lib/tftpboot" (replace 002 with whatever
+    umask is appropriate for your setup.)
+ 
+ 	       =======================================
+@@ -40,12 +40,12 @@ directly.  Thus, if your /etc/inetd.conf
+ line):
+ 
+ tftp	dgram	udp	wait	root	/usr/sbin/tcpd
+-/usr/sbin/in.tftpd -s /tftpboot -r blksize
++/usr/sbin/in.tftpd -s /var/lib/tftpboot -r blksize
+ 
+ ... it's better to change to ...
+ 
+ tftp	dgram	udp	wait	root	/usr/sbin/in.tftpd
+-in.tftpd -s /tftpboot -r blksize
++in.tftpd -s /var/lib/tftpboot -r blksize
+ 
+ You should make sure that you are using "wait" option in tftpd; you
+ also need to have tftpd spawned as root in order for chroot (-s) to
+diff -up tftp-hpa-0.48/tftpd/sample.rules.tftpboot tftp-hpa-0.48/tftpd/sample.rules
+--- tftp-hpa-0.48/tftpd/sample.rules.tftpboot	2008-05-29 17:38:46.000000000 +0200
++++ tftp-hpa-0.48/tftpd/sample.rules	2008-05-29 17:38:05.000000000 +0200
+@@ -30,5 +30,5 @@ rg	\\		/		# Convert backslashes to slash
+ rg	\#		@		# Convert hash marks to @ signs
+ rg	/../		/..no../	# Convert /../ to /..no../
+ e	^ok/				# These are always ok
+-r	^[^/]		/tftpboot/\0	# Convert non-absolute files
++r	^[^/]		/var/lib/tftpboot/\0	# Convert non-absolute files
+ a	\.pvt$				# Reject requests for private files
meta-networking/recipes-daemons/tftp-hpa/files/tftp-0.49-chk_retcodes.patch new file +15 -0
new file mode 100644
index 0000000..6d63571
@@ -0,0 +1,15 @@
+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 +159 -0
new file mode 100644
index 0000000..2b9023a
@@ -0,0 +1,159 @@
+diff -up tftp-hpa-0.49/config.h.cmd_arg tftp-hpa-0.49/config.h
+--- tftp-hpa-0.49/config.h.cmd_arg	2010-04-19 15:29:10.567331454 +0200
++++ tftp-hpa-0.49/config.h	2010-04-20 07:33:03.133232772 +0200
+@@ -291,6 +291,7 @@ typedef int socklen_t;
+ /* Prototypes for libxtra functions */
+ 
+ void *xmalloc(size_t);
++void *xrealloc(void *, size_t);
+ char *xstrdup(const char *);
+ 
+ #ifndef HAVE_BSD_SIGNAL
+diff -up tftp-hpa-0.49/configure.in.cmd_arg tftp-hpa-0.49/configure.in
+--- tftp-hpa-0.49/configure.in.cmd_arg	2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/configure.in	2010-04-19 11:05:12.387340698 +0200
+@@ -152,6 +152,7 @@ OBJROOT=`pwd`
+ 
+ XTRA=false
+ PA_SEARCH_LIBS_AND_ADD(xmalloc, iberty)
++PA_SEARCH_LIBS_AND_ADD(xrealloc, iberty)
+ PA_SEARCH_LIBS_AND_ADD(xstrdup, iberty)
+ PA_SEARCH_LIBS_AND_ADD(bsd_signal, bsd, bsdsignal)
+ PA_SEARCH_LIBS_AND_ADD(getopt_long, getopt, getopt_long)
+diff -up tftp-hpa-0.49/lib/xrealloc.c.cmd_arg tftp-hpa-0.49/lib/xrealloc.c
+--- tftp-hpa-0.49/lib/xrealloc.c.cmd_arg	2010-04-19 11:05:12.387340698 +0200
++++ tftp-hpa-0.49/lib/xrealloc.c	2010-04-19 11:05:12.387340698 +0200
+@@ -0,0 +1,20 @@
++/*
++ * xrealloc.c
++ *
++ * Simple error-checking version of realloc()
++ *
++ */
++
++#include "config.h"
++
++void *xrealloc(void *ptr, size_t size)
++{
++    void *p = realloc(ptr, size);
++
++    if (!p) {
++        fprintf(stderr, "Out of memory!\n");
++        exit(128);
++    }
++
++    return p;
++}
+diff -up tftp-hpa-0.49/tftp/main.c.cmd_arg tftp-hpa-0.49/tftp/main.c
+--- tftp-hpa-0.49/tftp/main.c.cmd_arg	2008-10-21 00:08:31.000000000 +0200
++++ tftp-hpa-0.49/tftp/main.c	2010-04-19 11:05:12.389329337 +0200
+@@ -89,11 +89,14 @@ int connected;
+ const struct modes *mode;
+ #ifdef WITH_READLINE
+ char *line = NULL;
++char *remote_pth = NULL;
+ #else
+ char line[LBUFLEN];
++char remote_pth[LBUFLEN];
+ #endif
+ int margc;
+-char *margv[20];
++char **margv;
++int sizeof_margv=0;
+ const char *prompt = "tftp> ";
+ sigjmp_buf toplevel;
+ void intr(int);
+@@ -379,6 +382,10 @@ static void getmoreargs(const char *part
+         free(line);
+         line = NULL;
+     }
++    if (remote_pth) {
++        free(remote_pth);
++        remote_pth = NULL;
++    }
+     line = xmalloc(len + elen + 1);
+     strcpy(line, partial);
+     strcpy(line + len, eline);
+@@ -535,6 +542,7 @@ void put(int argc, char *argv[])
+     int fd;
+     int n, err;
+     char *cp, *targ;
++    long dirlen, namelen, lastlen=0;
+ 
+     if (argc < 2) {
+         getmoreargs("send ", "(file) ");
+@@ -588,9 +596,22 @@ void put(int argc, char *argv[])
+     }
+     /* this assumes the target is a directory */
+     /* on a remote unix system.  hmmmm.  */
+-    cp = strchr(targ, '\0');
+-    *cp++ = '/';
++    dirlen = strlen(targ)+1;
++#ifdef WITH_READLINE
++    remote_pth = xmalloc(dirlen+1);
++#endif
++    strcpy(remote_pth, targ);
++    remote_pth[dirlen-1] = '/';
++    cp = remote_pth + dirlen;
+     for (n = 1; n < argc - 1; n++) {
++#ifdef WITH_READLINE
++        namelen = strlen(tail(argv[n])) + 1;
++        if (namelen > lastlen) {
++            remote_pth = xrealloc(remote_pth, dirlen + namelen + 1);
++            cp = remote_pth + dirlen;
++            lastlen = namelen;
++        }
++#endif
+         strcpy(cp, tail(argv[n]));
+         fd = open(argv[n], O_RDONLY | mode->m_openflags);
+         if (fd < 0) {
+@@ -600,9 +621,9 @@ void put(int argc, char *argv[])
+         }
+         if (verbose)
+             printf("putting %s to %s:%s [%s]\n",
+-                   argv[n], hostname, targ, mode->m_mode);
++                   argv[n], hostname, remote_pth, mode->m_mode);
+         sa_set_port(&peeraddr, port);
+-        tftp_sendfile(fd, targ, mode->m_mode);
++        tftp_sendfile(fd, remote_pth, mode->m_mode);
+     }
+ }
+ 
+@@ -801,6 +822,10 @@ static void command(void)
+             free(line);
+             line = NULL;
+         }
++        if (remote_pth) {
++            free(remote_pth);
++            remote_pth = NULL;
++        }
+         line = readline(prompt);
+         if (!line)
+             exit(0);            /* EOF */
+@@ -872,7 +897,13 @@ struct cmd *getcmd(char *name)
+ static void makeargv(void)
+ {
+     char *cp;
+-    char **argp = margv;
++    char **argp;
++
++    if (!sizeof_margv) {
++        sizeof_margv = 20;
++        margv = xmalloc(sizeof_margv * sizeof(char *));
++    }
++    argp = margv;
+ 
+     margc = 0;
+     for (cp = line; *cp;) {
+@@ -882,6 +913,11 @@ static void makeargv(void)
+             break;
+         *argp++ = cp;
+         margc += 1;
++        if (margc == sizeof_margv) {
++            sizeof_margv += 20;
++            margv = xrealloc(margv, sizeof_margv * sizeof(char *));
++            argp = margv + margc;
++        }
+         while (*cp != '\0' && !isspace(*cp))
+             cp++;
+         if (*cp == '\0')
meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch new file +18 -0
new file mode 100644
index 0000000..ded02ef
@@ -0,0 +1,18 @@
+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 +26 -0
new file mode 100644
index 0000000..e9b70d4
@@ -0,0 +1,26 @@
+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 +14 -0
new file mode 100644
index 0000000..b6c9d05
@@ -0,0 +1,14 @@
+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 +23 -0
new file mode 100644
index 0000000..d1fa75c
@@ -0,0 +1,23 @@
+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 +66 -0
new file mode 100644
index 0000000..f09663d
@@ -0,0 +1,66 @@
+SUMMARY        = "Client for the Trivial File Transfer Protocol"
+DESCRIPTION    = \
+"The Trivial File Transfer Protocol (TFTP) is normally used only for \
+booting diskless workstations.  The tftp package provides the user   \
+interface for TFTP, which allows users to transfer files to and from a \
+remote machine.  This program and TFTP provide very little security, \
+and should not be enabled unless it is expressly needed."
+DEPENDS = "tcp-wrappers readline"
+SECTION = "network"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://MCONFIG.in;startline=1;endline=9;md5=c28ba5adb43041fae4629db05c83cbdd \
+                    file://tftp/tftp.c;startline=1;endline=32;md5=988c1cba99d70858a26cd877209857f4"
+
+PR = "r0"
+
+SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.tar.bz2 \
+           file://tftp-0.40-remap.patch \
+           file://tftp-0.42-tftpboot.patch \
+           file://tftp-0.49-chk_retcodes.patch \
+           file://tftp-0.49-cmd_arg.patch \
+           file://tftp-hpa-0.39-tzfix.patch \
+           file://tftp-hpa-0.49-fortify-strcpy-crash.patch \
+           file://tftp-hpa-0.49-stats.patch \
+           file://tftp-hpa-5.2-pktinfo.patch \
+           file://default \
+           file://init"
+
+SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21"
+SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269"
+
+inherit autotools update-rc.d update-alternatives
+
+EXTRA_OECONF += "--disable-option-checking"
+
+# configure.in has errors
+do_configure() {
+	oe_runconf
+}
+
+do_install() {
+	oe_runmake install INSTALLROOT=${D}
+	mv ${D}${bindir}/tftp ${D}${bindir}/tftp-hpa
+	mv ${D}${sbindir}/in.tftpd ${D}${sbindir}/in.tftpd-hpa
+
+	install -m 755 -d ${D}${localstatedir}/lib/tftpboot/
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/tftpd-hpa
+	install -d ${D}${sysconfdir}/default
+	install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
+}
+
+FILES_${PN} = "${bindir}"
+
+PACKAGES += "tftp-hpa-server"
+SUMMARY_tftp-hpa-server = "Server for the Trivial File Transfer Protocol"
+FILES_tftp-hpa-server = "${sbindir} ${sysconfdir} ${localstatedir}"
+CONFFILES_tftp-hpa-server = "${sysconfdir}/default/tftpd-hpa"
+
+INITSCRIPT_PACKAGES = "tftp-hpa-server"
+INITSCRIPT_NAME = "tftpd-hpa"
+INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 20 1 ."
+
+ALTERNATIVE_${PN} = "tftp"
+ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa"
+ALTERNATIVE_PRIORITY = "50"
+
Signature · 2 lines
-Joe MacDonald.
:wq