blob: 684fbe09e1c1ee3a413f166c5d2b97e0c48822f8 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001DESCRIPTION = "The GNU inetutils are a collection of common \
2networking utilities and servers including ftp, ftpd, rcp, \
3rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \
4talkd, telnet, telnetd, tftp, tftpd, and uucpd."
5HOMEPAGE = "http://www.gnu.org/software/inetutils"
6SECTION = "net"
7DEPENDS = "ncurses netbase readline virtual/crypt"
8
9LICENSE = "GPLv3"
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7"
12
13SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \
14 file://version.patch \
15 file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \
16 file://inetutils-1.8-0003-wchar.patch \
17 file://rexec.xinetd.inetutils \
18 file://rlogin.xinetd.inetutils \
19 file://rsh.xinetd.inetutils \
20 file://telnet.xinetd.inetutils \
21 file://tftpd.xinetd.inetutils \
22 file://inetutils-1.9-PATH_PROCNET_DEV.patch \
23 file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \
24 file://0001-rcp-fix-to-work-with-large-files.patch \
Brad Bishop08902b02019-08-20 09:16:51 -040025 file://fix-buffer-fortify-tfpt.patch \
Brad Bishop19323692019-04-05 15:28:33 -040026"
27
28SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52"
29SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616"
30
31inherit autotools gettext update-alternatives texinfo
32
33acpaths = "-I ./m4"
34
35SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}"
36
37PACKAGECONFIG ??= "ftp uucpd \
38 ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
39 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \
40 "
41PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline"
42PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline"
43PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
44PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no,"
45PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6,"
46
47EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
48 inetutils_cv_path_login=${base_bindir}/login \
49 --with-libreadline-prefix=${STAGING_LIBDIR} \
50 --enable-rpath=no \
51"
52
53# These are horrible for security, disable them
54EXTRA_OECONF_append = " --disable-rsh --disable-rshd --disable-rcp \
55 --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
56
57do_configure_prepend () {
58 export HELP2MAN='true'
59 cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath
60 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
61 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
62 rm -f ${S}/glob/configure*
63}
64
65do_install_append () {
66 install -m 0755 -d ${D}${base_sbindir}
67 install -m 0755 -d ${D}${sbindir}
68 install -m 0755 -d ${D}${sysconfdir}/xinetd.d
69 if [ "${base_bindir}" != "${bindir}" ] ; then
70 install -m 0755 -d ${D}${base_bindir}
71 mv ${D}${bindir}/ping* ${D}${base_bindir}/
72 mv ${D}${bindir}/hostname ${D}${base_bindir}/
73 fi
74 mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/
75 mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
76 mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
77 mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
78 if [ -e ${D}${libexecdir}/rexecd ]; then
79 mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
80 cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
81 fi
82 if [ -e ${D}${libexecdir}/rlogind ]; then
83 mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
84 cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
85 fi
86 if [ -e ${D}${libexecdir}/rshd ]; then
87 mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
88 cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
89 fi
90 if [ -e ${D}${libexecdir}/talkd ]; then
91 mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
92 fi
93 mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd
94 mv ${D}${libexecdir}/* ${D}${bindir}/
95 cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet
96 cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd
97
98 sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/*
99 if [ -e ${D}${libdir}/charset.alias ]; then
100 rm -rf ${D}${libdir}/charset.alias
101 fi
102 rm -rf ${D}${libexecdir}/
103 # remove usr/lib if empty
104 rmdir ${D}${libdir} || true
105}
106
107PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \
108${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \
109${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \
110${PN}-rsh ${PN}-rshd"
111
112# The packages tftpd, telnetd and rshd conflict with the ones
113# provided by netkit, so add the corresponding -dbg packages
114# for them to avoid the confliction between the dbg package
115# of inetutils and netkit.
116PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg"
117NOAUTOPACKAGEDEBUG = "1"
118
119ALTERNATIVE_PRIORITY = "79"
120ALTERNATIVE_${PN} = "whois"
121ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd"
122
123ALTERNATIVE_PRIORITY_${PN}-logger = "60"
124ALTERNATIVE_${PN}-logger = "logger"
125ALTERNATIVE_${PN}-syslogd = "syslogd"
126ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
127
128ALTERNATIVE_${PN}-ftp = "ftp"
129ALTERNATIVE_${PN}-ftpd = "ftpd"
130ALTERNATIVE_${PN}-tftp = "tftp"
131ALTERNATIVE_${PN}-tftpd = "tftpd"
132ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd"
133ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd"
134
135ALTERNATIVE_${PN}-telnet = "telnet"
136ALTERNATIVE_${PN}-telnetd = "telnetd"
137ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd"
138ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd"
139
140ALTERNATIVE_${PN}-inetd= "inetd"
141ALTERNATIVE_${PN}-traceroute = "traceroute"
142
143ALTERNATIVE_${PN}-hostname = "hostname"
144ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname"
145
146ALTERNATIVE_${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8"
147ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
148ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1"
149ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
150ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
151
152ALTERNATIVE_${PN}-ifconfig = "ifconfig"
153ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig"
154
155ALTERNATIVE_${PN}-ping = "ping"
156ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
157
158ALTERNATIVE_${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}"
159ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
160
161
162FILES_${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug"
163FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
164FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
165FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}"
166FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}"
167FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}"
168FILES_${PN}-logger = "${bindir}/logger.${BPN}"
169
170FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}"
171RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng"
172
173FILES_${PN}-ftp = "${bindir}/ftp.${BPN}"
174
175FILES_${PN}-tftp = "${bindir}/tftp.${BPN}"
176FILES_${PN}-telnet = "${bindir}/telnet.${BPN}"
177
178# We make us of RCONFLICTS / RPROVIDES here rather than using the normal
179# alternatives method as this leads to packaging QA issues when using
180# musl as that library does not provide what these applications need to
181# build.
182FILES_${PN}-rsh = "${bindir}/rsh ${bindir}/rlogin ${bindir}/rexec ${bindir}/rcp"
183RCONFLICTS_${PN}-rsh += "netkit-rsh-client"
184RPROVIDES_${PN}-rsh = "rsh"
185
186FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
187 ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
188FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd"
189RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
190RCONFLICTS_${PN}-rshd += "netkit-rshd-server"
191RPROVIDES_${PN}-rshd = "rshd"
192
193FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
194FILES_${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}"
195RDEPENDS_${PN}-ftpd += "xinetd"
196
197FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd"
198FILES_${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd"
199RCONFLICTS_${PN}-tftpd += "netkit-tftpd"
200RDEPENDS_${PN}-tftpd += "xinetd"
201
202FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet"
203FILES_${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd"
Brad Bishop15ae2502019-06-18 21:44:24 -0400204RCONFLICTS_${PN}-telnetd += "netkit-telnet"
Brad Bishop19323692019-04-05 15:28:33 -0400205RPROVIDES_${PN}-telnetd = "telnetd"
206RDEPENDS_${PN}-telnetd += "xinetd"
207
208FILES_${PN}-inetd = "${bindir}/inetd.${BPN}"
209
210RDEPENDS_${PN} = "xinetd"