diff options
Diffstat (limited to 'meta/recipes-connectivity/inetutils/inetutils_2.5.bb')
-rw-r--r-- | meta/recipes-connectivity/inetutils/inetutils_2.5.bb | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/inetutils/inetutils_2.5.bb b/meta/recipes-connectivity/inetutils/inetutils_2.5.bb new file mode 100644 index 0000000000..0f1a0736bd --- /dev/null +++ b/meta/recipes-connectivity/inetutils/inetutils_2.5.bb | |||
@@ -0,0 +1,218 @@ | |||
1 | SUMMARY = "The GNU inetutils are a collection of common networking utilities and servers." | ||
2 | DESCRIPTION = "The GNU inetutils are a collection of common \ | ||
3 | networking utilities and servers including ftp, ftpd, rcp, \ | ||
4 | rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ | ||
5 | talkd, telnet, telnetd, tftp, tftpd, and uucpd." | ||
6 | HOMEPAGE = "http://www.gnu.org/software/inetutils" | ||
7 | SECTION = "net" | ||
8 | DEPENDS = "ncurses netbase readline virtual/crypt" | ||
9 | |||
10 | LICENSE = "GPL-3.0-only" | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" | ||
13 | |||
14 | SRC_URI[sha256sum] = "87697d60a31e10b5cb86a9f0651e1ec7bee98320d048c0739431aac3d5764fb6" | ||
15 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \ | ||
16 | file://rexec.xinetd.inetutils \ | ||
17 | file://rlogin.xinetd.inetutils \ | ||
18 | file://rsh.xinetd.inetutils \ | ||
19 | file://telnet.xinetd.inetutils \ | ||
20 | file://tftpd.xinetd.inetutils \ | ||
21 | " | ||
22 | |||
23 | inherit autotools gettext update-alternatives texinfo | ||
24 | |||
25 | acpaths = "-I ./m4" | ||
26 | |||
27 | PACKAGECONFIG ??= "ftp uucpd \ | ||
28 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ | ||
29 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ | ||
30 | " | ||
31 | PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline" | ||
32 | PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline" | ||
33 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" | ||
34 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no," | ||
35 | PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," | ||
36 | |||
37 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ | ||
38 | --with-libreadline-prefix=${STAGING_LIBDIR} \ | ||
39 | --enable-rpath=no \ | ||
40 | --with-path-login=${base_bindir}/login \ | ||
41 | --with-path-cp=${base_bindir}/cp \ | ||
42 | --with-path-uucico=${libexecdir}/uuico \ | ||
43 | --with-path-procnet-dev=/proc/net/dev \ | ||
44 | " | ||
45 | |||
46 | EXTRA_OECONF:append:libc-musl = " --with-path-utmpx=/dev/null/utmpx --with-path-wtmpx=/dev/null/wtmpx" | ||
47 | |||
48 | # These are horrible for security, disable them | ||
49 | EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \ | ||
50 | --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd" | ||
51 | |||
52 | # The configure script guesses many paths in cross builds, check for this happening | ||
53 | do_configure_cross_check() { | ||
54 | if grep "may be incorrect because of cross-compilation" ${B}/config.log; then | ||
55 | bberror Default path values used, these must be set explicitly | ||
56 | fi | ||
57 | } | ||
58 | do_configure[postfuncs] += "do_configure_cross_check" | ||
59 | |||
60 | # The --with-path options are not actually options, so this check needs to be silenced | ||
61 | ERROR_QA:remove = "unknown-configure-option" | ||
62 | |||
63 | do_configure:prepend () { | ||
64 | export HELP2MAN='true' | ||
65 | } | ||
66 | |||
67 | do_install:append () { | ||
68 | install -m 0755 -d ${D}${base_sbindir} | ||
69 | install -m 0755 -d ${D}${sbindir} | ||
70 | install -m 0755 -d ${D}${sysconfdir}/xinetd.d | ||
71 | if [ "${base_bindir}" != "${bindir}" ] ; then | ||
72 | install -m 0755 -d ${D}${base_bindir} | ||
73 | mv ${D}${bindir}/ping* ${D}${base_bindir}/ | ||
74 | mv ${D}${bindir}/hostname ${D}${base_bindir}/ | ||
75 | mv ${D}${bindir}/dnsdomainname ${D}${base_bindir}/ | ||
76 | fi | ||
77 | mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ | ||
78 | mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ | ||
79 | mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd | ||
80 | mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd | ||
81 | if [ -e ${D}${libexecdir}/rexecd ]; then | ||
82 | mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd | ||
83 | cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec | ||
84 | fi | ||
85 | if [ -e ${D}${libexecdir}/rlogind ]; then | ||
86 | mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind | ||
87 | cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin | ||
88 | fi | ||
89 | if [ -e ${D}${libexecdir}/rshd ]; then | ||
90 | mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd | ||
91 | cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh | ||
92 | fi | ||
93 | if [ -e ${D}${libexecdir}/talkd ]; then | ||
94 | mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd | ||
95 | fi | ||
96 | mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd | ||
97 | mv ${D}${libexecdir}/* ${D}${bindir}/ | ||
98 | cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet | ||
99 | cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd | ||
100 | |||
101 | sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/* | ||
102 | if [ -e ${D}${libdir}/charset.alias ]; then | ||
103 | rm -rf ${D}${libdir}/charset.alias | ||
104 | fi | ||
105 | rm -rf ${D}${libexecdir}/ | ||
106 | # remove usr/lib if empty | ||
107 | rmdir ${D}${libdir} || true | ||
108 | } | ||
109 | |||
110 | PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \ | ||
111 | ${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \ | ||
112 | ${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \ | ||
113 | ${PN}-rsh ${PN}-rshd" | ||
114 | |||
115 | # The packages tftpd, telnetd and rshd conflict with the ones | ||
116 | # provided by netkit, so add the corresponding -dbg packages | ||
117 | # for them to avoid the confliction between the dbg package | ||
118 | # of inetutils and netkit. | ||
119 | PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg" | ||
120 | NOAUTOPACKAGEDEBUG = "1" | ||
121 | |||
122 | ALTERNATIVE_PRIORITY = "79" | ||
123 | ALTERNATIVE:${PN} = "whois dnsdomainname" | ||
124 | ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd" | ||
125 | ALTERNATIVE_LINK_NAME[dnsdomainname] = "${base_bindir}/dnsdomainname" | ||
126 | |||
127 | ALTERNATIVE_PRIORITY_${PN}-logger = "60" | ||
128 | ALTERNATIVE:${PN}-logger = "logger" | ||
129 | ALTERNATIVE:${PN}-syslogd = "syslogd" | ||
130 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
131 | |||
132 | ALTERNATIVE:${PN}-ftp = "ftp" | ||
133 | ALTERNATIVE:${PN}-ftpd = "ftpd" | ||
134 | ALTERNATIVE:${PN}-tftp = "tftp" | ||
135 | ALTERNATIVE:${PN}-tftpd = "tftpd" | ||
136 | ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd" | ||
137 | ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd" | ||
138 | |||
139 | ALTERNATIVE:${PN}-telnet = "telnet" | ||
140 | ALTERNATIVE:${PN}-telnetd = "telnetd" | ||
141 | ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd" | ||
142 | ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd" | ||
143 | |||
144 | ALTERNATIVE:${PN}-inetd= "inetd" | ||
145 | ALTERNATIVE:${PN}-traceroute = "traceroute" | ||
146 | |||
147 | ALTERNATIVE:${PN}-hostname = "hostname" | ||
148 | ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" | ||
149 | |||
150 | ALTERNATIVE:${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8 \ | ||
151 | tftpd.8 tftp.1 telnetd.8" | ||
152 | ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1" | ||
153 | ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1" | ||
154 | ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" | ||
155 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" | ||
156 | ALTERNATIVE_LINK_NAME[telnetd.8] = "${mandir}/man8/telnetd.8" | ||
157 | ALTERNATIVE_LINK_NAME[tftpd.8] = "${mandir}/man8/tftpd.8" | ||
158 | ALTERNATIVE_LINK_NAME[tftp.1] = "${mandir}/man1/tftp.1" | ||
159 | |||
160 | ALTERNATIVE:${PN}-ifconfig = "ifconfig" | ||
161 | ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig" | ||
162 | |||
163 | ALTERNATIVE:${PN}-ping = "ping" | ||
164 | ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | ||
165 | |||
166 | ALTERNATIVE:${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}" | ||
167 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | ||
168 | |||
169 | |||
170 | FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" | ||
171 | FILES:${PN}-ping = "${base_bindir}/ping.${BPN}" | ||
172 | FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}" | ||
173 | FILES:${PN}-hostname = "${base_bindir}/hostname.${BPN}" | ||
174 | FILES:${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}" | ||
175 | FILES:${PN}-traceroute = "${bindir}/traceroute.${BPN}" | ||
176 | FILES:${PN}-logger = "${bindir}/logger.${BPN}" | ||
177 | |||
178 | FILES:${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}" | ||
179 | RCONFLICTS:${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng" | ||
180 | |||
181 | FILES:${PN}-ftp = "${bindir}/ftp.${BPN}" | ||
182 | |||
183 | FILES:${PN}-tftp = "${bindir}/tftp.${BPN}" | ||
184 | FILES:${PN}-telnet = "${bindir}/telnet.${BPN}" | ||
185 | |||
186 | # We make us of RCONFLICTS / RPROVIDES here rather than using the normal | ||
187 | # alternatives method as this leads to packaging QA issues when using | ||
188 | # musl as that library does not provide what these applications need to | ||
189 | # build. | ||
190 | FILES:${PN}-rsh = "${bindir}/rsh ${bindir}/rlogin ${bindir}/rexec ${bindir}/rcp" | ||
191 | RCONFLICTS:${PN}-rsh += "netkit-rsh-client" | ||
192 | RPROVIDES:${PN}-rsh = "rsh" | ||
193 | |||
194 | FILES:${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \ | ||
195 | ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec" | ||
196 | FILES:${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd" | ||
197 | RDEPENDS:${PN}-rshd += "xinetd tcp-wrappers" | ||
198 | RCONFLICTS:${PN}-rshd += "netkit-rshd-server" | ||
199 | RPROVIDES:${PN}-rshd = "rshd" | ||
200 | |||
201 | FILES:${PN}-ftpd = "${bindir}/ftpd.${BPN}" | ||
202 | FILES:${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}" | ||
203 | RDEPENDS:${PN}-ftpd += "xinetd" | ||
204 | |||
205 | FILES:${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd" | ||
206 | FILES:${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd" | ||
207 | RCONFLICTS:${PN}-tftpd += "netkit-tftpd" | ||
208 | RDEPENDS:${PN}-tftpd += "xinetd" | ||
209 | |||
210 | FILES:${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet" | ||
211 | FILES:${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd" | ||
212 | RCONFLICTS:${PN}-telnetd += "netkit-telnet" | ||
213 | RPROVIDES:${PN}-telnetd = "telnetd" | ||
214 | RDEPENDS:${PN}-telnetd += "xinetd" | ||
215 | |||
216 | FILES:${PN}-inetd = "${bindir}/inetd.${BPN}" | ||
217 | |||
218 | RDEPENDS:${PN} = "xinetd" | ||