diff options
Diffstat (limited to 'meta/recipes-extended/net-tools')
4 files changed, 232 insertions, 0 deletions
diff --git a/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch new file mode 100644 index 0000000000..06f81420e9 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 81814dc2b14843009193efd307d814c26baa61f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiri Popelka <jpopelka@redhat.com> | ||
3 | Date: Wed, 7 Dec 2011 19:14:09 +0100 | ||
4 | Subject: [PATCH] ifconfig interface:0 del <IP> will remove the aliased IP on IA64 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | commit 81814dc2b14843009193efd307d814c26baa61f0 from | ||
9 | git://git.code.sf.net/p/net-tools/code | ||
10 | |||
11 | --- | ||
12 | ifconfig.c | 4 +++- | ||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/ifconfig.c b/ifconfig.c | ||
16 | index bc405c6..dae8922 100644 | ||
17 | --- a/ifconfig.c | ||
18 | +++ b/ifconfig.c | ||
19 | @@ -890,7 +890,9 @@ int main(int argc, char **argv) | ||
20 | continue; | ||
21 | } | ||
22 | |||
23 | - memcpy(&ip, &sin.sin_addr.s_addr, sizeof(unsigned long)); | ||
24 | + /* Clear "ip" in case sizeof(unsigned long) > sizeof(sin.sin_addr.s_addr) */ | ||
25 | + ip = 0; | ||
26 | + memcpy(&ip, &sin.sin_addr.s_addr, sizeof(sin.sin_addr.s_addr)); | ||
27 | |||
28 | if (get_nmbc_parent(ifr.ifr_name, &nm, &bc) < 0) { | ||
29 | fprintf(stderr, _("Interface %s not initialized\n"), | ||
30 | -- | ||
31 | 1.7.9.5 | ||
32 | |||
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.h b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h new file mode 100644 index 0000000000..6d39c2a8cb --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * config.h Automatically generated configuration includefile | ||
3 | * | ||
4 | * NET-TOOLS A collection of programs that form the base set of the | ||
5 | * NET-3 Networking Distribution for the LINUX operating | ||
6 | * system. | ||
7 | * | ||
8 | * DO NOT EDIT DIRECTLY | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * | ||
14 | * Internationalization | ||
15 | * | ||
16 | * The net-tools package has currently been translated to French, | ||
17 | * German and Brazilian Portugese. Other translations are, of | ||
18 | * course, welcome. Answer `n' here if you have no support for | ||
19 | * internationalization on your system. | ||
20 | * | ||
21 | */ | ||
22 | #define I18N 1 | ||
23 | |||
24 | /* | ||
25 | * | ||
26 | * Protocol Families. | ||
27 | * | ||
28 | */ | ||
29 | #define HAVE_AFUNIX 1 | ||
30 | #define HAVE_AFINET 1 | ||
31 | #define HAVE_AFINET6 1 | ||
32 | #define HAVE_AFIPX 0 | ||
33 | #define HAVE_AFATALK 0 | ||
34 | #define HAVE_AFAX25 0 | ||
35 | #define HAVE_AFNETROM 1 | ||
36 | #define HAVE_AFROSE 0 | ||
37 | #define HAVE_AFX25 0 | ||
38 | #define HAVE_AFECONET 0 | ||
39 | #define HAVE_AFDECnet 0 | ||
40 | #define HAVE_AFASH 0 | ||
41 | |||
42 | /* | ||
43 | * | ||
44 | * Device Hardware types. | ||
45 | * | ||
46 | */ | ||
47 | #define HAVE_HWETHER 1 | ||
48 | #define HAVE_HWARC 1 | ||
49 | #define HAVE_HWSLIP 1 | ||
50 | #define HAVE_HWPPP 1 | ||
51 | #define HAVE_HWTUNNEL 1 | ||
52 | #define HAVE_HWSTRIP 0 | ||
53 | #define HAVE_HWTR 0 | ||
54 | #define HAVE_HWAX25 0 | ||
55 | #define HAVE_HWROSE 0 | ||
56 | #define HAVE_HWNETROM 1 | ||
57 | #define HAVE_HWX25 0 | ||
58 | #define HAVE_HWFR 1 | ||
59 | #define HAVE_HWSIT 0 | ||
60 | #define HAVE_HWFDDI 0 | ||
61 | #define HAVE_HWHIPPI 0 | ||
62 | #define HAVE_HWASH 0 | ||
63 | #define HAVE_HWHDLCLAPB 0 | ||
64 | #define HAVE_HWIRDA 1 | ||
65 | #define HAVE_HWEC 0 | ||
66 | #define HAVE_HWIB 0 | ||
67 | |||
68 | /* | ||
69 | * | ||
70 | * Other Features. | ||
71 | * | ||
72 | */ | ||
73 | #define HAVE_FW_MASQUERADE 1 | ||
74 | #define HAVE_IP_TOOLS 1 | ||
75 | #define HAVE_MII 1 | ||
diff --git a/meta/recipes-extended/net-tools/net-tools/net-tools-config.make b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make new file mode 100644 index 0000000000..ec516f27ee --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/net-tools-config.make | |||
@@ -0,0 +1,36 @@ | |||
1 | I18N=1 | ||
2 | HAVE_AFUNIX=1 | ||
3 | HAVE_AFINET=1 | ||
4 | HAVE_AFINET6=1 | ||
5 | # HAVE_AFIPX=0 | ||
6 | # HAVE_AFATALK=0 | ||
7 | # HAVE_AFAX25=0 | ||
8 | HAVE_AFNETROM=1 | ||
9 | # HAVE_AFROSE=0 | ||
10 | # HAVE_AFX25=0 | ||
11 | # HAVE_AFECONET=0 | ||
12 | # HAVE_AFDECnet=0 | ||
13 | # HAVE_AFASH=0 | ||
14 | HAVE_HWETHER=1 | ||
15 | HAVE_HWARC=1 | ||
16 | HAVE_HWSLIP=1 | ||
17 | HAVE_HWPPP=1 | ||
18 | HAVE_HWTUNNEL=1 | ||
19 | HAVE_HWSTRIP=1 | ||
20 | HAVE_HWTR=1 | ||
21 | # HAVE_HWAX25=0 | ||
22 | # HAVE_HWROSE=0 | ||
23 | HAVE_HWNETROM=1 | ||
24 | # HAVE_HWX25=0 | ||
25 | HAVE_HWFR=1 | ||
26 | # HAVE_HWSIT=0 | ||
27 | # HAVE_HWFDDI=0 | ||
28 | # HAVE_HWHIPPI=0 | ||
29 | # HAVE_HWASH=0 | ||
30 | # HAVE_HWHDLCLAPB=0 | ||
31 | HAVE_HWIRDA=1 | ||
32 | # HAVE_HWEC=0 | ||
33 | # HAVE_HWIB=0 | ||
34 | HAVE_FW_MASQUERADE=1 | ||
35 | HAVE_IP_TOOLS=1 | ||
36 | HAVE_MII=1 | ||
diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-25.bb b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb new file mode 100644 index 0000000000..0e4ee754a4 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools_1.60-25.bb | |||
@@ -0,0 +1,89 @@ | |||
1 | SUMMARY = "Basic networking tools" | ||
2 | DESCRIPTION = "A collection of programs that form the base set of the NET-3 networking distribution for the Linux operating system" | ||
3 | HOMEPAGE = "http://net-tools.berlios.de/" | ||
4 | BUGTRACKER = "http://bugs.debian.org/net-tools" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \ | ||
7 | file://ifconfig.c;beginline=11;endline=15;md5=d1ca372080ad5401e23ca0afc35cf9ba" | ||
8 | |||
9 | SRC_URI = "${DEBIAN_MIRROR}/main/n/net-tools/net-tools_1.60.orig.tar.gz;name=tarball \ | ||
10 | ${DEBIAN_MIRROR}/main/n/net-tools/${BPN}_${PV}.diff.gz;apply=no;name=patch \ | ||
11 | file://net-tools-config.h \ | ||
12 | file://net-tools-config.make \ | ||
13 | file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \ | ||
14 | " | ||
15 | |||
16 | S = "${WORKDIR}/net-tools-1.60" | ||
17 | |||
18 | SRC_URI[tarball.md5sum] = "ecaf37acb5b5daff4bdda77785fd916d" | ||
19 | SRC_URI[tarball.sha256sum] = "ec67967cf7b1a3a3828a84762fbc013ac50ee5dc9aa3095d5c591f302c2de0f5" | ||
20 | |||
21 | SRC_URI[patch.md5sum] = "5ab1e2184d0fa6518031291138f2fc51" | ||
22 | SRC_URI[patch.sha256sum] = "1bddcd96ac60e794978cb20fb7ea4c2e77258c56c042c9ac8b6ec2b2033bc56f" | ||
23 | |||
24 | inherit gettext | ||
25 | |||
26 | # The Makefile is lame, no parallel build | ||
27 | PARALLEL_MAKE = "" | ||
28 | |||
29 | # Unlike other Debian packages, net-tools *.diff.gz contains another series of | ||
30 | # patches maintained by quilt. So manually apply them before applying other local | ||
31 | # patches. Also remove all temp files before leaving, because do_patch() will pop | ||
32 | # up all previously applied patches in the start | ||
33 | nettools_do_patch() { | ||
34 | cd ${S} | ||
35 | quilt pop -a || true | ||
36 | if [ -d ${S}/.pc-nettools ]; then | ||
37 | rm -rf ${S}/.pc | ||
38 | mv ${S}/.pc-nettools ${S}/.pc | ||
39 | QUILT_PATCHES=${S}/debian/patches quilt pop -a | ||
40 | rm -rf ${S}/.pc ${S}/debian | ||
41 | fi | ||
42 | patch -p1 < ${WORKDIR}/${BPN}_${PV}.diff | ||
43 | QUILT_PATCHES=${S}/debian/patches quilt push -a | ||
44 | mv ${S}/.pc ${S}/.pc-nettools | ||
45 | } | ||
46 | |||
47 | do_unpack[cleandirs] += "${S}" | ||
48 | |||
49 | # We invoke base do_patch at end, to incorporate any local patch | ||
50 | python do_patch() { | ||
51 | bb.build.exec_func('nettools_do_patch', d) | ||
52 | bb.build.exec_func('patch_do_patch', d) | ||
53 | } | ||
54 | |||
55 | do_configure() { | ||
56 | # net-tools has its own config mechanism requiring "make config" | ||
57 | # we pre-generate desired options and copy to source directory instead | ||
58 | cp ${WORKDIR}/net-tools-config.h ${S}/config.h | ||
59 | cp ${WORKDIR}/net-tools-config.make ${S}/config.make | ||
60 | } | ||
61 | |||
62 | do_compile() { | ||
63 | # net-tools use COPTS/LOPTS to allow adding custom options | ||
64 | export COPTS="$CFLAGS" | ||
65 | export LOPTS="$LDFLAGS" | ||
66 | unset CFLAGS | ||
67 | unset LDFLAGS | ||
68 | |||
69 | oe_runmake | ||
70 | } | ||
71 | |||
72 | do_install() { | ||
73 | oe_runmake 'BASEDIR=${D}' install | ||
74 | } | ||
75 | |||
76 | inherit update-alternatives | ||
77 | |||
78 | base_sbindir_progs = "arp ifconfig ipmaddr iptunnel mii-tool nameif plipconfig rarp route slattach" | ||
79 | base_bindir_progs = "dnsdomainname domainname hostname netstat nisdomainname ypdomainname" | ||
80 | |||
81 | ALTERNATIVE_${PN} = "${base_sbindir_progs} ${base_bindir_progs}" | ||
82 | python __anonymous() { | ||
83 | for prog in d.getVar('base_sbindir_progs', True).split(): | ||
84 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) | ||
85 | for prog in d.getVar('base_bindir_progs', True).split(): | ||
86 | d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) | ||
87 | } | ||
88 | ALTERNATIVE_PRIORITY = "100" | ||
89 | |||