Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [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" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | DEPENDS = "ncurses netbase readline virtual/crypt" |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 8 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 9 | LICENSE = "GPLv3" |
| 10 | |
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" |
| 12 | |
| 13 | SRC_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 \ |
| 25 | " |
| 26 | |
| 27 | SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52" |
| 28 | SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616" |
| 29 | |
| 30 | inherit autotools gettext update-alternatives texinfo |
| 31 | |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 32 | acpaths = "-I ./m4" |
| 33 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 34 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | |
| 36 | PACKAGECONFIG ??= "ftp uucpd \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 37 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 38 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 39 | " |
| 40 | PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline" |
| 41 | PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline" |
| 42 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 43 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no," |
| 44 | PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 45 | |
| 46 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 47 | inetutils_cv_path_login=${base_bindir}/login \ |
| 48 | --with-libreadline-prefix=${STAGING_LIBDIR} \ |
| 49 | --enable-rpath=no \ |
| 50 | " |
| 51 | |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 52 | EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin " |
| 53 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | do_configure_prepend () { |
| 55 | export HELP2MAN='true' |
| 56 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath |
| 57 | rm -f ${S}/glob/configure* |
| 58 | } |
| 59 | |
| 60 | do_install_append () { |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [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 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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}/ |
| 68 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 69 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ |
| 70 | mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 71 | mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd |
| 72 | mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd |
| 73 | mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 74 | if [ -e ${D}${libexecdir}/rlogind ]; then |
| 75 | mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind |
| 76 | fi |
| 77 | if [ -e ${D}${libexecdir}/rshd ]; then |
| 78 | mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd |
| 79 | fi |
| 80 | if [ -e ${D}${libexecdir}/talkd ]; then |
| 81 | mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd |
| 82 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 83 | mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd |
| 84 | mv ${D}${libexecdir}/* ${D}${bindir}/ |
| 85 | cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec |
| 86 | cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin |
| 87 | cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh |
| 88 | cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet |
| 89 | cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd |
| 90 | |
| 91 | sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/* |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 92 | if [ -e ${D}${libdir}/charset.alias ]; then |
| 93 | rm -rf ${D}${libdir}/charset.alias |
| 94 | fi |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 95 | rm -rf ${D}${libexecdir}/ |
| 96 | # remove usr/lib if empty |
| 97 | rmdir ${D}${libdir} || true |
| 98 | } |
| 99 | |
| 100 | PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \ |
| 101 | ${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \ |
| 102 | ${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \ |
| 103 | ${PN}-rsh ${PN}-rshd" |
| 104 | |
| 105 | # The packages tftpd, telnetd and rshd conflict with the ones |
| 106 | # provided by netkit, so add the corresponding -dbg packages |
| 107 | # for them to avoid the confliction between the dbg package |
| 108 | # of inetutils and netkit. |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 109 | PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg" |
| 110 | NOAUTOPACKAGEDEBUG = "1" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 111 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 112 | ALTERNATIVE_PRIORITY = "79" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 113 | ALTERNATIVE_${PN} = "talk whois" |
| 114 | ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd" |
| 115 | ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd" |
| 116 | |
Brad Bishop | 7f28bc5 | 2017-12-03 23:42:40 -0500 | [diff] [blame] | 117 | ALTERNATIVE_PRIORITY_${PN}-logger = "60" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 118 | ALTERNATIVE_${PN}-logger = "logger" |
| 119 | ALTERNATIVE_${PN}-syslogd = "syslogd" |
| 120 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" |
| 121 | |
| 122 | ALTERNATIVE_${PN}-ftp = "ftp" |
| 123 | ALTERNATIVE_${PN}-ftpd = "ftpd" |
| 124 | ALTERNATIVE_${PN}-tftp = "tftp" |
| 125 | ALTERNATIVE_${PN}-tftpd = "tftpd" |
| 126 | ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd" |
| 127 | ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd" |
| 128 | |
| 129 | ALTERNATIVE_${PN}-telnet = "telnet" |
| 130 | ALTERNATIVE_${PN}-telnetd = "telnetd" |
| 131 | ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd" |
| 132 | ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd" |
| 133 | |
| 134 | ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh" |
| 135 | ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind" |
| 136 | ALTERNATIVE_LINK_NAME[rshd] = "${sbindir}/rshd" |
| 137 | ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" |
| 138 | ALTERNATIVE_LINK_NAME[rexecd] = "${sbindir}/rexecd" |
| 139 | ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" |
| 140 | ALTERNATIVE_LINK_NAME[rlogind] = "${sbindir}/rlogind" |
| 141 | ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" |
| 142 | |
| 143 | ALTERNATIVE_${PN}-inetd= "inetd" |
| 144 | ALTERNATIVE_${PN}-traceroute = "traceroute" |
| 145 | |
| 146 | ALTERNATIVE_${PN}-hostname = "hostname" |
| 147 | ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" |
| 148 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 149 | ALTERNATIVE_${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8" |
| 150 | ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1" |
| 151 | ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1" |
| 152 | ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" |
| 153 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" |
| 154 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 155 | ALTERNATIVE_${PN}-ifconfig = "ifconfig" |
| 156 | ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig" |
| 157 | |
| 158 | ALTERNATIVE_${PN}-ping = "ping" |
| 159 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" |
| 160 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 161 | ALTERNATIVE_${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 162 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" |
| 163 | |
| 164 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 165 | FILES_${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 166 | FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" |
| 167 | FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" |
| 168 | FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}" |
| 169 | FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}" |
| 170 | FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}" |
| 171 | FILES_${PN}-logger = "${bindir}/logger.${BPN}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 172 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 173 | FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 174 | RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng" |
| 175 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 176 | FILES_${PN}-ftp = "${bindir}/ftp.${BPN}" |
| 177 | |
| 178 | FILES_${PN}-tftp = "${bindir}/tftp.${BPN}" |
| 179 | FILES_${PN}-telnet = "${bindir}/telnet.${BPN}" |
| 180 | FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}" |
| 181 | |
| 182 | FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \ |
| 183 | ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec" |
| 184 | FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd" |
| 185 | RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers" |
| 186 | RCONFLICTS_${PN}-rshd += "netkit-rshd" |
| 187 | RPROVIDES_${PN}-rshd = "rshd" |
| 188 | |
| 189 | FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}" |
| 190 | FILES_${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}" |
| 191 | RDEPENDS_${PN}-ftpd += "xinetd" |
| 192 | |
| 193 | FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd" |
| 194 | FILES_${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd" |
| 195 | RCONFLICTS_${PN}-tftpd += "netkit-tftpd" |
| 196 | RDEPENDS_${PN}-tftpd += "xinetd" |
| 197 | |
| 198 | FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet" |
| 199 | FILES_${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd" |
| 200 | RCONFLICTS_${PN}-telnetd += "netkit-telnetd" |
| 201 | RPROVIDES_${PN}-telnetd = "telnetd" |
| 202 | RDEPENDS_${PN}-telnetd += "xinetd" |
| 203 | |
| 204 | FILES_${PN}-inetd = "${bindir}/inetd.${BPN}" |
| 205 | |
| 206 | RDEPENDS_${PN} = "xinetd" |