Skip to contentSkip to conversation

inetutils: Remove talk / talkd from ALTERNATIVES

PATCH New Tom Rini 1 participant 3 messages Mar 12, 2019

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/3 inetutils: Remove talk / talkd from ALTERNATIVES

There are no alternative provides of these packages anymore. To avoid QA issues when building with musl, don't put these under an alternative at all.

---
 meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb +1 -2
index a27dbae2e688..4a00e2b71d9b 100644
@@ -110,8 +110,7 @@ PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg"
 NOAUTOPACKAGEDEBUG = "1"
 
 ALTERNATIVE_PRIORITY = "79"
-ALTERNATIVE_${PN} = "talk whois"
-ALTERNATIVE_LINK_NAME[talkd]  = "${sbindir}/in.talkd"
+ALTERNATIVE_${PN} = "whois"
 ALTERNATIVE_LINK_NAME[uucpd]  = "${sbindir}/in.uucpd"
 
 ALTERNATIVE_PRIORITY_${PN}-logger = "60"
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 2/3 inetutils: Handle rsh, etc more consistently

- We cannot build rsh, rshd, rlogind and rcp on musl. This is handled gracefully in the configure scripts and spelled out with EXTRA_OECONF. Expand this to include rexec to cover all of the related functionality.
- Rework adding in the xinetd.d files for these services to only do so when we even have the services being built. This leads to no rsh/rshd sub-packages on musl at all.
- If we use the normal alternatives mechanism to allow for this or netkit-rsh to provide rsh/rshd functionality we end up with QA issues on musl as we have unused ALTERNATIVES logic. Switch to making use of RPROVIDES / RCONFLICTS logic instead and make it match the netkit-rsh packaging names.

---
 .../inetutils/inetutils_1.9.4.bb                   | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)
meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb +16 -16
index 4a00e2b71d9b..c71b6787e819 100644
@@ -49,7 +49,7 @@ EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
         --enable-rpath=no \
 "
 
-EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin "
+EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin --disable-rexec --disable-rexecd"
 
 do_configure_prepend () {
     export HELP2MAN='true'
@@ -70,21 +70,23 @@ do_install_append () {
     mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/
     mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd
     mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd
-    mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
+    if [ -e ${D}${libexecdir}/rexecd ]; then
+        mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd
+        cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec
+    fi
     if [ -e ${D}${libexecdir}/rlogind ]; then
         mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind
+        cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin
     fi
     if [ -e ${D}${libexecdir}/rshd ]; then
         mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd
+        cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh
     fi
     if [ -e ${D}${libexecdir}/talkd ]; then
         mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd
     fi
     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
 
@@ -130,15 +132,6 @@ ALTERNATIVE_${PN}-telnetd = "telnetd"
 ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd"
 ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd"
 
-ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh"
-ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind"
-ALTERNATIVE_LINK_NAME[rshd] = "${sbindir}/rshd"
-ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd"
-ALTERNATIVE_LINK_NAME[rexecd] = "${sbindir}/rexecd"
-ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
-ALTERNATIVE_LINK_NAME[rlogind] = "${sbindir}/rlogind"
-ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
-
 ALTERNATIVE_${PN}-inetd= "inetd"
 ALTERNATIVE_${PN}-traceroute = "traceroute"
 
@@ -176,13 +169,20 @@ 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}"
+
+# We make us of RCONFLICTS / RPROVIDES here rather than using the normal
+# alternatives method as this leads to packaging QA issues when using
+# musl as that library does not provide what these applications need to
+# build.
+FILES_${PN}-rsh = "${bindir}/rsh ${bindir}/rlogin ${bindir}/rexec ${bindir}/rcp"
+RCONFLICTS_${PN}-rsh += "netkit-rsh-client"
+RPROVIDES_${PN}-rsh = "rsh"
 
 FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \
                     ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec"
 FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd"
 RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers"
-RCONFLICTS_${PN}-rshd += "netkit-rshd"
+RCONFLICTS_${PN}-rshd += "netkit-rshd-server"
 RPROVIDES_${PN}-rshd = "rshd"
 
 FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}"
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 3/3 inetutils: Disable rsh, etc in the build

In reply to Tom Rini

It is long since past time for rsh and company to be retired from the world. Disable building these now.

---
 meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-connectivity/inetutils/inetutils_1.9.4.bb +3 -1
index c71b6787e819..ee4adff3f8a3 100644
@@ -49,7 +49,9 @@ EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \
         --enable-rpath=no \
 "
 
-EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin --disable-rexec --disable-rexecd"
+# These are horrible for security, disable them
+EXTRA_OECONF_append = " --disable-rsh --disable-rshd --disable-rcp \
+        --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd"
 
 do_configure_prepend () {
     export HELP2MAN='true'
Signature · 1 line
2.7.4