diff options
Diffstat (limited to 'meta-networking/recipes-support')
131 files changed, 5401 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch b/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch new file mode 100644 index 000000000..ec89b7a53 --- /dev/null +++ b/meta-networking/recipes-support/aoetools/aoetools/aoe-stat-no-bashism.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From 38c97e590fde19213f6ba31e72d1c227db869427 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Sun, 31 Aug 2014 22:28:38 -0700 | ||
4 | Subject: [PATCH] aoe-stat.in: no bashism | ||
5 | |||
6 | The checkbashisms shows there is no bashism, so use /bin/sh. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
11 | --- | ||
12 | aoe-stat.in | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/aoe-stat.in b/aoe-stat.in | ||
16 | index 50e6ac6..0c1d6f5 100755 | ||
17 | --- a/aoe-stat.in | ||
18 | +++ b/aoe-stat.in | ||
19 | @@ -1,4 +1,4 @@ | ||
20 | -#! /bin/bash | ||
21 | +#! /bin/sh | ||
22 | # aoe-stat - collate and present information about AoE storage | ||
23 | # Copyright 2012, CORAID, Inc., and licensed under GPL v.2. | ||
24 | |||
25 | -- | ||
26 | 1.7.9.5 | ||
27 | |||
diff --git a/meta-networking/recipes-support/aoetools/aoetools_36.bb b/meta-networking/recipes-support/aoetools/aoetools_36.bb new file mode 100644 index 000000000..2b80ae74f --- /dev/null +++ b/meta-networking/recipes-support/aoetools/aoetools_36.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "ATA over Ethernet Tools" | ||
2 | DESCRIPTION = " \ | ||
3 | The aoetools are programs for users of the ATA over Ethernet (AoE)network \ | ||
4 | storage protocol, a simple protocol for using storage over anethernet LAN. \ | ||
5 | The vblade program (storage target) exports a blockdevice using AoE. \ | ||
6 | " | ||
7 | HOMEPAGE = "http://sourceforge.net/projects/${BPN}" | ||
8 | SECTION = "console/network" | ||
9 | LICENSE = "GPLv2" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
11 | RRECOMMENDS_${PN} = "kernel-module-aoe" | ||
12 | |||
13 | SRC_URI = "http://sourceforge.net/projects/${BPN}/files/${BPN}/${BPN}-${PV}.tar.gz \ | ||
14 | file://aoe-stat-no-bashism.patch \ | ||
15 | " | ||
16 | SRC_URI[md5sum] = "bff30daa988a65f69d4448ce4726a6db" | ||
17 | SRC_URI[sha256sum] = "fb5e2cd0de7644cc1ec04ee3aeb43211cf7445a0c19e13d6b3ed5a8fbdf215ff" | ||
18 | |||
19 | # EXTRA_OEMAKE is typically: -e MAKEFLAGS= | ||
20 | # the -e causes problems as CFLAGS is modified in the Makefile. | ||
21 | EXTRA_OEMAKE = "" | ||
22 | |||
23 | do_install() { | ||
24 | oe_runmake DESTDIR=${D} install | ||
25 | } | ||
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch new file mode 100644 index 000000000..0875344fe --- /dev/null +++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-arpt-get-target-fix.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | arptables: fix the redefinition of 'arpt_get_target' | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | This function is already defined as a static inline function in | ||
6 | include/linux/netfilter_arp/arp_tables.h, once GCC uses -O0, the | ||
7 | inline will not work, and the redefinition error will happen | ||
8 | |||
9 | Signed-off-by: Aws Ismail <aws.ismail@windriver.com> | ||
10 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
11 | |||
12 | diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c | ||
13 | index 35736db..addd3f9 100644 | ||
14 | --- a/libarptc/libarptc_incl.c | ||
15 | +++ b/libarptc/libarptc_incl.c | ||
16 | @@ -11,14 +11,6 @@ | ||
17 | /* (C)1999 Paul ``Rusty'' Russell - Placed under the GNU GPL (See | ||
18 | COPYING for details). */ | ||
19 | |||
20 | -#ifndef __OPTIMIZE__ | ||
21 | -STRUCT_ENTRY_TARGET * | ||
22 | -GET_TARGET(STRUCT_ENTRY *e) | ||
23 | -{ | ||
24 | - return (void *)e + e->target_offset; | ||
25 | -} | ||
26 | -#endif | ||
27 | - | ||
28 | static int sockfd = -1; | ||
29 | static void *arptc_fn = NULL; | ||
30 | |||
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch new file mode 100644 index 000000000..80e980472 --- /dev/null +++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-compile-install.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | Index: arptables-v0.0.3-4/Makefile | ||
2 | =================================================================== | ||
3 | --- arptables-v0.0.3-4.orig/Makefile 2010-03-08 18:49:28.000000000 +0300 | ||
4 | +++ arptables-v0.0.3-4/Makefile 2010-03-22 15:52:56.000000000 +0300 | ||
5 | @@ -6,12 +6,11 @@ | ||
6 | LIBDIR:=$(PREFIX)/lib | ||
7 | BINDIR:=$(PREFIX)/sbin | ||
8 | MANDIR:=$(PREFIX)/man | ||
9 | -INITDIR:=/etc/rc.d/init.d | ||
10 | +INITDIR:=/etc/init.d | ||
11 | SYSCONFIGDIR:=/etc/sysconfig | ||
12 | DESTDIR:= | ||
13 | |||
14 | -COPT_FLAGS:=-O2 | ||
15 | -CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG | ||
16 | +ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" | ||
17 | |||
18 | ifndef ARPT_LIBDIR | ||
19 | ARPT_LIBDIR:=$(LIBDIR)/arptables | ||
20 | @@ -22,16 +21,16 @@ | ||
21 | all: arptables | ||
22 | |||
23 | arptables.o: arptables.c | ||
24 | - $(CC) $(CFLAGS) -c -o $@ $< | ||
25 | + $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $< | ||
26 | |||
27 | arptables-standalone.o: arptables-standalone.c | ||
28 | - $(CC) $(CFLAGS) -c -o $@ $< | ||
29 | + $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $< | ||
30 | |||
31 | libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c | ||
32 | - $(CC) $(CFLAGS) -c -o $@ $< | ||
33 | + $(CC) $(CFLAGS) $(ARPCFLAGS) -c -o $@ $< | ||
34 | |||
35 | arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS) | ||
36 | - $(CC) $(CFLAGS) -o $@ $^ | ||
37 | + $(CC) $(LDFLAGS) $(CFLAGS) $(ARPCFLAGS) -o $@ $^ | ||
38 | |||
39 | $(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8 | ||
40 | mkdir -p $(@D) | ||
41 | @@ -50,6 +49,7 @@ | ||
42 | cat arptables-restore | sed 's/__EXEC_PATH__/$(tmp1)/g' > arptables-restore_ | ||
43 | install -m 0755 -o root -g root arptables-restore_ $(DESTDIR)$(BINDIR)/arptables-restore | ||
44 | cat arptables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > arptables.sysv_ | ||
45 | + install -d $(DESTDIR)$(INITDIR) | ||
46 | if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi | ||
47 | rm -f arptables-save_ arptables-restore_ arptables.sysv_ | ||
48 | |||
49 | Index: arptables-v0.0.3-4/extensions/Makefile | ||
50 | =================================================================== | ||
51 | --- arptables-v0.0.3-4.orig/extensions/Makefile 2010-03-08 18:49:28.000000000 +0300 | ||
52 | +++ arptables-v0.0.3-4/extensions/Makefile 2010-03-22 15:52:38.000000000 +0300 | ||
53 | @@ -4,4 +4,7 @@ | ||
54 | EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o) | ||
55 | |||
56 | extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h | ||
57 | - $(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $< | ||
58 | + $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $< | ||
59 | + | ||
60 | +extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h | ||
61 | + $(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $< | ||
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch new file mode 100644 index 000000000..24956c4ca --- /dev/null +++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-init-busybox.patch | |||
@@ -0,0 +1,77 @@ | |||
1 | Index: arptables-v0.0.3-4/arptables.sysv | ||
2 | =================================================================== | ||
3 | --- arptables-v0.0.3-4.orig/arptables.sysv 2010-03-22 16:28:03.000000000 +0300 | ||
4 | +++ arptables-v0.0.3-4/arptables.sysv 2010-03-22 16:27:51.000000000 +0300 | ||
5 | @@ -12,10 +12,10 @@ | ||
6 | # config: __SYSCONFIG__/arptables | ||
7 | |||
8 | source /etc/init.d/functions | ||
9 | -source /etc/sysconfig/network | ||
10 | +# source /etc/sysconfig/network | ||
11 | |||
12 | # Check that networking is up. | ||
13 | -[ ${NETWORKING} = "no" ] && exit 0 | ||
14 | +# [ ${NETWORKING} = "no" ] && exit 0 | ||
15 | |||
16 | [ -x __EXEC_PATH__/arptables ] || exit 1 | ||
17 | [ -x __EXEC_PATH__/arptables-save ] || exit 1 | ||
18 | @@ -28,32 +28,30 @@ | ||
19 | desc="Arp filtering" | ||
20 | |||
21 | start() { | ||
22 | - echo -n $"Starting $desc ($prog): " | ||
23 | + echo -n "Starting $desc ($prog): " | ||
24 | __EXEC_PATH__/arptables-restore < __SYSCONFIG__/arptables || RETVAL=1 | ||
25 | |||
26 | if [ $RETVAL -eq 0 ]; then | ||
27 | - success "$prog startup" | ||
28 | - rm -f /var/lock/subsys/$prog | ||
29 | + echo "$prog ok" | ||
30 | + touch /var/lock/subsys/$prog | ||
31 | else | ||
32 | - failure "$prog startup" | ||
33 | + echo "$prog failed" | ||
34 | fi | ||
35 | |||
36 | - echo | ||
37 | return $RETVAL | ||
38 | } | ||
39 | |||
40 | stop() { | ||
41 | - echo -n $"Stopping $desc ($prog): " | ||
42 | + echo -n "Stopping $desc ($prog): " | ||
43 | __EXEC_PATH__/arptables-restore < /dev/null || RETVAL=1 | ||
44 | |||
45 | if [ $RETVAL -eq 0 ]; then | ||
46 | - success "$prog shutdown" | ||
47 | - rm -f %{_localstatedir}/lock/subsys/$prog | ||
48 | + echo "$prog stopped" | ||
49 | + rm -f /var/lock/subsys/$prog | ||
50 | else | ||
51 | - failure "$prog shutdown" | ||
52 | + echo "$prog failed to stop" | ||
53 | fi | ||
54 | |||
55 | - echo | ||
56 | return $RETVAL | ||
57 | } | ||
58 | |||
59 | @@ -63,15 +61,14 @@ | ||
60 | } | ||
61 | |||
62 | save() { | ||
63 | - echo -n $"Saving $desc ($prog): " | ||
64 | + echo -n "Saving $desc ($prog): " | ||
65 | __EXEC_PATH__/arptables-save > __SYSCONFIG__/arptables || RETVAL=1 | ||
66 | |||
67 | if [ $RETVAL -eq 0 ]; then | ||
68 | - success "$prog saved" | ||
69 | + echo "$prog saved" | ||
70 | else | ||
71 | - failure "$prog saved" | ||
72 | + echo "$prog is not saved" | ||
73 | fi | ||
74 | - echo | ||
75 | } | ||
76 | |||
77 | case "$1" in | ||
diff --git a/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch new file mode 100644 index 000000000..f332658bc --- /dev/null +++ b/meta-networking/recipes-support/arptables/arptables-0.0.3-4/arptables-remove-bashism.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From cd312bc0e3686404428878d23b8888cba09a20e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Thu, 18 Sep 2014 19:46:58 -0700 | ||
4 | Subject: [PATCH] arptables.sysv: remove bashism | ||
5 | |||
6 | Use "." to replace of "source", and change /bin/bash to /bin/sh, the | ||
7 | echo $"foo" works well in busybox. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
12 | --- | ||
13 | arptables.sysv | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/arptables.sysv b/arptables.sysv | ||
17 | index 7a90bd2..7710376 100644 | ||
18 | --- a/arptables.sysv | ||
19 | +++ b/arptables.sysv | ||
20 | @@ -1,4 +1,4 @@ | ||
21 | -#!/bin/bash | ||
22 | +#!/bin/sh | ||
23 | # | ||
24 | # init script for arptables | ||
25 | # | ||
26 | @@ -11,7 +11,7 @@ | ||
27 | # | ||
28 | # config: __SYSCONFIG__/arptables | ||
29 | |||
30 | -source /etc/init.d/functions | ||
31 | +. /etc/init.d/functions | ||
32 | # source /etc/sysconfig/network | ||
33 | |||
34 | # Check that networking is up. | ||
35 | -- | ||
36 | 1.7.9.5 | ||
37 | |||
diff --git a/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb b/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb new file mode 100644 index 000000000..41a55c027 --- /dev/null +++ b/meta-networking/recipes-support/arptables/arptables_0.0.3-4.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | SUMMARY = "Administration tool for arp packet filtering" | ||
2 | PRIORITY = "optional" | ||
3 | LICENSE = "GPL-2.0" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | PR = "r2" | ||
7 | |||
8 | RDEPENDS_${PN} += "perl" | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
11 | SRC_URI = " \ | ||
12 | ${SOURCEFORGE_MIRROR}/ebtables/arptables-v${PV}.tar.gz;name=arptables \ | ||
13 | file://arptables-compile-install.patch \ | ||
14 | file://arptables-init-busybox.patch \ | ||
15 | file://arptables-arpt-get-target-fix.patch \ | ||
16 | file://arptables-remove-bashism.patch \ | ||
17 | " | ||
18 | SRC_URI[arptables.md5sum] = "1d4ab05761f063b0751645d8f2b8f8e5" | ||
19 | SRC_URI[arptables.sha256sum] = "e529fd465c67d69ad335299a043516e6b38cdcd337a5ed21718413e96073f928" | ||
20 | |||
21 | S = "${WORKDIR}/arptables-v${PV}" | ||
22 | |||
23 | do_compile () { | ||
24 | oe_runmake | ||
25 | } | ||
26 | |||
27 | # the install target is not multi-job safe, but it doesn't do much | ||
28 | # so we just install serially | ||
29 | # | ||
30 | PARALLEL_MAKEINST = "-j1" | ||
31 | |||
32 | fakeroot do_install () { | ||
33 | oe_runmake 'BINDIR=${sbindir}' 'MANDIR=${mandir}/' 'DESTDIR=${D}' install | ||
34 | } | ||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc new file mode 100644 index 000000000..feeba7435 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Tools for ethernet bridging" | ||
2 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | DEPENDS = "sysfsutils" | ||
7 | |||
8 | SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \ | ||
9 | file://bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch \ | ||
10 | file://bridge-utils-1.5-fix-error-message-for-incorrect-command.patch \ | ||
11 | file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \ | ||
12 | " | ||
13 | |||
14 | inherit autotools-brokensep update-alternatives | ||
15 | |||
16 | ALTERNATIVE_${PN} = "brctl" | ||
17 | ALTERNATIVE_PRIORITY[brctl] = "100" | ||
18 | ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl" | ||
19 | |||
20 | EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" | ||
21 | |||
22 | do_install_append () { | ||
23 | install -d ${D}/${datadir}/bridge-utils | ||
24 | install -d ${D}/${sysconfdir}/network/if-pre-up.d | ||
25 | install -d ${D}/${sysconfdir}/network/if-post-down.d | ||
26 | } | ||
27 | |||
28 | RRECOMMENDS_${PN} = "kernel-module-bridge" | ||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch new file mode 100644 index 000000000..d00af9c15 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-check-error-returns-from-write-to-sysfs.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From bb9970a9df95837e39d680021b1f73d231e85406 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:52:43 -0700 | ||
8 | Subject: [PATCH 3/3] Check error returns from write to sysfs | ||
9 | |||
10 | Add helper function to check write to sysfs files. | ||
11 | |||
12 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
13 | --- | ||
14 | libbridge/libbridge_devif.c | 37 +++++++++++++++++++++++-------------- | ||
15 | 1 files changed, 23 insertions(+), 14 deletions(-) | ||
16 | |||
17 | diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c | ||
18 | index aa8bc36..1e83925 100644 | ||
19 | --- a/libbridge/libbridge_devif.c | ||
20 | +++ b/libbridge/libbridge_devif.c | ||
21 | @@ -280,25 +280,38 @@ fallback: | ||
22 | return old_get_port_info(brname, port, info); | ||
23 | } | ||
24 | |||
25 | +static int set_sysfs(const char *path, unsigned long value) | ||
26 | +{ | ||
27 | + int fd, ret = 0, cc; | ||
28 | + char buf[32]; | ||
29 | + | ||
30 | + fd = open(path, O_WRONLY); | ||
31 | + if (fd < 0) | ||
32 | + return -1; | ||
33 | + | ||
34 | + cc = snprintf(buf, sizeof(buf), "%lu\n", value); | ||
35 | + if (write(fd, buf, cc) < 0) | ||
36 | + ret = -1; | ||
37 | + close(fd); | ||
38 | + | ||
39 | + return ret; | ||
40 | +} | ||
41 | + | ||
42 | |||
43 | static int br_set(const char *bridge, const char *name, | ||
44 | unsigned long value, unsigned long oldcode) | ||
45 | { | ||
46 | int ret; | ||
47 | char path[SYSFS_PATH_MAX]; | ||
48 | - FILE *f; | ||
49 | |||
50 | - snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name); | ||
51 | + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", | ||
52 | + bridge, name); | ||
53 | |||
54 | - f = fopen(path, "w"); | ||
55 | - if (f) { | ||
56 | - ret = fprintf(f, "%ld\n", value); | ||
57 | - fclose(f); | ||
58 | - } else { | ||
59 | + if ((ret = set_sysfs(path, value)) < 0) { | ||
60 | /* fallback to old ioctl */ | ||
61 | struct ifreq ifr; | ||
62 | unsigned long args[4] = { oldcode, value, 0, 0 }; | ||
63 | - | ||
64 | + | ||
65 | strncpy(ifr.ifr_name, bridge, IFNAMSIZ); | ||
66 | ifr.ifr_data = (char *) &args; | ||
67 | ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr); | ||
68 | @@ -348,14 +361,10 @@ static int port_set(const char *bridge, const char *ifname, | ||
69 | { | ||
70 | int ret; | ||
71 | char path[SYSFS_PATH_MAX]; | ||
72 | - FILE *f; | ||
73 | |||
74 | snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport/%s", ifname, name); | ||
75 | - f = fopen(path, "w"); | ||
76 | - if (f) { | ||
77 | - ret = fprintf(f, "%ld\n", value); | ||
78 | - fclose(f); | ||
79 | - } else { | ||
80 | + | ||
81 | + if ((ret = set_sysfs(path, value)) < 0) { | ||
82 | int index = get_portno(bridge, ifname); | ||
83 | |||
84 | if (index < 0) | ||
85 | -- | ||
86 | 1.7.5.2 | ||
87 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch new file mode 100644 index 000000000..2d0494e53 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-error-message-for-incorrect-command.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From c7ed0996ef58b497d3d30be802ab5ae6c37099b5 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:49:57 -0700 | ||
8 | Subject: [PATCH 2/3] Fix error message for incorrect command | ||
9 | |||
10 | Debian bug 406907 | ||
11 | Error message was refering to incorrect command argument. | ||
12 | |||
13 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
14 | --- | ||
15 | brctl/brctl.c | 2 +- | ||
16 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/brctl/brctl.c b/brctl/brctl.c | ||
19 | index 454b8dd..46ca352 100644 | ||
20 | --- a/brctl/brctl.c | ||
21 | +++ b/brctl/brctl.c | ||
22 | @@ -69,7 +69,7 @@ int main(int argc, char *const* argv) | ||
23 | argc -= optind; | ||
24 | argv += optind; | ||
25 | if ((cmd = command_lookup(*argv)) == NULL) { | ||
26 | - fprintf(stderr, "never heard of command [%s]\n", argv[1]); | ||
27 | + fprintf(stderr, "never heard of command [%s]\n", *argv); | ||
28 | goto help; | ||
29 | } | ||
30 | |||
31 | -- | ||
32 | 1.7.5.2 | ||
33 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch new file mode 100644 index 000000000..6f6d6d423 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/bridge-utils-1.5-fix-incorrect-command-in-manual.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-status: BackPort [http://pkgs.fedoraproject.org/cgit/bridge-utils.git/diff/bridge-utils-1.5-fix-incorrect-command-in-manual.patch?id=b0d10717fd7cebf5d85eed3f941b409fa0384f08] | ||
2 | |||
3 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
4 | |||
5 | From 8ef7b77562b636efcbd8b759eb324d6c069200f2 Mon Sep 17 00:00:00 2001 | ||
6 | From: Stephen Hemminger <shemminger@vyatta.com> | ||
7 | Date: Tue, 3 May 2011 09:48:40 -0700 | ||
8 | Subject: [PATCH 1/3] Fix incorrect command in manual | ||
9 | |||
10 | Command is "setageing" not "setageingtime"; fix man page. | ||
11 | Debian bug report. | ||
12 | |||
13 | Signed-off-by: Petr Sabata <contyk@redhat.com> | ||
14 | --- | ||
15 | doc/brctl.8 | 2 +- | ||
16 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
17 | |||
18 | diff --git a/doc/brctl.8 b/doc/brctl.8 | ||
19 | index d904047..771f323 100644 | ||
20 | --- a/doc/brctl.8 | ||
21 | +++ b/doc/brctl.8 | ||
22 | @@ -89,7 +89,7 @@ data. Machines can move to other ports, network cards can be replaced | ||
23 | .B brctl showmacs <brname> | ||
24 | shows a list of learned MAC addresses for this bridge. | ||
25 | |||
26 | -.B brctl setageingtime <brname> <time> | ||
27 | +.B brctl setageing <brname> <time> | ||
28 | sets the ethernet (MAC) address ageing time, in seconds. After <time> | ||
29 | seconds of not having seen a frame coming from a certain address, the | ||
30 | bridge will time out (delete) that address from the Forwarding | ||
31 | -- | ||
32 | 1.7.5.2 | ||
33 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch b/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch new file mode 100644 index 000000000..de36f0598 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils/kernel-headers.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | include missing kernel header | ||
2 | |||
3 | Fixes errors like | ||
4 | |||
5 | | /b/kraj/jlinux-next/poky/build/tmp-eglibc/sysroots/re-64b/usr/include/linux/if_bridge.h:172:20: error: field 'ip6' has incomplete type | ||
6 | | In file included from ../libbridge/libbridge.h:24:0, | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Index: bridge-utils-1.5/libbridge/libbridge.h | ||
12 | =================================================================== | ||
13 | --- bridge-utils-1.5.orig/libbridge/libbridge.h 2011-03-28 17:52:54.000000000 -0700 | ||
14 | +++ bridge-utils-1.5/libbridge/libbridge.h 2013-03-04 21:16:25.781188309 -0800 | ||
15 | @@ -20,6 +20,7 @@ | ||
16 | #define _LIBBRIDGE_H | ||
17 | |||
18 | #include <sys/socket.h> | ||
19 | +#include <linux/in6.h> | ||
20 | #include <linux/if.h> | ||
21 | #include <linux/if_bridge.h> | ||
22 | |||
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb new file mode 100644 index 000000000..04f863b22 --- /dev/null +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils_1.5.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require bridge-utils.inc | ||
2 | |||
3 | SRC_URI += "file://kernel-headers.patch" | ||
4 | |||
5 | PARALLEL_MAKE = "" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=f9d20a453221a1b7e32ae84694da2c37" | ||
8 | |||
9 | SRC_URI[md5sum] = "ec7b381160b340648dede58c31bb2238" | ||
10 | SRC_URI[sha256sum] = "42f9e5fb8f6c52e63a98a43b81bd281c227c529f194913e1c51ec48a393b6688" | ||
11 | |||
diff --git a/meta-networking/recipes-support/cifs/cifs-utils_git.bb b/meta-networking/recipes-support/cifs/cifs-utils_git.bb new file mode 100644 index 000000000..2b7a0dd66 --- /dev/null +++ b/meta-networking/recipes-support/cifs/cifs-utils_git.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | DESCRIPTION = "A a package of utilities for doing and managing mounts of the Linux CIFS filesystem." | ||
2 | HOMEPAGE = "http://wiki.samba.org/index.php/LinuxCIFS_utils" | ||
3 | |||
4 | LICENSE = "GPLv3 & LGPLv3" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
6 | |||
7 | PV = "5.9" | ||
8 | PR = "r1" | ||
9 | |||
10 | SRCREV = "353d491dcb5d69d31434abeb962c8e9a49c36867" | ||
11 | SRC_URI = "git://git.samba.org/cifs-utils.git" | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | PACKAGECONFIG ??= "" | ||
16 | PACKAGECONFIG[cap] = "--with-libcap,--without-libcap,libcap" | ||
17 | # when enabled, it creates ${bindir}/cifscreds and --ignore-fail-on-non-empty in do_install_append is needed | ||
18 | PACKAGECONFIG[cifscreds] = "--enable-cifscreds,--disable-cifscreds,keyutils" | ||
19 | # when enabled, it creates ${sbindir}/cifs.upcall and --ignore-fail-on-non-empty in do_install_append is needed | ||
20 | PACKAGECONFIG[cifsupcall] = "--enable-cifsupcall,--disable-cifsupcall,krb5 talloc keyutils" | ||
21 | |||
22 | inherit autotools pkgconfig | ||
23 | |||
24 | do_install_append() { | ||
25 | # Remove empty /usr/bin and /usr/sbin directories since the mount helper | ||
26 | # is installed to /sbin | ||
27 | rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${sbindir} | ||
28 | } | ||
29 | |||
30 | RRECOMMENDS_${PN} = "kernel-module-cifs" | ||
diff --git a/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb b/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb new file mode 100644 index 000000000..06c0dd985 --- /dev/null +++ b/meta-networking/recipes-support/cim-schema/cim-schema-docs_2.40.0.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | require cim-schema.inc | ||
2 | |||
3 | LICENSE = "DMTF" | ||
4 | |||
5 | SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-Doc.zip \ | ||
6 | file://LICENSE \ | ||
7 | " | ||
8 | SRC_URI[md5sum] = "3d01940bc1085c6c42184c25fb61f739" | ||
9 | SRC_URI[sha256sum] = "3174cf0f8657b19d80dc59e184778d8e553da424728cb2966fe9d5428dd84267" | ||
10 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" | ||
11 | |||
12 | do_unpack() { | ||
13 | unzip -q ${DL_DIR}/cim_schema_${PV}Final-Doc.zip -d ${S} | ||
14 | cp -f ${FILE_DIRNAME}/files/LICENSE ${WORKDIR}/ | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV}-docs | ||
19 | cp -a ${S}/* ${D}${datadir}/doc/cim-schema-${PV}-docs | ||
20 | } | ||
21 | |||
22 | FILES_${PN} = "${datadir}/doc/*" | ||
23 | FILES_${PN}-doc = "" | ||
diff --git a/meta-networking/recipes-support/cim-schema/cim-schema.inc b/meta-networking/recipes-support/cim-schema/cim-schema.inc new file mode 100644 index 000000000..e35bff69c --- /dev/null +++ b/meta-networking/recipes-support/cim-schema/cim-schema.inc | |||
@@ -0,0 +1,9 @@ | |||
1 | SUMMARY = "Common Information Model (CIM) Schema" | ||
2 | DESCRIPTION = "Common Information Model (CIM) is a model for describing overall\ | ||
3 | management information in a network or enterprise environment. CIM\ | ||
4 | consists of a specification and a schema. The specification defines the\ | ||
5 | details for integration with other management models. The schema\ | ||
6 | provides the actual model descriptions." | ||
7 | |||
8 | HOMEPAGE = "http://www.dmtf.org/" | ||
9 | SECTION = "Development/Libraries" | ||
diff --git a/meta-networking/recipes-support/cim-schema/cim-schema_2.40.0.bb b/meta-networking/recipes-support/cim-schema/cim-schema_2.40.0.bb new file mode 100644 index 000000000..ff6c29dc5 --- /dev/null +++ b/meta-networking/recipes-support/cim-schema/cim-schema_2.40.0.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | require cim-schema.inc | ||
2 | |||
3 | LICENSE = "DMTF" | ||
4 | |||
5 | SRC_URI = "http://dmtf.org/sites/default/files/cim/cim_schema_v2400/cim_schema_${PV}Final-MOFs.zip \ | ||
6 | file://LICENSE \ | ||
7 | " | ||
8 | SRC_URI[md5sum] = "a9bdf17c7374e3b5b7adeaac4842c4ad" | ||
9 | SRC_URI[sha256sum] = "dbfa3064ea427acd71a4bebbc172ca2dc44b0b09a6d83b0945b9ffa988a9058a" | ||
10 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=eecc6f71a56ff3caf17f15bf7aeac7b4" | ||
11 | |||
12 | do_unpack() { | ||
13 | unzip -q ${DL_DIR}/cim_schema_${PV}Final-MOFs.zip -d ${S} | ||
14 | cp -f ${FILE_DIRNAME}/files/LICENSE ${WORKDIR}/ | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -d -m 0755 ${D}${datadir}/mof/cimv${PV}/ | ||
19 | install -d -m 0755 ${D}${datadir}/doc/cim-schema-${PV} | ||
20 | install -m 644 ${WORKDIR}/LICENSE ${D}${datadir}/doc/cim-schema-${PV} | ||
21 | |||
22 | cp -a ${S}/* ${D}${datadir}/mof/cimv${PV}/ | ||
23 | for i in `find ${D}${datadir}/mof/cimv${PV} -name "*.mof"`; do | ||
24 | sed -i -e 's/\r//g' $i | ||
25 | done | ||
26 | ln -s cimv${PV} ${D}${datadir}/mof/cim-current | ||
27 | ln -s cim_schema_${PV}.mof ${D}${datadir}/mof/cim-current/CIM_Schema.mof | ||
28 | } | ||
29 | |||
30 | FILES_${PN} = "${datadir}/mof/* ${datadir}/doc/*" | ||
31 | FILES_${PN}-doc = "" | ||
diff --git a/meta-networking/recipes-support/cim-schema/files/LICENSE b/meta-networking/recipes-support/cim-schema/files/LICENSE new file mode 100644 index 000000000..54a28120e --- /dev/null +++ b/meta-networking/recipes-support/cim-schema/files/LICENSE | |||
@@ -0,0 +1,34 @@ | |||
1 | // Copyright 1998-2008 Distributed Management Task Force, Inc. (DMTF). | ||
2 | // All rights reserved. | ||
3 | // DMTF is a not-for-profit association of industry members dedicated | ||
4 | // to promoting enterprise and systems management and interoperability. | ||
5 | // DMTF specifications and documents may be reproduced by | ||
6 | // members and non-members, provided that correct attribution is given. | ||
7 | // As DMTF specifications may be revised from time to time, | ||
8 | // the particular version and release date should always be noted. | ||
9 | // | ||
10 | // Implementation of certain elements of this standard or proposed | ||
11 | // standard may be subject to third party patent rights, including | ||
12 | // provisional patent rights (herein "patent rights"). DMTF makes | ||
13 | // no representations to users of the standard as to the existence | ||
14 | // of such rights, and is not responsible to recognize, disclose, or | ||
15 | // identify any or all such third party patent right, owners or | ||
16 | // claimants, nor for any incomplete or inaccurate identification or | ||
17 | // disclosure of such rights, owners or claimants. DMTF shall have no | ||
18 | // liability to any party, in any manner or circumstance, under any | ||
19 | // legal theory whatsoever, for failure to recognize, disclose, or | ||
20 | // identify any such third party patent rights, or for such party's | ||
21 | // reliance on the standard or incorporation thereof in its product, | ||
22 | // protocols or testing procedures. DMTF shall have no liability to | ||
23 | // any party implementing such standard, whether such implementation | ||
24 | // is foreseeable or not, nor to any patent owner or claimant, and shall | ||
25 | // have no liability or responsibility for costs or losses incurred if | ||
26 | // a standard is withdrawn or modified after publication, and shall be | ||
27 | // indemnified and held harmless by any party implementing the | ||
28 | // standard from any and all claims of infringement by a patent owner | ||
29 | // for such implementations. | ||
30 | // | ||
31 | // For information about patents held by third-parties which have | ||
32 | // notified the DMTF that, in their opinion, such patent may relate to | ||
33 | // or impact implementations of DMTF standards, visit | ||
34 | // http://www.dmtf.org/about/policies/disclosures.php. | ||
diff --git a/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch b/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch new file mode 100644 index 000000000..dae583d85 --- /dev/null +++ b/meta-networking/recipes-support/curlpp/curlpp/example21.cpp-remove-deprecated-code.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | example21.cpp: remove deprecated code | ||
2 | |||
3 | The deprecated code was no longer used, so remove it to avoid | ||
4 | compiling failure with -Werror=unused-function | ||
5 | ... | ||
6 | | example21.cpp:51:8: error: 'size_t {anonymous}::readData(char*, | ||
7 | size_t, size_t)' defined but not used [-Werror=unused-function] | ||
8 | | size_t readData(char *buffer, size_t size, size_t nitems) | ||
9 | ... | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
14 | --- | ||
15 | examples/example21.cpp | 17 ----------------- | ||
16 | 1 file changed, 17 deletions(-) | ||
17 | |||
18 | diff --git a/examples/example21.cpp b/examples/example21.cpp | ||
19 | --- a/examples/example21.cpp | ||
20 | +++ b/examples/example21.cpp | ||
21 | @@ -39,23 +39,6 @@ | ||
22 | #include <curlpp/Options.hpp> | ||
23 | #include <curlpp/Exception.hpp> | ||
24 | |||
25 | -/* | ||
26 | - anonymous namespace to prevent name clash in case other examples using the same global entities | ||
27 | - would be compiled in the same project | ||
28 | -*/ | ||
29 | -namespace | ||
30 | -{ | ||
31 | - | ||
32 | -char *data = NULL; | ||
33 | - | ||
34 | -size_t readData(char *buffer, size_t size, size_t nitems) | ||
35 | -{ | ||
36 | - strncpy(buffer, data, size * nitems); | ||
37 | - return size * nitems; | ||
38 | -} | ||
39 | - | ||
40 | -} // namespace | ||
41 | - | ||
42 | int main(int argc, char *argv[]) | ||
43 | { | ||
44 | if(argc != 3) { | ||
45 | -- | ||
46 | 1.9.1 | ||
47 | |||
diff --git a/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch b/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch new file mode 100644 index 000000000..ad73c0088 --- /dev/null +++ b/meta-networking/recipes-support/curlpp/curlpp/pkgconfig_fix.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Upstream-Status: Inappropriate [packaging] | ||
2 | |||
3 | |||
4 | Index: curl-7.20.0/libcurl.pc.in | ||
5 | =================================================================== | ||
6 | --- curl-7.20.0.orig/libcurl.pc.in 2009-11-17 18:11:07.000000000 +0000 | ||
7 | +++ curl-7.20.0/libcurl.pc.in 2010-03-25 12:13:26.814051066 +0000 | ||
8 | @@ -35,6 +35,7 @@ | ||
9 | URL: http://curl.haxx.se/ | ||
10 | Description: Library to transfer files with ftp, http, etc. | ||
11 | Version: @CURLVERSION@ | ||
12 | -Libs: -L${libdir} -lcurl @LIBS@ | ||
13 | -Libs.private: @LIBCURL_LIBS@ @LIBS@ | ||
14 | +Requires.private: @GNUTLS_REQUIRED@ | ||
15 | +Libs: -L${libdir} -lcurl | ||
16 | +Libs.private: -ldl -lz | ||
17 | Cflags: -I${includedir} | ||
18 | Index: curl-7.20.0/configure.ac | ||
19 | =================================================================== | ||
20 | --- curl-7.20.0.orig/configure.ac 2010-02-04 21:41:46.000000000 +0000 | ||
21 | +++ curl-7.20.0/configure.ac 2010-03-25 12:12:18.673129001 +0000 | ||
22 | @@ -1668,6 +1668,7 @@ | ||
23 | AC_SUBST(USE_GNUTLS, [1]) | ||
24 | GNUTLS_ENABLED=1 | ||
25 | USE_GNUTLS="yes" | ||
26 | + GNUTLS_REQUIRED="gnutls" | ||
27 | curl_ssl_msg="enabled (GnuTLS)" | ||
28 | ], | ||
29 | [ | ||
30 | @@ -1696,6 +1697,8 @@ | ||
31 | |||
32 | fi dnl OPENSSL != 1 | ||
33 | |||
34 | +AC_SUBST(GNUTLS_REQUIRED) | ||
35 | + | ||
36 | dnl ---------------------------------------------------- | ||
37 | dnl NSS. Only check if GnuTLS and OpenSSL are not enabled | ||
38 | dnl ---------------------------------------------------- | ||
diff --git a/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb b/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb new file mode 100644 index 000000000..48f5178b5 --- /dev/null +++ b/meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb | |||
@@ -0,0 +1,88 @@ | |||
1 | SUMMARY = "C++ library for client-side URL transfers" | ||
2 | HOMEPAGE = "http://code.google.com/p/curlpp/" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
6 | |||
7 | DEPENDS = "curl boost" | ||
8 | DEPENDS_class-native = "curl-native" | ||
9 | |||
10 | SRC_URI = "http://curlpp.googlecode.com/files/curlpp-${PV}.tar.gz \ | ||
11 | file://example21.cpp-remove-deprecated-code.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "ccc3d30d4b3b5d2cdbed635898c29485" | ||
15 | SRC_URI[sha256sum] = "e3f9427b27c5bddf898d383d45c0d3d5397e2056ff935d9a5cdaef6a9a653bd5" | ||
16 | |||
17 | inherit autotools-brokensep pkgconfig binconfig | ||
18 | |||
19 | EXTRA_OECONF = "--prefix=${STAGING_DIR} \ | ||
20 | --with-boost=${STAGING_DIR} \ | ||
21 | " | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}/${includedir}/curlpp | ||
25 | cp -r include/curlpp/* ${D}${includedir}/curlpp | ||
26 | |||
27 | install -d ${D}${includedir}/utilspp | ||
28 | cp -r include/utilspp/* ${D}${includedir}/utilspp | ||
29 | |||
30 | install -d ${D}/${libdir} | ||
31 | install -m 664 src/curlpp/.libs/libcurlpp.a ${D}/${libdir} | ||
32 | install -m 664 src/curlpp/.libs/libcurlpp.lai ${D}/${libdir}/libcurlpp.la | ||
33 | |||
34 | install -m 775 src/curlpp/.libs/libcurlpp.so.0.0.2 ${D}/${libdir} | ||
35 | |||
36 | install -m 664 src/utilspp/.libs/libutilspp.a ${D}/${libdir} | ||
37 | install -m 664 src/utilspp/.libs/libutilspp.lai ${D}/${libdir}/libutilspp.la | ||
38 | |||
39 | install -m 664 src/utilspp/.libs/libutilspp.so.0.0.0 ${D}/${libdir} | ||
40 | |||
41 | install -d ${D}/${libdir}/pkgconfig | ||
42 | install -m 664 curlpp.pc ${D}/${libdir}/pkgconfig | ||
43 | |||
44 | install -d ${D}/${bindir} | ||
45 | install -m 755 curlpp-config ${D}/${bindir} | ||
46 | |||
47 | install -d ${D}/${includedir}/curlpp | ||
48 | install -d ${D}/${includedir}/curlpp/internal | ||
49 | install -d ${D}/${includedir}/utilspp | ||
50 | install -d ${D}/${includedir}/utilspp/functor | ||
51 | install -d ${D}/${includedir}/utilspp/singleton | ||
52 | |||
53 | install -m 664 include/curlpp/config* ${D}/${includedir}/curlpp | ||
54 | install -m 664 include/curlpp/*.h* ${D}/${includedir}/curlpp | ||
55 | install -m 664 include/curlpp/*.inl ${D}/${includedir}/curlpp | ||
56 | |||
57 | install -m 664 include/curlpp/internal/*.h* ${D}/${includedir}/curlpp/internal | ||
58 | install -m 664 include/curlpp/internal/*.inl ${D}/${includedir}/curlpp/internal | ||
59 | |||
60 | install -m 664 include/utilspp/*.h* ${D}/${includedir}/utilspp | ||
61 | install -m 664 include/utilspp/*.inl ${D}/${includedir}/utilspp | ||
62 | |||
63 | install -m 664 include/utilspp/functor/*.h* ${D}/${includedir}/utilspp/functor | ||
64 | install -m 664 include/utilspp/singleton/*.h* ${D}/${includedir}/utilspp/singleton | ||
65 | install -m 664 include/utilspp/singleton/*.inl ${D}/${includedir}/utilspp/singleton | ||
66 | install -m 755 curlpp-config ${D}/${bindir} | ||
67 | } | ||
68 | |||
69 | pkg_postinst_${PN}() { | ||
70 | ln -sf libcurlpp.so.0.0.2 /usr/lib/libcurlpp.so.0 | ||
71 | ln -sf libcurlpp.so.0.0.2 /usr/lib/libcurlpp.so | ||
72 | ln -sf libutilspp.so.0.0.0 /usr/lib/libutilspp.so.0 | ||
73 | ln -sf libutilspp.so.0.0.0 /usr/lib/libutilspp.so | ||
74 | } | ||
75 | |||
76 | PACKAGES =+ "libcurlpp libcurlpp-dev libcurlpp-staticdev" | ||
77 | |||
78 | FILES_lib${BPN} = "${libdir}/lib*.so.* \ | ||
79 | " | ||
80 | |||
81 | FILES_lib${BPN}-dev = "${includedir} \ | ||
82 | ${libdir}/lib*.la \ | ||
83 | ${libdir}/pkgconfig \ | ||
84 | ${bindir}/*-config" | ||
85 | |||
86 | FILES_lib${BPN}-staticdev = "${libdir}/lib*.a" | ||
87 | |||
88 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq.inc b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc new file mode 100644 index 000000000..133524598 --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq.inc | |||
@@ -0,0 +1,66 @@ | |||
1 | SUMMARY = "Lightweight, easy to configure DNS forwarder and DHCP server" | ||
2 | HOMEPAGE = "http://www.thekelleys.org.uk/dnsmasq/doc.html" | ||
3 | SECTION = "console/network" | ||
4 | # GPLv3 was added in version 2.41 as license option | ||
5 | LICENSE = "GPLv2 | GPLv3" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
7 | file://COPYING-v3;md5=d32239bcb673463ab874e80d47fae504" | ||
8 | |||
9 | #at least versions 2.15 and prior are moved to the archive folder on the server | ||
10 | SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getVar('PV',1).split('.')[1]) > 15]}dnsmasq-${PV}.tar.gz;name=dnsmasq-${PV} \ | ||
11 | file://init \ | ||
12 | file://dnsmasq.conf \ | ||
13 | file://dnsmasq.service \ | ||
14 | " | ||
15 | |||
16 | inherit pkgconfig update-rc.d systemd | ||
17 | |||
18 | INITSCRIPT_NAME = "dnsmasq" | ||
19 | INITSCRIPT_PARAMS = "defaults" | ||
20 | |||
21 | PACKAGECONFIG ?= "" | ||
22 | PACKAGECONFIG[dbus] = ",,dbus" | ||
23 | PACKAGECONFIG[idn] = ",,libidn" | ||
24 | PACKAGECONFIG[conntrack] = ",,libnetfilter-conntrack" | ||
25 | PACKAGECONFIG[lua] = ",,lua" | ||
26 | EXTRA_OEMAKE = "\ | ||
27 | 'COPTS=${@base_contains('PACKAGECONFIG', 'dbus', '-DHAVE_DBUS', '', d)} \ | ||
28 | ${@base_contains('PACKAGECONFIG', 'idn', '-DHAVE_IDN', '', d)} \ | ||
29 | ${@base_contains('PACKAGECONFIG', 'conntrack', '-DHAVE_CONNTRACK', '', d)} \ | ||
30 | ${@base_contains('PACKAGECONFIG', 'lua', '-DHAVE_LUASCRIPT', '', d)}' \ | ||
31 | 'CFLAGS=${CFLAGS}' \ | ||
32 | 'LDFLAGS=${LDFLAGS}' \ | ||
33 | " | ||
34 | |||
35 | do_compile_append() { | ||
36 | # build dhcp_release | ||
37 | cd ${S}/contrib/wrt | ||
38 | oe_runmake | ||
39 | } | ||
40 | |||
41 | do_install () { | ||
42 | oe_runmake "PREFIX=${D}${prefix}" \ | ||
43 | "BINDIR=${D}${bindir}" \ | ||
44 | "MANDIR=${D}${mandir}" \ | ||
45 | install | ||
46 | install -d ${D}${sysconfdir}/ ${D}${sysconfdir}/init.d ${D}${sysconfdir}/dnsmasq.d | ||
47 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}${sysconfdir}/ | ||
48 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/dnsmasq | ||
49 | |||
50 | install -d ${D}${systemd_unitdir}/system | ||
51 | install -m 0644 ${WORKDIR}/dnsmasq.service ${D}${systemd_unitdir}/system | ||
52 | |||
53 | install -m 0755 ${S}/contrib/wrt/dhcp_release ${D}${bindir} | ||
54 | |||
55 | if [ "${@base_contains('PACKAGECONFIG', 'dbus', 'dbus', '', d)}" != "" ]; then | ||
56 | install -d ${D}${sysconfdir}/dbus-1/system.d | ||
57 | install -m 644 dbus/dnsmasq.conf ${D}${sysconfdir}/dbus-1/system.d/ | ||
58 | fi | ||
59 | } | ||
60 | |||
61 | CONFFILES_${PN} = "${sysconfdir}/dnsmasq.conf" | ||
62 | |||
63 | RPROVIDES_${PN} += "${PN}-systemd" | ||
64 | RREPLACES_${PN} += "${PN}-systemd" | ||
65 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
66 | SYSTEMD_SERVICE_${PN} = "dnsmasq.service" | ||
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch b/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch new file mode 100644 index 000000000..918c0b6d5 --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq/lua.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 1e5be0a0bcf85913d63408030dec038d360a5fa6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe MacDonald <joe_macdonald@mentor.com> | ||
3 | Date: Tue, 9 Sep 2014 10:24:58 -0400 | ||
4 | Subject: [PATCH] Upstream-status: Inappropriate [OE specific] | ||
5 | |||
6 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
7 | |||
8 | --- | ||
9 | Makefile | 4 ++-- | ||
10 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/Makefile b/Makefile | ||
13 | index fc38393..a79f8bf 100644 | ||
14 | --- a/Makefile | ||
15 | +++ b/Makefile | ||
16 | @@ -57,8 +57,8 @@ idn_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) - | ||
17 | idn_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` | ||
18 | ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack` | ||
19 | ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack` | ||
20 | -lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.1` | ||
21 | -lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua5.1` | ||
22 | +lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua` | ||
23 | +lua_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --libs lua` | ||
24 | nettle_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --cflags nettle hogweed` | ||
25 | nettle_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --libs nettle hogweed` | ||
26 | gmp_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DNSSEC $(PKG_CONFIG) --copy -lgmp` | ||
27 | -- | ||
28 | 1.7.9.5 | ||
29 | |||
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq/parallel-make.patch b/meta-networking/recipes-support/dnsmasq/dnsmasq/parallel-make.patch new file mode 100644 index 000000000..6d5b722ea --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq/parallel-make.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | The dnsmasq target depends on .configured and $(objs). .configured does an rm | ||
2 | -f *.o. Yet the only thing telling make to build the .configured target before | ||
3 | the $(objs) target was the order of the dependencies of the dnsmasq target. We | ||
4 | can't rely on that order when doing a paralllel make build, so add an explicit | ||
5 | rule to enforce that order. | ||
6 | |||
7 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
8 | Upstream-status: Pending | ||
9 | |||
10 | --- dnsmasq-2.68.orig/Makefile | ||
11 | +++ dnsmasq-2.68/Makefile | ||
12 | @@ -139,6 +139,8 @@ bloatcheck : $(BUILDDIR)/dnsmasq_baselin | ||
13 | @rm -f *.o | ||
14 | @touch $@ | ||
15 | |||
16 | +$(objs): .configured | ||
17 | + | ||
18 | $(objs:.o=.c) $(hdrs): | ||
19 | ln -s $(top)/$(SRC)/$@ . | ||
diff --git a/meta-networking/recipes-support/dnsmasq/dnsmasq_2.71.bb b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.71.bb new file mode 100644 index 000000000..ccc567e7f --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/dnsmasq_2.71.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require dnsmasq.inc | ||
2 | |||
3 | SRC_URI += "\ | ||
4 | file://parallel-make.patch \ | ||
5 | file://lua.patch \ | ||
6 | " | ||
7 | |||
8 | SRC_URI[dnsmasq-2.71.md5sum] = "15a68f7f6cc0119e843f67d2f79598f1" | ||
9 | SRC_URI[dnsmasq-2.71.sha256sum] = "7d8c64f66a396442e01b639df3ea6b4e02ba88cbe206c80be8de68b6841634c4" | ||
10 | |||
diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf new file mode 100755 index 000000000..1a198a379 --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.conf | |||
@@ -0,0 +1,293 @@ | |||
1 | # Configuration file for dnsmasq. | ||
2 | # | ||
3 | # Format is one option per line, legal options are the same | ||
4 | # as the long options legal on the command line. See | ||
5 | # "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. | ||
6 | |||
7 | # Change these lines if you want dnsmasq to serve MX records. | ||
8 | # Only one of mx-host and mx-target need be set, the other defaults | ||
9 | # to the name of the host running dnsmasq. | ||
10 | #mx-host= | ||
11 | #mx-target= | ||
12 | #selfmx | ||
13 | #localmx | ||
14 | |||
15 | # The following two options make you a better netizen, since they | ||
16 | # tell dnsmasq to filter out queries which the public DNS cannot | ||
17 | # answer, and which load the servers (especially the root servers) | ||
18 | # uneccessarily. If you have a dial-on-demand link they also stop | ||
19 | # these requests from bringing up the link uneccessarily. | ||
20 | |||
21 | # Never forward plain names (with a dot or domain part) | ||
22 | domain-needed | ||
23 | # Never forward addresses in the non-routed address spaces. | ||
24 | bogus-priv | ||
25 | |||
26 | |||
27 | # Uncomment this to filter useless windows-originated DNS requests | ||
28 | # which can trigger dial-on-demand links needlessly. | ||
29 | # Note that (amongst other things) this blocks all SRV requests, | ||
30 | # so don't use it if you use eg Kerberos. | ||
31 | #filterwin2k | ||
32 | |||
33 | # Change this line if you want dns to get its upstream servers from | ||
34 | # somewhere other that /etc/resolv.conf | ||
35 | #resolv-file= | ||
36 | |||
37 | # By default, dnsmasq will send queries to any of the upstream | ||
38 | # servers it knows about and tries to favour servers to are known | ||
39 | # to be up. Uncommenting this forces dnsmasq to try each query | ||
40 | # with each server strictly in the order they appear in | ||
41 | # /etc/resolv.conf | ||
42 | #strict-order | ||
43 | |||
44 | # If you don't want dnsmasq to read /etc/resolv.conf or any other | ||
45 | # file, getting its servers for this file instead (see below), then | ||
46 | # uncomment this | ||
47 | #no-resolv | ||
48 | |||
49 | # If you don't want dnsmasq to poll /etc/resolv.conf or other resolv | ||
50 | # files for changes and re-read them then uncomment this. | ||
51 | #no-poll | ||
52 | |||
53 | # Add other name servers here, with domain specs if they are for | ||
54 | # non-public domains. | ||
55 | #server=/localnet/192.168.0.1 | ||
56 | |||
57 | # Add local-only domains here, queries in these domains are answered | ||
58 | # from /etc/hosts or DHCP only. | ||
59 | #local=/localnet/ | ||
60 | |||
61 | # Add domains which you want to force to an IP address here. | ||
62 | # The example below send any host in doubleclick.net to a local | ||
63 | # webserver. | ||
64 | #address=/doubleclick.net/127.0.0.1 | ||
65 | |||
66 | # You no longer (as of version 1.7) need to set these to enable | ||
67 | # dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the | ||
68 | # "dip" group to achieve this. | ||
69 | #user= | ||
70 | #group= | ||
71 | |||
72 | # If you want dnsmasq to listen for requests only on specified interfaces | ||
73 | # (and the loopback) give the name of the interface (eg eth0) here. | ||
74 | # Repeat the line for more than one interface. | ||
75 | #interface= | ||
76 | # Or you can specify which interface _not_ to listen on | ||
77 | #except-interface= | ||
78 | # Or which to listen on by address (remember to include 127.0.0.1 if | ||
79 | # you use this.) | ||
80 | #listen-address= | ||
81 | |||
82 | # On systems which support it, dnsmasq binds the wildcard address, | ||
83 | # even when it is listening on only some interfaces. It then discards | ||
84 | # requests that it shouldn't reply to. This has the advantage of | ||
85 | # working even when interfaces come and go and change address. If you | ||
86 | # want dnsmasq to really bind only the interfaces it is listening on, | ||
87 | # uncomment this option. About the only time you may need this is when | ||
88 | # running another nameserver on the same machine. | ||
89 | #bind-interfaces | ||
90 | |||
91 | # If you don't want dnsmasq to read /etc/hosts, uncomment the | ||
92 | # following line. | ||
93 | #no-hosts | ||
94 | # or if you want it to read another file, as well as /etc/hosts, use | ||
95 | # this. | ||
96 | #addn-hosts=/etc/banner_add_hosts | ||
97 | |||
98 | # Set this (and domain: see below) if you want to have a domain | ||
99 | # automatically added to simple names in a hosts-file. | ||
100 | #expand-hosts | ||
101 | |||
102 | # Set the domain for dnsmasq. this is optional, but if it is set, it | ||
103 | # does the following things. | ||
104 | # 1) Allows DHCP hosts to have fully qualified domain names, as long | ||
105 | # as the domain part matches this setting. | ||
106 | # 2) Sets the "domain" DHCP option thereby potentially setting the | ||
107 | # domain of all systems configured by DHCP | ||
108 | # 3) Provides the domain part for "expand-hosts" | ||
109 | #domain=thekelleys.org.uk | ||
110 | |||
111 | # Uncomment this to enable the integrated DHCP server, you need | ||
112 | # to supply the range of addresses available for lease and optionally | ||
113 | # a lease time. If you have more than one network, you will need to | ||
114 | # repeat this for each network on which you want to supply DHCP | ||
115 | # service. | ||
116 | #dhcp-range=192.168.0.50,192.168.0.150,12h | ||
117 | dhcp-range=10.0.0.10,10.0.0.200,2h | ||
118 | |||
119 | # This is an example of a DHCP range where the netmask is given. This | ||
120 | # is needed for networks we reach the dnsmasq DHCP server via a relay | ||
121 | # agent. If you don't know what a DHCP relay agent is, you probably | ||
122 | # don't need to worry about this. | ||
123 | #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h | ||
124 | |||
125 | # This is an example of a DHCP range with a network-id, so that | ||
126 | # some DHCP options may be set only for this network. | ||
127 | #dhcp-range=red,192.168.0.50,192.168.0.150 | ||
128 | |||
129 | # Supply parameters for specified hosts using DHCP. There are lots | ||
130 | # of valid alternatives, so we will give examples of each. Note that | ||
131 | # IP addresses DO NOT have to be in the range given above, they just | ||
132 | # need to be on the same network. The order of the parameters in these | ||
133 | # do not matter, it's permissble to give name,adddress and MAC in any order | ||
134 | |||
135 | # Always allocate the host with ethernet address 11:22:33:44:55:66 | ||
136 | # The IP address 192.168.0.60 | ||
137 | #dhcp-host=11:22:33:44:55:66,192.168.0.60 | ||
138 | |||
139 | # Always set the name of the host with hardware address | ||
140 | # 11:22:33:44:55:66 to be "fred" | ||
141 | #dhcp-host=11:22:33:44:55:66,fred | ||
142 | |||
143 | # Always give the host with ethernet address 11:22:33:44:55:66 | ||
144 | # the name fred and IP address 192.168.0.60 and lease time 45 minutes | ||
145 | #dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m | ||
146 | |||
147 | # Give the machine which says it's name is "bert" IP address | ||
148 | # 192.168.0.70 and an infinite lease | ||
149 | #dhcp-host=bert,192.168.0.70,infinite | ||
150 | |||
151 | # Always give the host with client identifier 01:02:02:04 | ||
152 | # the IP address 192.168.0.60 | ||
153 | #dhcp-host=id:01:02:02:04,192.168.0.60 | ||
154 | |||
155 | # Always give the host with client identifier "marjorie" | ||
156 | # the IP address 192.168.0.60 | ||
157 | #dhcp-host=id:marjorie,192.168.0.60 | ||
158 | |||
159 | # Enable the address given for "judge" in /etc/hosts | ||
160 | # to be given to a machine presenting the name "judge" when | ||
161 | # it asks for a DHCP lease. | ||
162 | #dhcp-host=judge | ||
163 | |||
164 | # Never offer DHCP service to a machine whose ethernet | ||
165 | # address is 11:22:33:44:55:66 | ||
166 | #dhcp-host=11:22:33:44:55:66,ignore | ||
167 | |||
168 | # Ignore any client-id presented by the machine with ethernet | ||
169 | # address 11:22:33:44:55:66. This is useful to prevent a machine | ||
170 | # being treated differently when running under different OS's or | ||
171 | # between PXE boot and OS boot. | ||
172 | #dhcp-host=11:22:33:44:55:66,id:* | ||
173 | |||
174 | # Send extra options which are tagged as "red" to | ||
175 | # the machine with ethernet address 11:22:33:44:55:66 | ||
176 | #dhcp-host=11:22:33:44:55:66,net:red | ||
177 | |||
178 | # Send extra options which are tagged as "red" to any machine whose | ||
179 | # DHCP vendorclass string includes the substring "Linux" | ||
180 | #dhcp-vendorclass=red,Linux | ||
181 | |||
182 | # Send extra options which are tagged as "red" to any machine one | ||
183 | # of whose DHCP userclass strings includes the substring "accounts" | ||
184 | #dhcp-userclass=red,accounts | ||
185 | |||
186 | # If this line is uncommented, dnsmasq will read /etc/ethers and act | ||
187 | # on the ethernet-address/IP pairs found there just as if they had | ||
188 | # been given as --dhcp-host options. Useful if you keep | ||
189 | # MAC-address/host mappings there for other purposes. | ||
190 | #read-ethers | ||
191 | |||
192 | # Send options to hosts which ask for a DHCP lease. | ||
193 | # See RFC 2132 for details of available options. | ||
194 | # Note that all the common settings, such as netmask and | ||
195 | # broadcast address, DNS server and default route, are given | ||
196 | # sane defaults by dnsmasq. You very likely will not need any | ||
197 | # any dhcp-options. If you use Windows clients and Samba, there | ||
198 | # are some options which are recommended, they are detailed at the | ||
199 | # end of this section. | ||
200 | # For reference, the common options are: | ||
201 | # subnet mask - 1 | ||
202 | # default router - 3 | ||
203 | # DNS server - 6 | ||
204 | # broadcast address - 28 | ||
205 | |||
206 | # Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 | ||
207 | #dhcp-option=42,192.168.0.4,10.10.0.5 | ||
208 | |||
209 | # Set the NTP time server address to be the same machine as | ||
210 | # is running dnsmasq | ||
211 | #dhcp-option=42,0.0.0.0 | ||
212 | |||
213 | # Set the NIS domain name to "welly" | ||
214 | #dhcp-option=40,welly | ||
215 | |||
216 | # Set the default time-to-live to 50 | ||
217 | #dhcp-option=23,50 | ||
218 | |||
219 | # Set the "all subnets are local" flag | ||
220 | #dhcp-option=27,1 | ||
221 | |||
222 | # Send the etherboot magic flag and then etherboot options (a string). | ||
223 | #dhcp-option=128,e4:45:74:68:00:00 | ||
224 | #dhcp-option=129,NIC=eepro100 | ||
225 | |||
226 | # Specify an option which will only be sent to the "red" network | ||
227 | # (see dhcp-range for the declaration of the "red" network) | ||
228 | #dhcp-option=red,42,192.168.1.1 | ||
229 | |||
230 | # The following DHCP options set up dnsmasq in the same way as is specified | ||
231 | # for the ISC dhcpcd in | ||
232 | # http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt | ||
233 | # adapted for a typical dnsmasq installation where the host running | ||
234 | # dnsmasq is also the host running samba. | ||
235 | # you may want to uncomment them if you use Windows clients and Samba. | ||
236 | #dhcp-option=19,0 # option ip-forwarding off | ||
237 | #dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) | ||
238 | #dhcp-option=45,0.0.0.0 # netbios datagram distribution server | ||
239 | #dhcp-option=46,8 # netbios node type | ||
240 | #dhcp-option=47 # empty netbios scope. | ||
241 | |||
242 | |||
243 | # Set the boot filename and tftpd server name and address | ||
244 | # for BOOTP. You will only need this is you want to | ||
245 | # boot machines over the network. | ||
246 | #dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 | ||
247 | |||
248 | # Set the limit on DHCP leases, the default is 150 | ||
249 | #dhcp-lease-max=150 | ||
250 | |||
251 | # The DHCP server needs somewhere on disk to keep its lease database. | ||
252 | # This defaults to a sane location, but if you want to change it, use | ||
253 | # the line below. | ||
254 | #dhcp-leasefile=/var/lib/misc/dnsmasq.leases | ||
255 | |||
256 | # Set the cachesize here. | ||
257 | #cache-size=150 | ||
258 | |||
259 | # If you want to disable negative caching, uncomment this. | ||
260 | #no-negcache | ||
261 | |||
262 | # Normally responses which come form /etc/hosts and the DHCP lease | ||
263 | # file have Time-To-Live set as zero, which conventionally means | ||
264 | # do not cache further. If you are happy to trade lower load on the | ||
265 | # server for potentially stale date, you can set a time-to-live (in | ||
266 | # seconds) here. | ||
267 | #local-ttl= | ||
268 | |||
269 | # If you want dnsmasq to detect attempts by Verisign to send queries | ||
270 | # to unregistered .com and .net hosts to its sitefinder service and | ||
271 | # have dnsmasq instead return the correct NXDOMAIN response, uncomment | ||
272 | # this line. You can add similar lines to do the same for other | ||
273 | # registries which have implemented wildcard A records. | ||
274 | #bogus-nxdomain=64.94.110.11 | ||
275 | |||
276 | # If you want to fix up DNS results from upstream servers, use the | ||
277 | # alias option. This only works for IPv4. | ||
278 | # This alias makes a result of 1.2.3.4 appear as 5.6.7.8 | ||
279 | #alias=1.2.3.4,5.6.7.8 | ||
280 | # and this maps 1.2.3.x to 5.6.7.x | ||
281 | #alias=1.2.3.0,5.6.7.0,255.255.255.0 | ||
282 | |||
283 | # For debugging purposes, log each DNS query as it passes through | ||
284 | # dnsmasq. | ||
285 | #log-queries | ||
286 | |||
287 | # Include a another lot of configuration options. | ||
288 | #conf-file=/etc/dnsmasq.more.conf | ||
289 | |||
290 | |||
291 | |||
292 | |||
293 | |||
diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service new file mode 100644 index 000000000..549e15e2b --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service | |||
@@ -0,0 +1,13 @@ | |||
1 | [Unit] | ||
2 | Description=DNS forwarder and DHCP server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/run/dnsmasq.pid | ||
8 | ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid | ||
9 | ExecReload=/bin/kill -HUP $(/bin/cat /run/dnsmasq.pid) | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||
13 | |||
diff --git a/meta-networking/recipes-support/dnsmasq/files/init b/meta-networking/recipes-support/dnsmasq/files/init new file mode 100644 index 000000000..d1aa9e517 --- /dev/null +++ b/meta-networking/recipes-support/dnsmasq/files/init | |||
@@ -0,0 +1,52 @@ | |||
1 | #!/bin/sh | ||
2 | DAEMON=/usr/bin/dnsmasq | ||
3 | NAME=dnsmasq | ||
4 | DESC="DNS forwarder and DHCP server" | ||
5 | ARGS="-7 /etc/dnsmasq.d" | ||
6 | |||
7 | test -f $DAEMON || exit 0 | ||
8 | |||
9 | set -e | ||
10 | |||
11 | case "$1" in | ||
12 | start) | ||
13 | echo -n "starting $DESC: $NAME... " | ||
14 | test -d /var/lib/misc/ || mkdir /var/lib/misc/ | ||
15 | start-stop-daemon -S -x $DAEMON -- $ARGS | ||
16 | echo "done." | ||
17 | ;; | ||
18 | stop) | ||
19 | echo -n "stopping $DESC: $NAME... " | ||
20 | start-stop-daemon -K -x $DAEMON | ||
21 | echo "done." | ||
22 | ;; | ||
23 | status) | ||
24 | echo -n "dnsmasq " | ||
25 | start-stop-daemon -q -K -t -x $DAEMON | ||
26 | RET=$? | ||
27 | if [ "$RET" = "0" ]; then | ||
28 | PID=`cat /var/run/dnsmasq.pid` | ||
29 | echo "($PID) is running" | ||
30 | else | ||
31 | echo "is not running" | ||
32 | exit $RET | ||
33 | fi | ||
34 | ;; | ||
35 | restart) | ||
36 | echo "restarting $DESC: $NAME... " | ||
37 | $0 stop | ||
38 | $0 start | ||
39 | echo "done." | ||
40 | ;; | ||
41 | reload) | ||
42 | echo -n "reloading $DESC: $NAME... " | ||
43 | killall -HUP $(basename ${DAEMON}) | ||
44 | echo "done." | ||
45 | ;; | ||
46 | *) | ||
47 | echo "Usage: $0 {start|stop|status|restart|reload}" | ||
48 | exit 1 | ||
49 | ;; | ||
50 | esac | ||
51 | |||
52 | exit 0 | ||
diff --git a/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch b/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch new file mode 100644 index 000000000..6f5c279be --- /dev/null +++ b/meta-networking/recipes-support/dovecot/dovecot/0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | From 483f120603ada8db680085e3f462396da937e036 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Wed, 8 Jan 2014 09:30:36 +0100 | ||
4 | Subject: [PATCH] configure.ac: convert AC_TRY_RUN to AC_TRY_LINK statements | ||
5 | |||
6 | This is not completely safe, but it's the least invasive fix. | ||
7 | |||
8 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
9 | Upstream-status: Inappropriate | ||
10 | --- | ||
11 | configure.ac | 23 +++++++---------------- | ||
12 | 1 file changed, 7 insertions(+), 16 deletions(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index 95984bb..dff1f87 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -499,13 +499,10 @@ have_ioloop=no | ||
19 | |||
20 | if test "$ioloop" = "best" || test "$ioloop" = "epoll"; then | ||
21 | AC_CACHE_CHECK([whether we can use epoll],i_cv_epoll_works,[ | ||
22 | - AC_TRY_RUN([ | ||
23 | + AC_TRY_LINK([ | ||
24 | #include <sys/epoll.h> | ||
25 | - | ||
26 | - int main() | ||
27 | - { | ||
28 | - return epoll_create(5) < 1; | ||
29 | - } | ||
30 | + ], [ | ||
31 | + epoll_create(5) < 1; | ||
32 | ], [ | ||
33 | i_cv_epoll_works=yes | ||
34 | ], [ | ||
35 | @@ -551,15 +548,13 @@ have_notify=none | ||
36 | if test "$notify" = "" || test "$notify" = "inotify" ; then | ||
37 | dnl * inotify? | ||
38 | AC_CACHE_CHECK([whether we can use inotify],i_cv_inotify_works,[ | ||
39 | - AC_TRY_RUN([ | ||
40 | + AC_TRY_LINK([ | ||
41 | #define _GNU_SOURCE | ||
42 | #include <sys/ioctl.h> | ||
43 | #include <fcntl.h> | ||
44 | #include <sys/inotify.h> | ||
45 | #include <stdio.h> | ||
46 | - | ||
47 | - int main() | ||
48 | - { | ||
49 | + ], [ | ||
50 | int wd, fd; | ||
51 | char * fn = "/tmp"; | ||
52 | |||
53 | @@ -581,8 +576,6 @@ if test "$notify" = "" || test "$notify" = "inotify" ; then | ||
54 | inotify_rm_watch (fd, wd); | ||
55 | |||
56 | close (fd); | ||
57 | - return 0; | ||
58 | - } | ||
59 | ], [ | ||
60 | i_cv_inotify_works=yes | ||
61 | ], [ | ||
62 | @@ -670,7 +663,7 @@ fi | ||
63 | dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. | ||
64 | dnl * It may also be broken in AIX. | ||
65 | AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ | ||
66 | - AC_TRY_RUN([ | ||
67 | + AC_TRY_LINK([ | ||
68 | #define _XOPEN_SOURCE 600 | ||
69 | #include <stdio.h> | ||
70 | #include <stdlib.h> | ||
71 | @@ -679,7 +672,7 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ | ||
72 | #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7) | ||
73 | possibly broken posix_fallocate | ||
74 | #endif | ||
75 | - int main() { | ||
76 | + ], [ | ||
77 | int fd = creat("conftest.temp", 0600); | ||
78 | int ret; | ||
79 | if (fd == -1) { | ||
80 | @@ -688,8 +681,6 @@ AC_CACHE_CHECK([whether posix_fallocate() works],i_cv_posix_fallocate_works,[ | ||
81 | } | ||
82 | ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; | ||
83 | unlink("conftest.temp"); | ||
84 | - return ret; | ||
85 | - } | ||
86 | ], [ | ||
87 | i_cv_posix_fallocate_works=yes | ||
88 | ], [ | ||
89 | -- | ||
90 | 1.8.4.2 | ||
91 | |||
diff --git a/meta-networking/recipes-support/dovecot/dovecot/building-rquota_xdr.c-depend-on-rquota.h.patch b/meta-networking/recipes-support/dovecot/dovecot/building-rquota_xdr.c-depend-on-rquota.h.patch new file mode 100644 index 000000000..11d9d8c0d --- /dev/null +++ b/meta-networking/recipes-support/dovecot/dovecot/building-rquota_xdr.c-depend-on-rquota.h.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | [PATCH] building rquota_xdr.c depends on rquota.h | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | rquota.h is generated automatically, and building rquota_xdr.c | ||
6 | needs rquota.h, so add the dependency on rquota.h for rquota_xdr.c | ||
7 | |||
8 | Signed-off-by: rongqing li <rli2@yow-blade4.wrs.com> | ||
9 | --- | ||
10 | src/plugins/quota/Makefile.am | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/src/plugins/quota/Makefile.am b/src/plugins/quota/Makefile.am | ||
14 | index 8a6988d..3626d79 100644 | ||
15 | --- a/src/plugins/quota/Makefile.am | ||
16 | +++ b/src/plugins/quota/Makefile.am | ||
17 | @@ -70,7 +70,7 @@ RQUOTA_XDR = rquota_xdr.c | ||
18 | RQUOTA_XDR_LO = rquota_xdr.lo | ||
19 | #RQUOTA_X = /usr/include/rpcsvc/rquota.x | ||
20 | RQUOTA_X = $(srcdir)/rquota.x | ||
21 | -rquota_xdr.c: Makefile $(RQUOTA_X) | ||
22 | +rquota_xdr.c: Makefile $(RQUOTA_X) rquota.h | ||
23 | if [ "$(top_srcdir)" != "$(top_builddir)" ]; then \ | ||
24 | cp $(RQUOTA_X) $(top_builddir)/src/plugins/quota/; \ | ||
25 | fi; \ | ||
26 | -- | ||
27 | 1.8.2.1 | ||
28 | |||
diff --git a/meta-networking/recipes-support/dovecot/dovecot_2.2.10.bb b/meta-networking/recipes-support/dovecot/dovecot_2.2.10.bb new file mode 100644 index 000000000..f733a7832 --- /dev/null +++ b/meta-networking/recipes-support/dovecot/dovecot_2.2.10.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | SUMMARY = "Dovecot is an open source IMAP and POP3 email server" | ||
2 | DESCRIPTION = "Dovecot is an open source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. Dovecot is an excellent choice for both small and large installations. It's fast, simple to set up, requires no special administration and it uses very little memory." | ||
3 | |||
4 | LICENSE = "LGPLv2.1 & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=a981379bd0f1c362f8d1d21515e5b30b" | ||
6 | |||
7 | SRC_URI = "http://dovecot.org/releases/2.2/dovecot-${PV}.tar.gz \ | ||
8 | file://0001-configure.ac-convert-AC_TRY_RUN-to-AC_TRY_LINK-state.patch \ | ||
9 | file://building-rquota_xdr.c-depend-on-rquota.h.patch \ | ||
10 | " | ||
11 | SRC_URI[md5sum] = "037e9c9e07d9dbff54dcff09f280fc8c" | ||
12 | SRC_URI[sha256sum] = "75592483d40dc4f76cc3b41af40caa4be80478946a699d46846d5d03e4d2e09b" | ||
13 | |||
14 | DEPENDS = "openssl xz zlib bzip2 libcap" | ||
15 | |||
16 | inherit autotools pkgconfig | ||
17 | |||
18 | PACKAGECONFIG ??= " \ | ||
19 | ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \ | ||
20 | ${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | ||
21 | " | ||
22 | |||
23 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," | ||
24 | PACKAGECONFIG[ldap] = "--with-ldap=plugin,--without-ldap,openldap," | ||
25 | |||
26 | # From native build in armv7a-hf/eglibc | ||
27 | CACHED_CONFIGUREVARS += "i_cv_signed_size_t=no \ | ||
28 | i_cv_gmtime_max_time_t=32 \ | ||
29 | i_cv_signed_time_t=yes \ | ||
30 | i_cv_mmap_plays_with_write=yes \ | ||
31 | i_cv_fd_passing=yes \ | ||
32 | i_cv_c99_vsnprintf=yes \ | ||
33 | lib_cv___va_copy=yes \ | ||
34 | lib_cv_va_copy=yes \ | ||
35 | lib_cv_va_val_copy=yes \ | ||
36 | " | ||
37 | |||
38 | # hardcode epoll() to avoid running unsafe tests | ||
39 | # BSD needs kqueue and uclibc poll() | ||
40 | EXTRA_OECONF = " --with-ioloop=epoll" | ||
41 | |||
42 | FILES_${PN}-staticdev += "${libdir}/dovecot/*/*.a" | ||
43 | FILES_${PN}-dev += "${libdir}/dovecot/*.so" | ||
44 | FILES_${PN}-dbg += "${libdir}/dovecot/*/.debug" | ||
45 | |||
diff --git a/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb b/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb new file mode 100644 index 000000000..a45f74699 --- /dev/null +++ b/meta-networking/recipes-support/fetchmail/fetchmail_6.3.26.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Fetchmail retrieves mail from remote mail servers and forwards it via SMTP" | ||
2 | DESCRIPTION = "Fetchmail is a full-featured, robust, well-documented remote-mail retrieval and forwarding utility intended to be used over on-demand TCP/IP links (such as SLIP or PPP connections). It supports every remote-mail protocol now in use on the Internet: POP2, POP3, RPOP, APOP, KPOP, all flavors of IMAP, ETRN, and ODMR. It can even support IPv6 and IPSEC." | ||
3 | |||
4 | LICENSE = "GPLv2 & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=fbb509e0303f5ded1cbfc0cc8705f28c" | ||
6 | |||
7 | DEPENDS = "openssl" | ||
8 | |||
9 | SRC_URI = "http://download.berlios.de/fetchmail/fetchmail-${PV}.tar.xz" | ||
10 | SRC_URI[md5sum] = "61b66faad044afa26e142bb1791aa2b3" | ||
11 | SRC_URI[sha256sum] = "79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850" | ||
12 | |||
13 | inherit autotools gettext python-dir pythonnative | ||
14 | |||
15 | EXTRA_OECONF = "--with-ssl=${STAGING_DIR_HOST}${prefix}" | ||
16 | |||
17 | PACKAGES =+ "fetchmail-python" | ||
18 | FILES_fetchmail-python = "${libdir}/${PYTHON_DIR}/*" | ||
diff --git a/meta-networking/recipes-support/fping/fping_3.5.bb b/meta-networking/recipes-support/fping/fping_3.5.bb new file mode 100644 index 000000000..fe8893405 --- /dev/null +++ b/meta-networking/recipes-support/fping/fping_3.5.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "sends ICMP ECHO_REQUEST packets to network hosts" | ||
2 | DESCRIPTION = "fping is a ping like program which uses the Internet Control \ | ||
3 | Message Protocol (ICMP) echo request to determine if a target host is \ | ||
4 | responding. fping differs from ping in that you can specify any number of \ | ||
5 | targets on the command line, or specify a file containing the lists of \ | ||
6 | targets to ping. Instead of sending to one target until it times out or \ | ||
7 | replies, fping will send out a ping packet and move on to the next target \ | ||
8 | in a round-robin fashion." | ||
9 | HOMEPAGE = "http://www.fping.org/" | ||
10 | SECTION = "console/tools" | ||
11 | LICENSE = "BSD" | ||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=09d77789fe32be35acde9637a5ee39b1" | ||
13 | |||
14 | SRC_URI = "http://www.fping.org/dist/fping-${PV}.tar.gz" | ||
15 | SRC_URI[md5sum] = "2e17cb655aa4eb59b5a4a38a89e746ed" | ||
16 | SRC_URI[sha256sum] = "09b8960e235341bae6000085d38106357eae656a79e0119bd27e816c9003656a" | ||
17 | |||
18 | S = "${WORKDIR}/fping-${PV}" | ||
19 | |||
20 | inherit autotools | ||
21 | |||
22 | EXTRA_OECONF = "--enable-ipv4" | ||
23 | |||
24 | PACKAGECONFIG ?= "${@base_contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}" | ||
25 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | ||
diff --git a/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb b/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb new file mode 100644 index 000000000..58dca8624 --- /dev/null +++ b/meta-networking/recipes-support/ifenslave/ifenslave_1.1.0.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "Configure network interfaces for parallel routing" | ||
2 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding" | ||
3 | SECTION = "network" | ||
4 | |||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://ifenslave.c;beginline=8;endline=12;md5=a9f0bd2324cdc1b36d1f44f0e643a62a" | ||
7 | |||
8 | SRC_URI = "http://ftp.debian.org/debian/pool/main/i/${BPN}-2.6/${BPN}-2.6_${PV}.orig.tar.gz" | ||
9 | SRC_URI[md5sum] = "56126cd1013cefe0ce6f81613e677bdd" | ||
10 | SRC_URI[sha256sum] = "7917bf34de80a2492eb225adf9168c83a4854ac8a008ed0fd5b3fd147ccd3041" | ||
11 | |||
12 | do_compile() { | ||
13 | ${CC} ifenslave.c -o ifenslave | ||
14 | } | ||
15 | do_install() { | ||
16 | install -d "${D}${sbindir}" | ||
17 | install -m 755 "${S}/ifenslave" "${D}${sbindir}/" | ||
18 | } | ||
diff --git a/meta-networking/recipes-support/iftop/iftop_1.0pre2.bb b/meta-networking/recipes-support/iftop/iftop_1.0pre2.bb new file mode 100644 index 000000000..cc1f8b046 --- /dev/null +++ b/meta-networking/recipes-support/iftop/iftop_1.0pre2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | SUMMARY = "iftop does for network usage what top(1) does for CPU usage" | ||
2 | HOMEPAGE = "http://www.ex-parrot.com/pdw/iftop/" | ||
3 | |||
4 | DEPENDS = "libpcap ncurses" | ||
5 | |||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
8 | |||
9 | SRC_URI = "http://www.ex-parrot.com/pdw/iftop/download/iftop-${PV}.tar.gz" | ||
10 | SRC_URI[md5sum] = "fef521a49ec0122458d02c64212af3c5" | ||
11 | SRC_URI[sha256sum] = "1b193037bb3019afae88cd94c87468aac4b045d81ab816ed8d2f489716b14027" | ||
12 | |||
13 | inherit autotools-brokensep | ||
14 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch new file mode 100644 index 000000000..d5602c03d --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 738a9857be9c92ad2f70be88ccee238e3154a936 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe MacDonald <joe.macdonald@windriver.com> | ||
3 | Date: Wed, 2 Oct 2013 14:20:37 -0400 | ||
4 | Subject: [PATCH] racoon/pfkey: avoid potential null-pointer dereference | ||
5 | |||
6 | Building with -Werror=maybe-uninitialized revealed that 'remote' from | ||
7 | pk_recvmigrate() could be used with uninitialized data in | ||
8 | migrate_sp_ike_addresses(). Ensure it is always at a minimum assigned | ||
9 | NULL. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com> | ||
14 | --- | ||
15 | src/racoon/pfkey.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c | ||
19 | index d00b166..e0dc1db 100644 | ||
20 | --- a/src/racoon/pfkey.c | ||
21 | +++ b/src/racoon/pfkey.c | ||
22 | @@ -3352,7 +3352,7 @@ pk_recvmigrate(mhp) | ||
23 | struct sockaddr *old_saddr, *new_saddr; | ||
24 | struct sockaddr *old_daddr, *new_daddr; | ||
25 | struct sockaddr *old_local, *old_remote; | ||
26 | - struct sockaddr *local, *remote; | ||
27 | + struct sockaddr *local, *remote = NULL; | ||
28 | struct sadb_x_kmaddress *kmaddr; | ||
29 | struct sadb_x_policy *xpl; | ||
30 | struct sadb_x_ipsecrequest *xisr_list; | ||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch new file mode 100644 index 000000000..13e9d73fc --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-Don-t-link-against-libfl.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From e48b9097dce7bc2bfbb9e9c542124d3b5cebab39 Mon Sep 17 00:00:00 2001 | ||
2 | From: Paul Barker <paul@paulbarker.me.uk> | ||
3 | Date: Wed, 5 Mar 2014 13:39:14 +0000 | ||
4 | Subject: [PATCH] Don't link against libfl | ||
5 | |||
6 | We can remove all references to yywrap by adding "%option noyywrap" statements | ||
7 | to each flex source file that doesn't override yywrap. After this, we no longer | ||
8 | need to link against libfl and so no longer get errors about undefined | ||
9 | references to yylex. | ||
10 | |||
11 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
12 | Upstream-status: Submitted 2014-03-11 | ||
13 | see http://sourceforge.net/p/ipsec-tools/mailman/ipsec-tools-devel/thread/CANyK_8ewmxGA3vBVJW6s1APXPmxPR%2BDFWZ61EL8pCt288aKQ6w%40mail.gmail.com/#msg32088797 | ||
14 | --- | ||
15 | src/libipsec/Makefile.am | 1 - | ||
16 | src/racoon/Makefile.am | 2 +- | ||
17 | src/racoon/cftoken.l | 2 ++ | ||
18 | src/setkey/Makefile.am | 1 - | ||
19 | src/setkey/token.l | 2 ++ | ||
20 | 5 files changed, 5 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/src/libipsec/Makefile.am b/src/libipsec/Makefile.am | ||
23 | index 6a4e3b3..df1e106 100644 | ||
24 | --- a/src/libipsec/Makefile.am | ||
25 | +++ b/src/libipsec/Makefile.am | ||
26 | @@ -26,7 +26,6 @@ libipsec_la_SOURCES = \ | ||
27 | # version is current:revision:age. | ||
28 | # See: http://www.gnu.org/manual/libtool-1.4.2/html_chapter/libtool_6.html#SEC32 | ||
29 | libipsec_la_LDFLAGS = -version-info 0:1:0 | ||
30 | -libipsec_la_LIBADD = $(LEXLIB) | ||
31 | |||
32 | noinst_HEADERS = ipsec_strerror.h | ||
33 | |||
34 | diff --git a/src/racoon/Makefile.am b/src/racoon/Makefile.am | ||
35 | index dbaded9..0662957 100644 | ||
36 | --- a/src/racoon/Makefile.am | ||
37 | +++ b/src/racoon/Makefile.am | ||
38 | @@ -38,7 +38,7 @@ racoon_SOURCES = \ | ||
39 | cftoken.l cfparse.y prsa_tok.l prsa_par.y | ||
40 | EXTRA_racoon_SOURCES = isakmp_xauth.c isakmp_cfg.c isakmp_unity.c throttle.c \ | ||
41 | isakmp_frag.c nattraversal.c security.c $(MISSING_ALGOS) | ||
42 | -racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(LEXLIB) \ | ||
43 | +racoon_LDADD = $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) \ | ||
44 | $(SECCTX_OBJS) vmbuf.o sockmisc.o misc.o ../libipsec/libipsec.la | ||
45 | racoon_DEPENDENCIES = \ | ||
46 | $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(SECCTX_OBJS) \ | ||
47 | diff --git a/src/racoon/cftoken.l b/src/racoon/cftoken.l | ||
48 | index 490242c..1701922 100644 | ||
49 | --- a/src/racoon/cftoken.l | ||
50 | +++ b/src/racoon/cftoken.l | ||
51 | @@ -106,6 +106,8 @@ static int incstackp = 0; | ||
52 | static int yy_first_time = 1; | ||
53 | %} | ||
54 | |||
55 | +%option noyywrap | ||
56 | + | ||
57 | /* common seciton */ | ||
58 | nl \n | ||
59 | ws [ \t]+ | ||
60 | diff --git a/src/setkey/Makefile.am b/src/setkey/Makefile.am | ||
61 | index 746c1f1..389e6cf 100644 | ||
62 | --- a/src/setkey/Makefile.am | ||
63 | +++ b/src/setkey/Makefile.am | ||
64 | @@ -13,7 +13,6 @@ setkey_SOURCES = \ | ||
65 | |||
66 | setkey_LDFLAGS = ../libipsec/libipsec.la | ||
67 | setkey_DEPENDENCIES = ../libipsec/libipsec.la | ||
68 | -setkey_LDADD = $(LEXLIB) | ||
69 | |||
70 | noinst_HEADERS = vchar.h extern.h | ||
71 | man8_MANS = setkey.8 | ||
72 | diff --git a/src/setkey/token.l b/src/setkey/token.l | ||
73 | index ad3d843..eb23b76 100644 | ||
74 | --- a/src/setkey/token.l | ||
75 | +++ b/src/setkey/token.l | ||
76 | @@ -88,6 +88,8 @@ | ||
77 | #endif | ||
78 | %} | ||
79 | |||
80 | +%option noyywrap | ||
81 | + | ||
82 | /* common section */ | ||
83 | nl \n | ||
84 | ws [ \t]+ | ||
85 | -- | ||
86 | 1.9.0 | ||
87 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch new file mode 100644 index 000000000..8d270a62b --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/configure.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: ipsec-tools-0.8.1/configure.ac | ||
2 | =================================================================== | ||
3 | --- ipsec-tools-0.8.1.orig/configure.ac 2013-01-08 12:43:29.000000000 +0000 | ||
4 | +++ ipsec-tools-0.8.1/configure.ac 2014-07-18 07:51:30.045555880 +0000 | ||
5 | @@ -6,7 +6,7 @@ | ||
6 | AC_CONFIG_SRCDIR([configure.ac]) | ||
7 | AC_CONFIG_HEADERS(config.h) | ||
8 | |||
9 | -AM_INIT_AUTOMAKE(dist-bzip2) | ||
10 | +AM_INIT_AUTOMAKE([foreign dist-bzip2]) | ||
11 | |||
12 | AC_ENABLE_SHARED(no) | ||
13 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch new file mode 100644 index 000000000..36efc4917 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/glibc-2.20.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | squahes below warning | ||
2 | warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ||
3 | |||
4 | Seen with glibc 2.20 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Pending | ||
8 | Index: ipsec-tools-0.8.2/src/include-glibc/glibc-bugs.h | ||
9 | =================================================================== | ||
10 | --- ipsec-tools-0.8.2.orig/src/include-glibc/glibc-bugs.h 2006-09-09 09:22:08.000000000 -0700 | ||
11 | +++ ipsec-tools-0.8.2/src/include-glibc/glibc-bugs.h 2014-09-03 22:27:22.551563888 -0700 | ||
12 | @@ -4,7 +4,11 @@ | ||
13 | #define __GLIBC_BUGS_H__ 1 | ||
14 | |||
15 | #define _XOPEN_SOURCE 500 | ||
16 | +/* Legacy feature macro.*/ | ||
17 | #define _BSD_SOURCE | ||
18 | +/* New feature macro that provides everything _BSD_SOURCE and | ||
19 | + * _SVID_SOURCE provided and possibly more. */ | ||
20 | +#define _DEFAULT_SOURCE | ||
21 | |||
22 | #include <features.h> | ||
23 | #include <sys/types.h> | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch new file mode 100644 index 000000000..e82db087c --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-Resend-UPDATE-message-when-received-EINTR-message.patch | |||
@@ -0,0 +1,220 @@ | |||
1 | racoon: Resend UPDATE message when received EINTR message | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | While kernel is processing the UPDATE message which is sent from racoon, | ||
6 | it maybe interrupted by system signal and if this case happens, | ||
7 | kernel responds with an EINTR message to racoon and kernel fails to | ||
8 | establish the corresponding SA. | ||
9 | Fix this problem by resend the UPDATE message when EINTR(Interrupted | ||
10 | system call) error happens. | ||
11 | |||
12 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> | ||
13 | --- | ||
14 | --- a/src/libipsec/libpfkey.h | ||
15 | +++ b/src/libipsec/libpfkey.h | ||
16 | @@ -92,6 +92,12 @@ | ||
17 | u_int16_t ctxstrlen; /* length of security context string */ | ||
18 | }; | ||
19 | |||
20 | +struct update_msg_info { | ||
21 | + struct sadb_msg *update_msg; | ||
22 | + int so; | ||
23 | + int len; | ||
24 | +}; | ||
25 | + | ||
26 | /* The options built into libipsec */ | ||
27 | extern int libipsec_opt; | ||
28 | #define LIBIPSEC_OPT_NATT 0x01 | ||
29 | --- a/src/libipsec/pfkey.c | ||
30 | +++ b/src/libipsec/pfkey.c | ||
31 | @@ -1219,7 +1219,8 @@ | ||
32 | } | ||
33 | #endif | ||
34 | |||
35 | - | ||
36 | +struct update_msg_info update_msg_send = {NULL, 0, 0}; | ||
37 | + | ||
38 | /* sending SADB_ADD or SADB_UPDATE message to the kernel */ | ||
39 | static int | ||
40 | pfkey_send_x1(struct pfkey_send_sa_args *sa_parms) | ||
41 | @@ -1483,10 +1484,24 @@ | ||
42 | |||
43 | /* send message */ | ||
44 | len = pfkey_send(sa_parms->so, newmsg, len); | ||
45 | - free(newmsg); | ||
46 | |||
47 | - if (len < 0) | ||
48 | - return -1; | ||
49 | + if (newmsg->sadb_msg_type == SADB_UPDATE) { | ||
50 | + if (update_msg_send.update_msg) | ||
51 | + free(update_msg_send.update_msg); | ||
52 | + update_msg_send.update_msg = newmsg; | ||
53 | + update_msg_send.so = sa_parms->so; | ||
54 | + update_msg_send.len = len; | ||
55 | + | ||
56 | + if (len < 0) { | ||
57 | + free(update_msg_send.update_msg); | ||
58 | + update_msg_send.update_msg = NULL; | ||
59 | + return -1; | ||
60 | + } | ||
61 | + } else { | ||
62 | + free(newmsg); | ||
63 | + if (len < 0) | ||
64 | + return -1; | ||
65 | + } | ||
66 | |||
67 | __ipsec_errcode = EIPSEC_NO_ERROR; | ||
68 | return len; | ||
69 | --- a/src/racoon/session.c | ||
70 | +++ b/src/racoon/session.c | ||
71 | @@ -100,6 +100,8 @@ | ||
72 | |||
73 | #include "sainfo.h" | ||
74 | |||
75 | +extern struct update_msg_info update_msg_send; | ||
76 | + | ||
77 | struct fd_monitor { | ||
78 | int (*callback)(void *ctx, int fd); | ||
79 | void *ctx; | ||
80 | @@ -348,6 +350,11 @@ | ||
81 | close_sockets(); | ||
82 | backupsa_clean(); | ||
83 | |||
84 | + if (update_msg_send.update_msg) { | ||
85 | + free(update_msg_send.update_msg); | ||
86 | + update_msg_send.update_msg = NULL; | ||
87 | + } | ||
88 | + | ||
89 | plog(LLV_INFO, LOCATION, NULL, "racoon process %d shutdown\n", getpid()); | ||
90 | |||
91 | exit(0); | ||
92 | --- a/src/racoon/pfkey.c | ||
93 | +++ b/src/racoon/pfkey.c | ||
94 | @@ -103,10 +103,12 @@ | ||
95 | #include "crypto_openssl.h" | ||
96 | #include "grabmyaddr.h" | ||
97 | +#include "../libipsec/libpfkey.h" | ||
98 | |||
99 | #if defined(SADB_X_EALG_RIJNDAELCBC) && !defined(SADB_X_EALG_AESCBC) | ||
100 | #define SADB_X_EALG_AESCBC SADB_X_EALG_RIJNDAELCBC | ||
101 | #endif | ||
102 | |||
103 | +extern struct update_msg_info update_msg_send; | ||
104 | /* prototype */ | ||
105 | static u_int ipsecdoi2pfkey_aalg __P((u_int)); | ||
106 | static u_int ipsecdoi2pfkey_ealg __P((u_int)); | ||
107 | @@ -253,6 +255,13 @@ | ||
108 | s_pfkey_type(msg->sadb_msg_type), | ||
109 | strerror(msg->sadb_msg_errno)); | ||
110 | |||
111 | + if (msg->sadb_msg_errno == EINTR && | ||
112 | + update_msg_send.update_msg) { | ||
113 | + plog(LLV_DEBUG, LOCATION, NULL, | ||
114 | + "pfkey update resend\n"); | ||
115 | + send(update_msg_send.so, (void *)update_msg_send.update_msg, (socklen_t)update_msg_send.len, 0); | ||
116 | + } | ||
117 | + | ||
118 | goto end; | ||
119 | } | ||
120 | |||
121 | @@ -498,6 +507,11 @@ | ||
122 | { | ||
123 | flushsp(); | ||
124 | |||
125 | + if (update_msg_send.update_msg) { | ||
126 | + free(update_msg_send.update_msg); | ||
127 | + update_msg_send.update_msg = NULL; | ||
128 | + } | ||
129 | + | ||
130 | if (pfkey_send_spddump(lcconf->sock_pfkey) < 0) { | ||
131 | plog(LLV_ERROR, LOCATION, NULL, | ||
132 | "libipsec sending spddump failed: %s\n", | ||
133 | @@ -1295,6 +1309,8 @@ | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | +int update_received = 0; | ||
138 | + | ||
139 | static int | ||
140 | pk_recvupdate(mhp) | ||
141 | caddr_t *mhp; | ||
142 | @@ -1307,6 +1323,13 @@ | ||
143 | int incomplete = 0; | ||
144 | struct saproto *pr; | ||
145 | |||
146 | + update_received = 1; | ||
147 | + | ||
148 | + if (update_msg_send.update_msg) { | ||
149 | + free(update_msg_send.update_msg); | ||
150 | + update_msg_send.update_msg = NULL; | ||
151 | + } | ||
152 | + | ||
153 | /* ignore this message because of local test mode. */ | ||
154 | if (f_local) | ||
155 | return 0; | ||
156 | @@ -4163,3 +4186,8 @@ | ||
157 | |||
158 | return buf; | ||
159 | } | ||
160 | + | ||
161 | +int receive_from_isakmp() | ||
162 | +{ | ||
163 | + return pfkey_handler(NULL, lcconf->sock_pfkey); | ||
164 | +} | ||
165 | --- a/src/racoon/pfkey.h | ||
166 | +++ b/src/racoon/pfkey.h | ||
167 | @@ -71,5 +71,6 @@ | ||
168 | extern u_int32_t pk_getseq __P((void)); | ||
169 | extern const char *sadbsecas2str | ||
170 | __P((struct sockaddr *, struct sockaddr *, int, u_int32_t, int)); | ||
171 | +extern int receive_from_isakmp __P((void)); | ||
172 | |||
173 | #endif /* _PFKEY_H */ | ||
174 | --- a/src/racoon/isakmp_quick.c | ||
175 | +++ b/src/racoon/isakmp_quick.c | ||
176 | @@ -774,6 +774,8 @@ | ||
177 | return error; | ||
178 | } | ||
179 | |||
180 | +extern int update_received; | ||
181 | + | ||
182 | /* | ||
183 | * send to responder | ||
184 | * HDR*, HASH(3) | ||
185 | @@ -892,6 +894,11 @@ | ||
186 | } | ||
187 | plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n"); | ||
188 | |||
189 | + while (!update_received) | ||
190 | + receive_from_isakmp(); | ||
191 | + | ||
192 | + update_received = 0; | ||
193 | + | ||
194 | /* Do ADD for responder */ | ||
195 | if (pk_sendadd(iph2) < 0) { | ||
196 | plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n"); | ||
197 | @@ -1035,6 +1042,11 @@ | ||
198 | } | ||
199 | plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n"); | ||
200 | |||
201 | + while (!update_received) | ||
202 | + receive_from_isakmp(); | ||
203 | + | ||
204 | + update_received = 0; | ||
205 | + | ||
206 | /* Do ADD for responder */ | ||
207 | if (pk_sendadd(iph2) < 0) { | ||
208 | plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n"); | ||
209 | @@ -1989,6 +2001,11 @@ | ||
210 | } | ||
211 | plog(LLV_DEBUG, LOCATION, NULL, "pfkey update sent.\n"); | ||
212 | |||
213 | + while (!update_received) | ||
214 | + receive_from_isakmp(); | ||
215 | + | ||
216 | + update_received = 0; | ||
217 | + | ||
218 | /* Do ADD for responder */ | ||
219 | if (pk_sendadd(iph2) < 0) { | ||
220 | plog(LLV_ERROR, LOCATION, NULL, "pfkey add failed.\n"); | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch new file mode 100644 index 000000000..e272bc20f --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-ivm.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Subject: [PATCH] ipsec-tools: racoon: check several invalid ivm | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Add checking for invalid ivm, or it will crash racoon. | ||
6 | |||
7 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
8 | --- | ||
9 | isakmp_cfg.c | 5 +++++ | ||
10 | 1 file changed, 5 insertions(+) | ||
11 | |||
12 | diff -urpN a/src/racoon/isakmp_cfg.c b/src/racoon/isakmp_cfg.c | ||
13 | --- a/src/racoon/isakmp_cfg.c | ||
14 | +++ b/src/racoon/isakmp_cfg.c | ||
15 | @@ -171,6 +171,11 @@ isakmp_cfg_r(iph1, msg) | ||
16 | iph1->mode_cfg->last_msgid != packet->msgid ) | ||
17 | iph1->mode_cfg->ivm = | ||
18 | isakmp_cfg_newiv(iph1, packet->msgid); | ||
19 | + if(iph1->mode_cfg->ivm == NULL) { | ||
20 | + plog(LLV_ERROR, LOCATION, NULL, | ||
21 | + "failed to create new IV\n"); | ||
22 | + return; | ||
23 | + } | ||
24 | ivm = iph1->mode_cfg->ivm; | ||
25 | |||
26 | dmsg = oakley_do_decrypt(iph1, msg, ivm->iv, ivm->ive); | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch new file mode 100644 index 000000000..de1bdb407 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoon-check-invalid-pointers.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | Subject: [PATCH] ipsec-tools: racoon: check several invalid pointers | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Add checking for invalid pointers, or it will crash racoon. | ||
6 | |||
7 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
8 | --- | ||
9 | ipsec_doi.c | 5 +++-- | ||
10 | isakmp_cfg.c | 7 +++++++ | ||
11 | isakmp_quick.c | 6 ++++-- | ||
12 | 3 files changed, 14 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff -urpN a/src/racoon/ipsec_doi.c b/src/racoon/ipsec_doi.c | ||
15 | --- a/src/racoon/ipsec_doi.c | ||
16 | +++ b/src/racoon/ipsec_doi.c | ||
17 | @@ -3374,8 +3374,9 @@ ipsecdoi_chkcmpids( idt, ids, exact ) | ||
18 | |||
19 | /* handle wildcard IDs */ | ||
20 | |||
21 | - if (idt == NULL || ids == NULL) | ||
22 | - { | ||
23 | + if (idt == NULL || ids == NULL || | ||
24 | + idt->v == NULL || idt->l == 0 || | ||
25 | + ids->v == NULL || ids->l == 0) { | ||
26 | if( !exact ) | ||
27 | { | ||
28 | plog(LLV_DEBUG, LOCATION, NULL, | ||
29 | diff -urpN a/src/racoon/isakmp_cfg.c b/src/racoon/isakmp_cfg.c | ||
30 | --- a/src/racoon/isakmp_cfg.c | ||
31 | +++ b/src/racoon/isakmp_cfg.c | ||
32 | @@ -1138,6 +1138,13 @@ isakmp_cfg_newiv(iph1, msgid) | ||
33 | return NULL; | ||
34 | } | ||
35 | |||
36 | + if (iph1->ivm == NULL || iph1->ivm->iv == NULL || | ||
37 | + iph1->ivm->iv->v == NULL || iph1->ivm->iv->l == 0) { | ||
38 | + plog(LLV_ERROR, LOCATION, NULL, | ||
39 | + "isakmp_cfg_newiv called with invalid IV management\n"); | ||
40 | + return NULL; | ||
41 | + } | ||
42 | + | ||
43 | if (ics->ivm != NULL) | ||
44 | oakley_delivm(ics->ivm); | ||
45 | |||
46 | diff -urpN a/src/racoon/isakmp_quick.c b/src/racoon/isakmp_quick.c | ||
47 | --- a/src/racoon/isakmp_quick.c | ||
48 | +++ b/src/racoon/isakmp_quick.c | ||
49 | @@ -2243,8 +2243,10 @@ get_proposal_r(iph2) | ||
50 | int error = ISAKMP_INTERNAL_ERROR; | ||
51 | |||
52 | /* check the existence of ID payload */ | ||
53 | - if ((iph2->id_p != NULL && iph2->id == NULL) | ||
54 | - || (iph2->id_p == NULL && iph2->id != NULL)) { | ||
55 | + if ((iph2->id_p != NULL && | ||
56 | + (iph2->id == NULL || iph2->id->v == NULL || iph2->id->l == 0)) || | ||
57 | + (iph2->id != NULL && | ||
58 | + (iph2->id_p == NULL || iph2->id_p->v == NULL || iph2->id_p->l == 0))) { | ||
59 | plog(LLV_ERROR, LOCATION, NULL, | ||
60 | "Both IDs wasn't found in payload.\n"); | ||
61 | return ISAKMP_NTYPE_INVALID_ID_INFORMATION; | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoonctl-build-fix.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoonctl-build-fix.patch new file mode 100644 index 000000000..f77fa8638 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/racoonctl-build-fix.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Subject: [PATCH] ipsec-tools: racoonctl buildfix | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | building ipsec-tools failed building/linking racoonctl with some errors: | ||
6 | - missing "yylex" error | ||
7 | - some linking errors for variables defined in racoon but not racoonctl | ||
8 | - some symbols from nattraversal.c where not found as it wasn't linked | ||
9 | when building with NAT support. | ||
10 | |||
11 | Signed-off-by: Liviu Gheorghisan <liviu.gheorghisan@enea.com> | ||
12 | Signed-off-by: Daniel BORNAZ <daniel.bornaz@enea.com> | ||
13 | --- | ||
14 | diff -rupN a/src/racoon/Makefile.am b/src/racoon/Makefile.am | ||
15 | --- a/src/racoon/Makefile.am 2014-03-05 12:16:52.907101044 +0100 | ||
16 | +++ b/src/racoon/Makefile.am 2014-03-05 12:17:10.946320064 +0100 | ||
17 | @@ -44,7 +44,17 @@ racoon_DEPENDENCIES = \ | ||
18 | $(CRYPTOBJS) $(HYBRID_OBJS) $(NATT_OBJS) $(FRAG_OBJS) $(SECCTX_OBJS) \ | ||
19 | vmbuf.o sockmisc.o misc.o | ||
20 | |||
21 | -racoonctl_SOURCES = racoonctl.c str2val.c | ||
22 | +racoonctl_SOURCES = \ | ||
23 | + session.c isakmp.c handler.c \ | ||
24 | + isakmp_ident.c isakmp_agg.c isakmp_base.c \ | ||
25 | + isakmp_quick.c isakmp_inf.c isakmp_newg.c \ | ||
26 | + gssapi.c dnssec.c getcertsbyname.c privsep.c \ | ||
27 | + pfkey.c admin.c evt.c ipsec_doi.c oakley.c grabmyaddr.c vendorid.c \ | ||
28 | + policy.c localconf.c remoteconf.c crypto_openssl.c algorithm.c \ | ||
29 | + proposal.c sainfo.c strnames.c nattraversal.c \ | ||
30 | + plog.c logger.c schedule.c str2val.c \ | ||
31 | + safefile.c backupsa.c genlist.c rsalist.c \ | ||
32 | + cftoken.l cfparse.y prsa_tok.l prsa_par.y racoonctl.c | ||
33 | racoonctl_LDADD = libracoon.la ../libipsec/libipsec.la | ||
34 | |||
35 | libracoon_la_SOURCES = kmpstat.c vmbuf.c sockmisc.c misc.c | ||
36 | |||
37 | diff -rupN a/src/racoon/racoonctl.c b/src/racoon/racoonctl.c | ||
38 | --- a/src/racoon/racoonctl.c 2014-03-05 12:16:52.915100698 +0100 | ||
39 | +++ b/src/racoon/racoonctl.c 2014-03-05 12:17:17.906018754 +0100 | ||
40 | @@ -247,6 +247,9 @@ usage() | ||
41 | #error "Incompatible racoonctl interface" | ||
42 | #endif | ||
43 | |||
44 | +int f_local = 0; /* local test mode. behave like a wall. */ | ||
45 | +int dump_config =0; | ||
46 | + | ||
47 | int | ||
48 | main(ac, av) | ||
49 | int ac; | ||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/with-flexdir.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/with-flexdir.patch new file mode 100644 index 000000000..da1169218 --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/with-flexdir.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | --- ipsec-tools-0.8.1.old/configure.ac 2014-03-04 16:24:57.431207664 +0100 | ||
2 | +++ ipsec-tools-0.8.1/configure.ac 2014-03-04 16:26:00.372461304 +0100 | ||
3 | @@ -171,9 +171,9 @@ if test $with_readline != "no"; then | ||
4 | fi | ||
5 | |||
6 | |||
7 | -AC_MSG_CHECKING(if --with-flex option is specified) | ||
8 | +AC_MSG_CHECKING(if --with-flexdir option is specified) | ||
9 | AC_ARG_WITH(flexdir, | ||
10 | - [AC_HELP_STRING([--with-flex], [use directiory (default: no)])], | ||
11 | + [AC_HELP_STRING([--with-flexdir], [use directory (default: no)])], | ||
12 | [flexdir="$withval"]) | ||
13 | AC_MSG_RESULT(${flexdir-dirdefault}) | ||
14 | |||
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb new file mode 100644 index 000000000..4653a9aba --- /dev/null +++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | DESCRIPTION = "IPsec-Tools is a port of KAME's IPsec utilities to the \ | ||
2 | Linux-2.6 IPsec implementation." | ||
3 | HOMEPAGE = "http://ipsec-tools.sourceforge.net/" | ||
4 | SECTION = "console/network" | ||
5 | LICENSE = "BSD" | ||
6 | LIC_FILES_CHKSUM = "file://src/libipsec/pfkey.c;beginline=6;endline=31;md5=bc9b7ff40beff19fe6bc6aef26bd2b24" | ||
7 | |||
8 | DEPENDS = "virtual/kernel openssl readline flex-native bison-native" | ||
9 | |||
10 | SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${PV}.tar.bz2 \ | ||
11 | file://0002-Don-t-link-against-libfl.patch \ | ||
12 | file://configure.patch \ | ||
13 | file://racoonctl-build-fix.patch \ | ||
14 | file://with-flexdir.patch \ | ||
15 | file://0001-racoon-pfkey-avoid-potential-null-pointer-dereferenc.patch \ | ||
16 | file://racoon-check-invalid-pointers.patch \ | ||
17 | file://racoon-check-invalid-ivm.patch \ | ||
18 | file://glibc-2.20.patch \ | ||
19 | file://racoon-Resend-UPDATE-message-when-received-EINTR-message.patch \ | ||
20 | " | ||
21 | SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41" | ||
22 | SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d" | ||
23 | |||
24 | inherit autotools | ||
25 | |||
26 | # Options: | ||
27 | # --enable-adminport enable admin port | ||
28 | # --enable-rc5 enable RC5 encryption (patented) | ||
29 | # --enable-idea enable IDEA encryption (patented) | ||
30 | # --enable-gssapi enable GSS-API authentication | ||
31 | # --enable-hybrid enable hybrid, both mode-cfg and xauth support | ||
32 | # --enable-frag enable IKE fragmentation payload support | ||
33 | # --enable-stats enable statistics logging function | ||
34 | # --enable-dpd enable dead peer detection | ||
35 | # --enable-samode-unspec enable to use unspecified a mode of SA | ||
36 | # --disable-ipv6 disable ipv6 support | ||
37 | # --enable-natt enable NAT-Traversal (yes/no/kernel) | ||
38 | # --enable-natt-versions=list list of supported NAT-T versions delimited by coma. | ||
39 | # --with-kernel-headers=/lib/modules/<uname>/build/include | ||
40 | # where your Linux Kernel headers are installed | ||
41 | # --with-readline support readline input (yes by default) | ||
42 | # --with-flex use directiory (default: no) | ||
43 | # --with-flexlib=<LIB> specify flex library. | ||
44 | # --with-openssl=DIR specify OpenSSL directory | ||
45 | # --with-libradius=DIR specify libradius path (like/usr/pkg) | ||
46 | # --with-libpam=DIR specify libpam path (like/usr/pkg) | ||
47 | # | ||
48 | # Note: if you give it the actual kernel headers it won't build, it actually | ||
49 | # needs to point at the linux-libc-headers version of the kernel headers. | ||
50 | # | ||
51 | EXTRA_OECONF = "--with-kernel-headers=${STAGING_INCDIR} \ | ||
52 | --with-readline \ | ||
53 | --with-openssl=${STAGING_LIBDIR}/.. \ | ||
54 | --without-libradius \ | ||
55 | --disable-security-context \ | ||
56 | --enable-shared \ | ||
57 | --enable-dpd \ | ||
58 | --enable-natt=yes \ | ||
59 | ${@base_contains('DISTRO_FEATURES', 'ipv6', '--enable-ipv6=yes', '', d)}" | ||
60 | |||
61 | # See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=530527 | ||
62 | CFLAGS += "-fno-strict-aliasing" | ||
63 | |||
64 | PACKAGECONFIG ??= "" | ||
65 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam," | ||
66 | PACKAGECONFIG[selinux] = "--enable-security-context,--disable-security-context,libselinux," | ||
diff --git a/meta-networking/recipes-support/libmemcached/files/crosscompile.patch b/meta-networking/recipes-support/libmemcached/files/crosscompile.patch new file mode 100644 index 000000000..63511bff5 --- /dev/null +++ b/meta-networking/recipes-support/libmemcached/files/crosscompile.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | libmemcached/backtrace.cc | 3 ++- | ||
2 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
3 | |||
4 | --- libmemcached-1.0.15.orig/libmemcached/backtrace.cc | ||
5 | +++ libmemcached-1.0.15/libmemcached/backtrace.cc | ||
6 | @@ -75,10 +75,11 @@ void custom_backtrace(void) | ||
7 | { | ||
8 | for (int x= 0; x < stack_frames; x++) | ||
9 | { | ||
10 | bool was_demangled= false; | ||
11 | |||
12 | +#if USE_DEMANGLE == 1 | ||
13 | if (USE_DEMANGLE) | ||
14 | { | ||
15 | #ifdef HAVE_DLFCN_H | ||
16 | Dl_info dlinfo; | ||
17 | if (dladdr(backtrace_buffer[x], &dlinfo)) | ||
18 | @@ -107,11 +108,11 @@ void custom_backtrace(void) | ||
19 | dlinfo.dli_fname); | ||
20 | } | ||
21 | } | ||
22 | #endif | ||
23 | } | ||
24 | - | ||
25 | +#endif | ||
26 | if (was_demangled == false) | ||
27 | { | ||
28 | fprintf(stderr, "?%d %p in %s\n", x, backtrace_buffer[x], symbollist[x]); | ||
29 | } | ||
30 | } | ||
diff --git a/meta-networking/recipes-support/libmemcached/libmemcached.inc b/meta-networking/recipes-support/libmemcached/libmemcached.inc new file mode 100644 index 000000000..50ef4d606 --- /dev/null +++ b/meta-networking/recipes-support/libmemcached/libmemcached.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "open source C/C++ client library and tools for the memcached server" | ||
2 | DEPENDS = "libevent util-linux" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=865490941c91ba790f0ea78dec93bd60" | ||
5 | |||
6 | SRC_URI = "http://launchpad.net/libmemcached/1.0/${PV}/+download/libmemcached-${PV}.tar.gz" | ||
7 | |||
8 | TARGET_LDFLAGS += "-luuid" | ||
9 | |||
10 | PACKAGECONFIG ??= "" | ||
11 | PACKAGECONFIG[sasl] = "--enable-sasl,--disable-sasl,cyrus-sasl" | ||
12 | |||
13 | inherit autotools gettext pkgconfig | ||
diff --git a/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb b/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb new file mode 100644 index 000000000..18232b4ce --- /dev/null +++ b/meta-networking/recipes-support/libmemcached/libmemcached_1.0.15.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require libmemcached.inc | ||
2 | |||
3 | SRC_URI += "file://crosscompile.patch" | ||
4 | |||
5 | SRC_URI[md5sum] = "616297a1aedefc52b3f6922eda5d559a" | ||
6 | SRC_URI[sha256sum] = "dd7e9560029835bddf761a5b4c2339d9e5c7374558659b6c11b2c95e7d3a4325" | ||
diff --git a/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb b/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb new file mode 100644 index 000000000..cdf8415ff --- /dev/null +++ b/meta-networking/recipes-support/libmemcached/libmemcached_1.0.7.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require libmemcached.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "d59a462a92d296f76bff2d9bc72b2516" | ||
4 | SRC_URI[sha256sum] = "3efa86c9733eaad55d7119cb16769424e2aa6c22b3392e8f973946fce6678d81" | ||
diff --git a/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb b/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb new file mode 100644 index 000000000..ded6d08a7 --- /dev/null +++ b/meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.16.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "The Linux Kernel Stream Control Transmission Protocol (lksctp) project" | ||
2 | SECTION = "libs" | ||
3 | LICENSE = "LGPLv2" | ||
4 | |||
5 | LIC_FILES_CHKSUM = " \ | ||
6 | file://COPYING.lib;md5=0a1b79af951c42a9c8573533fbba9a92 \ | ||
7 | file://COPYING;md5=0c56db0143f4f80c369ee3af7425af6e \ | ||
8 | " | ||
9 | |||
10 | SRC_URI = "${SOURCEFORGE_MIRROR}/lksctp/${BP}.tar.gz" | ||
11 | |||
12 | SRC_URI[md5sum] = "708bb0b5a6806ad6e8d13c55b067518e" | ||
13 | SRC_URI[sha256sum] = "0903dd526b7f30a89d5031aa2c82757612becc38ed7bc6e4f972f8deae351f26" | ||
14 | |||
15 | #| arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -shared -fPIC -DPIC .libs/bindx.o .libs/connectx.o .libs/peeloff.o .libs/opt_info.o .libs/addrs.o .libs/sendmsg.o .libs/recvmsg.o -march=armv5te -marm -mthumb-interwork --sysroot=/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/qemuarm -O2 -Wl,--version-script=/home/jenkins/oe/world/shr-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/lksctp-tools/1.0.16-r0/lksctp-tools-1.0.16/src/lib/Versions.map -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-soname -Wl,libsctp.so.1 -o .libs/libsctp.so.1.0.16 | ||
16 | #| /home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.0/ld: error: symbol sctp_connectx has undefined version | ||
17 | #| collect2: error: ld returned 1 exit status | ||
18 | #| make[4]: *** [libsctp.la] Error 1 | ||
19 | PNBLACKLIST[lksctp-tools] ?= "BROKEN: fails to link against sctp_connectx symbol" | ||
20 | |||
21 | S = "${WORKDIR}/${BP}" | ||
22 | |||
23 | BBCLASSEXTEND = "native" | ||
24 | |||
25 | inherit autotools pkgconfig binconfig | ||
26 | |||
27 | SOLIBVERSION="${PV}" | ||
28 | SOLIBMAJORVERSION="1" | ||
29 | |||
30 | PACKAGES =+ "${PN}-withsctp ${PN}-utils" | ||
31 | |||
32 | FILES_${PN} = " \ | ||
33 | ${libdir}/libsctp.so.${SOLIBVERSION} \ | ||
34 | " | ||
35 | |||
36 | FILES_${PN}-withsctp = " \ | ||
37 | ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBVERSION} \ | ||
38 | " | ||
39 | |||
40 | FILES_${PN}-dev += " \ | ||
41 | ${libdir}/libsctp.so.${SOLIBMAJORVERSION} \ | ||
42 | ${libdir}/libsctp.so \ | ||
43 | ${libdir}/lksctp-tools/libwithsctp.so.${SOLIBMAJORVERSION} \ | ||
44 | ${libdir}/lksctp-tools/libwithsctp.so \ | ||
45 | ${datadir}/lksctp-tools/*.c \ | ||
46 | ${datadir}/lksctp-tools/*.h \ | ||
47 | " | ||
48 | |||
49 | FILES_${PN}-utils = "${bindir}/*" | ||
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch new file mode 100644 index 000000000..9ecd707b4 --- /dev/null +++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/no-help2man.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Disable building manpages so that make install doesn't fail due to lack of help2man | ||
2 | |||
3 | Upstream-Status: Inappropriate [config] | ||
4 | |||
5 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | |||
7 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
8 | index 46c4017..d6ed312 100644 | ||
9 | --- a/src/Makefile.am | ||
10 | +++ b/src/Makefile.am | ||
11 | @@ -9,11 +9,6 @@ izcoordinator_DESC = "simple coordinator for IEEE 802.15.4 network" | ||
12 | iz_DESC = "configure an IEEE 802.15.4 interface" | ||
13 | izchat_DESC = "simple chat program using IEEE 802.15.4" | ||
14 | |||
15 | -if MANPAGES | ||
16 | -dist_man_MANS = $(manpages) | ||
17 | -endif | ||
18 | -EXTRA_DIST = $(manpages) | ||
19 | - | ||
20 | izattach_SOURCES = serial.c | ||
21 | |||
22 | iz_SOURCES = iz.c iz-common.c iz-mac.c iz-phy.c | ||
23 | @@ -27,18 +22,6 @@ izcoordinator_LDADD = ../addrdb/libaddrdb.la $(LDADD) $(NL_LIBS) $(LEXLIB) | ||
24 | iz_CFLAGS = $(AM_CFLAGS) $(NL_CFLAGS) -D_GNU_SOURCE | ||
25 | iz_LDADD = $(LDADD) $(NL_LIBS) | ||
26 | |||
27 | -izattach.8: $(izattach_SOURCES) $(top_srcdir)/configure.ac | ||
28 | - -$(HELP2MAN) -o $@ -s 8 -N -n $(izattach_DESC) $(builddir)/izattach | ||
29 | - | ||
30 | -izcoordinator.8: $(izcoordinator_SOURCES) $(top_srcdir)/configure.ac | ||
31 | - -$(HELP2MAN) -o $@ -s 8 -N -n $(izcoordinator_DESC) $(builddir)/izcoordinator | ||
32 | - | ||
33 | -iz.8: $(iz_SOURCES) $(top_srcdir)/configure.ac | ||
34 | - -$(HELP2MAN) -o $@ -s 8 -N -n $(iz_DESC) $(builddir)/iz | ||
35 | - | ||
36 | -izchat.1: $(izchat_SOURCES) $(top_srcdir)/configure.ac | ||
37 | - -$(HELP2MAN) -o $@ -s 1 -N -n $(izchat_DESC) $(builddir)/izchat | ||
38 | - | ||
39 | install-data-hook: | ||
40 | $(mkinstalldirs) $(DESTDIR)`dirname $(leasefile)` | ||
41 | $(mkinstalldirs) $(DESTDIR)`dirname $(pidfile)` | ||
diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb new file mode 100644 index 000000000..ca1026229 --- /dev/null +++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Utilities for managing the Linux LoWPAN stack" | ||
2 | DESCRIPTION = "This is a set of utils to manage the Linux LoWPAN stack. \ | ||
3 | The LoWPAN stack aims for IEEE 802.15.4-2003 (and for lesser extent IEEE 802.15.4-2006) compatibility." | ||
4 | |||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
7 | |||
8 | DEPENDS = "libnl python" | ||
9 | |||
10 | PV = "0.3.1+git${SRCPV}" | ||
11 | SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ | ||
12 | file://no-help2man.patch" | ||
13 | SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit autotools python-dir pkgconfig | ||
18 | |||
19 | CACHED_CONFIGUREVARS += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}/lowpan-tools" | ||
20 | |||
21 | do_install_append() { | ||
22 | rmdir ${D}${localstatedir}/run | ||
23 | } | ||
24 | |||
25 | FILES_${PN}-dbg += "${libexecdir}/lowpan-tools/.debug/" | ||
26 | |||
27 | PACKAGES =+ "${PN}-python" | ||
28 | FILES_${PN}-python = "${libdir}/python*" | ||
diff --git a/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb b/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb new file mode 100644 index 000000000..b97e9d1fc --- /dev/null +++ b/meta-networking/recipes-support/macchanger/macchanger_1.5.0.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Tool to view/change network interface MAC addresses" | ||
2 | DESCRIPTION = "A GNU/Linux utility for viewing/manipulating the MAC address of network interfaces." | ||
3 | HOMEPAGE = "http://www.alobbs.com/macchanger" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
6 | |||
7 | |||
8 | SRC_URI = "${GNU_MIRROR}/macchanger/${BPN}-${PV}.tar.gz" | ||
9 | |||
10 | SRC_URI[md5sum] = "79b7cdaeca3d8ebafa764c4b0dd03ab7" | ||
11 | SRC_URI[sha256sum] = "d44bfa27cb29c5a718627cb3ef3aa42eb5130426545eb2031120826cd73fa8fe" | ||
12 | |||
13 | FILES_${PN} = " \ | ||
14 | ${bindir}/${BPN} \ | ||
15 | ${datadir}/${BPN}/wireless.list \ | ||
16 | ${datadir}/${BPN}/OUI.list \ | ||
17 | " | ||
18 | |||
19 | FILES_${PN}-doc = " \ | ||
20 | ${datadir}/info \ | ||
21 | ${datadir}/man \ | ||
22 | " | ||
23 | |||
24 | inherit autotools | ||
diff --git a/meta-networking/recipes-support/memcached/memcached/configure.patch b/meta-networking/recipes-support/memcached/memcached/configure.patch new file mode 100644 index 000000000..7001a0ed6 --- /dev/null +++ b/meta-networking/recipes-support/memcached/memcached/configure.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: memcached-1.4.17/configure.ac | ||
2 | =================================================================== | ||
3 | --- memcached-1.4.17.orig/configure.ac 2013-12-20 21:44:49.000000000 +0000 | ||
4 | +++ memcached-1.4.17/configure.ac 2014-07-18 07:17:00.593499483 +0000 | ||
5 | @@ -4,7 +4,7 @@ | ||
6 | AC_INIT(memcached, VERSION_NUMBER, memcached@googlegroups.com) | ||
7 | AC_CANONICAL_SYSTEM | ||
8 | AC_CONFIG_SRCDIR(memcached.c) | ||
9 | -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) | ||
10 | +AM_INIT_AUTOMAKE([foreign]) | ||
11 | AM_CONFIG_HEADER(config.h) | ||
12 | |||
13 | AC_PROG_CC | ||
diff --git a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch new file mode 100644 index 000000000..544b840fe --- /dev/null +++ b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | memcached: add knob to detect whether hugetlbfs are checked | ||
2 | |||
3 | Add knob to detect whether hugetlbfs are checked or not. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
8 | --- | ||
9 | configure.ac | 7 ++++++- | ||
10 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index 7f22f21..21691b9 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -314,7 +314,12 @@ fi | ||
17 | dnl ---------------------------------------------------------------------------- | ||
18 | |||
19 | AC_SEARCH_LIBS(umem_cache_create, umem) | ||
20 | -AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) | ||
21 | +AC_ARG_ENABLE(hugetlbfs, | ||
22 | + [AS_HELP_STRING([--enable-hugetlbfs],[Enable hugetlbfs])]) | ||
23 | + | ||
24 | +if test "x$enable_hugetlbfs" = "xyes"; then | ||
25 | + AC_SEARCH_LIBS(gethugepagesizes, hugetlbfs) | ||
26 | +fi | ||
27 | |||
28 | AC_HEADER_STDBOOL | ||
29 | AH_BOTTOM([#if HAVE_STDBOOL_H | ||
30 | -- | ||
31 | 1.8.3.4 | ||
32 | |||
diff --git a/meta-networking/recipes-support/memcached/memcached_1.4.17.bb b/meta-networking/recipes-support/memcached/memcached_1.4.17.bb new file mode 100644 index 000000000..4d93f041e --- /dev/null +++ b/meta-networking/recipes-support/memcached/memcached_1.4.17.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | SUMMARY = "A high-performance memory object caching system" | ||
2 | DESCRIPTION = "\ | ||
3 | memcached optimizes specific high-load serving applications that are designed \ | ||
4 | to take advantage of its versatile no-locking memory access system. Clients \ | ||
5 | are available in several different programming languages, to suit the needs \ | ||
6 | of the specific application. Traditionally this has been used in mod_perl \ | ||
7 | apps to avoid storing large chunks of data in Apache memory, and to share \ | ||
8 | this burden across several machines." | ||
9 | |||
10 | HOMEPAGE = "http://memcached.org/" | ||
11 | LICENSE = "BSD-3-Clause" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=7e5ded7363d335e1bb18013ca08046ff" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
17 | DEPENDS += "libevent" | ||
18 | RDEPENDS_${PN} += "perl perl-module-posix perl-module-autoloader \ | ||
19 | perl-module-tie-hash bash \ | ||
20 | " | ||
21 | |||
22 | SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ | ||
23 | file://configure.patch \ | ||
24 | file://memcached-add-hugetlbfs-check.patch" | ||
25 | |||
26 | # set the same COMPATIBLE_HOST as libhugetlbfs | ||
27 | COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64|arm).*-linux' | ||
28 | |||
29 | SRC_URI[md5sum] = "46402dfbd7faadf6182283dbbd18b1a6" | ||
30 | SRC_URI[sha256sum] = "d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458" | ||
31 | |||
32 | python __anonymous () { | ||
33 | endianness = d.getVar('SITEINFO_ENDIANNESS', True) | ||
34 | if endianness == 'le': | ||
35 | d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=little") | ||
36 | else: | ||
37 | d.appendVar('EXTRA_OECONF', " ac_cv_c_endian=big") | ||
38 | } | ||
39 | |||
40 | PACKAGECONFIG ??= "" | ||
41 | PACKAGECONFIG[hugetlbfs] = "--enable-hugetlbfs, --disable-hugetlbfs, libhugetlbfs" | ||
42 | |||
43 | inherit update-rc.d | ||
44 | |||
45 | INITSCRIPT_NAME = "memcached" | ||
46 | INITSCRIPT_PARAMS = "defaults" | ||
47 | |||
48 | do_install_append() { | ||
49 | install -D -m 755 ${S}/scripts/memcached-init ${D}${sysconfdir}/init.d/memcached | ||
50 | mkdir -p ${D}/usr/share/memcached/scripts | ||
51 | install -m 755 ${S}/scripts/memcached-tool ${D}/usr/share/memcached/scripts | ||
52 | install -m 755 ${S}/scripts/start-memcached ${D}/usr/share/memcached/scripts | ||
53 | } | ||
diff --git a/meta-networking/recipes-support/mtr/files/configure.patch b/meta-networking/recipes-support/mtr/files/configure.patch new file mode 100644 index 000000000..c978b879e --- /dev/null +++ b/meta-networking/recipes-support/mtr/files/configure.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | Index: mtr-0.82/configure.in | ||
2 | =================================================================== | ||
3 | --- mtr-0.82.orig/configure.in 2014-07-16 19:52:56.306026346 +0000 | ||
4 | +++ mtr-0.82/configure.in 2014-07-17 21:59:03.208587150 +0000 | ||
5 | @@ -1,5 +1,5 @@ | ||
6 | -AC_INIT(mtr.c) | ||
7 | -AM_INIT_AUTOMAKE(mtr, 0.82) | ||
8 | +AC_INIT(mtr.c, 0.82) | ||
9 | +AM_INIT_AUTOMAKE([foreign]) | ||
10 | |||
11 | |||
12 | AC_SUBST(GTK_OBJ) | ||
diff --git a/meta-networking/recipes-support/mtr/files/no-gtk.patch b/meta-networking/recipes-support/mtr/files/no-gtk.patch new file mode 100644 index 000000000..0dbeb7a29 --- /dev/null +++ b/meta-networking/recipes-support/mtr/files/no-gtk.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Disable gtk check that breaks with current autotools | ||
2 | |||
3 | Ideally we would have a proper fix for this and send that upstream instead. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
8 | |||
9 | diff --git a/configure.in b/configure.in | ||
10 | index 8474543..5118565 100644 | ||
11 | --- a/configure.in | ||
12 | +++ b/configure.in | ||
13 | @@ -48,16 +48,8 @@ AC_ARG_ENABLE(ipv6, | ||
14 | [ --disable-ipv6 Do not enable IPv6], | ||
15 | WANTS_IPV6=$enableval, WANTS_IPV6=yes) | ||
16 | |||
17 | -if test "x$WANTS_GTK" = "xyes"; then | ||
18 | - AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS" | ||
19 | - LIBS="$LIBS $GTK_LIBS -lm", | ||
20 | - AC_MSG_WARN(Building without GTK2 display support) | ||
21 | - AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.]) | ||
22 | - GTK_OBJ="") | ||
23 | -else | ||
24 | - AC_DEFINE(NO_GTK) | ||
25 | - GTK_OBJ="" | ||
26 | -fi | ||
27 | +AC_DEFINE(NO_GTK, 1, [Define if you don't have the GTK+ libraries available.]) | ||
28 | +GTK_OBJ="" | ||
29 | |||
30 | AC_CHECK_FUNC(socket, , | ||
31 | AC_CHECK_LIB(socket, socket, , AC_MSG_ERROR(No socket library found))) | ||
diff --git a/meta-networking/recipes-support/mtr/mtr_0.82.bb b/meta-networking/recipes-support/mtr/mtr_0.82.bb new file mode 100644 index 000000000..b9a1ea286 --- /dev/null +++ b/meta-networking/recipes-support/mtr/mtr_0.82.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Combined traceroute and ping utility" | ||
2 | DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool." | ||
3 | HOMEPAGE = "http://www.bitwizard.nl/mtr/" | ||
4 | DEPENDS = "ncurses" | ||
5 | |||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
8 | file://mtr.c;beginline=5;endline=16;md5=56e390ced194aff352eefab404883057" | ||
9 | |||
10 | SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz \ | ||
11 | file://configure.patch \ | ||
12 | file://no-gtk.patch" | ||
13 | |||
14 | SRC_URI[md5sum] = "10601ea543fda3e51545c4bce195b64c" | ||
15 | SRC_URI[sha256sum] = "f3b457c9623ae03565688a7ffd49d4843a5e2505ccaf3ba8d9fbd86e3ce9b6a0" | ||
16 | |||
17 | inherit autotools | ||
18 | |||
19 | EXTRA_OECONF = "--without-gtk" | ||
20 | |||
diff --git a/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb b/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb new file mode 100644 index 000000000..a0e37e17a --- /dev/null +++ b/meta-networking/recipes-support/ndisc6/ndisc6_1.0.2.bb | |||
@@ -0,0 +1,59 @@ | |||
1 | SECTION = "console/network" | ||
2 | DESCRIPTION = "This package includes some useful diagnostics tools for \ | ||
3 | IPv6 networks, including ndisc6, rdisc6, tcptraceroute6 and traceroute6." | ||
4 | SECTION = "console/network" | ||
5 | HOMEPAGE = "http://www.remlab.net/ndisc6/" | ||
6 | LICENSE = "GPL-2.0" | ||
7 | |||
8 | # The tcptraceroute6 and tracert6 commands depend on rltraceroute6 to | ||
9 | # perform the actual trace operation. | ||
10 | RDEPENDS_${PN}-tcptraceroute6 = "${PN}-rltraceroute6" | ||
11 | RDEPENDS_${PN}-tracert6 = "${PN}-rltraceroute6" | ||
12 | RDEPENDS_${PN}-misc += "perl" | ||
13 | |||
14 | SRC_URI = "http://www.remlab.net/files/ndisc6/ndisc6-${PV}.tar.bz2 \ | ||
15 | " | ||
16 | SRC_URI[md5sum] = "50cb4c19606cf6ff2b7388e71832f579" | ||
17 | SRC_URI[sha256sum] = "6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a" | ||
18 | |||
19 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
20 | |||
21 | inherit autotools gettext | ||
22 | |||
23 | ALLOW_EMPTY_${PN} = "1" | ||
24 | |||
25 | # Split into seperate packages since we normal don't want them all | ||
26 | # The main package is left empty and therefore not created. | ||
27 | PACKAGES += "${PN}-ndisc6 ${PN}-tcpspray6 ${PN}-rdisc6 \ | ||
28 | ${PN}-tcptraceroute6 ${PN}-rltraceroute6 \ | ||
29 | ${PN}-tracert6 ${PN}-rdnssd ${PN}-misc" | ||
30 | FILES_${PN} = "" | ||
31 | FILES_${PN}-ndisc6 = "${bindir}/ndisc6" | ||
32 | FILES_${PN}-tcpspray6 = "${bindir}/tcpspray6" | ||
33 | FILES_${PN}-rdisc6 = "${bindir}/rdisc6" | ||
34 | FILES_${PN}-tcptraceroute6 = "${bindir}/tcptraceroute6" | ||
35 | FILES_${PN}-rltraceroute6 = "${bindir}/rltraceroute6" | ||
36 | FILES_${PN}-tracert6 = "${bindir}/tracert6" | ||
37 | FILES_${PN}-rdnssd = "${sbindir}/rdnssd ${sysconfdir}/rdnssd" | ||
38 | FILES_${PN}-misc = "${bindir}/dnssort ${bindir}/name2addr ${bindir}/tcpspray ${bindir}/addr2name" | ||
39 | |||
40 | DESCRIPTION_${PN}-ndisc6 = "ICMPv6 Neighbor Discovery tool. \ | ||
41 | Performs IPv6 neighbor discovery in userland. Replaces arping from the \ | ||
42 | IPv4 world." | ||
43 | DESCRIPTION_${PN}-rdisc6 = "ICMPv6 Router Discovery tool. \ | ||
44 | Queries IPv6 routers on the network for advertised prefixes. Can be used \ | ||
45 | to detect rogue IPv6 routers, monitor legitimate IPv6 routers." | ||
46 | DESCRITPION_${PN}-tcpspray6 = "Performs bandwidth measurements of TCP \ | ||
47 | sessions between the local system and a remote echo server in either IPv6 \ | ||
48 | or IPv4." | ||
49 | |||
50 | DESCRITPION_${PN}-rdnssd = "Daemon to autoconfigure the list of DNS \ | ||
51 | servers through slateless IPv6 autoconfiguration." | ||
52 | |||
53 | do_install_append () { | ||
54 | rm -rf ${D}${localstatedir} | ||
55 | # Enable SUID bit for applications that need it | ||
56 | chmod 4555 ${D}${bindir}/rltraceroute6 | ||
57 | chmod 4555 ${D}${bindir}/ndisc6 | ||
58 | chmod 4555 ${D}${bindir}/rdisc6 | ||
59 | } | ||
diff --git a/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb new file mode 100644 index 000000000..4237dc4c5 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | require netcat.inc | ||
2 | SUMMARY = "OpenBSD Netcat" | ||
3 | HOMEPAGE = "http://ftp.debian.org" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | |||
6 | DEPENDS += "glib-2.0 libbsd" | ||
7 | |||
8 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}.orig.tar.gz;name=netcat \ | ||
9 | ${DEBIAN_MIRROR}/main/n/netcat-openbsd/netcat-openbsd_${PV}-7.debian.tar.gz;name=netcat-patch" | ||
10 | |||
11 | SRC_URI[netcat.md5sum] = "7e67b22f1ad41a1b7effbb59ff28fca1" | ||
12 | SRC_URI[netcat.sha256sum] = "40653fe66c1516876b61b07e093d826e2a5463c5d994f1b7e6ce328f3edb211e" | ||
13 | SRC_URI[netcat-patch.md5sum] = "e914f8eb7eda5c75c679dd77787ac76b" | ||
14 | SRC_URI[netcat-patch.sha256sum] = "eee759327ffea293e81d0dde67921b7fcfcad279ffd7a2c9d037bbc8f882b363" | ||
15 | |||
16 | S = "${WORKDIR}/${BPN}-${PV}" | ||
17 | |||
18 | do_configure[noexec] = "1" | ||
19 | |||
20 | netcat_do_patch() { | ||
21 | cd ${S} | ||
22 | while read line; do patch -p1 < ${WORKDIR}/debian/patches/$line; done < ${WORKDIR}/debian/patches/series | ||
23 | } | ||
24 | |||
25 | python do_patch() { | ||
26 | bb.build.exec_func('netcat_do_patch', d) | ||
27 | bb.build.exec_func('patch_do_patch', d) | ||
28 | } | ||
29 | |||
30 | do_compile() { | ||
31 | cd ${S} | ||
32 | pkgrel=4 | ||
33 | oe_runmake CFLAGS="$CFLAGS -DDEBIAN_VERSION=\"\\\"${pkgrel}\\\"\"" | ||
34 | } | ||
35 | |||
36 | do_install() { | ||
37 | install -d ${D}${bindir} | ||
38 | install -m 755 ${S}/nc ${D}${bindir}/nc.${BPN} | ||
39 | } | ||
40 | ALTERNATIVE_PRIORITY = "50" | ||
diff --git a/meta-networking/recipes-support/netcat/netcat.inc b/meta-networking/recipes-support/netcat/netcat.inc new file mode 100644 index 000000000..6c815d97e --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat.inc | |||
@@ -0,0 +1,5 @@ | |||
1 | SECTION = "console/network" | ||
2 | inherit update-alternatives gettext | ||
3 | |||
4 | ALTERNATIVE_${PN} = "nc" | ||
5 | |||
diff --git a/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch new file mode 100644 index 000000000..dd1938a99 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Make netcat_flag_count() return positive value | ||
2 | |||
3 | C language has 3 distinct char types: | ||
4 | char | ||
5 | unsigned char | ||
6 | signed char | ||
7 | A char has the same range of values as signed char on X86, | ||
8 | but same as unsigned char on PPC which made netcat_flag_count | ||
9 | return a negative value, now we force variable c as signed char | ||
10 | to make netcat_flag_count return positive value. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
15 | --- | ||
16 | src/flagset.c | 2 +- | ||
17 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
18 | |||
19 | diff --git a/src/flagset.c b/src/flagset.c | ||
20 | index 442b634..54ac898 100644 | ||
21 | --- a/src/flagset.c | ||
22 | +++ b/src/flagset.c | ||
23 | @@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port) | ||
24 | |||
25 | int netcat_flag_count(void) | ||
26 | { | ||
27 | - register char c; | ||
28 | + register signed char c; | ||
29 | register int i; | ||
30 | int ret = 0; | ||
31 | |||
32 | -- | ||
33 | 1.7.5.4 | ||
34 | |||
diff --git a/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch new file mode 100644 index 000000000..5cbcb08e8 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Apparently somewhere along the line HAVE_LOCALE_H was changed to | ||
2 | HAVE_LC_MESSAGES. Adjust netcat to match. | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
7 | |||
8 | Index: netcat-0.7.1/src/intl.h | ||
9 | =================================================================== | ||
10 | --- netcat-0.7.1.orig/src/intl.h | ||
11 | +++ netcat-0.7.1/src/intl.h | ||
12 | @@ -25,11 +25,11 @@ | ||
13 | #ifdef ENABLE_NLS | ||
14 | #include <libintl.h> | ||
15 | |||
16 | -#ifdef HAVE_LOCALE_H | ||
17 | +#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H) | ||
18 | #include <locale.h> | ||
19 | #else | ||
20 | #error You must have locale.h in your system | ||
21 | -#endif /* HAVE_LOCALE_H */ | ||
22 | +#endif /* HAVE_LC_MESSAGES || HAVE_LOCALE_H */ | ||
23 | |||
24 | /* Our dear (and very common) gettext macros */ | ||
25 | #define _(String) gettext(String) | ||
diff --git a/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch b/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch new file mode 100644 index 000000000..9b0ed58d6 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat/obsolete_autoconf_macros.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Replace obsoleted AM_CONFIG_HEADER flagged by autoconf 2.69 | ||
2 | locale.h check was picked from old gettext macros but with new aclocal | ||
3 | it picks the right 0.18 gettext.m4 and does not get the check | ||
4 | therefore we explicitly add it to configure.ac | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | |||
10 | Index: netcat-0.7.1/configure.ac | ||
11 | =================================================================== | ||
12 | --- netcat-0.7.1.orig/configure.ac 2013-01-18 01:30:01.928069739 -0800 | ||
13 | +++ netcat-0.7.1/configure.ac 2013-01-18 01:32:50.568073009 -0800 | ||
14 | @@ -26,8 +26,7 @@ | ||
15 | AC_PREREQ(2.53) | ||
16 | |||
17 | dnl without this order in this file, automake will be confused! | ||
18 | -AM_CONFIG_HEADER(config.h) | ||
19 | - | ||
20 | +AC_CONFIG_HEADERS(config.h) | ||
21 | dnl check for programs. first the c compiler. | ||
22 | AC_PROG_CC | ||
23 | AC_PROG_CPP | ||
24 | @@ -56,7 +55,7 @@ | ||
25 | AC_LBL_LIBRARY_NET | ||
26 | |||
27 | dnl Fortunately we have Solaris... | ||
28 | -AC_CHECK_HEADERS(sys/sockio.h) | ||
29 | +AC_CHECK_HEADERS(sys/sockio.h locale.h) | ||
30 | |||
31 | AC_CHECK_FUNCS(srandom random) | ||
32 | if test $ac_cv_func_srandom = no; then | ||
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb new file mode 100644 index 000000000..8710c3646 --- /dev/null +++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | require netcat.inc | ||
2 | SUMMARY = "GNU Netcat" | ||
3 | HOMEPAGE = "http://netcat.sourceforge.net" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
6 | |||
7 | PR = "r3" | ||
8 | |||
9 | SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \ | ||
10 | file://obsolete_autoconf_macros.patch \ | ||
11 | file://netcat-locale_h.patch \ | ||
12 | file://make-netcat_flag_count_work.patch \ | ||
13 | " | ||
14 | |||
15 | SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef" | ||
16 | SRC_URI[sha256sum] = "b55af0bbdf5acc02d1eb6ab18da2acd77a400bafd074489003f3df09676332bb" | ||
17 | |||
18 | inherit autotools | ||
19 | |||
20 | do_install_append() { | ||
21 | install -d ${D}${bindir} | ||
22 | mv ${D}${bindir}/nc ${D}${bindir}/nc.${BPN} | ||
23 | } | ||
24 | ALTERNATIVE_PRIORITY = "100" | ||
diff --git a/meta-networking/recipes-support/netcf/gnulib_git.bb b/meta-networking/recipes-support/netcf/gnulib_git.bb new file mode 100644 index 000000000..1da6c83ed --- /dev/null +++ b/meta-networking/recipes-support/netcf/gnulib_git.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SUMMARY = "The GNU portability library" | ||
2 | DESCRIPTION = "A collection of software subroutines which are designed to \ | ||
3 | be usable on many operating systems. The goal of the project \ | ||
4 | is to make it easy for free software authors to make their \ | ||
5 | software run on many operating systems. Since source is designed \ | ||
6 | to be copied from gnulib, it is not a library per-se, as much \ | ||
7 | as a collection of portable idioms to be used in other projects." | ||
8 | |||
9 | HOMEPAGE = "http://www.gnu.org/software/gnulib/" | ||
10 | SECTION = "libs" | ||
11 | LICENSE = "LGPLv2+" | ||
12 | |||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=e4cf3810f33a067ea7ccd2cd889fed21" | ||
14 | SRCREV = "24379a9217fa4bd62685795aaaa010fd90ced9e3" | ||
15 | SRC_URI = "git://git.sv.gnu.org/gnulib;protocol=git \ | ||
16 | " | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | do_install () { | ||
20 | cd ${S} | ||
21 | git checkout master | ||
22 | git clone ${S} ${D}/${datadir}/gnulib | ||
23 | } | ||
24 | |||
25 | do_patch[noexec] = "1" | ||
26 | do_configure[noexec] = "1" | ||
27 | do_compile[noexec] = "1" | ||
28 | do_package[noexec] = "1" | ||
29 | do_packagedata[noexec] = "1" | ||
30 | do_package_write_ipk[noexec] = "1" | ||
31 | do_package_write_deb[noexec] = "1" | ||
32 | do_package_write_rpm[noexec] = "1" | ||
diff --git a/meta-networking/recipes-support/netcf/netcf_git.bb b/meta-networking/recipes-support/netcf/netcf_git.bb new file mode 100644 index 000000000..979e45b60 --- /dev/null +++ b/meta-networking/recipes-support/netcf/netcf_git.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "netcf" | ||
2 | DESCRIPTION = "netcf is a cross-platform network configuration library." | ||
3 | HOMEPAGE = "https://fedorahosted.org/netcf/" | ||
4 | SECTION = "console/tools" | ||
5 | LICENSE = "LGPLv2.1" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" | ||
8 | |||
9 | SRCREV = "b8a19dc860b38c97c42115d8a559b78853452a4b" | ||
10 | PV = "0.2.3+git${SRCPV}" | ||
11 | |||
12 | SRC_URI = "git://git.fedorahosted.org/netcf.git;protocol=git \ | ||
13 | " | ||
14 | |||
15 | DEPENDS += "augeas libnl libxslt libxml2 gnulib" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit gettext autotools-brokensep pkgconfig | ||
20 | |||
21 | EXTRA_OECONF_append_class-target = " --with-driver=redhat" | ||
22 | do_configure_prepend() { | ||
23 | cd ${S} | ||
24 | rm -f .gitmodules | ||
25 | ./bootstrap --gnulib-srcdir=${STAGING_DATADIR}/gnulib | ||
26 | } | ||
27 | |||
28 | do_install_append() { | ||
29 | mv ${D}${sysconfdir}/rc.d/init.d/ ${D}${sysconfdir} | ||
30 | rm -rf ${D}${sysconfdir}/rc.d/ | ||
31 | } | ||
diff --git a/meta-networking/recipes-support/netperf/files/cpu_set.patch b/meta-networking/recipes-support/netperf/files/cpu_set.patch new file mode 100644 index 000000000..434b79049 --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/cpu_set.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
6 | --- | ||
7 | src/netlib.c | 7 ++++++- | ||
8 | 1 files changed, 6 insertions(+), 1 deletions(-) | ||
9 | |||
10 | diff --git a/src/netlib.c b/src/netlib.c | ||
11 | index 206e002..e33aae6 100644 | ||
12 | --- a/src/netlib.c | ||
13 | +++ b/src/netlib.c | ||
14 | @@ -2265,7 +2265,12 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map) | ||
15 | fall-back on what we had before, which is to use just the size of | ||
16 | an unsigned long. raj 2006-09-14 */ | ||
17 | |||
18 | -#if defined(__CPU_SETSIZE) | ||
19 | +#if defined(CPU_SETSIZE) | ||
20 | +#define NETPERF_CPU_SETSIZE CPU_SETSIZE | ||
21 | +#define NETPERF_CPU_SET(cpu, cpusetp) CPU_SET(cpu, cpusetp) | ||
22 | +#define NETPERF_CPU_ZERO(cpusetp) CPU_ZERO (cpusetp) | ||
23 | + typedef cpu_set_t netperf_cpu_set_t; | ||
24 | +#elif defined(__CPU_SETSIZE) | ||
25 | #define NETPERF_CPU_SETSIZE __CPU_SETSIZE | ||
26 | #if defined(__CPU_SET_S) | ||
27 | #define NETPERF_CPU_SET(cpu, cpusetp) __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp) | ||
28 | -- | ||
29 | 1.7.1.1 | ||
30 | |||
diff --git a/meta-networking/recipes-support/netperf/files/init b/meta-networking/recipes-support/netperf/files/init new file mode 100644 index 000000000..8ba2a6373 --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/init | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # | ||
4 | # Written by Miquel van Smoorenburg <miquels@cistron.nl>. | ||
5 | # Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.org>. | ||
6 | # Modified for Debian by Christoph Lameter <clameter@debian.org> | ||
7 | # Modified for openembedded by Bruno Randolf <bruno.randolf@4g-systems.biz> | ||
8 | |||
9 | ### BEGIN INIT INFO | ||
10 | # Provides: netperf | ||
11 | # Required-Start: $remote_fs $local_fs $time | ||
12 | # Required-Stop: $remote_fs $local_fs $time | ||
13 | # Should-Start: $network $named | ||
14 | # Should-Stop: $network $named | ||
15 | # Default-Start: 2 3 4 5 | ||
16 | # Default-Stop: 0 1 6 | ||
17 | # Short-Description: network benchmark | ||
18 | ### END INIT INFO | ||
19 | |||
20 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
21 | DAEMON=/usr/sbin/netserver | ||
22 | |||
23 | test -f $DAEMON || exit 0 | ||
24 | |||
25 | case "$1" in | ||
26 | start) | ||
27 | echo -n "Starting network benchmark server: netserver" | ||
28 | start-stop-daemon -S -x $DAEMON > /dev/null 2>&1 | ||
29 | echo "." | ||
30 | ;; | ||
31 | stop) | ||
32 | echo -n "Stopping network benchmark server: netserver" | ||
33 | start-stop-daemon -K -x $DAEMON | ||
34 | echo "." | ||
35 | ;; | ||
36 | #reload) | ||
37 | # | ||
38 | # If the daemon can reload its config files on the fly | ||
39 | # for example by sending it SIGHUP, do it here. | ||
40 | # | ||
41 | # If the daemon responds to changes in its config file | ||
42 | # directly anyway, make this a do-nothing entry. | ||
43 | # | ||
44 | # start-stop-daemon --stop --signal 1 --verbose --exec $DAEMON | ||
45 | # ;; | ||
46 | restart|force-reload) | ||
47 | # | ||
48 | # If the "reload" option is implemented, move the "force-reload" | ||
49 | # option to the "reload" entry above. If not, "force-reload" is | ||
50 | # just the same as "restart". | ||
51 | # | ||
52 | start-stop-daemon -K -x $DAEMON | ||
53 | sleep 1 | ||
54 | start-stop-daemon -S -x $DAEMON | ||
55 | ;; | ||
56 | *) | ||
57 | echo "Usage: /etc/init.d/netperf {start|stop|restart|force-reload}" | ||
58 | exit 1 | ||
59 | ;; | ||
60 | esac | ||
61 | |||
62 | exit 0 | ||
diff --git a/meta-networking/recipes-support/netperf/files/vfork.patch b/meta-networking/recipes-support/netperf/files/vfork.patch new file mode 100644 index 000000000..eff98bfde --- /dev/null +++ b/meta-networking/recipes-support/netperf/files/vfork.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | Subject: [PATCH] netperf: fix vfork/fork | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
6 | --- | ||
7 | src/netserver.c | 12 ++++++++++-- | ||
8 | 1 files changed, 10 insertions(+), 2 deletions(-) | ||
9 | |||
10 | diff --git a/src/netserver.c b/src/netserver.c | ||
11 | index 379a106..f6a8b09 100644 | ||
12 | --- a/src/netserver.c | ||
13 | +++ b/src/netserver.c | ||
14 | @@ -1020,7 +1020,7 @@ process_requests() | ||
15 | void | ||
16 | spawn_child() { | ||
17 | |||
18 | -#if defined(HAVE_FORK) | ||
19 | +#if defined(HAVE_FORK) || defined(HAVE_VFORK) | ||
20 | |||
21 | if (debug) { | ||
22 | fprintf(where, | ||
23 | @@ -1038,7 +1038,11 @@ spawn_child() { | ||
24 | |||
25 | signal(SIGCLD,SIG_IGN); | ||
26 | |||
27 | +#if defined(HAVE_FORK) | ||
28 | switch (fork()) { | ||
29 | +#else | ||
30 | + switch (vfork()) { | ||
31 | +#endif | ||
32 | case -1: | ||
33 | fprintf(where, | ||
34 | "%s: fork() error %s (errno %d)\n", | ||
35 | @@ -1405,7 +1409,7 @@ scan_netserver_args(int argc, char *argv[]) { | ||
36 | |||
37 | void | ||
38 | daemonize() { | ||
39 | -#if defined(HAVE_FORK) | ||
40 | +#if defined(HAVE_FORK) || defined(HAVE_VFORK) | ||
41 | |||
42 | if (debug) { | ||
43 | fprintf(where, | ||
44 | @@ -1419,7 +1423,11 @@ daemonize() { | ||
45 | fflush(stdout); | ||
46 | fflush(stderr); | ||
47 | |||
48 | +#if defined(HAVE_FORK) | ||
49 | switch (fork()) { | ||
50 | +#else | ||
51 | + switch (vfork()) { | ||
52 | +#endif | ||
53 | case -1: | ||
54 | fprintf(stderr, | ||
55 | "%s: fork() error %s (errno %d)\n", | ||
56 | -- | ||
57 | 1.7.1.1 | ||
58 | |||
diff --git a/meta-networking/recipes-support/netperf/netperf_2.6.0.bb b/meta-networking/recipes-support/netperf/netperf_2.6.0.bb new file mode 100644 index 000000000..146210c93 --- /dev/null +++ b/meta-networking/recipes-support/netperf/netperf_2.6.0.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | SUMMARY = "A networking benchmarking tool" | ||
2 | DESCRIPTION = "Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." | ||
3 | SECTION = "console/network" | ||
4 | HOMEPAGE = "http://www.netperf.org/" | ||
5 | LICENSE = "netperf" | ||
6 | LICENSE_FLAGS = "non-commercial" | ||
7 | |||
8 | |||
9 | SRC_URI="ftp://ftp.netperf.org/netperf/archive/netperf-${PV}.tar.bz2 \ | ||
10 | file://cpu_set.patch \ | ||
11 | file://vfork.patch \ | ||
12 | file://init" | ||
13 | SRC_URI[md5sum] = "9654ffdfd4c4f2c93ce3733cd9ed9236" | ||
14 | SRC_URI[sha256sum] = "cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://COPYING;md5=a0ab17253e7a3f318da85382c7d5d5d6" | ||
17 | |||
18 | inherit update-rc.d autotools | ||
19 | |||
20 | S = "${WORKDIR}/netperf-${PV}" | ||
21 | |||
22 | # cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros | ||
23 | CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE" | ||
24 | |||
25 | # set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files | ||
26 | # larger than 2GB | ||
27 | CFLAGS_append = "${@base_contains('DISTRO_FEATURES', 'largefile', \ | ||
28 | ' -D_FILE_OFFSET_BITS=64', '', d)}" | ||
29 | |||
30 | PACKAGECONFIG ??= "" | ||
31 | PACKAGECONFIG[sctp] = "--enable-sctp,--disable-sctp,lksctp-tools," | ||
32 | |||
33 | # autotools.bbclass attends to include m4 files with path depth <= 2 by | ||
34 | # "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4. | ||
35 | do_configure_prepend() { | ||
36 | test -d ${S}/m4/m4 && mv -f ${S}/m4/m4 ${S}/m4-files | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | sed -e 's#/usr/sbin/#${sbindir}/#g' -i ${WORKDIR}/init | ||
41 | |||
42 | install -d ${D}${sbindir} ${D}${bindir} ${D}${sysconfdir}/init.d | ||
43 | install -m 4755 src/netperf ${D}${bindir} | ||
44 | install -m 4755 src/netserver ${D}${sbindir} | ||
45 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/netperf | ||
46 | |||
47 | # man | ||
48 | install -d ${D}${mandir}/man1/ | ||
49 | install -m 0644 ${S}/doc/netserver.man ${D}${mandir}/man1/netserver.1 | ||
50 | install -m 0644 ${S}/doc/netperf.man ${D}${mandir}/man1/netperf.1 | ||
51 | |||
52 | # move scripts to examples directory | ||
53 | install -d ${D}${docdir}/netperf/examples | ||
54 | install -m 0644 ${S}/doc/examples/*_script ${D}${docdir}/netperf/examples/ | ||
55 | |||
56 | # docs .. | ||
57 | install -m 0644 ${S}/COPYING ${D}${docdir}/netperf | ||
58 | install -m 0644 ${S}/Release_Notes ${D}${docdir}/netperf | ||
59 | install -m 0644 ${S}/README ${D}${docdir}/netperf | ||
60 | install -m 0644 ${S}/doc/netperf_old.ps ${D}${docdir}/netperf | ||
61 | } | ||
62 | |||
63 | RRECOMMENDS_${PN} += "${@base_contains('PACKAGECONFIG', 'sctp', 'kernel-module-sctp', '', d)}" | ||
64 | |||
65 | INITSCRIPT_NAME="netperf" | ||
66 | INITSCRIPT_PARAMS="defaults" | ||
diff --git a/meta-networking/recipes-support/nis/files/libdl.patch b/meta-networking/recipes-support/nis/files/libdl.patch new file mode 100644 index 000000000..605af319f --- /dev/null +++ b/meta-networking/recipes-support/nis/files/libdl.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | --- pwdutils-2.6/configure.in.orig 2005-04-19 20:22:36.603052192 -0700 | ||
2 | +++ pwdutils-2.6/configure.in 2005-04-19 21:09:45.308023672 -0700 | ||
3 | @@ -178,6 +178,9 @@ | ||
4 | AC_CHECK_LIB(ldap, main, LDAP_LIBS="-lldap $LDAP_LIBS" found_ldap_lib=yes,,$LDAP_LIBS) | ||
5 | fi | ||
6 | |||
7 | + dnl this always needs dl | ||
8 | + AC_CHECK_LIB(dl, dlopen, LDAP_LIBS="$LDAP_LIBS -ldl") | ||
9 | + | ||
10 | if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = netscape5 \); then | ||
11 | AC_CHECK_LIB(ldap50, main, LDAP_LIBS="-lldap50 -lssldap50 -lssl3 -lnss3 -lnspr4 -lprldap50 -lplc4 -lplds4" found_ldap_lib=yes need_pthread=true,, -lpthread) | ||
12 | fi | ||
diff --git a/meta-networking/recipes-support/nis/files/no-selinux.patch b/meta-networking/recipes-support/nis/files/no-selinux.patch new file mode 100644 index 000000000..71da3e393 --- /dev/null +++ b/meta-networking/recipes-support/nis/files/no-selinux.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | --- pwdutils-2.6/lib/copy_xattr.c.orig 2005-04-16 17:15:52.916660880 -0700 | ||
2 | +++ pwdutils-2.6/lib/copy_xattr.c 2005-04-16 17:18:10.345768480 -0700 | ||
3 | @@ -127,8 +127,11 @@ | ||
4 | |||
5 | if (lsetxattr (to, name, value, size, 0) != 0) | ||
6 | { | ||
7 | - if (strcmp (name, "security.selinux") == 0 && | ||
8 | - is_selinux_enabled() == 0) | ||
9 | + if (strcmp (name, "security.selinux") == 0 | ||
10 | +#if defined(WITH_SELINUX) | ||
11 | + && is_selinux_enabled() == 0 | ||
12 | +#endif | ||
13 | + ) | ||
14 | fprintf (stderr, | ||
15 | _("SELinux not enabled, ignore attribute %s for `%s'.\n"), | ||
16 | name, to); | ||
diff --git a/meta-networking/recipes-support/nis/files/ypbind-yocto.init b/meta-networking/recipes-support/nis/files/ypbind-yocto.init new file mode 100644 index 000000000..5f50a530e --- /dev/null +++ b/meta-networking/recipes-support/nis/files/ypbind-yocto.init | |||
@@ -0,0 +1,99 @@ | |||
1 | #! /bin/sh | ||
2 | # Copyright (c) 2004 Author: Thorsten Kukuk <kukuk@suse.de> | ||
3 | # | ||
4 | # /etc/init.d/ypbind | ||
5 | # | ||
6 | # and symbolic its link | ||
7 | # | ||
8 | # /usr/sbin/rcypbind | ||
9 | # | ||
10 | # System startup script for the ypbind daemon | ||
11 | # | ||
12 | ### BEGIN INIT INFO | ||
13 | # Provides: ypbind | ||
14 | # Required-Start: $remote_fs $portmap | ||
15 | # Should-Start: ypserv slpd | ||
16 | # Required-Stop: portmap | ||
17 | # Default-Start: 3 5 | ||
18 | # Default-Stop: 0 1 2 6 | ||
19 | # Short-Description: Start ypbind (necessary for a NIS client) | ||
20 | # Description: ypbind finds the server for NIS domains and maintains | ||
21 | # the NIS binding information. | ||
22 | ### END INIT INFO | ||
23 | |||
24 | YPBIND_BIN=/usr/sbin/ypbind | ||
25 | pidfile=/var/run/ypbind.pid | ||
26 | |||
27 | [ -f /etc/default/ypbind ] && . /etc/default/ypbind | ||
28 | |||
29 | case "$1" in | ||
30 | start) | ||
31 | echo -n "Starting ypbind" | ||
32 | ## If the domainname is not set, skip starting of ypbind | ||
33 | ## and return with "program not configured" | ||
34 | /bin/ypdomainname &> /dev/null | ||
35 | if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then | ||
36 | if [ -f /etc/defaultdomain ]; then | ||
37 | XDOMAINNAME=`cat /etc/defaultdomain` | ||
38 | /bin/ypdomainname "$XDOMAINNAME" | ||
39 | fi | ||
40 | /bin/ypdomainname &> /dev/null | ||
41 | if [ $? -ne 0 -o -z "`/bin/ypdomainname 2>/dev/null`" ]; then | ||
42 | # Tell the user this has skipped | ||
43 | echo -n " . . . . . . . . . . No domainname set" | ||
44 | # service is not configured | ||
45 | exit 1 | ||
46 | fi | ||
47 | fi | ||
48 | |||
49 | ## If we don't have a /etc/yp.conf file, skip starting of | ||
50 | ## ypbind and return with "program not configured" | ||
51 | ## if you add the -broadcast Option later, comment this out. | ||
52 | if [ ! -f /etc/yp.conf -a "$YPBIND_BROADCAST" != "yes" ] ; then | ||
53 | # Tell the user this has skipped | ||
54 | echo -n " . . . . . . . . . . ${attn}/etc/yp.conf not found${norm}" | ||
55 | # service is not configured | ||
56 | exit 1 | ||
57 | fi | ||
58 | |||
59 | # evaluate the OPTIONS for ypbind-mt | ||
60 | OPTIONS="" | ||
61 | test "$YPBIND_LOCAL_ONLY" = "yes" && OPTIONS="-local-only $OPTIONS" | ||
62 | test "$YPBIND_BROADCAST" = "yes" && OPTIONS="-broadcast $OPTIONS" | ||
63 | test "$YPBIND_BROKEN_SERVER" = "yes" && OPTIONS="-broken-server $OPTIONS" | ||
64 | |||
65 | start-stop-daemon --start --quiet --pidfile $pidfile --exec $YPBIND_BIN -- $YPBIND_OPTIONS $OPTIONS | ||
66 | if [ $? -eq 0 ]; then | ||
67 | notfound=1 | ||
68 | for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do | ||
69 | ypwhich &>/dev/null && { notfound=0 ; break; }; | ||
70 | echo -n " ." | ||
71 | sleep 1; | ||
72 | done | ||
73 | if [ $notfound -eq 1 ]; then | ||
74 | echo -n " ${warn}No NIS server found${norm}"; | ||
75 | fi | ||
76 | else | ||
77 | exit 1 | ||
78 | fi | ||
79 | ;; | ||
80 | stop) | ||
81 | echo -n "Shutting down ypbind" | ||
82 | start-stop-daemon --stop --quiet --pidfile $pidfile | ||
83 | # Remove static data, else glibc will continue to use NIS | ||
84 | rm -f /var/yp/binding/* /var/run/ypbind.pid | ||
85 | ;; | ||
86 | restart) | ||
87 | $0 stop | ||
88 | sleep 1 | ||
89 | $0 start | ||
90 | ;; | ||
91 | reload | force-reload) | ||
92 | echo -n "Reload service ypbind" | ||
93 | start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile | ||
94 | ;; | ||
95 | *) | ||
96 | echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" | ||
97 | exit 1 | ||
98 | ;; | ||
99 | esac | ||
diff --git a/meta-networking/recipes-support/nis/nis.inc b/meta-networking/recipes-support/nis/nis.inc new file mode 100644 index 000000000..075d2756d --- /dev/null +++ b/meta-networking/recipes-support/nis/nis.inc | |||
@@ -0,0 +1,31 @@ | |||
1 | # This include file contains global definitions for the | ||
2 | # various NIS packages. | ||
3 | # | ||
4 | # These packages will only function correctly with glibc - | ||
5 | # the rpcsvc functionality is not present in uclibc | ||
6 | DESCRIPTION = "NIS Server and Tools" | ||
7 | HOMEPAGE = "http://www.linux-nis.org/nis/" | ||
8 | SECTION = "console/network" | ||
9 | LICENSE = "GPL-2.0" | ||
10 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
11 | |||
12 | inherit autotools gettext pkgconfig | ||
13 | |||
14 | # install is broken because src/Makefile heroically adds '-s' | ||
15 | # to the install flags - passing -s to the build /usr/bin/install! | ||
16 | # install-strip gets it right but installs ypbind -m <default>, | ||
17 | # not -m 555. In an OE build this is not, so far as I can see, | ||
18 | # a security problem (and this fix to the build problem is *much* | ||
19 | # easier and more maintainable.) | ||
20 | do_install() { | ||
21 | oe_runmake 'DESTDIR=${D}' install-strip | ||
22 | } | ||
23 | |||
24 | # An attempt to build on uclibc will fail, causing annoyance, | ||
25 | # so force the package to be skipped here (this will cause a | ||
26 | # 'nothing provides' error) | ||
27 | python () { | ||
28 | os = bb.data.getVar("TARGET_OS", d, 1) | ||
29 | if os == "linux-uclibc": | ||
30 | raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this") | ||
31 | } | ||
diff --git a/meta-networking/recipes-support/nis/yp-tools/domainname.service b/meta-networking/recipes-support/nis/yp-tools/domainname.service new file mode 100644 index 000000000..21aa92cb3 --- /dev/null +++ b/meta-networking/recipes-support/nis/yp-tools/domainname.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=NIS Domainname | ||
3 | |||
4 | [Service] | ||
5 | Type=oneshot | ||
6 | EnvironmentFile=/etc/nisdomainname | ||
7 | ExecStart=/usr/bin/domainname $NISDOMAINNAME | ||
8 | RemainAfterExit=true | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
12 | |||
diff --git a/meta-networking/recipes-support/nis/yp-tools_2.12.bb b/meta-networking/recipes-support/nis/yp-tools_2.12.bb new file mode 100644 index 000000000..001784550 --- /dev/null +++ b/meta-networking/recipes-support/nis/yp-tools_2.12.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | # This package builds tools to manage NIS | ||
2 | # The source package is utils/net/NIS/yp-tools | ||
3 | # | ||
4 | PR = "r3" | ||
5 | DESCRIPTION="\ | ||
6 | Network Information Service tools. \ | ||
7 | This package contains ypcat, ypmatch, ypset, \ | ||
8 | ypwhich, yppasswd, domainname, nisdomainname \ | ||
9 | and ypdomainname." | ||
10 | |||
11 | require nis.inc | ||
12 | SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \ | ||
13 | file://domainname.service \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[md5sum] = "ce1e06d86caa285fa8cd76fdf103f51e" | ||
17 | SRC_URI[sha256sum] = "6ae8321666eea7837da343eea90ea30273fb74943ad111d5a4befd2afb252063" | ||
18 | |||
19 | CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true" | ||
20 | |||
21 | inherit systemd | ||
22 | |||
23 | RPROVIDES_${PN} += "${PN}-systemd" | ||
24 | RREPLACES_${PN} += "${PN}-systemd" | ||
25 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
26 | SYSTEMD_SERVICE_${PN} = "domainname.service" | ||
27 | |||
28 | do_install_append() { | ||
29 | install -d ${D}${systemd_unitdir}/system | ||
30 | install -m 0644 ${WORKDIR}/domainname.service ${D}${systemd_unitdir}/system | ||
31 | } | ||
diff --git a/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service new file mode 100644 index 000000000..1f8df42af --- /dev/null +++ b/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service | |||
@@ -0,0 +1,14 @@ | |||
1 | [Unit] | ||
2 | Description=YP Bind | ||
3 | Requires=domainname.service | ||
4 | After=domainname.service network.target | ||
5 | Before=systemd-user-sessions.service | ||
6 | |||
7 | [Service] | ||
8 | Type=forking | ||
9 | PIDFile=/var/run/ypbind.pid | ||
10 | ExecStart=/usr/sbin/ypbind | ||
11 | |||
12 | [Install] | ||
13 | WantedBy=multi-user.target | ||
14 | |||
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb new file mode 100644 index 000000000..35ef16a89 --- /dev/null +++ b/meta-networking/recipes-support/nis/ypbind-mt_1.36.bb | |||
@@ -0,0 +1,52 @@ | |||
1 | # This package builds the NIS ypbind daemon | ||
2 | # The source package is utils/net/NIS/ypbind-mt | ||
3 | # | ||
4 | PR = "r3" | ||
5 | DESCRIPTION="\ | ||
6 | Multithreaded NIS bind service (ypbind-mt). \ | ||
7 | ypbind-mt is a complete new implementation of a NIS \ | ||
8 | binding daemon for Linux. It has the following \ | ||
9 | features. Supports ypbind protocol V1 and V2. \ | ||
10 | Uses threads for better response. Supports multiple \ | ||
11 | domain bindings. Supports /var/yp/binding/* file \ | ||
12 | for Linux libc 4/5 and glibc 2.x. Supports a list \ | ||
13 | of known secure NIS server (/etc/yp.conf) Binds to \ | ||
14 | the server which answered as first." | ||
15 | HOMEPAGE="http://www.linux-nis.org/nis/ypbind-mt/index.html" | ||
16 | |||
17 | require nis.inc | ||
18 | |||
19 | LIC_FILES_CHKSUM = "file://COPYING;md5=082c9a0886c7c3db1bc862b5b62ffe08" | ||
20 | |||
21 | SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ | ||
22 | file://ypbind-yocto.init \ | ||
23 | file://ypbind.service \ | ||
24 | " | ||
25 | SRC_URI[md5sum] = "135834db97d78ff6d79fdee2810b4056" | ||
26 | SRC_URI[sha256sum] = "0eff76c1849f4b38ea1a60280d8397c4240369c641fe5402ce57edf1a90958c7" | ||
27 | |||
28 | # ypbind-mt now provides all the functionality of ypbind | ||
29 | # and is used in place of it. | ||
30 | PROVIDES += "ypbind" | ||
31 | |||
32 | CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true" | ||
33 | |||
34 | do_install_append () { | ||
35 | install -d ${D}${sysconfdir}/init.d | ||
36 | install -d ${D}${sysconfdir}/rcS.d | ||
37 | |||
38 | install -m 0755 ${WORKDIR}/ypbind-yocto.init ${D}${sysconfdir}/init.d/ypbind | ||
39 | |||
40 | # TODO, use update-rc.d | ||
41 | ln -s ../init.d/ypbind ${D}${sysconfdir}/rcS.d/S44ypbind | ||
42 | |||
43 | install -d ${D}${systemd_unitdir}/system | ||
44 | install -m 0644 ${WORKDIR}/ypbind.service ${D}${systemd_unitdir}/system | ||
45 | } | ||
46 | |||
47 | inherit systemd | ||
48 | |||
49 | RPROVIDES_${PN} += "${PN}-systemd" | ||
50 | RREPLACES_${PN} += "${PN}-systemd" | ||
51 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
52 | SYSTEMD_SERVICE_${PN} = "ypbind.service" | ||
diff --git a/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch b/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch new file mode 100644 index 000000000..ddcb044e6 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/CVE-2013-5211.patch | |||
@@ -0,0 +1,112 @@ | |||
1 | ntp: fix CVE-2013-5211 | ||
2 | |||
3 | Upstream-status: Backport | ||
4 | |||
5 | The monlist feature in ntp_request.c in ntpd in NTP before | ||
6 | 4.2.7p26 allows remote attackers to cause a denial of service | ||
7 | (traffic amplification) via forged (1) REQ_MON_GETLIST or | ||
8 | (2) REQ_MON_GETLIST_1 requests, as exploited in the wild | ||
9 | in December 2013. | ||
10 | |||
11 | Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com> | ||
12 | |||
13 | --- a/ntpd/ntp_request.c | ||
14 | +++ b/ntpd/ntp_request.c | ||
15 | @@ -1912,44 +1912,11 @@ mon_getlist_0( | ||
16 | struct req_pkt *inpkt | ||
17 | ) | ||
18 | { | ||
19 | - register struct info_monitor *im; | ||
20 | - register struct mon_data *md; | ||
21 | - extern struct mon_data mon_mru_list; | ||
22 | - extern int mon_enabled; | ||
23 | - | ||
24 | #ifdef DEBUG | ||
25 | if (debug > 2) | ||
26 | printf("wants monitor 0 list\n"); | ||
27 | #endif | ||
28 | - if (!mon_enabled) { | ||
29 | - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
30 | - return; | ||
31 | - } | ||
32 | - im = (struct info_monitor *)prepare_pkt(srcadr, inter, inpkt, | ||
33 | - v6sizeof(struct info_monitor)); | ||
34 | - for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0; | ||
35 | - md = md->mru_next) { | ||
36 | - im->lasttime = htonl((u_int32)((current_time - | ||
37 | - md->firsttime) / md->count)); | ||
38 | - im->firsttime = htonl((u_int32)(current_time - md->lasttime)); | ||
39 | - im->restr = htonl((u_int32)md->flags); | ||
40 | - im->count = htonl((u_int32)(md->count)); | ||
41 | - if (IS_IPV6(&md->rmtadr)) { | ||
42 | - if (!client_v6_capable) | ||
43 | - continue; | ||
44 | - im->addr6 = SOCK_ADDR6(&md->rmtadr); | ||
45 | - im->v6_flag = 1; | ||
46 | - } else { | ||
47 | - im->addr = NSRCADR(&md->rmtadr); | ||
48 | - if (client_v6_capable) | ||
49 | - im->v6_flag = 0; | ||
50 | - } | ||
51 | - im->port = md->rmtport; | ||
52 | - im->mode = md->mode; | ||
53 | - im->version = md->version; | ||
54 | - im = (struct info_monitor *)more_pkt(); | ||
55 | - } | ||
56 | - flush_pkt(); | ||
57 | + req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | @@ -1962,50 +1929,7 @@ mon_getlist_1( | ||
62 | struct req_pkt *inpkt | ||
63 | ) | ||
64 | { | ||
65 | - register struct info_monitor_1 *im; | ||
66 | - register struct mon_data *md; | ||
67 | - extern struct mon_data mon_mru_list; | ||
68 | - extern int mon_enabled; | ||
69 | - | ||
70 | - if (!mon_enabled) { | ||
71 | - req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
72 | - return; | ||
73 | - } | ||
74 | - im = (struct info_monitor_1 *)prepare_pkt(srcadr, inter, inpkt, | ||
75 | - v6sizeof(struct info_monitor_1)); | ||
76 | - for (md = mon_mru_list.mru_next; md != &mon_mru_list && im != 0; | ||
77 | - md = md->mru_next) { | ||
78 | - im->lasttime = htonl((u_int32)((current_time - | ||
79 | - md->firsttime) / md->count)); | ||
80 | - im->firsttime = htonl((u_int32)(current_time - md->lasttime)); | ||
81 | - im->restr = htonl((u_int32)md->flags); | ||
82 | - im->count = htonl((u_int32)md->count); | ||
83 | - if (IS_IPV6(&md->rmtadr)) { | ||
84 | - if (!client_v6_capable) | ||
85 | - continue; | ||
86 | - im->addr6 = SOCK_ADDR6(&md->rmtadr); | ||
87 | - im->v6_flag = 1; | ||
88 | - im->daddr6 = SOCK_ADDR6(&md->interface->sin); | ||
89 | - } else { | ||
90 | - im->addr = NSRCADR(&md->rmtadr); | ||
91 | - if (client_v6_capable) | ||
92 | - im->v6_flag = 0; | ||
93 | - if (MDF_BCAST == md->cast_flags) | ||
94 | - im->daddr = NSRCADR(&md->interface->bcast); | ||
95 | - else if (md->cast_flags) { | ||
96 | - im->daddr = NSRCADR(&md->interface->sin); | ||
97 | - if (!im->daddr) | ||
98 | - im->daddr = NSRCADR(&md->interface->bcast); | ||
99 | - } else | ||
100 | - im->daddr = 4; | ||
101 | - } | ||
102 | - im->flags = htonl(md->cast_flags); | ||
103 | - im->port = md->rmtport; | ||
104 | - im->mode = md->mode; | ||
105 | - im->version = md->version; | ||
106 | - im = (struct info_monitor_1 *)more_pkt(); | ||
107 | - } | ||
108 | - flush_pkt(); | ||
109 | + req_ack(srcadr, inter, inpkt, INFO_ERR_NODATA); | ||
110 | } | ||
111 | |||
112 | /* | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta-networking/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch new file mode 100644 index 000000000..cb1e2f734 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | --- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400 | ||
2 | +++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400 | ||
3 | @@ -14,6 +14,14 @@ | ||
4 | # include <sys/timex.h> | ||
5 | #endif | ||
6 | |||
7 | +#if defined(ADJ_NANO) && !defined(MOD_NANO) | ||
8 | +#define MOD_NANO ADJ_NANO | ||
9 | +#endif | ||
10 | + | ||
11 | +#if defined(ADJ_TAI) && !defined(MOD_TAI) | ||
12 | +#define MOD_TAI ADJ_TAI | ||
13 | +#endif | ||
14 | + | ||
15 | #ifndef NTP_SYSCALLS_LIBC | ||
16 | #ifdef NTP_SYSCALLS_STD | ||
17 | # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t)) | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9293.patch b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9293.patch new file mode 100644 index 000000000..667b705ea --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9293.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | CVE-2014-9293 ntp: automatic generation of weak default key in config_auth() | ||
2 | |||
3 | Upstream-Status: Backport [Debian] | ||
4 | |||
5 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
6 | |||
7 | Index: git/ntpd/ntp_config.c | ||
8 | =================================================================== | ||
9 | --- git.orig/ntpd/ntp_config.c 2014-12-20 18:45:45.232872120 +0100 | ||
10 | +++ git/ntpd/ntp_config.c 2014-12-20 18:45:47.672921968 +0100 | ||
11 | @@ -1866,13 +1866,16 @@ | ||
12 | req_hashlen = digest_len; | ||
13 | #endif | ||
14 | } else { | ||
15 | - int rankey; | ||
16 | + unsigned char rankey[16]; | ||
17 | + | ||
18 | + if (ntp_crypto_random_buf(rankey, sizeof (rankey))) { | ||
19 | + msyslog(LOG_ERR, "ntp_crypto_random_buf() failed."); | ||
20 | + exit(1); | ||
21 | + } | ||
22 | |||
23 | - rankey = ntp_random(); | ||
24 | req_keytype = NID_md5; | ||
25 | req_hashlen = 16; | ||
26 | - MD5auth_setkey(req_keyid, req_keytype, | ||
27 | - (u_char *)&rankey, sizeof(rankey)); | ||
28 | + MD5auth_setkey(req_keyid, req_keytype, rankey, sizeof(rankey)); | ||
29 | authtrust(req_keyid, 1); | ||
30 | } | ||
31 | |||
32 | Index: git/ntpd/ntpd.c | ||
33 | =================================================================== | ||
34 | --- git.orig/ntpd/ntpd.c 2014-12-20 18:45:45.232872120 +0100 | ||
35 | +++ git/ntpd/ntpd.c 2014-12-20 18:45:47.672921968 +0100 | ||
36 | @@ -597,6 +597,7 @@ | ||
37 | get_systime(&now); | ||
38 | |||
39 | ntp_srandom((int)(now.l_i * now.l_uf)); | ||
40 | + ntp_crypto_srandom(); | ||
41 | |||
42 | #if !defined(VMS) | ||
43 | # ifndef NODETACH | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9294.patch b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9294.patch new file mode 100644 index 000000000..67e532b9d --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9294.patch | |||
@@ -0,0 +1,128 @@ | |||
1 | CVE-2014-9294 ntp: ntp-keygen uses weak random number generator and seed when generating MD5 keys | ||
2 | |||
3 | Upstream-Status: Backport [Debian] | ||
4 | |||
5 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
6 | |||
7 | Index: ntp-4.2.6p5/include/ntp_random.h | ||
8 | =================================================================== | ||
9 | --- ntp-4.2.6p5.orig/include/ntp_random.h | ||
10 | +++ ntp-4.2.6p5/include/ntp_random.h | ||
11 | @@ -1,6 +1,9 @@ | ||
12 | |||
13 | #include <ntp_types.h> | ||
14 | |||
15 | +void ntp_crypto_srandom(void); | ||
16 | +int ntp_crypto_random_buf(void *buf, size_t nbytes); | ||
17 | + | ||
18 | long ntp_random (void); | ||
19 | void ntp_srandom (unsigned long); | ||
20 | void ntp_srandomdev (void); | ||
21 | Index: ntp-4.2.6p5/libntp/ntp_random.c | ||
22 | =================================================================== | ||
23 | --- ntp-4.2.6p5.orig/libntp/ntp_random.c | ||
24 | +++ ntp-4.2.6p5/libntp/ntp_random.c | ||
25 | @@ -481,3 +481,74 @@ ntp_random( void ) | ||
26 | } | ||
27 | return(i); | ||
28 | } | ||
29 | + | ||
30 | +/* | ||
31 | + * Crypto-quality random number functions | ||
32 | + * | ||
33 | + * Author: Harlan Stenn, 2014 | ||
34 | + * | ||
35 | + * This file is Copyright (c) 2014 by Network Time Foundation. | ||
36 | + * BSD terms apply: see the file COPYRIGHT in the distribution root for details. | ||
37 | + */ | ||
38 | + | ||
39 | +#ifdef OPENSSL | ||
40 | +#include <openssl/err.h> | ||
41 | +#include <openssl/rand.h> | ||
42 | + | ||
43 | +int crypto_rand_init = 0; | ||
44 | +#endif | ||
45 | + | ||
46 | +/* | ||
47 | + * ntp_crypto_srandom: | ||
48 | + * | ||
49 | + * Initialize the random number generator, if needed by the underlying | ||
50 | + * crypto random number generation mechanism. | ||
51 | + */ | ||
52 | + | ||
53 | +void | ||
54 | +ntp_crypto_srandom( | ||
55 | + void | ||
56 | + ) | ||
57 | +{ | ||
58 | +#ifdef OPENSSL | ||
59 | + if (!crypto_rand_init) { | ||
60 | + RAND_poll(); | ||
61 | + crypto_rand_init = 1; | ||
62 | + } | ||
63 | +#else | ||
64 | + /* No initialization needed for arc4random() */ | ||
65 | +#endif | ||
66 | +} | ||
67 | + | ||
68 | +/* | ||
69 | + * ntp_crypto_random_buf: | ||
70 | + * | ||
71 | + * Returns 0 on success, -1 on error. | ||
72 | + */ | ||
73 | +int | ||
74 | +ntp_crypto_random_buf( | ||
75 | + void *buf, | ||
76 | + size_t nbytes | ||
77 | + ) | ||
78 | +{ | ||
79 | +#ifdef OPENSSL | ||
80 | + int rc; | ||
81 | + | ||
82 | + rc = RAND_bytes(buf, nbytes); | ||
83 | + if (1 != rc) { | ||
84 | + unsigned long err; | ||
85 | + char *err_str; | ||
86 | + | ||
87 | + err = ERR_get_error(); | ||
88 | + err_str = ERR_error_string(err, NULL); | ||
89 | + /* XXX: Log the error */ | ||
90 | + | ||
91 | + return -1; | ||
92 | + } | ||
93 | + return 0; | ||
94 | +#else | ||
95 | + arc4random_buf(buf, nbytes); | ||
96 | + return 0; | ||
97 | +#endif | ||
98 | +} | ||
99 | + | ||
100 | Index: ntp-4.2.6p5/util/ntp-keygen.c | ||
101 | =================================================================== | ||
102 | --- ntp-4.2.6p5.orig/util/ntp-keygen.c | ||
103 | +++ ntp-4.2.6p5/util/ntp-keygen.c | ||
104 | @@ -261,6 +261,8 @@ main( | ||
105 | ssl_check_version(); | ||
106 | #endif /* OPENSSL */ | ||
107 | |||
108 | + ntp_crypto_srandom(); | ||
109 | + | ||
110 | /* | ||
111 | * Process options, initialize host name and timestamp. | ||
112 | */ | ||
113 | @@ -727,7 +729,14 @@ gen_md5( | ||
114 | int temp; | ||
115 | |||
116 | while (1) { | ||
117 | - temp = ntp_random() & 0xff; | ||
118 | + int rc; | ||
119 | + | ||
120 | + rc = ntp_crypto_random_buf(&temp, 1); | ||
121 | + if (-1 == rc) { | ||
122 | + fprintf(stderr, "ntp_crypto_random_buf() failed.\n"); | ||
123 | + exit (-1); | ||
124 | + } | ||
125 | + temp &= 0xff; | ||
126 | if (temp == '#') | ||
127 | continue; | ||
128 | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9295.patch b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9295.patch new file mode 100644 index 000000000..6143f26e9 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9295.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | CVE-2014-9295 ntp: Multiple buffer overflows via specially-crafted packets | ||
2 | |||
3 | Upstream-Status: Backport [Debian] | ||
4 | |||
5 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
6 | |||
7 | 2014-12-12 11:06:03+00:00, stenn@psp-fb1.ntp.org +12 -3 | ||
8 | [Sec 2667] buffer overflow in crypto_recv() | ||
9 | 2014-12-12 11:13:40+00:00, stenn@psp-fb1.ntp.org +16 -1 | ||
10 | [Sec 2668] buffer overflow in ctl_putdata() | ||
11 | 2014-12-12 11:19:37+00:00, stenn@psp-fb1.ntp.org +14 -0 | ||
12 | [Sec 2669] buffer overflow in configure() | ||
13 | |||
14 | Index: git/ntpd/ntp_crypto.c | ||
15 | =================================================================== | ||
16 | --- git.orig/ntpd/ntp_crypto.c 2014-12-20 18:45:44.208851199 +0100 | ||
17 | +++ git/ntpd/ntp_crypto.c 2014-12-20 18:45:56.425100776 +0100 | ||
18 | @@ -789,15 +789,24 @@ | ||
19 | * errors. | ||
20 | */ | ||
21 | if (vallen == (u_int)EVP_PKEY_size(host_pkey)) { | ||
22 | + u_int32 *cookiebuf = malloc( | ||
23 | + RSA_size(host_pkey->pkey.rsa)); | ||
24 | + if (!cookiebuf) { | ||
25 | + rval = XEVNT_CKY; | ||
26 | + break; | ||
27 | + } | ||
28 | + | ||
29 | if (RSA_private_decrypt(vallen, | ||
30 | (u_char *)ep->pkt, | ||
31 | - (u_char *)&temp32, | ||
32 | + (u_char *)cookiebuf, | ||
33 | host_pkey->pkey.rsa, | ||
34 | - RSA_PKCS1_OAEP_PADDING) <= 0) { | ||
35 | + RSA_PKCS1_OAEP_PADDING) != 4) { | ||
36 | rval = XEVNT_CKY; | ||
37 | + free(cookiebuf); | ||
38 | break; | ||
39 | } else { | ||
40 | - cookie = ntohl(temp32); | ||
41 | + cookie = ntohl(*cookiebuf); | ||
42 | + free(cookiebuf); | ||
43 | } | ||
44 | } else { | ||
45 | rval = XEVNT_CKY; | ||
46 | Index: git/ntpd/ntp_control.c | ||
47 | =================================================================== | ||
48 | --- git.orig/ntpd/ntp_control.c 2014-12-20 18:45:44.208851199 +0100 | ||
49 | +++ git/ntpd/ntp_control.c 2014-12-20 18:45:56.429100859 +0100 | ||
50 | @@ -486,6 +486,10 @@ | ||
51 | static char *reqpt; | ||
52 | static char *reqend; | ||
53 | |||
54 | +#ifndef MIN | ||
55 | +#define MIN(a, b) (((a) <= (b)) ? (a) : (b)) | ||
56 | +#endif | ||
57 | + | ||
58 | /* | ||
59 | * init_control - initialize request data | ||
60 | */ | ||
61 | @@ -995,6 +999,7 @@ | ||
62 | ) | ||
63 | { | ||
64 | int overhead; | ||
65 | + unsigned int currentlen; | ||
66 | |||
67 | overhead = 0; | ||
68 | if (!bin) { | ||
69 | @@ -1018,12 +1023,22 @@ | ||
70 | /* | ||
71 | * Save room for trailing junk | ||
72 | */ | ||
73 | - if (dlen + overhead + datapt > dataend) { | ||
74 | + while (dlen + overhead + datapt > dataend) { | ||
75 | /* | ||
76 | * Not enough room in this one, flush it out. | ||
77 | */ | ||
78 | + currentlen = MIN(dlen, dataend - datapt); | ||
79 | + | ||
80 | + memcpy(datapt, dp, currentlen); | ||
81 | + | ||
82 | + datapt += currentlen; | ||
83 | + dp += currentlen; | ||
84 | + dlen -= currentlen; | ||
85 | + datalinelen += currentlen; | ||
86 | + | ||
87 | ctl_flushpkt(CTL_MORE); | ||
88 | } | ||
89 | + | ||
90 | memmove((char *)datapt, dp, (unsigned)dlen); | ||
91 | datapt += dlen; | ||
92 | datalinelen += dlen; | ||
93 | @@ -2492,6 +2507,20 @@ | ||
94 | |||
95 | /* Initialize the remote config buffer */ | ||
96 | data_count = reqend - reqpt; | ||
97 | + | ||
98 | + if (data_count > sizeof(remote_config.buffer) - 2) { | ||
99 | + snprintf(remote_config.err_msg, | ||
100 | + sizeof(remote_config.err_msg), | ||
101 | + "runtime configuration failed: request too long"); | ||
102 | + ctl_putdata(remote_config.err_msg, | ||
103 | + strlen(remote_config.err_msg), 0); | ||
104 | + ctl_flushpkt(0); | ||
105 | + msyslog(LOG_NOTICE, | ||
106 | + "runtime config from %s rejected: request too long", | ||
107 | + stoa(&rbufp->recv_srcadr)); | ||
108 | + return; | ||
109 | + } | ||
110 | + | ||
111 | memcpy(remote_config.buffer, reqpt, data_count); | ||
112 | if (data_count > 0 | ||
113 | && '\n' != remote_config.buffer[data_count - 1]) | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9296.patch b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9296.patch new file mode 100644 index 000000000..a85f65d2a --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-4.2.6p5-cve-2014-9296.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | CVE-2014-9296 ntp: receive() missing return on error | ||
2 | |||
3 | Upstream-Status: Backport [Debian] | ||
4 | |||
5 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
6 | |||
7 | 2014-12-12 11:24:22+00:00, stenn@psp-fb1.ntp.org +1 -0 | ||
8 | [Sec 2670] Missing return; from error clause | ||
9 | |||
10 | Index: git/ntpd/ntp_proto.c | ||
11 | =================================================================== | ||
12 | --- git.orig/ntpd/ntp_proto.c 2014-12-20 18:45:42.760821618 +0100 | ||
13 | +++ git/ntpd/ntp_proto.c 2014-12-20 18:46:00.153176945 +0100 | ||
14 | @@ -947,6 +947,7 @@ | ||
15 | fast_xmit(rbufp, MODE_ACTIVE, 0, | ||
16 | restrict_mask); | ||
17 | sys_restricted++; | ||
18 | + return; | ||
19 | } | ||
20 | } | ||
21 | |||
diff --git a/meta-networking/recipes-support/ntp/files/ntp-keygen_no_openssl.patch b/meta-networking/recipes-support/ntp/files/ntp-keygen_no_openssl.patch new file mode 100644 index 000000000..f576e2ee8 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp-keygen_no_openssl.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | Fix ntp-keygen build without OpenSSL | ||
2 | |||
3 | Patch borrowed from Gentoo, originally from upstream | ||
4 | Added --enable-libenvent to config since this version | ||
5 | does not have local libevent support but we need the | ||
6 | functions from the lib. | ||
7 | |||
8 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | |||
12 | Upstream commit: | ||
13 | http://bk1.ntp.org/ntp-stable/?PAGE=patch&REV=5497b345z5MNTuNvJWuqPSje25NQTg | ||
14 | Gentoo bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=533238 | ||
15 | |||
16 | Signed-off-by: Markos Chandras <hwoarang@gentoo.org> | ||
17 | |||
18 | Index: ntp-4.2.6p5/libntp/ntp_random.c | ||
19 | =================================================================== | ||
20 | --- ntp-4.2.6p5.orig/libntp/ntp_random.c | ||
21 | +++ ntp-4.2.6p5/libntp/ntp_random.c | ||
22 | @@ -498,6 +498,21 @@ ntp_random( void ) | ||
23 | int crypto_rand_init = 0; | ||
24 | #endif | ||
25 | |||
26 | +#ifndef HAVE_ARC4RANDOM_BUF | ||
27 | +static void | ||
28 | +arc4random_buf(void *buf, size_t nbytes); | ||
29 | + | ||
30 | +void | ||
31 | +evutil_secure_rng_get_bytes(void *buf, size_t nbytes); | ||
32 | + | ||
33 | +static void | ||
34 | +arc4random_buf(void *buf, size_t nbytes) | ||
35 | +{ | ||
36 | + evutil_secure_rng_get_bytes(buf, nbytes); | ||
37 | + return; | ||
38 | +} | ||
39 | +#endif | ||
40 | + | ||
41 | /* | ||
42 | * ntp_crypto_srandom: | ||
43 | * | ||
44 | Index: ntp-4.2.6p5/util/Makefile.am | ||
45 | =================================================================== | ||
46 | --- ntp-4.2.6p5.orig/util/Makefile.am | ||
47 | +++ ntp-4.2.6p5/util/Makefile.am | ||
48 | @@ -21,6 +21,7 @@ AM_CPPFLAGS= -I$(top_srcdir)/include -I$ | ||
49 | LDADD= ../libntp/libntp.a | ||
50 | ntp_keygen_SOURCES = ntp-keygen.c ntp-keygen-opts.c ntp-keygen-opts.h | ||
51 | ntp_keygen_LDADD= version.o $(LIBOPTS_LDADD) ../libntp/libntp.a @LCRYPTO@ | ||
52 | +ntp_keygen_LDADD += $(LDADD_LIBEVENT) | ||
53 | |||
54 | ETAGS_ARGS= Makefile.am | ||
55 | #EXTRA_DIST= README TAGS | ||
56 | Index: ntp-4.2.6p5/configure.ac | ||
57 | =================================================================== | ||
58 | --- ntp-4.2.6p5.orig/configure.ac | ||
59 | +++ ntp-4.2.6p5/configure.ac | ||
60 | @@ -376,6 +376,8 @@ AC_CHECK_FUNC([openlog], , | ||
61 | AC_SEARCH_LIBS([MD5Init], [md5 md]) | ||
62 | AC_CHECK_FUNCS(MD5Init) | ||
63 | |||
64 | +AC_CHECK_FUNC([arc4random_buf]) | ||
65 | + | ||
66 | NTP_LINEEDITLIBS | ||
67 | |||
68 | dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt | ||
69 | @@ -5205,6 +5207,39 @@ AC_MSG_RESULT([$ntp_use_dev_clockctl]) | ||
70 | |||
71 | AC_CHECK_HEADERS([sys/capability.h sys/prctl.h]) | ||
72 | |||
73 | +AC_MSG_CHECKING([if we have libevent capabilities (libevent)]) | ||
74 | + | ||
75 | +case "$ac_cv_header_event2_event-config_h" in | ||
76 | + yes) | ||
77 | + case "$host" in | ||
78 | + *) ntp_have_linuxcaps=yes | ||
79 | + ;; | ||
80 | + esac | ||
81 | + ;; | ||
82 | + *) | ||
83 | + ntp_have_linuxcaps=no | ||
84 | + ;; | ||
85 | +esac | ||
86 | + | ||
87 | +AC_ARG_ENABLE( | ||
88 | + [libevent], | ||
89 | + [AS_HELP_STRING( | ||
90 | + [--enable-libevent], | ||
91 | + [+ Use libevent capabilities for arc4random] | ||
92 | + )], | ||
93 | + [ntp_have_libevent=$enableval] | ||
94 | +) | ||
95 | + | ||
96 | +AC_MSG_RESULT([$ntp_have_libevent]) | ||
97 | + | ||
98 | +case "$ntp_have_libevent" in | ||
99 | + yes) | ||
100 | + AC_DEFINE([HAVE_LIBEVENT], [1], | ||
101 | + [Do we have libevent capabilities?]) | ||
102 | + LIBS="$LIBS -levent" | ||
103 | +esac | ||
104 | + | ||
105 | + | ||
106 | AC_MSG_CHECKING([if we have linux capabilities (libcap)]) | ||
107 | |||
108 | case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntp.conf b/meta-networking/recipes-support/ntp/files/ntp.conf new file mode 100644 index 000000000..676e18645 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntp.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | # This is the most basic ntp configuration file | ||
2 | # The driftfile must remain in a place specific to this | ||
3 | # machine - it records the machine specific clock error | ||
4 | driftfile /var/lib/ntp/drift | ||
5 | # This should be a server that is close (in IP terms) | ||
6 | # to the machine. Add other servers as required. | ||
7 | # Unless you un-comment the line below ntpd will sync | ||
8 | # only against the local system clock. | ||
9 | # | ||
10 | # server time.server.example.com | ||
11 | # | ||
12 | # Using local hardware clock as fallback | ||
13 | # Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself | ||
14 | server 127.127.1.0 | ||
15 | fudge 127.127.1.0 stratum 14 | ||
16 | # Defining a default security setting | ||
17 | restrict default | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd new file mode 100755 index 000000000..d1b9c4907 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntpd | |||
@@ -0,0 +1,84 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: ntp | ||
5 | # Required-Start: $network $remote_fs $syslog | ||
6 | # Required-Stop: $network $remote_fs $syslog | ||
7 | # Default-Start: 2 3 4 5 | ||
8 | # Default-Stop: | ||
9 | # Short-Description: Start NTP daemon | ||
10 | ### END INIT INFO | ||
11 | |||
12 | PATH=/sbin:/bin:/usr/bin:/usr/sbin | ||
13 | |||
14 | DAEMON=/usr/sbin/ntpd | ||
15 | PIDFILE=/var/run/ntpd.pid | ||
16 | |||
17 | # ntpd init.d script for ntpdc from ntp.isc.org | ||
18 | test -x $DAEMON -a -r /etc/ntp.conf || exit 0 | ||
19 | |||
20 | # rcS contains TICKADJ | ||
21 | test -r /etc/default/rcS && . /etc/default/rcS | ||
22 | |||
23 | # Source function library. | ||
24 | . /etc/init.d/functions | ||
25 | |||
26 | # Functions to do individual actions | ||
27 | settick(){ | ||
28 | # If TICKADJ is set we *must* adjust it before we start, because the | ||
29 | # driftfile relies on the correct setting | ||
30 | test -n "$TICKADJ" -a -x /usr/sbin/tickadj && { | ||
31 | echo -n "Setting tick to $TICKADJ: " | ||
32 | /usr/sbin/tickadj "$TICKADJ" | ||
33 | echo "done" | ||
34 | } | ||
35 | } | ||
36 | startdaemon(){ | ||
37 | # The -g option allows ntpd to step the time to correct it just | ||
38 | # once. The daemon will exit if the clock drifts too much after | ||
39 | # this. If ntpd seems to disappear after a while assume TICKADJ | ||
40 | # above is set to a totally incorrect value. | ||
41 | echo -n "Starting ntpd: " | ||
42 | start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -u ntp:ntp -p $PIDFILE "$@" | ||
43 | echo "done" | ||
44 | } | ||
45 | stopdaemon(){ | ||
46 | echo -n "Stopping ntpd: " | ||
47 | start-stop-daemon --stop --quiet --oknodo -p $PIDFILE | ||
48 | echo "done" | ||
49 | } | ||
50 | |||
51 | case "$1" in | ||
52 | start) | ||
53 | settick | ||
54 | startdaemon -g | ||
55 | ;; | ||
56 | stop) | ||
57 | stopdaemon | ||
58 | ;; | ||
59 | force-reload) | ||
60 | stopdaemon | ||
61 | settick | ||
62 | startdaemon -g | ||
63 | ;; | ||
64 | restart) | ||
65 | # Don't reset the tick here | ||
66 | stopdaemon | ||
67 | startdaemon -g | ||
68 | ;; | ||
69 | reload) | ||
70 | # Must do this by hand, but don't do -g | ||
71 | stopdaemon | ||
72 | startdaemon | ||
73 | ;; | ||
74 | status) | ||
75 | status /usr/sbin/ntpd; | ||
76 | exit $? | ||
77 | ;; | ||
78 | *) | ||
79 | echo "Usage: ntpd { start | stop | status | restart | reload }" >&2 | ||
80 | exit 1 | ||
81 | ;; | ||
82 | esac | ||
83 | |||
84 | exit 0 | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate b/meta-networking/recipes-support/ntp/files/ntpdate new file mode 100755 index 000000000..17b64d133 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntpdate | |||
@@ -0,0 +1,54 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | PATH=/sbin:/bin:/usr/bin:/usr/sbin | ||
4 | |||
5 | test -x /usr/sbin/ntpdate || exit 0 | ||
6 | |||
7 | if test -f /etc/default/ntpdate ; then | ||
8 | . /etc/default/ntpdate | ||
9 | fi | ||
10 | |||
11 | if [ "$NTPSERVERS" = "" ] ; then | ||
12 | if [ "$METHOD" = "" -a "$1" != "silent" ] ; then | ||
13 | echo "Please set NTPSERVERS in /etc/default/ntpdate" | ||
14 | exit 1 | ||
15 | else | ||
16 | exit 0 | ||
17 | fi | ||
18 | fi | ||
19 | |||
20 | # This is a heuristic: The idea is that if a static interface is brought | ||
21 | # up, that is a major event, and we can put in some extra effort to fix | ||
22 | # the system time. Feel free to change this, especially if you regularly | ||
23 | # bring up new network interfaces. | ||
24 | if [ "$METHOD" = static ]; then | ||
25 | OPTS="-b" | ||
26 | fi | ||
27 | |||
28 | if [ "$METHOD" = loopback ]; then | ||
29 | exit 0 | ||
30 | fi | ||
31 | |||
32 | ( | ||
33 | |||
34 | LOCKFILE=/var/lock/ntpdate | ||
35 | |||
36 | # Avoid running more than one at a time | ||
37 | if [ -x /usr/bin/lockfile-create ]; then | ||
38 | lockfile-create $LOCKFILE | ||
39 | lockfile-touch $LOCKFILE & | ||
40 | LOCKTOUCHPID="$!" | ||
41 | fi | ||
42 | |||
43 | if /usr/sbin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then | ||
44 | if [ "$UPDATE_HWCLOCK" = "yes" ]; then | ||
45 | hwclock --systohc || : | ||
46 | fi | ||
47 | fi | ||
48 | |||
49 | if [ -x /usr/bin/lockfile-create ] ; then | ||
50 | kill $LOCKTOUCHPID | ||
51 | lockfile-remove $LOCKFILE | ||
52 | fi | ||
53 | |||
54 | ) & | ||
diff --git a/meta-networking/recipes-support/ntp/files/ntpdate.default b/meta-networking/recipes-support/ntp/files/ntpdate.default new file mode 100644 index 000000000..486b6e07d --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/ntpdate.default | |||
@@ -0,0 +1,7 @@ | |||
1 | # Configuration script used by ntpdate-sync script | ||
2 | |||
3 | NTPSERVERS="" | ||
4 | |||
5 | # Set to "yes" to write time to hardware clock on success | ||
6 | UPDATE_HWCLOCK="no" | ||
7 | |||
diff --git a/meta-networking/recipes-support/ntp/files/openssl-check.patch b/meta-networking/recipes-support/ntp/files/openssl-check.patch new file mode 100644 index 000000000..8b4a6733c --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/openssl-check.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | Hack OpenSSL check to work when libssl and libcrypto aren't in same dir | ||
2 | |||
3 | Upstream-Status: Inappropriate [config] | ||
4 | |||
5 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
6 | --- | ||
7 | configure | 4 ++-- | ||
8 | m4/ntp_openssl.m4 | 4 ++-- | ||
9 | sntp/configure | 4 ++-- | ||
10 | 3 files changed, 6 insertions(+), 6 deletions(-) | ||
11 | |||
12 | diff --git a/configure b/configure | ||
13 | index aae2c01..6a3c15e 100755 | ||
14 | --- a/configure | ||
15 | +++ b/configure | ||
16 | @@ -22868,8 +22868,8 @@ case "$ans" in | ||
17 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
18 | ;; | ||
19 | *) | ||
20 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
21 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
22 | + test -f $i/libssl.so && break | ||
23 | + test -f $i/libssl.a && break | ||
24 | ;; | ||
25 | esac | ||
26 | done | ||
27 | diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4 | ||
28 | index 7d9f477..67bdd55 100644 | ||
29 | --- a/m4/ntp_openssl.m4 | ||
30 | +++ b/m4/ntp_openssl.m4 | ||
31 | @@ -41,8 +41,8 @@ case "$ans" in | ||
32 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
33 | ;; | ||
34 | *) | ||
35 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
36 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
37 | + test -f $i/libssl.so && break | ||
38 | + test -f $i/libssl.a && break | ||
39 | ;; | ||
40 | esac | ||
41 | done | ||
42 | diff --git a/sntp/configure b/sntp/configure | ||
43 | index 7782c29..55e82d9 100755 | ||
44 | --- a/sntp/configure | ||
45 | +++ b/sntp/configure | ||
46 | @@ -14810,8 +14810,8 @@ case "$ans" in | ||
47 | test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | ||
48 | ;; | ||
49 | *) | ||
50 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break | ||
51 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break | ||
52 | + test -f $i/libssl.so && break | ||
53 | + test -f $i/libssl.a && break | ||
54 | ;; | ||
55 | esac | ||
56 | done | ||
57 | -- | ||
58 | 1.7.1 | ||
59 | |||
diff --git a/meta-networking/recipes-support/ntp/files/tickadj.c.patch b/meta-networking/recipes-support/ntp/files/tickadj.c.patch new file mode 100644 index 000000000..9ef9de9e1 --- /dev/null +++ b/meta-networking/recipes-support/ntp/files/tickadj.c.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c | ||
2 | =================================================================== | ||
3 | --- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 | ||
4 | +++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200 | ||
5 | @@ -21,7 +21,8 @@ | ||
6 | # include <unistd.h> | ||
7 | #endif /* HAVE_UNISTD_H */ | ||
8 | |||
9 | -#ifdef HAVE___ADJTIMEX /* Linux */ | ||
10 | +/* proper handling here has been moved to upstream ntp bugzilla */ | ||
11 | +#ifdef linux | ||
12 | |||
13 | #include <sys/timex.h> | ||
14 | struct timex txc; | ||
15 | @@ -91,7 +92,7 @@ | ||
16 | } | ||
17 | |||
18 | if (!errflg) { | ||
19 | - if (__adjtimex(&txc) < 0) | ||
20 | + if (adjtimex(&txc) < 0) | ||
21 | perror("adjtimex"); | ||
22 | else if (!quiet) | ||
23 | printf("tick = %ld\ntick_adj = %d\n", | ||
24 | @@ -146,7 +147,7 @@ | ||
25 | #endif | ||
26 | } | ||
27 | |||
28 | - if (__adjtimex(&txc) < 0) | ||
29 | + if (adjtimex(&txc) < 0) | ||
30 | { | ||
31 | perror("adjtimex"); | ||
32 | } | ||
diff --git a/meta-networking/recipes-support/ntp/ntp.inc b/meta-networking/recipes-support/ntp/ntp.inc new file mode 100644 index 000000000..ab7bd9c53 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp.inc | |||
@@ -0,0 +1,158 @@ | |||
1 | SUMMARY = "Network Time Protocol daemon and utilities" | ||
2 | DESCRIPTION = "The Network Time Protocol (NTP) is used to \ | ||
3 | synchronize the time of a computer client or server to \ | ||
4 | another server or reference time source, such as a radio \ | ||
5 | or satellite receiver or modem." | ||
6 | HOMEPAGE = "http://support.ntp.org" | ||
7 | SECTION = "console/network" | ||
8 | LICENSE = "NTP" | ||
9 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" | ||
10 | |||
11 | DEPENDS = "pps-tools" | ||
12 | |||
13 | INC_PR = "r6" | ||
14 | |||
15 | SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ | ||
16 | file://tickadj.c.patch \ | ||
17 | file://ntp-4.2.4_p6-nano.patch \ | ||
18 | file://openssl-check.patch \ | ||
19 | file://ntpd \ | ||
20 | file://ntp.conf \ | ||
21 | file://ntpdate \ | ||
22 | file://ntpdate.default \ | ||
23 | file://ntpdate.service \ | ||
24 | file://ntpd.service \ | ||
25 | file://sntp.service \ | ||
26 | file://sntp \ | ||
27 | file://ntpd.list \ | ||
28 | file://CVE-2013-5211.patch \ | ||
29 | file://ntp-4.2.6p5-cve-2014-9293.patch \ | ||
30 | file://ntp-4.2.6p5-cve-2014-9294.patch \ | ||
31 | file://ntp-4.2.6p5-cve-2014-9295.patch \ | ||
32 | file://ntp-4.2.6p5-cve-2014-9296.patch \ | ||
33 | file://ntp-keygen_no_openssl.patch \ | ||
34 | " | ||
35 | |||
36 | inherit autotools update-rc.d useradd systemd | ||
37 | |||
38 | # The ac_cv_header_readline_history is to stop ntpdc depending on either | ||
39 | # readline or curses | ||
40 | EXTRA_OECONF += "--with-net-snmp-config=no \ | ||
41 | --without-ntpsnmpd \ | ||
42 | ac_cv_header_readline_history_h=no \ | ||
43 | --with-binsubdir=sbin" | ||
44 | |||
45 | CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" | ||
46 | |||
47 | USERADD_PACKAGES = "${PN}" | ||
48 | NTP_USER_HOME ?= "/var/lib/ntp" | ||
49 | USERADD_PARAM_${PN} = "--system --home-dir ${NTP_USER_HOME} \ | ||
50 | --no-create-home \ | ||
51 | --shell /bin/false --user-group ntp" | ||
52 | |||
53 | # NB: debug is default-enabled by NTP; keep it default-enabled here. | ||
54 | PACKAGECONFIG ??= "event cap debug" | ||
55 | PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ | ||
56 | --with-openssl-incdir=${STAGING_INCDIR} \ | ||
57 | --with-crypto, \ | ||
58 | --without-openssl --without-crypto, \ | ||
59 | openssl" | ||
60 | PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap" | ||
61 | PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline" | ||
62 | PACKAGECONFIG[debug] = "--enable-debugging,--disable-debugging" | ||
63 | PACKAGECONFIG[event] = "--enable-libevent,--disable-libevent, libevent" | ||
64 | |||
65 | do_install_append() { | ||
66 | install -d ${D}${sysconfdir}/init.d | ||
67 | install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} | ||
68 | install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d | ||
69 | install -d ${D}${bindir} | ||
70 | install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync | ||
71 | |||
72 | install -m 755 -d ${D}${NTP_USER_HOME} | ||
73 | chown ntp:ntp ${D}${NTP_USER_HOME} | ||
74 | |||
75 | # Fix hardcoded paths in scripts | ||
76 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
77 | sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
78 | sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
79 | sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync | ||
80 | sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync | ||
81 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntptrace | ||
82 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntptrace | ||
83 | sed -i '1s,#!.*perl -w,#! ${bindir}/env perl,' ${D}${sbindir}/ntp-wait | ||
84 | sed -i '/use/i use warnings;' ${D}${sbindir}/ntp-wait | ||
85 | |||
86 | install -d ${D}/${sysconfdir}/default | ||
87 | install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate | ||
88 | install -m 0644 ${WORKDIR}/sntp ${D}${sysconfdir}/default/ | ||
89 | |||
90 | install -d ${D}/${sysconfdir}/network/if-up.d | ||
91 | ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d | ||
92 | |||
93 | install -d ${D}${systemd_unitdir}/system | ||
94 | install -m 0644 ${WORKDIR}/ntpdate.service ${D}${systemd_unitdir}/system/ | ||
95 | install -m 0644 ${WORKDIR}/ntpd.service ${D}${systemd_unitdir}/system/ | ||
96 | install -m 0644 ${WORKDIR}/sntp.service ${D}${systemd_unitdir}/system/ | ||
97 | |||
98 | install -d ${D}${systemd_unitdir}/ntp-units.d | ||
99 | install -m 0644 ${WORKDIR}/ntpd.list ${D}${systemd_unitdir}/ntp-units.d/60-ntpd.list | ||
100 | } | ||
101 | |||
102 | PACKAGES += "ntpdate sntp ${PN}-tickadj ${PN}-utils" | ||
103 | # NOTE: you don't need ntpdate, use "ntpd -q -g -x" | ||
104 | |||
105 | # ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms | ||
106 | # with wonky clocks (e.g. OpenSlug) | ||
107 | RDEPENDS_${PN} = "${PN}-tickadj libbsd" | ||
108 | # Handle move from bin to utils package | ||
109 | RPROVIDES_${PN}-utils = "${PN}-bin" | ||
110 | RREPLACES_${PN}-utils = "${PN}-bin" | ||
111 | RCONFLICTS_${PN}-utils = "${PN}-bin" | ||
112 | |||
113 | SYSTEMD_PACKAGES = "${PN} ntpdate sntp" | ||
114 | SYSTEMD_SERVICE_${PN} = "ntpd.service" | ||
115 | SYSTEMD_SERVICE_ntpdate = "ntpdate.service" | ||
116 | SYSTEMD_SERVICE_sntp = "sntp.service" | ||
117 | |||
118 | RPROVIDES_${PN} += "${PN}-systemd" | ||
119 | RREPLACES_${PN} += "${PN}-systemd" | ||
120 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
121 | |||
122 | RPROVIDES_ntpdate += "ntpdate-systemd" | ||
123 | RREPLACES_ntpdate += "ntpdate-systemd" | ||
124 | RCONFLICTS_ntpdate += "ntpdate-systemd" | ||
125 | |||
126 | RSUGGESTS_${PN} = "iana-etc" | ||
127 | |||
128 | FILES_${PN} = "${sbindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${libdir} \ | ||
129 | ${NTP_USER_HOME} \ | ||
130 | ${systemd_unitdir}/ntp-units.d/60-ntpd.list \ | ||
131 | " | ||
132 | FILES_${PN}-tickadj = "${sbindir}/tickadj" | ||
133 | FILES_${PN}-utils = "${sbindir}" | ||
134 | FILES_ntpdate = "${sbindir}/ntpdate \ | ||
135 | ${sysconfdir}/network/if-up.d/ntpdate-sync \ | ||
136 | ${bindir}/ntpdate-sync \ | ||
137 | ${sysconfdir}/default/ntpdate \ | ||
138 | ${systemd_unitdir}/system/ntpdate.service \ | ||
139 | " | ||
140 | FILES_sntp = "${sbindir}/sntp \ | ||
141 | ${sysconfdir}/default/sntp \ | ||
142 | " | ||
143 | |||
144 | CONFFILES_${PN} = "${sysconfdir}/ntp.conf" | ||
145 | CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate" | ||
146 | |||
147 | INITSCRIPT_NAME = "ntpd" | ||
148 | # No dependencies, so just go in at the standard level (20) | ||
149 | INITSCRIPT_PARAMS = "defaults" | ||
150 | |||
151 | pkg_postinst_ntpdate() { | ||
152 | if ! grep -q -s ntpdate $D/var/spool/cron/root; then | ||
153 | echo "adding crontab" | ||
154 | test -d $D/var/spool/cron || mkdir -p $D/var/spool/cron | ||
155 | echo "30 * * * * ${bindir}/ntpdate-sync silent" >> $D/var/spool/cron/root | ||
156 | fi | ||
157 | } | ||
158 | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.list b/meta-networking/recipes-support/ntp/ntp/ntpd.list new file mode 100644 index 000000000..d1fe6b7e2 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.list | |||
@@ -0,0 +1 @@ | |||
ntpd.service | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service new file mode 100644 index 000000000..b7c426864 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/run/ntpd.pid | ||
8 | ExecStart=/usr/sbin/ntpd -p /run/ntpd.pid -g | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/meta-networking/recipes-support/ntp/ntp/ntpdate.service new file mode 100644 index 000000000..10cbd70f9 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpdate.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service (one-shot ntpdate mode) | ||
3 | Before=ntpd.service | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=/usr/bin/ntpdate-sync silent | ||
8 | RemainAfterExit=yes | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntp/ntp/sntp b/meta-networking/recipes-support/ntp/ntp/sntp new file mode 100644 index 000000000..f8c5895b7 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/sntp | |||
@@ -0,0 +1 @@ | |||
NTPSERVER="ntpserver.example.org" | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/sntp.service b/meta-networking/recipes-support/ntp/ntp/sntp.service new file mode 100644 index 000000000..4898b8a70 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/sntp.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Simple Network Time Service Client | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | EnvironmentFile=-/etc/default/sntp | ||
8 | ExecStart=/usr/sbin/sntp -s $NTPSERVER | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb new file mode 100644 index 000000000..588a1b03c --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp_4.2.6p5.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require ntp.inc | ||
2 | |||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" | ||
6 | SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" | ||
diff --git a/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb b/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb new file mode 100644 index 000000000..b931d0470 --- /dev/null +++ b/meta-networking/recipes-support/nuttcp/nuttcp_7.2.1.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | # Copyright (C) 2013 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "network performance measurement tool" | ||
5 | DESCRIPTION = "nuttcp is a network performance measurement tool intended for use by network \ | ||
6 | and system managers. Its most basic usage is to determine the raw TCP (or UDP) \ | ||
7 | network layer throughput by transferring memory buffers from a source system \ | ||
8 | across an interconnecting network to a destination system, either transferring \ | ||
9 | data for a specified time interval, or alternatively transferring a specified \ | ||
10 | number of bytes." | ||
11 | HOMEPAGE = "http://www.nuttcp.net/nuttcp/Welcome%20Page.html" | ||
12 | LICENSE = "GPL-2.0" | ||
13 | SECTION = "net" | ||
14 | LIC_FILES_CHKSUM = "file://nuttcp-${PV}.c;beginline=4;endline=30;md5=ae7045c3c3616092e07d87f04ba0d960" | ||
15 | |||
16 | SRC_URI = "http://lcp.nrl.navy.mil/nuttcp/beta/nuttcp-${PV}.c" | ||
17 | SRC_URI[md5sum] = "1ebf4a08bad2a295a8155f02995e8754" | ||
18 | SRC_URI[sha256sum] = "c6e33810ccce67260f8d5d627f60e429d44f532365c58ed5673d035e2a59c4db" | ||
19 | |||
20 | S = "${WORKDIR}" | ||
21 | |||
22 | do_compile () { | ||
23 | ${CC} ${CFLAGS} -o nuttcp nuttcp-${PV}.c | ||
24 | } | ||
25 | |||
26 | do_install () { | ||
27 | install -d ${D}${bindir} | ||
28 | install -m 0755 nuttcp ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-networking/recipes-support/openvpn/openvpn/openvpn b/meta-networking/recipes-support/openvpn/openvpn/openvpn new file mode 100755 index 000000000..a3cd6a2f4 --- /dev/null +++ b/meta-networking/recipes-support/openvpn/openvpn/openvpn | |||
@@ -0,0 +1,104 @@ | |||
1 | #!/bin/sh -e | ||
2 | # | ||
3 | # Original version by Robert Leslie | ||
4 | # <rob@mars.org>, edited by iwj and cs | ||
5 | # Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as> | ||
6 | # Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net> | ||
7 | |||
8 | test $DEBIAN_SCRIPT_DEBUG && set -v -x | ||
9 | |||
10 | DAEMON=/usr/sbin/openvpn | ||
11 | CONFIG_DIR=/etc/openvpn | ||
12 | test -x $DAEMON || exit 0 | ||
13 | test -d $CONFIG_DIR || exit 0 | ||
14 | |||
15 | start_vpn () { | ||
16 | modprobe tun >/dev/null 2>&1 || true | ||
17 | $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \ | ||
18 | --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->" | ||
19 | echo -n " $NAME" | ||
20 | } | ||
21 | stop_vpn () { | ||
22 | kill `cat $PIDFILE` || true | ||
23 | rm $PIDFILE | ||
24 | } | ||
25 | |||
26 | case "$1" in | ||
27 | start) | ||
28 | echo -n "Starting openvpn:" | ||
29 | |||
30 | if test -z $2 ; then | ||
31 | for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do | ||
32 | NAME=${CONFIG%%.conf} | ||
33 | start_vpn | ||
34 | done | ||
35 | else | ||
36 | if test -e $CONFIG_DIR/$2.conf ; then | ||
37 | NAME=$2 | ||
38 | start_vpn | ||
39 | else | ||
40 | echo -n " No such VPN: $2" | ||
41 | fi | ||
42 | fi | ||
43 | echo "." | ||
44 | |||
45 | ;; | ||
46 | stop) | ||
47 | echo -n "Stopping openvpn:" | ||
48 | |||
49 | if test -z $2 ; then | ||
50 | for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do | ||
51 | NAME=`echo $PIDFILE | cut -c18-` | ||
52 | NAME=${NAME%%.pid} | ||
53 | stop_vpn | ||
54 | echo -n " $NAME" | ||
55 | done | ||
56 | else | ||
57 | if test -e /var/run/openvpn.$2.pid ; then | ||
58 | PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null` | ||
59 | NAME=`echo $PIDFILE | cut -c18-` | ||
60 | NAME=${NAME%%.pid} | ||
61 | stop_vpn | ||
62 | echo -n " $NAME" | ||
63 | else | ||
64 | echo -n " No such VPN: $2" | ||
65 | fi | ||
66 | fi | ||
67 | echo "." | ||
68 | ;; | ||
69 | # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'. | ||
70 | reload|force-reload) | ||
71 | echo -n "Reloading openvpn:" | ||
72 | for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do | ||
73 | NAME=`echo $PIDFILE | cut -c18-` | ||
74 | NAME=${NAME%%.pid} | ||
75 | # If openvpn if running under a different user than root we'll need to restart | ||
76 | if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then | ||
77 | stop_vpn | ||
78 | sleep 1 | ||
79 | start_vpn | ||
80 | echo -n "(restarted)" | ||
81 | else | ||
82 | kill -HUP `cat $PIDFILE` || true | ||
83 | # start-stop-daemon --stop --signal HUP --quiet --oknodo \ | ||
84 | # --exec $DAEMON --pidfile $PIDFILE | ||
85 | echo -n " $NAME" | ||
86 | fi | ||
87 | done | ||
88 | echo "." | ||
89 | ;; | ||
90 | |||
91 | restart) | ||
92 | $0 stop $2 | ||
93 | sleep 1 | ||
94 | $0 start $2 | ||
95 | ;; | ||
96 | *) | ||
97 | echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2 | ||
98 | exit 1 | ||
99 | ;; | ||
100 | esac | ||
101 | |||
102 | exit 0 | ||
103 | |||
104 | # vim:set ai et sts=2 sw=2 tw=0: | ||
diff --git a/meta-networking/recipes-support/openvpn/openvpn_2.3.4.bb b/meta-networking/recipes-support/openvpn/openvpn_2.3.4.bb new file mode 100644 index 000000000..1fb722a44 --- /dev/null +++ b/meta-networking/recipes-support/openvpn/openvpn_2.3.4.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | SUMMARY = "A full-featured SSL VPN solution via tun device." | ||
2 | HOMEPAGE = "http://openvpn.sourceforge.net" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c" | ||
6 | DEPENDS = "lzo openssl iproute2 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
7 | |||
8 | inherit autotools | ||
9 | |||
10 | SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \ | ||
11 | file://openvpn" | ||
12 | |||
13 | SRC_URI[md5sum] = "04d47237907faabe9d046970ffe44b2e" | ||
14 | SRC_URI[sha256sum] = "af506d5f48568fa8d2f2435cb3fad35f9a9a8f263999ea6df3ba296960cec85a" | ||
15 | |||
16 | CFLAGS += "-fno-inline" | ||
17 | |||
18 | # I want openvpn to be able to read password from file (hrw) | ||
19 | EXTRA_OECONF += "--enable-password-save --enable-iproute2" | ||
20 | EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}" | ||
21 | |||
22 | # Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host. | ||
23 | EXTRA_OECONF += "IPROUTE=/sbin/ip" | ||
24 | |||
25 | do_install_append() { | ||
26 | install -d ${D}/${sysconfdir}/init.d | ||
27 | install -d ${D}/${sysconfdir}/openvpn | ||
28 | install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d | ||
29 | } | ||
30 | |||
31 | RRECOMMENDS_${PN} = "kernel-module-tun" | ||
32 | |||
33 | FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug" | ||
diff --git a/meta-networking/recipes-support/pimd/pimd_2.1.8.bb b/meta-networking/recipes-support/pimd/pimd_2.1.8.bb new file mode 100644 index 000000000..f0323618d --- /dev/null +++ b/meta-networking/recipes-support/pimd/pimd_2.1.8.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "pimd is a lightweight stand-alone PIM-SM v2 multicast routing daemon." | ||
2 | HOMEPAGE = "http://troglobit.com/pimd.html" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=94f108f91fab720d62425770b70dd790" | ||
5 | |||
6 | SRC_URI = "ftp://troglobit.com/pimd/${BP}.tar.bz2" | ||
7 | SRC_URI[md5sum] = "a12448bc7c9bfcebf51a13ebf1ffa962" | ||
8 | SRC_URI[sha256sum] = "01016940543a0a6131d4e6c91b595d47e187012c59a298eec14c3dbc38564b3a" | ||
9 | |||
10 | CFLAGS += "-I ${S}/include " | ||
11 | |||
12 | do_install() { | ||
13 | unset datadir | ||
14 | unset mandir | ||
15 | oe_runmake 'DESTDIR=${D}' install | ||
16 | } | ||
17 | |||
diff --git a/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb b/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb new file mode 100644 index 000000000..06d6d28fa --- /dev/null +++ b/meta-networking/recipes-support/ssmping/ssmping_0.9.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | SUMMARY = "ssmping is a tool for checking whether one can receive SSM from a given host" | ||
2 | HOMEPAGE = "http://www.venaas.no/multicast/ssmping/" | ||
3 | LICENSE = "ISC" | ||
4 | LIC_FILES_CHKSUM = "file://asmping.c;beginline=2;endline=11;md5=1ca8d1a1ca931e5cfe604ebf20a78b71" | ||
5 | |||
6 | SRC_URI = "http://www.venaas.no/multicast/ssmping/${BP}.tar.gz" | ||
7 | SRC_URI[md5sum] = "ad8e3d13f6d72918f73be7e7975d7fad" | ||
8 | SRC_URI[sha256sum] = "22103a37eaa28489169a0927bc01e0596c3485fc4d29fc8456c07fd2c70fca6d" | ||
9 | |||
10 | CFLAGS += "-D_GNU_SOURCE " | ||
diff --git a/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch b/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch new file mode 100644 index 000000000..da96983e6 --- /dev/null +++ b/meta-networking/recipes-support/strongswan/files/fix-funtion-parameter.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | fix the function parameter | ||
2 | |||
3 | Upstream-Status: pending | ||
4 | |||
5 | Original openssl_diffie_hellman_create has three parameters, but | ||
6 | it is reassigned a function pointer which has one parameter, and | ||
7 | is called with one parameter, which will lead to segment fault | ||
8 | on PPC, Now we simply correct the number of parameters. | ||
9 | |||
10 | #0 0x484d4aa0 in __GI_raise (sig=6) | ||
11 | at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 | ||
12 | #1 0x484d9930 in __GI_abort () at abort.c:91 | ||
13 | #2 0x10002064 in segv_handler (signal=11) at charon.c:224 | ||
14 | #3 <signal handler called> | ||
15 | #4 0x48d89630 in openssl_diffie_hellman_create (group=MODP_1024_BIT, g=..., | ||
16 | p=<error reading variable: Cannot access memory at address 0x0>) | ||
17 | at openssl_diffie_hellman.c:143 | ||
18 | #5 0x482c54f8 in create_dh (this=0x11ac6e68, group=MODP_1024_BIT) | ||
19 | at crypto/crypto_factory.c:358 | ||
20 | #6 0x48375884 in create_dh (this=<optimized out>, group=<optimized out>) | ||
21 | at sa/keymat.c:132 | ||
22 | #7 0x483843b8 in process_payloads (this=0x51400a78, message=<optimized | ||
23 | out>) | ||
24 | at sa/tasks/ike_init.c:200 | ||
25 | #8 0x483844d0 in process_r (this=0x51400a78, message=0x51500778) | ||
26 | at sa/tasks/ike_init.c:319 | ||
27 | #9 0x48374c9c in process_request (message=0x51500778, this=0x51400d20) | ||
28 | at sa/task_manager.c:870 | ||
29 | #10 process_message (this=0x51400d20, msg=0x51500778) at | ||
30 | sa/task_manager.c:925 | ||
31 | #11 0x4836c378 in process_message (this=0x514005f0, message=0x51500778) | ||
32 | at sa/ike_sa.c:1317 | ||
33 | #12 0x48362270 in execute (this=0x515008d0) | ||
34 | at processing/jobs/process_message_job.c:74 | ||
35 | |||
36 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
37 | --- | ||
38 | src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | 8 +++++++- | ||
39 | src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | 4 +++- | ||
40 | src/libstrongswan/plugins/openssl/openssl_plugin.c | 1 + | ||
41 | 3 files changed, 11 insertions(+), 2 deletions(-) | ||
42 | |||
43 | diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | ||
44 | index ff33824..bd21446 100644 | ||
45 | --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | ||
46 | +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c | ||
47 | @@ -142,7 +142,7 @@ METHOD(diffie_hellman_t, destroy, void, | ||
48 | /* | ||
49 | * Described in header. | ||
50 | */ | ||
51 | -openssl_diffie_hellman_t *openssl_diffie_hellman_create( | ||
52 | +openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom( | ||
53 | diffie_hellman_group_t group, chunk_t g, chunk_t p) | ||
54 | { | ||
55 | private_openssl_diffie_hellman_t *this; | ||
56 | @@ -197,5 +197,11 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create( | ||
57 | |||
58 | return &this->public; | ||
59 | } | ||
60 | +openssl_diffie_hellman_t *openssl_diffie_hellman_create( diffie_hellman_group_t group) | ||
61 | +{ | ||
62 | + chunk_t g; | ||
63 | + chunk_t p; | ||
64 | + openssl_diffie_hellman_create_custom(group, g, p); | ||
65 | +} | ||
66 | |||
67 | #endif /* OPENSSL_NO_DH */ | ||
68 | diff --git a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | ||
69 | index 53dc59c..eb69eaa 100644 | ||
70 | --- a/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | ||
71 | +++ b/src/libstrongswan/plugins/openssl/openssl_diffie_hellman.h | ||
72 | @@ -44,8 +44,10 @@ struct openssl_diffie_hellman_t { | ||
73 | * @param p custom prime, if MODP_CUSTOM | ||
74 | * @return openssl_diffie_hellman_t object, NULL if not supported | ||
75 | */ | ||
76 | -openssl_diffie_hellman_t *openssl_diffie_hellman_create( | ||
77 | +openssl_diffie_hellman_t *openssl_diffie_hellman_create_custom( | ||
78 | diffie_hellman_group_t group, chunk_t g, chunk_t p); | ||
79 | +openssl_diffie_hellman_t *openssl_diffie_hellman_create( | ||
80 | + diffie_hellman_group_t group); | ||
81 | |||
82 | #endif /** OPENSSL_DIFFIE_HELLMAN_H_ @}*/ | ||
83 | |||
84 | diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c | ||
85 | index ff25086..c76873d 100644 | ||
86 | --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c | ||
87 | +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c | ||
88 | @@ -388,6 +388,7 @@ METHOD(plugin_t, get_features, int, | ||
89 | PLUGIN_PROVIDE(DH, MODP_1024_BIT), | ||
90 | PLUGIN_PROVIDE(DH, MODP_1024_160), | ||
91 | PLUGIN_PROVIDE(DH, MODP_768_BIT), | ||
92 | + PLUGIN_REGISTER(DH, openssl_diffie_hellman_create_custom), | ||
93 | PLUGIN_PROVIDE(DH, MODP_CUSTOM), | ||
94 | #endif | ||
95 | #ifndef OPENSSL_NO_RSA | ||
96 | -- | ||
97 | 1.8.3 | ||
98 | |||
diff --git a/meta-networking/recipes-support/strongswan/strongswan_5.2.0.bb b/meta-networking/recipes-support/strongswan/strongswan_5.2.0.bb new file mode 100644 index 000000000..0997fd03c --- /dev/null +++ b/meta-networking/recipes-support/strongswan/strongswan_5.2.0.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \ | ||
2 | Linux operating system." | ||
3 | SUMMARY = "strongSwan is an OpenSource IPsec implementation" | ||
4 | HOMEPAGE = "http://www.strongswan.org" | ||
5 | SECTION = "console/network" | ||
6 | LICENSE = "GPLv2" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
8 | DEPENDS = "gmp openssl flex-native flex bison-native" | ||
9 | |||
10 | SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \ | ||
11 | file://fix-funtion-parameter.patch \ | ||
12 | " | ||
13 | |||
14 | SRC_URI[md5sum] = "5cee4ee1a6ccb74400758b3ace54d46e" | ||
15 | SRC_URI[sha256sum] = "b00c30bd2e60ff2e5fc85f54bbad54fe246585812fdf212dbe777a5258da26ce" | ||
16 | |||
17 | EXTRA_OECONF = "--enable-gmp \ | ||
18 | --enable-openssl \ | ||
19 | --without-lib-prefix \ | ||
20 | " | ||
21 | |||
22 | EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
23 | |||
24 | PACKAGECONFIG ??= "sqlite3 curl \ | ||
25 | ${@base_contains('DISTRO_FEATURES', 'ldap', 'ldap', '', d)} \ | ||
26 | " | ||
27 | PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3," | ||
28 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap," | ||
29 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl," | ||
30 | PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4," | ||
31 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," | ||
32 | |||
33 | inherit autotools systemd pkgconfig | ||
34 | |||
35 | RRECOMMENDS_${PN} = "kernel-module-ipsec" | ||
36 | |||
37 | FILES_${PN} += "${libdir}/ipsec/lib*${SOLIBS} ${libdir}/ipsec/plugins/*.so" | ||
38 | FILES_${PN}-dbg += "${libdir}/ipsec/.debug ${libdir}/ipsec/plugins/.debug ${libexecdir}/ipsec/.debug" | ||
39 | FILES_${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/plugins/*.la" | ||
40 | FILES_${PN}-staticdev += "${libdir}/ipsec/*.a ${libdir}/ipsec/plugins/*.a" | ||
41 | |||
42 | RPROVIDES_${PN} += "${PN}-systemd" | ||
43 | RREPLACES_${PN} += "${PN}-systemd" | ||
44 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
45 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
diff --git a/meta-networking/recipes-support/stunnel/stunnel_4.56.bb b/meta-networking/recipes-support/stunnel/stunnel_4.56.bb new file mode 100644 index 000000000..74f2234f0 --- /dev/null +++ b/meta-networking/recipes-support/stunnel/stunnel_4.56.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | SUMMARY = "Program for providing universal TLS/SSL tunneling service" | ||
2 | DESCRIPTION = "SSL encryption wrapper between remote client and local (inetd-startable) or remote server." | ||
3 | SECTION = "net" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=f41ebed8571077706fee0b860c4d6666" | ||
6 | DEPENDS = "openssl zlib tcp-wrappers" | ||
7 | |||
8 | RDEPENDS_${PN} += "perl" | ||
9 | |||
10 | SRC_URI = "https://www.stunnel.org/downloads/archive/4.x/${BP}.tar.gz" | ||
11 | |||
12 | SRC_URI[md5sum] = "ac4c4a30bd7a55b6687cbd62d864054c" | ||
13 | SRC_URI[sha256sum] = "9cae2cfbe26d87443398ce50d7d5db54e5ea363889d5d2ec8d2778a01c871293" | ||
14 | |||
15 | inherit autotools | ||
16 | |||
17 | EXTRA_OECONF += "--with-ssl='${STAGING_EXECPREFIXDIR}' --disable-fips" | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch new file mode 100644 index 000000000..358f6050f --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/add-ptest.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 7b259580800e259d232229dc89f97058b56e2fe8 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongjun.Yang" <hongjun.yang@windriver.com> | ||
3 | Date: Wed, 22 Oct 2014 10:02:48 +0800 | ||
4 | Subject: [PATCH] Add ptest for tcpdump | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Hongjun.Yang <hongjun.yang@windriver.com> | ||
9 | --- | ||
10 | Makefile.in | 10 +++++++++- | ||
11 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/Makefile.in b/Makefile.in | ||
14 | index 8c35a45..4fb8ae6 100644 | ||
15 | --- a/Makefile.in | ||
16 | +++ b/Makefile.in | ||
17 | @@ -428,9 +428,17 @@ distclean: | ||
18 | tests/failure-outputs.txt | ||
19 | rm -rf autom4te.cache tests/DIFF tests/NEW | ||
20 | |||
21 | -check: tcpdump | ||
22 | +buildtest-TESTS: tcpdump | ||
23 | + | ||
24 | +runtest-PTEST: | ||
25 | (cd tests && ./TESTrun.sh) | ||
26 | |||
27 | +install-ptest: | ||
28 | + cp -r tests $(DESTDIR) | ||
29 | + cp -r config.h $(DESTDIR) | ||
30 | + install -m 0755 Makefile $(DESTDIR) | ||
31 | + ln -sf /usr/sbin/tcpdump $(DESTDIR)/tcpdump | ||
32 | + | ||
33 | tags: $(TAGFILES) | ||
34 | ctags -wtd $(TAGFILES) | ||
35 | |||
36 | -- | ||
37 | 1.9.1 | ||
38 | |||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch new file mode 100644 index 000000000..3697420fd --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/configure.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | --- | ||
2 | aclocal.m4 | 1 - | ||
3 | configure.in | 1 + | ||
4 | 2 files changed, 1 insertions(+), 1 deletions(-) | ||
5 | |||
6 | diff --git a/aclocal.m4 b/aclocal.m4 | ||
7 | index 40b5866..0c662b0 100644 | ||
8 | --- a/aclocal.m4 | ||
9 | +++ b/aclocal.m4 | ||
10 | @@ -40,7 +40,6 @@ dnl | ||
11 | AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC, | ||
12 | [AC_PREREQ(2.50) | ||
13 | AC_BEFORE([$0], [AC_LBL_C_INIT]) | ||
14 | - AC_BEFORE([$0], [AC_PROG_CC]) | ||
15 | AC_BEFORE([$0], [AC_LBL_FIXINCLUDES]) | ||
16 | AC_BEFORE([$0], [AC_LBL_DEVEL]) | ||
17 | AC_ARG_WITH(gcc, [ --without-gcc don't use gcc]) | ||
18 | diff --git a/configure.in b/configure.in | ||
19 | index 11257c9..7f9591c 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/configure.in | ||
22 | @@ -19,6 +19,7 @@ AC_REVISION($Revision: 1.204 $) | ||
23 | AC_PREREQ(2.50) | ||
24 | AC_INIT(tcpdump.c) | ||
25 | |||
26 | +AC_PROG_CC | ||
27 | AC_CANONICAL_HOST | ||
28 | |||
29 | AC_LBL_C_INIT_BEFORE_CC(V_CCOPT, V_INCLS) | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest new file mode 100755 index 000000000..c03a8b8ef --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/run-ptest | |||
@@ -0,0 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | make -k runtest-PTEST | sed -e '/: passed/ s/^/PASS: /g' \ | ||
3 | -e '/: failed/ s/^/FAIL: /g' \ | ||
4 | -e 's/: passed//g' \ | ||
5 | -e 's/: failed//g' | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch new file mode 100644 index 000000000..50e2d5439 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-configure-dlpi.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | [PATCH] tcpdump: cross-compiling not check dlpi. | ||
2 | |||
3 | For cross-compiling on Linux platforms, we do not need to check libdlpi | ||
4 | since it is only placed on Solaris. | ||
5 | Also, checking libdlpi in native /lib would cause do_qa_configure fail. | ||
6 | |||
7 | Upstream-Status: Pending. | ||
8 | |||
9 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
10 | --- | ||
11 | configure.in | 4 +++- | ||
12 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
13 | |||
14 | diff --git a/configure.in b/configure.in | ||
15 | index 7f9591c..ca277c0 100644 | ||
16 | --- a/configure.in | ||
17 | +++ b/configure.in | ||
18 | @@ -716,7 +716,9 @@ don't.]) | ||
19 | fi | ||
20 | |||
21 | # libdlpi is needed for Solaris 11 and later. | ||
22 | -AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib) | ||
23 | +if test "$cross_compiling" != yes; then | ||
24 | + AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib) | ||
25 | +fi | ||
26 | |||
27 | dnl portability macros for getaddrinfo/getnameinfo | ||
28 | dnl | ||
29 | -- | ||
30 | 1.7.5.4 | ||
31 | |||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch new file mode 100644 index 000000000..b414b72e9 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/tcpdump-cross-getaddrinfo.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Fix getaddinfo check when cross compiling | ||
2 | |||
3 | Upstream-Status: Pending. | ||
4 | |||
5 | AC_TRY_RUN defaults to td_cv_buggygetaddrinfo=yes when | ||
6 | cross-compiling. So this change indicates that we | ||
7 | are cross-compiling. | ||
8 | |||
9 | Signed-of-by: Aws Ismail <aws.ismail@windriver.com> | ||
10 | |||
11 | diff --git a/configure.in b/configure.in | ||
12 | index ca277c0..283035e 100644 | ||
13 | --- a/configure.in | ||
14 | +++ b/configure.in | ||
15 | @@ -434,7 +434,7 @@ main() | ||
16 | ], | ||
17 | td_cv_buggygetaddrinfo=no, | ||
18 | td_cv_buggygetaddrinfo=yes, | ||
19 | - td_cv_buggygetaddrinfo=yes)]) | ||
20 | + td_cv_buggygetaddrinfo=cross)]) | ||
21 | if test "$td_cv_buggygetaddrinfo" = no; then | ||
22 | AC_MSG_RESULT(good) | ||
23 | else | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch new file mode 100644 index 000000000..d7a3ac23b --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump-4.6.1/unnecessary-to-check-libpcap.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | unnecessary to check libpcap | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | since the check of libpcap did not consider the cross-compile, lead to the | ||
6 | below error: | ||
7 | This autoconf log indicates errors, it looked at host include and/or | ||
8 | library paths while determining system capabilities. | ||
9 | |||
10 | In fact, the libpcap has been added into the tcpdump's DEPENDS, not need to | ||
11 | check if libpcap existed. | ||
12 | |||
13 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
14 | --- | ||
15 | configure.in | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/configure.in b/configure.in | ||
19 | index 06fade1..9125de7 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/configure.in | ||
22 | @@ -567,7 +567,7 @@ AC_SEARCH_LIBS(getrpcbynumber, nsl, | ||
23 | dnl AC_CHECK_LIB(z, uncompress) | ||
24 | dnl AC_CHECK_HEADERS(zlib.h) | ||
25 | |||
26 | -AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) | ||
27 | +#AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) | ||
28 | |||
29 | # | ||
30 | # Check for these after AC_LBL_LIBPCAP, so we link with the appropriate | ||
31 | -- | ||
32 | 1.7.9.5 | ||
33 | |||
diff --git a/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb b/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb new file mode 100644 index 000000000..1fdaf308d --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpdump_4.6.1.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "A sophisticated network protocol analyzer" | ||
2 | HOMEPAGE = "http://www.tcpdump.org/" | ||
3 | LICENSE = "BSD" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867" | ||
5 | SECTION = "console/network" | ||
6 | DEPENDS = "libpcap" | ||
7 | |||
8 | SRC_URI = " \ | ||
9 | http://www.tcpdump.org/release/${BP}.tar.gz \ | ||
10 | file://configure.patch \ | ||
11 | file://unnecessary-to-check-libpcap.patch \ | ||
12 | file://tcpdump-configure-dlpi.patch \ | ||
13 | file://tcpdump-cross-getaddrinfo.patch \ | ||
14 | file://add-ptest.patch \ | ||
15 | file://run-ptest \ | ||
16 | " | ||
17 | SRC_URI[md5sum] = "dab267ec30216a069747d10314079ec7" | ||
18 | SRC_URI[sha256sum] = "4c88c2a9aeb4047074f344fc9b2b6577b219972d359e192f6d12ccf983a13fd7" | ||
19 | export LIBS=" -lpcap" | ||
20 | |||
21 | inherit autotools-brokensep ptest | ||
22 | CACHED_CONFIGUREVARS = "ac_cv_linux_vers=${ac_cv_linux_vers=2}" | ||
23 | |||
24 | PACKAGECONFIG ??= "openssl ipv6" | ||
25 | PACKAGECONFIG[openssl] = "--with-crypto=yes, --without-openssl --without-crypto, openssl" | ||
26 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," | ||
27 | |||
28 | EXTRA_AUTORECONF += " -I m4" | ||
29 | |||
30 | do_configure_prepend() { | ||
31 | mkdir -p ${S}/m4 | ||
32 | if [ -f aclocal.m4 ]; then | ||
33 | mv aclocal.m4 ${S}/m4 | ||
34 | fi | ||
35 | # AC_CHECK_LIB(dlpi.. was looking to host /lib | ||
36 | sed -i 's:-L/lib::g' ./configure.in | ||
37 | } | ||
38 | do_configure_append() { | ||
39 | sed -i 's:-L/usr/lib::' ./Makefile | ||
40 | sed -i 's:-Wl,-rpath,${STAGING_LIBDIR}::' ./Makefile | ||
41 | sed -i 's:-I/usr/include::' ./Makefile | ||
42 | } | ||
43 | |||
44 | do_install_append() { | ||
45 | # tcpdump 4.0.0 installs a copy to /usr/sbin/tcpdump.4.0.0 | ||
46 | rm -f ${D}${sbindir}/tcpdump.${PV} | ||
47 | } | ||
48 | |||
49 | do_compile_ptest() { | ||
50 | oe_runmake buildtest-TESTS | ||
51 | } | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch b/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch new file mode 100644 index 000000000..386b7f83a --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-1.2a3-time.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm] | ||
2 | |||
3 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
4 | |||
5 | --- tcpslice-1.2a3.orig/search.c 2000-09-10 10:52:40.000000000 +0200 | ||
6 | +++ tcpslice-1.2a3/search.c 2006-07-28 14:56:55.000000000 +0200 | ||
7 | @@ -53,7 +53,7 @@ | ||
8 | /* Size of a packet header in bytes; easier than typing the sizeof() all | ||
9 | * the time ... | ||
10 | */ | ||
11 | -#define PACKET_HDR_LEN (sizeof( struct pcap_pkthdr )) | ||
12 | +#define PACKET_HDR_LEN (sizeof( struct pcap_sf_pkthdr )) | ||
13 | |||
14 | extern int snaplen; | ||
15 | |||
16 | @@ -111,16 +111,24 @@ | ||
17 | static void | ||
18 | extract_header( pcap_t *p, u_char *buf, struct pcap_pkthdr *hdr ) | ||
19 | { | ||
20 | - memcpy((char *) hdr, (char *) buf, sizeof(struct pcap_pkthdr)); | ||
21 | + struct pcap_sf_pkthdr hdri; | ||
22 | + | ||
23 | + memcpy((char *) &hdri, (char *) buf, sizeof(struct pcap_sf_pkthdr)); | ||
24 | |||
25 | if ( pcap_is_swapped( p ) ) | ||
26 | { | ||
27 | - hdr->ts.tv_sec = SWAPLONG(hdr->ts.tv_sec); | ||
28 | - hdr->ts.tv_usec = SWAPLONG(hdr->ts.tv_usec); | ||
29 | - hdr->len = SWAPLONG(hdr->len); | ||
30 | - hdr->caplen = SWAPLONG(hdr->caplen); | ||
31 | + hdr->ts.tv_sec = SWAPLONG(hdri.ts.tv_sec); | ||
32 | + hdr->ts.tv_usec = SWAPLONG(hdri.ts.tv_usec); | ||
33 | + hdr->len = SWAPLONG(hdri.len); | ||
34 | + hdr->caplen = SWAPLONG(hdri.caplen); | ||
35 | + } | ||
36 | + else | ||
37 | + { | ||
38 | + hdr->ts.tv_sec = hdri.ts.tv_sec; | ||
39 | + hdr->ts.tv_usec = hdri.ts.tv_usec; | ||
40 | + hdr->len = hdri.len; | ||
41 | + hdr->caplen = hdri.caplen; | ||
42 | } | ||
43 | - | ||
44 | /* | ||
45 | * From bpf/libpcap/savefile.c: | ||
46 | * | ||
47 | --- tcpslice-1.2a3.orig/tcpslice.h 1995-11-02 00:40:53.000000000 +0100 | ||
48 | +++ tcpslice-1.2a3/tcpslice.h 2006-07-28 14:56:55.000000000 +0200 | ||
49 | @@ -20,6 +20,26 @@ | ||
50 | */ | ||
51 | |||
52 | |||
53 | +#include <time.h> | ||
54 | +/* #include <net/bpf.h> */ | ||
55 | + | ||
56 | +/* | ||
57 | + * This is a timeval as stored in disk in a dumpfile. | ||
58 | + * It has to use the same types everywhere, independent of the actual | ||
59 | + * `struct timeval' | ||
60 | + */ | ||
61 | + | ||
62 | +struct pcap_timeval { | ||
63 | + bpf_int32 tv_sec; /* seconds */ | ||
64 | + bpf_int32 tv_usec; /* microseconds */ | ||
65 | +}; | ||
66 | + | ||
67 | +struct pcap_sf_pkthdr { | ||
68 | + struct pcap_timeval ts; /* time stamp */ | ||
69 | + bpf_u_int32 caplen; /* length of portion present */ | ||
70 | + bpf_u_int32 len; /* length this packet (off wire) */ | ||
71 | +}; | ||
72 | + | ||
73 | time_t gwtm2secs( struct tm *tm ); | ||
74 | |||
75 | int sf_find_end( struct pcap *p, struct timeval *first_timestamp, | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch b/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch new file mode 100644 index 000000000..0a7359311 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpslice/tcpslice-CVS.20010207-bpf.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Pending [from tcpdump-4.1.1-1.fc14.src.rpm] | ||
2 | |||
3 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
4 | diff -ur tcpdump-3.8.1/tcpslice/tcpslice.c tcpdump-3.8.1.new/tcpslice/tcpslice.c | ||
5 | --- tcpslice/tcpslice.c 2004-01-15 17:35:53.000000000 +0100 | ||
6 | +++ tcpslice/tcpslice.c 2004-01-15 16:12:57.000000000 +0100 | ||
7 | @@ -35,7 +35,7 @@ | ||
8 | #include <sys/file.h> | ||
9 | #include <sys/stat.h> | ||
10 | |||
11 | -#include <net/bpf.h> | ||
12 | +/* #include <net/bpf.h> */ | ||
13 | |||
14 | #include <ctype.h> | ||
15 | #ifdef HAVE_FCNTL_H | ||
diff --git a/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb b/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb new file mode 100644 index 000000000..203d143b5 --- /dev/null +++ b/meta-networking/recipes-support/tcpdump/tcpslice_1.2a3.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "tcpslice" | ||
2 | DESCRIPTION = "A tool for extracting parts of a tcpdump packet trace." | ||
3 | HOMEPAGE = "http://www.tcpdump.org/related.html" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "BSD-4-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://tcpslice.c;endline=20;md5=99519e2e5234d1662a4ce16baa62c64e" | ||
8 | |||
9 | SRC_URI = "ftp://ftp.ee.lbl.gov/${BP}.tar.gz \ | ||
10 | file://tcpslice-1.2a3-time.patch \ | ||
11 | file://tcpslice-CVS.20010207-bpf.patch \ | ||
12 | " | ||
13 | SRC_URI[md5sum] = "e329cbeb7e589f132d92c3447c477190" | ||
14 | SRC_URI[sha256sum] = "4096e8debc898cfaa16b5306f1c42f8d18b19e30e60da8d4deb781c8f684c840" | ||
15 | |||
16 | inherit autotools-brokensep | ||
17 | |||
18 | DEPENDS += "libpcap" | ||
19 | |||
20 | # We do not want to autoreconf. We must specify srcdir as ".". | ||
21 | # We have to set the ac_cv_* cache variables as well as pass the normal | ||
22 | # cross-compilation options to configure! | ||
23 | # | ||
24 | do_configure () { | ||
25 | oe_runconf \ | ||
26 | --srcdir="." \ | ||
27 | ac_cv_build=${BUILD_SYS} \ | ||
28 | ac_cv_host=${HOST_SYS} \ | ||
29 | ac_cv_target=${HOST_SYS} | ||
30 | } | ||
31 | |||
32 | do_install_prepend () { | ||
33 | mkdir -p ${D}/usr/sbin | ||
34 | } | ||
35 | |||
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch new file mode 100755 index 000000000..a856b1809 --- /dev/null +++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-cross-compile.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | Uptream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com> | ||
4 | |||
5 | --- a/configure.ac | ||
6 | +++ b/configure.ac | ||
7 | @@ -402,7 +402,6 @@ | ||
8 | |||
9 | dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important | ||
10 | dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167 | ||
11 | -libpcap_version_096=no | ||
12 | AC_RUN_IFELSE(AC_LANG_PROGRAM([[ | ||
13 | #include <string.h> | ||
14 | #include <stdlib.h> | ||
15 | @@ -419,11 +418,12 @@ | ||
16 | exit(0); | ||
17 | |||
18 | exit(1); | ||
19 | -]]), [ | ||
20 | - libpcap_version_096=yes | ||
21 | -]) | ||
22 | +]]), | ||
23 | + [libpcap_version_096=yes], | ||
24 | + [libpcap_version_096=no], | ||
25 | + [libpcap_version_096=yes] | ||
26 | +) | ||
27 | |||
28 | -libpcap_ver8=no | ||
29 | AC_RUN_IFELSE(AC_LANG_PROGRAM([[ | ||
30 | #include <string.h> | ||
31 | #include <stdlib.h> | ||
32 | @@ -444,13 +444,12 @@ | ||
33 | exit(0); | ||
34 | |||
35 | exit(1); | ||
36 | -]]), [ | ||
37 | - libpcap_ver8=yes | ||
38 | -], [ | ||
39 | - libpcap_ver8=no | ||
40 | -]) | ||
41 | +]]), | ||
42 | + [libpcap_ver8=yes], | ||
43 | + [libpcap_ver8=no], | ||
44 | + [libpcap_ver8=yes] | ||
45 | +) | ||
46 | |||
47 | -libpcap_ver7=no | ||
48 | AC_RUN_IFELSE(AC_LANG_PROGRAM([[ | ||
49 | #include <string.h> | ||
50 | #include <stdlib.h> | ||
51 | @@ -469,11 +468,11 @@ | ||
52 | exit(0); | ||
53 | |||
54 | exit(1); | ||
55 | -]]), [ | ||
56 | - libpcap_ver7=yes | ||
57 | -], [ | ||
58 | - libpcap_ver7=no | ||
59 | -]) | ||
60 | +]]), | ||
61 | + [libpcap_ver7=yes], | ||
62 | + [libpcap_ver7=no], | ||
63 | + [libpcap_ver7=yes] | ||
64 | +) | ||
65 | |||
66 | if test x$libpcap_ver8 = xyes ; then | ||
67 | AC_MSG_RESULT(>= 0.8.0) | ||
68 | @@ -761,8 +760,8 @@ | ||
69 | |||
70 | have_bpf=no | ||
71 | dnl Check for BSD's BPF | ||
72 | -AC_MSG_CHECKING(for BPF device sending support) | ||
73 | -AC_TRY_RUN([ | ||
74 | +AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf, | ||
75 | +[AC_TRY_RUN([ | ||
76 | #include <stdio.h> | ||
77 | #include <stdlib.h> | ||
78 | #include <sys/types.h> | ||
79 | @@ -796,8 +795,11 @@ | ||
80 | [Do we have BPF device support?]) | ||
81 | AC_MSG_RESULT(yes) | ||
82 | have_bpf=yes | ||
83 | -],[ | ||
84 | - AC_MSG_RESULT(no) | ||
85 | +], | ||
86 | +[AC_MSG_RESULT(no)], | ||
87 | +[AC_MSG_ERROR([cross-compiling, | ||
88 | + presetting ac_cv_have_bpf=(yes|no) will help])] | ||
89 | +) | ||
90 | ]) | ||
91 | |||
92 | |||
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch new file mode 100644 index 000000000..5f36c68c9 --- /dev/null +++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Uptream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com> | ||
4 | |||
5 | Index: tcpreplay-3.4.4/configure.ac | ||
6 | =================================================================== | ||
7 | --- tcpreplay-3.4.4.orig/configure.ac | ||
8 | +++ tcpreplay-3.4.4/configure.ac | ||
9 | @@ -389,7 +389,7 @@ CFLAGS="$CFLAGS -I$LPCAPINCDIR" | ||
10 | AC_SEARCH_LIBS([pcap_close], [pcap], | ||
11 | LPCAPLIB="$LIBS", | ||
12 | AC_ERROR([Unable to link libpcap in ${foundpcap}]), | ||
13 | - -lnl) | ||
14 | + -lnl-3) | ||
15 | |||
16 | AC_SUBST(LPCAPINC) | ||
17 | AC_SUBST(LPCAPLIB) | ||
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch new file mode 100644 index 000000000..3c11c922b --- /dev/null +++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-no-bfp-support.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Uptream-Status: Pending | ||
2 | |||
3 | Signed-off-by: Zongchun Yu <Zongchun.Yu@freescale.com> | ||
4 | |||
5 | --- a/configure.ac | ||
6 | +++ b/configure.ac | ||
7 | @@ -758,6 +758,8 @@ | ||
8 | AC_MSG_RESULT(no) | ||
9 | ]) | ||
10 | |||
11 | +ac_cv_have_bpf=no | ||
12 | + | ||
13 | have_bpf=no | ||
14 | dnl Check for BSD's BPF | ||
15 | AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf, | ||
diff --git a/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb new file mode 100644 index 000000000..4bce270e4 --- /dev/null +++ b/meta-networking/recipes-support/tcpreplay/tcpreplay_3.4.4.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | SUMMARY = "Use previously captured traffic to test network devices" | ||
2 | |||
3 | HOMEPAGE = "http://tcpreplay.synfin.net/" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "GPLv3" | ||
7 | LIC_FILES_CHKSUM = "file://docs/LICENSE;md5=c33cccf72cc1603e8a72a84811ae3ac8" | ||
8 | |||
9 | SRC_URI = "http://prdownloads.sourceforge.net/tcpreplay/${PV}/tcpreplay-${PV}.tar.gz \ | ||
10 | file://tcpreplay-3.4.4-cross-compile.patch \ | ||
11 | file://tcpreplay-3.4.4-no-bfp-support.patch \ | ||
12 | file://tcpreplay-3.4.4-fix-unable-to-link-libpcap-issue.patch \ | ||
13 | " | ||
14 | SRC_URI[md5sum] = "22725feb9b2590809f9350308ec65180" | ||
15 | SRC_URI[sha256sum] = "7a809c58ddec86407fd6e5597ac883d7874a19bea81d716bb2b1c6e3b0e7b58f" | ||
16 | |||
17 | DEPENDS = "libpcap" | ||
18 | |||
19 | EXTRA_OECONF += "--with-libpcap=${STAGING_DIR_HOST}/usr" | ||
20 | |||
21 | inherit siteinfo autotools-brokensep | ||
22 | |||
diff --git a/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch b/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch new file mode 100644 index 000000000..1bda576bc --- /dev/null +++ b/meta-networking/recipes-support/tnftp/tnftp/tnftp-autotools.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | [PATCH] Update configure.ac and Makefile.am to resolve warnings/errors | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
6 | --- | ||
7 | configure.ac | 2 ++ | ||
8 | libnetbsd/Makefile.am | 2 +- | ||
9 | 2 files changed, 3 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/configure.ac b/configure.ac | ||
12 | index a96d2ab..b3b3069 100644 | ||
13 | --- a/configure.ac | ||
14 | +++ b/configure.ac | ||
15 | @@ -71,9 +71,11 @@ AH_TEMPLATE([WITH_SSL], | ||
16 | # | ||
17 | # Checks for programs. | ||
18 | # | ||
19 | +AM_PROG_AR() | ||
20 | AC_PROG_CC() | ||
21 | AC_PROG_AWK() | ||
22 | AC_PROG_LIBTOOL() | ||
23 | +AM_PROG_CC_C_O() | ||
24 | |||
25 | # | ||
26 | # Checks for tool features. | ||
27 | diff --git a/libnetbsd/Makefile.am b/libnetbsd/Makefile.am | ||
28 | index 3e5c3ce..39bb12d 100644 | ||
29 | --- a/libnetbsd/Makefile.am | ||
30 | +++ b/libnetbsd/Makefile.am | ||
31 | @@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libnetbsd.la | ||
32 | libnetbsd_la_SOURCES = | ||
33 | |||
34 | |||
35 | -CPPFLAGS = \ | ||
36 | +AM_CPPFLAGS = \ | ||
37 | -I$(srcdir) \ | ||
38 | -I$(top_srcdir) \ | ||
39 | -I$(top_builddir) | ||
40 | -- | ||
41 | 1.7.10.4 | ||
42 | |||
diff --git a/meta-networking/recipes-support/tnftp/tnftp_20130505.bb b/meta-networking/recipes-support/tnftp/tnftp_20130505.bb new file mode 100644 index 000000000..eda9d5c0f --- /dev/null +++ b/meta-networking/recipes-support/tnftp/tnftp_20130505.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | SUMMARY = "Enhanced NetBSD ftp client" | ||
2 | DESCRIPTION = "tnftp (formerly known as lukemftp) is a port of the NetBSD FTP client \ | ||
3 | to other systems. It offers many enhancements over the traditional \ | ||
4 | BSD FTP client, including command-line editing, command-line fetches \ | ||
5 | of FTP and HTTP URLs (including via proxies), command-line uploads of \ | ||
6 | FTP URLs, context-sensitive word completion, dynamic progress bar, \ | ||
7 | IPv6 support, modification time preservation, paging of local and \ | ||
8 | remote files, passive mode support (with fallback to active mode), \ | ||
9 | SOCKS support, TIS FWTK gate-ftp server support, and transfer rate \ | ||
10 | throttling." | ||
11 | |||
12 | SECTION = "console/network" | ||
13 | LICENSE = "BSD-4-Clause" | ||
14 | |||
15 | DEPENDS = "ncurses" | ||
16 | |||
17 | SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \ | ||
18 | file://tnftp-autotools.patch \ | ||
19 | " | ||
20 | |||
21 | inherit autotools update-alternatives pkgconfig | ||
22 | |||
23 | ALTERNATIVE_PRIORITY = "100" | ||
24 | |||
25 | ALTERNATIVE_${PN} = "ftp" | ||
26 | ALTERNATIVE_LINK_NAME_${PN} = "${bindir}/ftp" | ||
27 | ALTERNATIVE_TARGET_${PN} = "${bindir}/tnftp" | ||
28 | |||
29 | FILES_${PN} = "${bindir}/tnftp" | ||
30 | |||
31 | LIC_FILES_CHKSUM = "file://COPYING;md5=6d6796cb166a9bb050958241dad9479e" | ||
32 | SRC_URI[md5sum] = "66e218d02ec7d9fc39ab70ba2900305a" | ||
33 | SRC_URI[sha256sum] = "6f650e25f6fd51538f677b789b49379f367ae9f1dee74c94cfe24d92abc2cffb" | ||
34 | |||
35 | PACKAGECONFIG ?= "openssl" | ||
36 | PACKAGECONFIG[openssl] = "--enable-ssl, --disable-ssl --with-ssl=no, openssl" | ||
diff --git a/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch b/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch new file mode 100644 index 000000000..2c030b55d --- /dev/null +++ b/meta-networking/recipes-support/traceroute/traceroute/filter-out-the-patches-from-subdirs.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From e273e0ebc753645555909bcc4874c72458b17891 Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Fri, 17 Jan 2014 03:17:44 -0500 | ||
4 | Subject: [PATCH] Make.rules: filter-out the patches from subdirs | ||
5 | |||
6 | The $(subdirs) contains all the dirs under the ${B}, and this one: | ||
7 | |||
8 | do_unpack[cleandirs] = "${S}/patches" | ||
9 | |||
10 | will create a "patches" dir, then there will be compile errors, filter | ||
11 | out the patches will fix the problem. | ||
12 | |||
13 | Note: poky doesn't have this problem since it separates the ${S} and | ||
14 | ${B} | ||
15 | |||
16 | Upstream-Status: Inappropriate [OE specific] | ||
17 | |||
18 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
19 | --- | ||
20 | Make.rules | 4 ++-- | ||
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/Make.rules b/Make.rules | ||
24 | index b077cd5..0bfce2d 100644 | ||
25 | --- a/Make.rules | ||
26 | +++ b/Make.rules | ||
27 | @@ -97,7 +97,7 @@ endif | ||
28 | subdirs := $(filter-out $(SKIPDIRS), $(subdirs)) | ||
29 | endif | ||
30 | |||
31 | -install install-%: subdirs := $(filter-out $(SKIPINSTALL), $(subdirs)) | ||
32 | +install install-%: subdirs := $(filter-out $(SKIPINSTALL) patches, $(subdirs)) | ||
33 | |||
34 | |||
35 | override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared) | ||
36 | @@ -106,7 +106,7 @@ override MAKE += srcdir=$(srcdir) subdirs="$(subdirs)" shared=$(shared) | ||
37 | INCLUDEDIRS := $(filter $(INCLUDEDIRS), $(subdirs)) | ||
38 | LIBDIRS := $(filter $(LIBDIRS), $(subdirs)) | ||
39 | MODDIRS := $(filter $(MODDIRS), $(subdirs)) | ||
40 | -EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS), $(subdirs)) | ||
41 | +EXEDIRS := $(filter-out $(INCLUDEDIRS) $(LIBDIRS) $(MODDIRS) patches, $(subdirs)) | ||
42 | MODUSERS := $(filter $(MODUSERS), $(subdirs)) | ||
43 | SBINUSERS := $(filter $(SBINUSERS), $(subdirs)) | ||
44 | |||
45 | -- | ||
46 | 1.7.10.4 | ||
47 | |||
diff --git a/meta-networking/recipes-support/traceroute/traceroute_2.0.20.bb b/meta-networking/recipes-support/traceroute/traceroute_2.0.20.bb new file mode 100644 index 000000000..4b49c7686 --- /dev/null +++ b/meta-networking/recipes-support/traceroute/traceroute_2.0.20.bb | |||
@@ -0,0 +1,42 @@ | |||
1 | SUMMARY = "A new modern implementation of traceroute(8) utility for Linux systems" | ||
2 | DESCRIPTION = "The traceroute utility displays the route used by IP packets on \ | ||
3 | their way to a specified network (or Internet) host. Traceroute displays \ | ||
4 | the IP number and host name (if possible) of the machines along the \ | ||
5 | route taken by the packets. Traceroute is used as a network debugging \ | ||
6 | tool. If you're having network connectivity problems, traceroute will \ | ||
7 | show you where the trouble is coming from along the route." | ||
8 | SECTION = "console/network" | ||
9 | HOMEPAGE = "http://traceroute.sourceforge.net/" | ||
10 | LICENSE = "GPL-2.0 LGPL-2.1" | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
12 | file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" | ||
13 | |||
14 | inherit update-alternatives | ||
15 | |||
16 | SRC_URI = "${SOURCEFORGE_MIRROR}/traceroute/traceroute/${BP}/${BP}.tar.gz \ | ||
17 | file://filter-out-the-patches-from-subdirs.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "559f104e155e0e14ee0c717776a745fa" | ||
21 | SRC_URI[sha256sum] = "2facba9525c95428d7bff3a313fc6ecfd8c529c678ae666c73015558a0edc271" | ||
22 | |||
23 | do_compile() { | ||
24 | export LDFLAGS="${TARGET_LDFLAGS} -L${S}/libsupp" | ||
25 | oe_runmake "env=yes" | ||
26 | } | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${bindir} | ||
30 | install -m755 ${BPN}/${BPN} ${D}${bindir} | ||
31 | |||
32 | install -m755 wrappers/tcptraceroute ${D}${bindir} | ||
33 | |||
34 | install -d ${D}${mandir} | ||
35 | install -p -m644 ${BPN}/${BPN}.8 ${D}${mandir} | ||
36 | ln -s ${BPN}.8 ${D}${mandir}/${BPN}6.8 | ||
37 | ln -s ${BPN}.8 ${D}${mandir}/tcptraceroute.8 | ||
38 | |||
39 | } | ||
40 | |||
41 | ALTERNATIVE_${PN} = "traceroute" | ||
42 | ALTERNATIVE_LINK_NAME[traceroute] = "${bindir}/traceroute" | ||
diff --git a/meta-networking/recipes-support/tunctl/tunctl.inc b/meta-networking/recipes-support/tunctl/tunctl.inc new file mode 100644 index 000000000..e95cfa523 --- /dev/null +++ b/meta-networking/recipes-support/tunctl/tunctl.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Tool for controlling the Linux TUN/TAP driver" | ||
2 | SECTION = "net" | ||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://tunctl.c;beginline=1;endline=4;md5=ff3a09996bc5fff6bc5d4e0b4c28f999" | ||
5 | |||
6 | SRC_URI = "${SOURCEFORGE_MIRROR}/tunctl/tunctl-${PV}.tar.gz" | ||
7 | |||
8 | do_compile() { | ||
9 | oe_runmake tunctl | ||
10 | } | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}/${sbindir} | ||
14 | install -m 755 tunctl ${D}/${sbindir} | ||
15 | } | ||
diff --git a/meta-networking/recipes-support/tunctl/tunctl_1.5.bb b/meta-networking/recipes-support/tunctl/tunctl_1.5.bb new file mode 100644 index 000000000..dd265612f --- /dev/null +++ b/meta-networking/recipes-support/tunctl/tunctl_1.5.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | require tunctl.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "fdbedc263b3e85bb0e087cd567414607" | ||
4 | SRC_URI[sha256sum] = "aa2a6c4cc6bfacb11e0d9f62334a6638a0d435475c61230116f00b6af8b14fff" | ||
diff --git a/meta-networking/recipes-support/wireshark/README b/meta-networking/recipes-support/wireshark/README new file mode 100644 index 000000000..63b5b7263 --- /dev/null +++ b/meta-networking/recipes-support/wireshark/README | |||
@@ -0,0 +1,45 @@ | |||
1 | # | ||
2 | Wireshark - Notes | ||
3 | |||
4 | URL: http://www.wireshark.org/ | ||
5 | User Guide: http://www.wireshark.org/docs/wsug_html_chunked/ | ||
6 | Secruity advisories: http://www.wireshark.org/security/ | ||
7 | |||
8 | Wireshark is slowly moving away from gtk and towards QT as their graphical stack. | ||
9 | Currently gtk is supported with this release and I plan on integrating QT. | ||
10 | |||
11 | |||
12 | |||
13 | Adding the wireshark to your build | ||
14 | ======================================== | ||
15 | |||
16 | via local.conf | ||
17 | IMAGE_INSTALL_append = " wireshark" | ||
18 | |||
19 | Adding the wireshark to your graphical build | ||
20 | ======================================== | ||
21 | via local.conf | ||
22 | IMAGE_INSTALL_append = " wireshark" | ||
23 | |||
24 | and one of: | ||
25 | |||
26 | EXTRA_IMAGE_FEATURES += "x11-base" | ||
27 | |||
28 | or use the "core-image-x11" | ||
29 | |||
30 | |||
31 | Maintenance | ||
32 | ----------- | ||
33 | |||
34 | Send patches, comments or questions to openembedded-devel@lists.openembedded.org | ||
35 | |||
36 | When sending single patches, please use something like: | ||
37 | |||
38 | git send-email -1 -M \ | ||
39 | --to openembedded-devel@lists.openembedded.org \ | ||
40 | --cc akuster@mvista.com \ | ||
41 | --subject-prefix=meta-networking][PATCH | ||
42 | |||
43 | Maintainer: Armin Kuster <akuster@mvista.com> | ||
44 | |||
45 | |||
diff --git a/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch b/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch new file mode 100644 index 000000000..64a08add7 --- /dev/null +++ b/meta-networking/recipes-support/wireshark/files/Do-not-set-CC_FOR_BUILD-flags.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | [PATCH] Do not set CC_FOR_BUILD flags | ||
2 | |||
3 | Upstream-status: Pending | ||
4 | |||
5 | AC_WIRESHARK_COMPILER_FLAGS_CHECK() is checking which options CC is supported, | ||
6 | and put the supported options into CFLAGS, but it should not put them into | ||
7 | CFLAGS_FOR_BUILD. since CC and BUILD_CC can be different, CFLAGS_FOR_BUILD is | ||
8 | used by BUILD_CC | ||
9 | |||
10 | BUILD_CC is used to generated host tools, do not use the gcc's optimised options, | ||
11 | do not effect the running of host tools. so do not set CC_FOR_BUILD flags. | ||
12 | |||
13 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
14 | --- | ||
15 | acinclude.m4 | 8 -------- | ||
16 | 1 file changed, 8 deletions(-) | ||
17 | |||
18 | diff --git a/acinclude.m4 b/acinclude.m4 | ||
19 | index 136fc27..8d3d360 100644 | ||
20 | --- a/acinclude.m4 | ||
21 | +++ b/acinclude.m4 | ||
22 | @@ -1755,10 +1755,6 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then | ||
23 | # just the new option. | ||
24 | # | ||
25 | CFLAGS="$CFLAGS_saved $GCC_OPTION" | ||
26 | - # | ||
27 | - # Add it to the flags we use when building build tools. | ||
28 | - # | ||
29 | - CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION" | ||
30 | ], | ||
31 | [ | ||
32 | AC_MSG_RESULT(yes) | ||
33 | @@ -1771,10 +1767,6 @@ if test "x$ac_supports_gcc_flags" = "xyes" ; then | ||
34 | # just the new option. | ||
35 | # | ||
36 | CFLAGS="$CFLAGS_saved $GCC_OPTION" | ||
37 | - # | ||
38 | - # Add it to the flags we use when building build tools. | ||
39 | - # | ||
40 | - CFLAGS_FOR_BUILD="$CFLAGS_FOR_BUILD $GCC_OPTION" | ||
41 | fi | ||
42 | ], | ||
43 | [ | ||
44 | -- | ||
45 | 1.9.1 | ||
46 | |||
diff --git a/meta-networking/recipes-support/wireshark/wireshark_1.12.4.bb b/meta-networking/recipes-support/wireshark/wireshark_1.12.4.bb new file mode 100644 index 000000000..683321657 --- /dev/null +++ b/meta-networking/recipes-support/wireshark/wireshark_1.12.4.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | DESCRIPTION = "wireshark - a popular network protocol analyzer" | ||
2 | HOMEPAGE = "http://www.wireshark.org" | ||
3 | SECTION = "network" | ||
4 | LICENSE = "GPL-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://README.linux;md5=631e077455b7972172eb149195e065b0" | ||
6 | |||
7 | DEPENDS = "perl-native pcre expat glib-2.0 sbc" | ||
8 | |||
9 | SRC_URI = " \ | ||
10 | http://wiresharkdownloads.riverbed.com/wireshark/src/wireshark-${PV}.tar.bz2 \ | ||
11 | file://Do-not-set-CC_FOR_BUILD-flags.patch \ | ||
12 | " | ||
13 | |||
14 | PE = "1" | ||
15 | |||
16 | SRC_URI[md5sum] = "acfa156fd35cb66c867b1ace992e4b5b" | ||
17 | SRC_URI[sha256sum] = "de804e98e252e4b795d28d6ac2d48d7f5aacd9b046ee44d44266983795ebc312" | ||
18 | |||
19 | inherit autotools pkgconfig | ||
20 | |||
21 | ARM_INSTRUCTION_SET = "arm" | ||
22 | |||
23 | # Works with either gtk+ or gtk3. | ||
24 | WHICH_GTK = "gtk3" | ||
25 | |||
26 | PACKAGECONFIG ??= "libcap gnutls libnl" | ||
27 | PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "x11", "${WHICH_GTK} graphics", "", d)}" | ||
28 | PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}" | ||
29 | |||
30 | PACKAGECONFIG[libcap] = "--with-libcap=${STAGING_DIR_HOST}, --with-libcap=no, libcap" | ||
31 | PACKAGECONFIG[libsmi] = "--with-libsmi=yes, --with-libsmi=no, libsmi" | ||
32 | PACKAGECONFIG[libnl] = "--with-libnl=yes, --with-libnl=no, libnl" | ||
33 | PACKAGECONFIG[portaudio] = "--with-portaudio=yes, --with-portaudio=no, portaudio-v19" | ||
34 | PACKAGECONFIG[gtk2] = "--with-gtk2=yes, --with-gtk2=no, gtk+" | ||
35 | PACKAGECONFIG[gtk3] = "--with-gtk3=yes, --with-gtk3=no, gtk+3" | ||
36 | PACKAGECONFIG[graphics] = "--enable-wireshark, --disable-wireshark," | ||
37 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," | ||
38 | PACKAGECONFIG[gnutls] = "--with-gnutls=yes, --with-gnutls=no, gnutls" | ||
39 | PACKAGECONFIG[gcrypt] = "--with-gcrypt=yes, --with-gcrypt=no, libgcrypt" | ||
40 | PACKAGECONFIG[krb5] = "--with-krb5=yes, --with-krb5=no, krb5" | ||
41 | PACKAGECONFIG[lua] = "--with-lua=yes, --with-lua=no, lua" | ||
42 | PACKAGECONFIG[zlib] = "--with-zlib=yes, --with-zlib=no, zlib" | ||
43 | PACKAGECONFIG[geoip] = "--with-geoip=yes, --with-geoip=no, geoip" | ||
44 | |||
45 | # these next two options require addional layers | ||
46 | PACKAGECONFIG[adns] = "--with-adns=yes, --with-adns=no, adns" | ||
47 | PACKAGECONFIG[c-ares] = "--with-c-ares=yes, --with-c-ares=no, c-ares" | ||
48 | |||
49 | EXTRA_OECONF += "--with-qt=no --enable-usr-local=no --enable-tshark --with-pcap=no --enable-pcap-ng-default" | ||
50 | |||
51 | do_configure_prepend() { | ||
52 | # force to use fallback | ||
53 | sed -i -e '/^glib_prefix/s/=.*$/=""/' ${S}/aclocal-flags | ||
54 | } | ||
55 | |||
56 | ALLOW_EMPTY_${PN} = "1" | ||
57 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||