mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 17:59:26 +00:00
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>
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
# default: off
|
||||||
|
# description:
|
||||||
|
# Rexecd is the server for the rexec program. The server provides remote
|
||||||
|
# execution facilities with authentication based on user names and
|
||||||
|
# passwords.
|
||||||
|
#
|
||||||
|
service exec
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
protocol = tcp
|
||||||
|
flags = NAMEINARGS
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
log_on_success += USERID
|
||||||
|
log_on_failure += USERID
|
||||||
|
server = /usr/bin/tcpd
|
||||||
|
server_args = /usr/sbin/in.rexecd
|
||||||
|
disable = yes
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
# default: off
|
||||||
|
# description:
|
||||||
|
# Rlogind is a server for the rlogin program. The server provides remote
|
||||||
|
# execution with authentication based on privileged port numbers from trusted
|
||||||
|
# host
|
||||||
|
#
|
||||||
|
service login
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
protocol = tcp
|
||||||
|
flags = NAMEINARGS
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
log_on_success += USERID
|
||||||
|
log_on_failure += USERID
|
||||||
|
server = /usr/bin/tcpd
|
||||||
|
server_args = /usr/sbin/in.rlogind -a
|
||||||
|
disable = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# default: off
|
||||||
|
# description:
|
||||||
|
# The rshd server is a server for the rcmd(3) routine and,
|
||||||
|
# consequently, for the rsh(1) program. The server provides
|
||||||
|
# remote execution facilities with authentication based on
|
||||||
|
# privileged port numbers from trusted hosts.
|
||||||
|
#
|
||||||
|
service shell
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
protocol = tcp
|
||||||
|
flags = NAMEINARGS
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
log_on_success += USERID
|
||||||
|
log_on_failure += USERID
|
||||||
|
server = /usr/bin/tcpd
|
||||||
|
server_args = /usr/sbin/in.rshd -aL
|
||||||
|
disable = yes
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
# default: on
|
||||||
|
# description: The telnet server serves telnet sessions; it uses \
|
||||||
|
# unencrypted username/password pairs for authentication.
|
||||||
|
service telnet
|
||||||
|
{
|
||||||
|
disable = no
|
||||||
|
flags = REUSE
|
||||||
|
socket_type = stream
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
server = /usr/sbin/in.telnetd
|
||||||
|
log_on_failure += USERID
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# default: off
|
||||||
|
# description:
|
||||||
|
# Tftpd is a server which supports the Internet Trivial File Transfer
|
||||||
|
# Pro-tocol (RFC 783). The TFTP server operates at the port indicated
|
||||||
|
# in the tftp service description; see services(5).
|
||||||
|
#
|
||||||
|
service tftp
|
||||||
|
{
|
||||||
|
disable = yes
|
||||||
|
socket_type = dgram
|
||||||
|
protocol = udp
|
||||||
|
flags = IPv6
|
||||||
|
wait = yes
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
server = /usr/sbin/in.tftpd
|
||||||
|
server_args = /tftpboot
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,30 +3,36 @@ networking utilities and servers including ftp, ftpd, rcp, \
|
|||||||
rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
|
rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
|
||||||
talkd, telnet, telnetd, tftp, tftpd, and uucpd."
|
talkd, telnet, telnetd, tftp, tftpd, and uucpd."
|
||||||
SECTION = "libs"
|
SECTION = "libs"
|
||||||
DEPENDS = "ncurses"
|
DEPENDS = "ncurses netbase readline"
|
||||||
LICENSE = "GPLv3"
|
LICENSE = "GPLv3"
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
|
LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r1"
|
||||||
|
|
||||||
SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
|
SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
|
||||||
file://disable-pre-ANSI-compilers.patch \
|
file://disable-pre-ANSI-compilers.patch \
|
||||||
file://version.patch \
|
file://version.patch \
|
||||||
file://remove-gets.patch \
|
file://remove-gets.patch \
|
||||||
file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
|
file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
|
||||||
file://inetutils-1.8-0003-wchar.patch \
|
file://inetutils-1.8-0003-wchar.patch \
|
||||||
file://fix-disable-ipv6.patch \
|
file://rexec.xinetd.inetutils \
|
||||||
|
file://rlogin.xinetd.inetutils \
|
||||||
|
file://rsh.xinetd.inetutils \
|
||||||
|
file://telnet.xinetd.inetutils \
|
||||||
|
file://tftpd.xinetd.inetutils \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c"
|
SRC_URI[md5sum] = "944f7196a2b3dba2d400e9088576000c"
|
||||||
SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b"
|
SRC_URI[sha256sum] = "02a9ebde8a198cb85f87545b9d88fb103a183958139864a85fe9e027ad79ff2b"
|
||||||
|
|
||||||
inherit autotools gettext
|
inherit autotools gettext update-alternatives
|
||||||
|
|
||||||
|
SRC_URI += "${@base_contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
|
||||||
noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}"
|
noipv6="${@base_contains('DISTRO_FEATURES', 'ipv6', '', '--disable-ipv6 gl_cv_socket_ipv6=no', d)}"
|
||||||
EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
|
EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
|
||||||
--with-path-procnet-dev=/proc/net/dev \
|
--with-path-procnet-dev=/proc/net/dev \
|
||||||
${noipv6} \
|
${noipv6} \
|
||||||
|
--with-path-login=/bin/login \
|
||||||
"
|
"
|
||||||
|
|
||||||
do_configure_prepend () {
|
do_configure_prepend () {
|
||||||
@@ -35,30 +41,114 @@ do_configure_prepend () {
|
|||||||
rm -f ${S}/glob/configure*
|
rm -f ${S}/glob/configure*
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install () {
|
do_install_append () {
|
||||||
autotools_do_install
|
install -m 0755 -d ${D}${base_bindir}
|
||||||
install -d ${D}${base_sbindir} ${D}${base_bindir}
|
install -m 0755 -d ${D}${base_sbindir}
|
||||||
mv ${D}${bindir}/tftp ${D}${bindir}/tftp.${BPN}
|
install -m 0755 -d ${D}${sbindir}
|
||||||
mv ${D}${bindir}/telnet ${D}${bindir}/telnet.${BPN}
|
install -m 0755 -d ${D}${sysconfdir}/xinetd.d
|
||||||
mv ${D}${bindir}/logger ${D}${bindir}/logger.${BPN}
|
mv ${D}${bindir}/ping ${D}${base_bindir}/
|
||||||
mv ${D}${bindir}/traceroute ${D}${bindir}/traceroute.${BPN}
|
mv ${D}${bindir}/ping6 ${D}${base_bindir}/
|
||||||
mv ${D}${bindir}/hostname ${D}${base_bindir}/hostname.${BPN}
|
mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
|
||||||
mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ifconfig.${BPN}
|
mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
|
||||||
|
mv ${D}${bindir}/hostname ${D}${base_bindir}/
|
||||||
|
mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
|
||||||
|
mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
|
||||||
|
mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
|
||||||
|
mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
|
||||||
|
mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
|
||||||
|
mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
|
||||||
|
mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd
|
||||||
|
mv ${D}${libexecdir}/* ${D}${bindir}/
|
||||||
|
cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
|
||||||
|
cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
|
||||||
|
cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
|
||||||
|
cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet
|
||||||
|
cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd
|
||||||
|
rm -rf ${D}${libexecdir}/
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_${PN} () {
|
PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \
|
||||||
update-alternatives --install ${bindir}/tftp tftp tftp.${BPN} 100
|
${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \
|
||||||
update-alternatives --install ${bindir}/telnet telnet telnet.${BPN} 100
|
${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \
|
||||||
update-alternatives --install ${bindir}/logger logger logger.${BPN} 100
|
${PN}-rsh ${PN}-rshd"
|
||||||
update-alternatives --install ${bindir}/traceroute traceroute traceroute.${BPN} 100
|
|
||||||
update-alternatives --install ${base_bindir}/hostname hostname hostname.${BPN} 100
|
|
||||||
update-alternatives --install ${base_sbindir}/ifconfig ifconfig ifconfig.${BPN} 100
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_prerm_${PN} () {
|
ALTERNATIVE_PRIORITY = "80"
|
||||||
update-alternatives --remove tftp tftp.${BPN}
|
ALTERNATIVE_${PN} = "talk whois"
|
||||||
update-alternatives --remove telnet telnet.${BPN}
|
ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd"
|
||||||
update-alternatives --remove logger logger.${BPN}
|
ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
|
||||||
update-alternatives --remove traceroute traceroute.${BPN}
|
|
||||||
update-alternatives --remove ifconfig ifconfig.${BPN}
|
ALTERNATIVE_${PN}-logger = "logger"
|
||||||
}
|
ALTERNATIVE_${PN}-syslogd = "syslogd"
|
||||||
|
ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-ftp = "ftp"
|
||||||
|
ALTERNATIVE_${PN}-ftpd = "ftpd"
|
||||||
|
ALTERNATIVE_${PN}-tftp = "tftp"
|
||||||
|
ALTERNATIVE_${PN}-tftpd = "tftpd"
|
||||||
|
ALTERNATIVE_LINK_NAME_${PN}-tftpd = "${bindir}/tftpd"
|
||||||
|
ALTERNATIVE_TARGET_${PN}-tftpd = "${sbindir}/in.tftpd"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-telnet = "telnet"
|
||||||
|
ALTERNATIVE_${PN}-telnetd = "telnetd"
|
||||||
|
ALTERNATIVE_LINK_NAME_${PN}-telnetd = "${bindir}/telnetd"
|
||||||
|
ALTERNATIVE_TARGET_${PN}-telnetd = "${sbindir}/in.telnetd"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh"
|
||||||
|
ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind"
|
||||||
|
ALTERNATIVE_LINK_NAME_${PN}-rshd = "${bindir}/rshd"
|
||||||
|
ALTERNATIVE_TARGET_${PN}-rshd = "${sbindir}/in.rshd"
|
||||||
|
ALTERNATIVE_LINK_NAME_${PN}-rexecd = "${bindir}/rexecd"
|
||||||
|
ALTERNATIVE_TARGET_${PN}-rexecd = "${sbindir}/in.rexecd"
|
||||||
|
ALTERNATIVE_LINK_NAME_${PN}-rlogind = "${bindir}/rlogind"
|
||||||
|
ALTERNATIVE_TARGET_${PN}-rlogind = "${sbindir}/in.rlogind"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-inetd= "inetd"
|
||||||
|
ALTERNATIVE_${PN}-traceroute = "traceroute"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-hostname = "hostname"
|
||||||
|
ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-ifconfig = "ifconfig"
|
||||||
|
ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-ping = "ping"
|
||||||
|
ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
|
||||||
|
|
||||||
|
ALTERNATIVE_${PN}-ping6 = "ping6"
|
||||||
|
ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
|
||||||
|
|
||||||
|
|
||||||
|
FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
|
||||||
|
FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
|
||||||
|
FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}"
|
||||||
|
FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
|
||||||
|
FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
|
||||||
|
FILES_${PN}-logger = "${bindir}/logger.${BPN}"
|
||||||
|
FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
|
||||||
|
FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
|
||||||
|
|
||||||
|
FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
|
||||||
|
FILES_${PN}-telnet = "${bindir}/telnet.${BPN}"
|
||||||
|
FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}"
|
||||||
|
|
||||||
|
FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
|
||||||
|
${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
|
||||||
|
RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
|
||||||
|
RCONFLICTS_${PN}-rshd += "netkit-rshd"
|
||||||
|
RPROVIDES_${PN}-rshd = "rshd"
|
||||||
|
|
||||||
|
FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
|
||||||
|
RDEPENDS_${PN}-ftpd += "xinetd"
|
||||||
|
|
||||||
|
FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
|
||||||
|
RCONFLICTS_${PN}-tftpd += "netkit-tftpd"
|
||||||
|
RDEPENDS_${PN}-tftpd += "xinetd"
|
||||||
|
|
||||||
|
FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
|
||||||
|
RCONFLICTS_${PN}-telnetd += "netkit-telnetd"
|
||||||
|
RPROVIDES_${PN}-telnetd = "telnetd"
|
||||||
|
RDEPENDS_${PN}-telnetd += "xinetd"
|
||||||
|
|
||||||
|
FILES_${PN}-inetd = "${bindir}/inetd.${BPN}"
|
||||||
|
|
||||||
|
RDEPENDS_${PN} = "xinetd"
|
||||||
|
|||||||
Reference in New Issue
Block a user