Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "netkit-rsh includes the rsh daemon and client." |
| 2 | SECTION = "net" |
| 3 | HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" |
| 4 | LICENSE = "BSD-4-Clause" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | DEPENDS = "xinetd libgcrypt virtual/crypt" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 6 | |
| 7 | LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606" |
| 8 | |
| 9 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \ |
| 10 | ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \ |
| 11 | file://rsh-redone_link_order_file.patch \ |
| 12 | file://no_pam_build_fix.patch \ |
| 13 | file://rexec.xinetd.netkit \ |
| 14 | file://rlogin.xinetd.netkit \ |
| 15 | file://rsh.xinetd.netkit \ |
| 16 | file://netkit-rsh-0.17-rexec-ipv6.patch \ |
| 17 | file://fix-host-variable.patch \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 18 | file://fixup_wait3_api_change.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | file://CVE-2019-7282-and-CVE-2019-7283.patch \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | " |
| 21 | |
| 22 | SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096" |
| 23 | SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669" |
| 24 | SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3" |
| 25 | SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9" |
| 26 | |
| 27 | # Other support files |
| 28 | PAM_SRC_URI = "file://rexec.pam \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 29 | file://rlogin.pam \ |
| 30 | file://rsh.pam \ |
| 31 | " |
| 32 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 34 | inherit pkgconfig update-alternatives |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 35 | |
| 36 | CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" |
| 37 | LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt" |
| 38 | |
| 39 | PACKAGECONFIG ??= "" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 40 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 41 | PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam" |
| 42 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 43 | COMPATIBLE_HOST:libc-musl = 'null' |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 45 | do_configure () { |
| 46 | ./configure --prefix=${prefix} --exec-prefix=${exec_prefix} |
| 47 | echo "INSTALLROOT=${D}" > MCONFIG |
| 48 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 49 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 50 | echo "USE_PAM=1" >> MCONFIG |
| 51 | fi |
| 52 | |
| 53 | # didn't want to patch these next changes |
| 54 | sed -i 's/netkit-//' ${S}/rsh/pathnames.h |
| 55 | sed -i 's/netkit-//' ${S}/rcp/pathnames.h |
| 56 | } |
| 57 | |
| 58 | do_install () { |
| 59 | install -d ${D}${bindir} |
| 60 | install -d ${D}${sbindir} |
| 61 | install -d ${D}${mandir}/man1 |
| 62 | install -d ${D}${mandir}/man8 |
| 63 | install -d ${D}${sysconfdir}/xinetd.d |
| 64 | |
| 65 | oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ |
| 66 | 'DAEMONMODE=0755' 'MANMODE=0644' \ |
| 67 | 'SUIDMODE=4755' \ |
| 68 | 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ |
| 69 | 'MANDIR=${mandir}' install |
| 70 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 71 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 72 | install -d ${D}${sysconfdir}/pam.d |
| 73 | install -m 0644 debian/hosts.equiv ${D}/${sysconfdir} |
| 74 | install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec |
| 75 | install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 76 | install -m 0644 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 77 | fi |
| 78 | cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec |
| 79 | cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin |
| 80 | cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh |
| 81 | } |
| 82 | |
| 83 | PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" |
| 84 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 85 | FILES:${PN}-client = "${bindir}/*" |
| 86 | FILES:${PN}-server = "${sbindir}/* ${sysconfdir}" |
| 87 | FILES:${PN}-doc = "${mandir}" |
| 88 | FILES:${PN}-dbg = "${prefix}/src/debug \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 89 | ${sbindir}/.debug ${bindir}/.debug" |
| 90 | |
| 91 | ALTERNATIVE_PRIORITY = "80" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 92 | ALTERNATIVE:${PN}-client = "rcp rexec rlogin rsh" |
| 93 | ALTERNATIVE:${PN}-server = "rshd rexecd rlogind" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 94 | ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd" |
| 95 | ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" |
| 96 | ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd" |
| 97 | ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" |
| 98 | ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind" |
| 99 | ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" |
| 100 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 101 | RCONFLICTS:${PN}-server += "inetutils-rshd" |
| 102 | RPROVIDES:${PN}-server = "rshd" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 103 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame^] | 104 | RDEPENDS:${PN}-server = "xinetd" |
| 105 | RDEPENDS:${PN}-server += "tcp-wrappers" |