diff options
author | Roy.Li <rongqing.li@windriver.com> | 2013-07-17 11:20:42 +0800 |
---|---|---|
committer | Joe MacDonald <joe.macdonald@windriver.com> | 2013-07-17 15:44:38 -0400 |
commit | e81ef5153c8679a1fc68e59d0f62f77489daf075 (patch) | |
tree | 17ebf63be1fccd69f604d53b009eaa7c954e83ee /meta-networking/recipes-connectivity/inetutils | |
parent | 6c293df99b5bb88072d84d9cf06b9e72fcbfba0c (diff) | |
download | meta-openembedded-e81ef5153c8679a1fc68e59d0f62f77489daf075.tar.gz |
inetutils: several improvement
1. integrate rexec, rlogin, rsh, telnet, tftpd xinetd startup scripts
2. inherit update-alternatives bbclass, not call update-alternatives directly.
3. package all commands into subpackages
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Joe MacDonald <joe.macdonald@windriver.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/inetutils')
6 files changed, 215 insertions, 29 deletions
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rexec.xinetd.inetutils b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rexec.xinetd.inetutils new file mode 100644 index 0000000000..80aed36ffb --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rexec.xinetd.inetutils | |||
@@ -0,0 +1,20 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # Rexecd is the server for the rexec program. The server provides remote | ||
4 | # execution facilities with authentication based on user names and | ||
5 | # passwords. | ||
6 | # | ||
7 | service exec | ||
8 | { | ||
9 | socket_type = stream | ||
10 | protocol = tcp | ||
11 | flags = NAMEINARGS | ||
12 | wait = no | ||
13 | user = root | ||
14 | group = root | ||
15 | log_on_success += USERID | ||
16 | log_on_failure += USERID | ||
17 | server = /usr/bin/tcpd | ||
18 | server_args = /usr/sbin/in.rexecd | ||
19 | disable = yes | ||
20 | } | ||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rlogin.xinetd.inetutils b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rlogin.xinetd.inetutils new file mode 100644 index 0000000000..00dbf935bb --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rlogin.xinetd.inetutils | |||
@@ -0,0 +1,23 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # Rlogind is a server for the rlogin program. The server provides remote | ||
4 | # execution with authentication based on privileged port numbers from trusted | ||
5 | # host | ||
6 | # | ||
7 | service login | ||
8 | { | ||
9 | socket_type = stream | ||
10 | protocol = tcp | ||
11 | flags = NAMEINARGS | ||
12 | wait = no | ||
13 | user = root | ||
14 | group = root | ||
15 | log_on_success += USERID | ||
16 | log_on_failure += USERID | ||
17 | server = /usr/bin/tcpd | ||
18 | server_args = /usr/sbin/in.rlogind -a | ||
19 | disable = yes | ||
20 | } | ||
21 | |||
22 | |||
23 | |||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rsh.xinetd.inetutils b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rsh.xinetd.inetutils new file mode 100644 index 0000000000..ad59b62076 --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rsh.xinetd.inetutils | |||
@@ -0,0 +1,21 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # The rshd server is a server for the rcmd(3) routine and, | ||
4 | # consequently, for the rsh(1) program. The server provides | ||
5 | # remote execution facilities with authentication based on | ||
6 | # privileged port numbers from trusted hosts. | ||
7 | # | ||
8 | service shell | ||
9 | { | ||
10 | socket_type = stream | ||
11 | protocol = tcp | ||
12 | flags = NAMEINARGS | ||
13 | wait = no | ||
14 | user = root | ||
15 | group = root | ||
16 | log_on_success += USERID | ||
17 | log_on_failure += USERID | ||
18 | server = /usr/bin/tcpd | ||
19 | server_args = /usr/sbin/in.rshd -aL | ||
20 | disable = yes | ||
21 | } | ||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/telnet.xinetd.inetutils b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/telnet.xinetd.inetutils new file mode 100644 index 0000000000..2a2a12e3ad --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/telnet.xinetd.inetutils | |||
@@ -0,0 +1,13 @@ | |||
1 | # default: on | ||
2 | # description: The telnet server serves telnet sessions; it uses \ | ||
3 | # unencrypted username/password pairs for authentication. | ||
4 | service telnet | ||
5 | { | ||
6 | disable = no | ||
7 | flags = REUSE | ||
8 | socket_type = stream | ||
9 | wait = no | ||
10 | user = root | ||
11 | server = /usr/sbin/in.telnetd | ||
12 | log_on_failure += USERID | ||
13 | } | ||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/tftpd.xinetd.inetutils b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/tftpd.xinetd.inetutils new file mode 100644 index 0000000000..f549163394 --- /dev/null +++ b/meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/tftpd.xinetd.inetutils | |||
@@ -0,0 +1,19 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # Tftpd is a server which supports the Internet Trivial File Transfer | ||
4 | # Pro-tocol (RFC 783). The TFTP server operates at the port indicated | ||
5 | # in the tftp service description; see services(5). | ||
6 | # | ||
7 | service tftp | ||
8 | { | ||
9 | disable = yes | ||
10 | socket_type = dgram | ||
11 | protocol = udp | ||
12 | flags = IPv6 | ||
13 | wait = yes | ||
14 | user = root | ||
15 | group = root | ||
16 | server = /usr/sbin/in.tftpd | ||
17 | server_args = /tftpboot | ||
18 | } | ||
19 | |||
diff --git a/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb index 603bf01762..c55851f530 100644 --- a/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb +++ b/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb | |||
@@ -3,30 +3,36 @@ networking utilities and servers including ftp, ftpd, rcp, \ | |||
3 | rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ | 3 | rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ |
4 | talkd, telnet, telnetd, tftp, tftpd, and uucpd." | 4 | talkd, telnet, telnetd, tftp, tftpd, and uucpd." |
5 | SECTION = "libs" | 5 | SECTION = "libs" |
6 | DEPENDS = "ncurses" | 6 | DEPENDS = "ncurses netbase readline" |
7 | LICENSE = "GPLv3" | 7 | LICENSE = "GPLv3" |
8 | 8 | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" |
10 | 10 | ||
11 | PR = "r1" | 11 | PR = "r1" |
12 | |||
13 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ | 12 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ |
14 | file://disable-pre-ANSI-compilers.patch \ | 13 | file://disable-pre-ANSI-compilers.patch \ |
15 | file://version.patch \ | 14 | file://version.patch \ |
16 | file://remove-gets.patch \ | 15 | file://remove-gets.patch \ |
17 | file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ | 16 | file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ |
18 | file://inetutils-1.8-0003-wchar.patch \ | 17 | file://inetutils-1.8-0003-wchar.patch \ |
19 | file://fix-disable-ipv6.patch \ | 18 | file://rexec.xinetd.inetutils \ |
20 | " | 19 | file://rlogin.xinetd.inetutils \ |
20 | file://rsh.xinetd.inetutils \ | ||
21 | file://telnet.xinetd.inetutils \ | ||
22 | file://tftpd.xinetd.inetutils \ | ||
23 | " | ||
24 | |||
21 | SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c" | 25 | SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c" |
22 | SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b" | 26 | SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b" |
23 | 27 | ||
24 | inherit autotools gettext | 28 | inherit autotools gettext update-alternatives |
25 | 29 | ||
30 | SRC_URI += "${@base_contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" | ||
26 | noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}" | 31 | noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}" |
27 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ | 32 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ |
28 | --with-path-procnet-dev=/proc/net/dev \ | 33 | --with-path-procnet-dev=/proc/net/dev \ |
29 | ${noipv6} \ | 34 | ${noipv6} \ |
35 | --with-path-login=/bin/login \ | ||
30 | " | 36 | " |
31 | 37 | ||
32 | do_configure_prepend () { | 38 | do_configure_prepend () { |
@@ -35,30 +41,114 @@ do_configure_prepend () { | |||
35 | rm -f ${S}/glob/configure* | 41 | rm -f ${S}/glob/configure* |
36 | } | 42 | } |
37 | 43 | ||
38 | do_install () { | 44 | do_install_append () { |
39 | autotools_do_install | 45 | install -m 0755 -d ${D}${base_bindir} |
40 | install -d ${D}${base_sbindir} ${D}${base_bindir} | 46 | install -m 0755 -d ${D}${base_sbindir} |
41 | mv ${D}${bindir}/tftp ${D}${bindir}/tftp.${BPN} | 47 | install -m 0755 -d ${D}${sbindir} |
42 | mv ${D}${bindir}/telnet ${D}${bindir}/telnet.${BPN} | 48 | install -m 0755 -d ${D}${sysconfdir}/xinetd.d |
43 | mv ${D}${bindir}/logger ${D}${bindir}/logger.${BPN} | 49 | mv ${D}${bindir}/ping ${D}${base_bindir}/ |
44 | mv ${D}${bindir}/traceroute ${D}${bindir}/traceroute.${BPN} | 50 | mv ${D}${bindir}/ping6 ${D}${base_bindir}/ |
45 | mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${BPN} | 51 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ |
46 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ifconfig.${BPN} | 52 | mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ |
53 | mv ${D}${bindir}/hostname ${D}${base_bindir}/ | ||
54 | mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd | ||
55 | mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd | ||
56 | mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd | ||
57 | mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind | ||
58 | mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd | ||
59 | mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd | ||
60 | mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd | ||
61 | mv ${D}${libexecdir}/* ${D}${bindir}/ | ||
62 | cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec | ||
63 | cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin | ||
64 | cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh | ||
65 | cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet | ||
66 | cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd | ||
67 | rm -rf ${D}${libexecdir}/ | ||
47 | } | 68 | } |
48 | 69 | ||
49 | pkg_postinst_${PN} () { | 70 | PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \ |
50 | update-alternatives --install ${bindir}/tftp tftp tftp.${BPN} 100 | 71 | ${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \ |
51 | update-alternatives --install ${bindir}/telnet telnet telnet.${BPN} 100 | 72 | ${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \ |
52 | update-alternatives --install ${bindir}/logger logger logger.${BPN} 100 | 73 | ${PN}-rsh ${PN}-rshd" |
53 | update-alternatives --install ${bindir}/traceroute traceroute traceroute.${BPN} 100 | ||
54 | update-alternatives --install ${base_bindir}/hostname hostname hostname.${BPN} 100 | ||
55 | update-alternatives --install ${base_sbindir}/ifconfig ifconfig ifconfig.${BPN} 100 | ||
56 | } | ||
57 | 74 | ||
58 | pkg_prerm_${PN} () { | 75 | ALTERNATIVE_PRIORITY = "80" |
59 | update-alternatives --remove tftp tftp.${BPN} | 76 | ALTERNATIVE_${PN} = "talk whois" |
60 | update-alternatives --remove telnet telnet.${BPN} | 77 | ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd" |
61 | update-alternatives --remove logger logger.${BPN} | 78 | ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd" |
62 | update-alternatives --remove traceroute traceroute.${BPN} | 79 | |
63 | update-alternatives --remove ifconfig ifconfig.${BPN} | 80 | ALTERNATIVE_${PN}-logger = "logger" |
64 | } | 81 | ALTERNATIVE_${PN}-syslogd = "syslogd" |
82 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
83 | |||
84 | ALTERNATIVE_${PN}-ftp = "ftp" | ||
85 | ALTERNATIVE_${PN}-ftpd = "ftpd" | ||
86 | ALTERNATIVE_${PN}-tftp = "tftp" | ||
87 | ALTERNATIVE_${PN}-tftpd = "tftpd" | ||
88 | ALTERNATIVE_LINK_NAME_${PN}-tftpd = "${bindir}/tftpd" | ||
89 | ALTERNATIVE_TARGET_${PN}-tftpd = "${sbindir}/in.tftpd" | ||
90 | |||
91 | ALTERNATIVE_${PN}-telnet = "telnet" | ||
92 | ALTERNATIVE_${PN}-telnetd = "telnetd" | ||
93 | ALTERNATIVE_LINK_NAME_${PN}-telnetd = "${bindir}/telnetd" | ||
94 | ALTERNATIVE_TARGET_${PN}-telnetd = "${sbindir}/in.telnetd" | ||
95 | |||
96 | ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh" | ||
97 | ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind" | ||
98 | ALTERNATIVE_LINK_NAME_${PN}-rshd = "${bindir}/rshd" | ||
99 | ALTERNATIVE_TARGET_${PN}-rshd = "${sbindir}/in.rshd" | ||
100 | ALTERNATIVE_LINK_NAME_${PN}-rexecd = "${bindir}/rexecd" | ||
101 | ALTERNATIVE_TARGET_${PN}-rexecd = "${sbindir}/in.rexecd" | ||
102 | ALTERNATIVE_LINK_NAME_${PN}-rlogind = "${bindir}/rlogind" | ||
103 | ALTERNATIVE_TARGET_${PN}-rlogind = "${sbindir}/in.rlogind" | ||
104 | |||
105 | ALTERNATIVE_${PN}-inetd= "inetd" | ||
106 | ALTERNATIVE_${PN}-traceroute = "traceroute" | ||
107 | |||
108 | ALTERNATIVE_${PN}-hostname = "hostname" | ||
109 | ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" | ||
110 | |||
111 | ALTERNATIVE_${PN}-ifconfig = "ifconfig" | ||
112 | ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig" | ||
113 | |||
114 | ALTERNATIVE_${PN}-ping = "ping" | ||
115 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
116 | |||
117 | ALTERNATIVE_${PN}-ping6 = "ping6" | ||
118 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | ||
119 | |||
120 | |||
121 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" | ||
122 | FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" | ||
123 | FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}" | ||
124 | FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}" | ||
125 | FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}" | ||
126 | FILES_${PN}-logger = "${bindir}/logger.${BPN}" | ||
127 | FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}" | ||
128 | FILES_${PN}-ftp = "${bindir}/ftp.${BPN}" | ||
129 | |||
130 | FILES_${PN}-tftp = "${bindir}/tftp.${BPN}" | ||
131 | FILES_${PN}-telnet = "${bindir}/telnet.${BPN}" | ||
132 | FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}" | ||
133 | |||
134 | FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \ | ||
135 | ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec" | ||
136 | RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers" | ||
137 | RCONFLICTS_${PN}-rshd += "netkit-rshd" | ||
138 | RPROVIDES_${PN}-rshd = "rshd" | ||
139 | |||
140 | FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}" | ||
141 | RDEPENDS_${PN}-ftpd += "xinetd" | ||
142 | |||
143 | FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd" | ||
144 | RCONFLICTS_${PN}-tftpd += "netkit-tftpd" | ||
145 | RDEPENDS_${PN}-tftpd += "xinetd" | ||
146 | |||
147 | FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet" | ||
148 | RCONFLICTS_${PN}-telnetd += "netkit-telnetd" | ||
149 | RPROVIDES_${PN}-telnetd = "telnetd" | ||
150 | RDEPENDS_${PN}-telnetd += "xinetd" | ||
151 | |||
152 | FILES_${PN}-inetd = "${bindir}/inetd.${BPN}" | ||
153 | |||
154 | RDEPENDS_${PN} = "xinetd" | ||