summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2013-07-17 11:20:42 +0800
committerJoe MacDonald <joe.macdonald@windriver.com>2013-07-17 15:44:38 -0400
commite81ef5153c8679a1fc68e59d0f62f77489daf075 (patch)
tree17ebf63be1fccd69f604d53b009eaa7c954e83ee /meta-networking
parent6c293df99b5bb88072d84d9cf06b9e72fcbfba0c (diff)
downloadmeta-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')
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rexec.xinetd.inetutils20
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rlogin.xinetd.inetutils23
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/rsh.xinetd.inetutils21
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/telnet.xinetd.inetutils13
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils-1.9.1/tftpd.xinetd.inetutils19
-rw-r--r--meta-networking/recipes-connectivity/inetutils/inetutils_1.9.1.bb148
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 000000000..80aed36ff
--- /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#
7service 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 000000000..00dbf935b
--- /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#
7service 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 000000000..ad59b6207
--- /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#
8service 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 000000000..2a2a12e3a
--- /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.
4service 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 000000000..f54916339
--- /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#
7service 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 603bf0176..c55851f53 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, \
3rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ 3rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
4talkd, telnet, telnetd, tftp, tftpd, and uucpd." 4talkd, telnet, telnetd, tftp, tftpd, and uucpd."
5SECTION = "libs" 5SECTION = "libs"
6DEPENDS = "ncurses" 6DEPENDS = "ncurses netbase readline"
7LICENSE = "GPLv3" 7LICENSE = "GPLv3"
8 8
9LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" 9LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
10 10
11PR = "r1" 11PR = "r1"
12
13SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ 12SRC_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
21SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c" 25SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c"
22SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b" 26SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b"
23 27
24inherit autotools gettext 28inherit autotools gettext update-alternatives
25 29
30SRC_URI += "${@base_contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
26noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}" 31noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}"
27EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ 32EXTRA_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
32do_configure_prepend () { 38do_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
38do_install () { 44do_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
49pkg_postinst_${PN} () { 70PACKAGES =+ "${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
58pkg_prerm_${PN} () { 75ALTERNATIVE_PRIORITY = "80"
59 update-alternatives --remove tftp tftp.${BPN} 76ALTERNATIVE_${PN} = "talk whois"
60 update-alternatives --remove telnet telnet.${BPN} 77ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd"
61 update-alternatives --remove logger logger.${BPN} 78ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
62 update-alternatives --remove traceroute traceroute.${BPN} 79
63 update-alternatives --remove ifconfig ifconfig.${BPN} 80ALTERNATIVE_${PN}-logger = "logger"
64} 81ALTERNATIVE_${PN}-syslogd = "syslogd"
82ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
83
84ALTERNATIVE_${PN}-ftp = "ftp"
85ALTERNATIVE_${PN}-ftpd = "ftpd"
86ALTERNATIVE_${PN}-tftp = "tftp"
87ALTERNATIVE_${PN}-tftpd = "tftpd"
88ALTERNATIVE_LINK_NAME_${PN}-tftpd = "${bindir}/tftpd"
89ALTERNATIVE_TARGET_${PN}-tftpd = "${sbindir}/in.tftpd"
90
91ALTERNATIVE_${PN}-telnet = "telnet"
92ALTERNATIVE_${PN}-telnetd = "telnetd"
93ALTERNATIVE_LINK_NAME_${PN}-telnetd = "${bindir}/telnetd"
94ALTERNATIVE_TARGET_${PN}-telnetd = "${sbindir}/in.telnetd"
95
96ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh"
97ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind"
98ALTERNATIVE_LINK_NAME_${PN}-rshd = "${bindir}/rshd"
99ALTERNATIVE_TARGET_${PN}-rshd = "${sbindir}/in.rshd"
100ALTERNATIVE_LINK_NAME_${PN}-rexecd = "${bindir}/rexecd"
101ALTERNATIVE_TARGET_${PN}-rexecd = "${sbindir}/in.rexecd"
102ALTERNATIVE_LINK_NAME_${PN}-rlogind = "${bindir}/rlogind"
103ALTERNATIVE_TARGET_${PN}-rlogind = "${sbindir}/in.rlogind"
104
105ALTERNATIVE_${PN}-inetd= "inetd"
106ALTERNATIVE_${PN}-traceroute = "traceroute"
107
108ALTERNATIVE_${PN}-hostname = "hostname"
109ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
110
111ALTERNATIVE_${PN}-ifconfig = "ifconfig"
112ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
113
114ALTERNATIVE_${PN}-ping = "ping"
115ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
116
117ALTERNATIVE_${PN}-ping6 = "ping6"
118ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
119
120
121FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
122FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
123FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}"
124FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
125FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
126FILES_${PN}-logger = "${bindir}/logger.${BPN}"
127FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
128FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
129
130FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
131FILES_${PN}-telnet = "${bindir}/telnet.${BPN}"
132FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}"
133
134FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
135 ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
136RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
137RCONFLICTS_${PN}-rshd += "netkit-rshd"
138RPROVIDES_${PN}-rshd = "rshd"
139
140FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
141RDEPENDS_${PN}-ftpd += "xinetd"
142
143FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
144RCONFLICTS_${PN}-tftpd += "netkit-tftpd"
145RDEPENDS_${PN}-tftpd += "xinetd"
146
147FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
148RCONFLICTS_${PN}-telnetd += "netkit-telnetd"
149RPROVIDES_${PN}-telnetd = "telnetd"
150RDEPENDS_${PN}-telnetd += "xinetd"
151
152FILES_${PN}-inetd = "${bindir}/inetd.${BPN}"
153
154RDEPENDS_${PN} = "xinetd"