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