Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Security tool that is a wrapper for TCP daemons" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "http://www.softpanorama.org/Net/Network_security/TCP_wrappers/" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | DESCRIPTION = "Tools for monitoring and filtering incoming requests for tcp \ |
| 4 | services." |
| 5 | SECTION = "console/network" |
| 6 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 7 | LICENSE = "BSD-1-Clause" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://DISCLAIMER;md5=071bd69cb78b18888ea5e3da5c3127fa" |
| 9 | PR ="r10" |
| 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | DEPENDS += "libnsl2" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
| 13 | PACKAGES = "${PN}-dbg libwrap libwrap-doc libwrap-dev libwrap-staticdev ${PN} ${PN}-doc" |
| 14 | FILES_libwrap = "${base_libdir}/lib*${SOLIBS}" |
| 15 | FILES_libwrap-doc = "${mandir}/man3 ${mandir}/man5" |
| 16 | FILES_libwrap-dev = "${libdir}/lib*${SOLIBSDEV} ${includedir}" |
| 17 | FILES_libwrap-staticdev = "${libdir}/lib*.a" |
| 18 | FILES_${PN} = "${sbindir}" |
| 19 | FILES_${PN}-doc = "${mandir}/man8" |
| 20 | |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 21 | SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | file://00_man_quoting.diff \ |
| 23 | file://01_man_portability.patch \ |
| 24 | file://05_wildcard_matching.patch \ |
| 25 | file://06_fix_gethostbyname.patch \ |
| 26 | file://10_usagi-ipv6.patch \ |
| 27 | file://11_tcpd_blacklist.patch \ |
| 28 | file://11_usagi_fix.patch \ |
| 29 | file://12_makefile_config.patch \ |
| 30 | file://13_shlib_weaksym.patch \ |
| 31 | file://14_cidr_support.patch \ |
| 32 | file://15_match_clarify.patch \ |
| 33 | file://expand_remote_port.patch \ |
| 34 | file://have_strerror.patch \ |
| 35 | file://man_fromhost.patch \ |
| 36 | file://restore_sigalarm.patch \ |
| 37 | file://rfc931.diff \ |
| 38 | file://safe_finger.patch \ |
| 39 | file://sig_fix.patch \ |
| 40 | file://siglongjmp.patch \ |
| 41 | file://socklen_t.patch \ |
| 42 | file://tcpdchk_libwrapped.patch \ |
| 43 | file://ldflags.patch \ |
| 44 | file://rename_strings_variable.patch \ |
| 45 | file://try-from.8 \ |
| 46 | file://safe_finger.8 \ |
| 47 | file://makefile-fix-parallel.patch \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 48 | file://musl-decls.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 49 | file://0001-Fix-build-with-clang.patch \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 50 | file://fix_warnings.patch \ |
| 51 | file://fix_warnings2.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | " |
| 53 | |
| 54 | SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a" |
| 55 | SRC_URI[sha256sum] = "9543d7adedf78a6de0b221ccbbd1952e08b5138717f4ade814039bb489a4315d" |
| 56 | |
| 57 | S = "${WORKDIR}/tcp_wrappers_${PV}" |
| 58 | |
| 59 | EXTRA_OEMAKE = "'CC=${CC}' \ |
| 60 | 'AR=${AR}' \ |
| 61 | 'RANLIB=${RANLIB}' \ |
| 62 | 'REAL_DAEMON_DIR=${sbindir}' \ |
| 63 | 'STYLE=-DPROCESS_OPTIONS' \ |
| 64 | 'FACILITY=LOG_DAEMON' \ |
| 65 | 'SEVERITY=LOG_INFO' \ |
| 66 | 'BUGS=' \ |
| 67 | 'VSYSLOG=' \ |
| 68 | 'RFC931_TIMEOUT=10' \ |
| 69 | 'ACCESS=-DHOSTS_ACCESS' \ |
| 70 | 'KILL_OPT=-DKILL_IP_OPTIONS' \ |
| 71 | 'UMASK=-DDAEMON_UMASK=022' \ |
| 72 | 'NETGROUP=${EXTRA_OEMAKE_NETGROUP}' \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 73 | 'ARFLAGS=rv' \ |
| 74 | 'AUX_OBJ=weak_symbols.o' \ |
| 75 | 'TLI=' \ |
| 76 | 'COPTS=' \ |
| 77 | 'EXTRA_CFLAGS=${CFLAGS} -DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len'" |
| 78 | |
| 79 | EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 80 | EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN" |
| 81 | |
| 82 | EXTRA_OEMAKE_append_libc-musl = " 'LIBS='" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 83 | |
| 84 | do_compile () { |
| 85 | oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \ |
| 86 | all |
| 87 | } |
| 88 | |
| 89 | BINS = "safe_finger tcpd tcpdchk try-from tcpdmatch" |
| 90 | MANS3 = "hosts_access" |
| 91 | MANS5 = "hosts_options" |
| 92 | MANS8 = "tcpd tcpdchk tcpdmatch" |
| 93 | do_install () { |
| 94 | oe_libinstall -a libwrap ${D}${libdir} |
| 95 | oe_libinstall -C shared -so libwrap ${D}${base_libdir} |
| 96 | |
| 97 | if [ "${libdir}" != "${base_libdir}" ] ; then |
| 98 | rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'` |
| 99 | libname=`readlink ${D}${base_libdir}/libwrap.so | xargs basename` |
| 100 | ln -s ${rel_lib_prefix}${base_libdir}/${libname} ${D}${libdir}/libwrap.so |
| 101 | rm -f ${D}${base_libdir}/libwrap.so |
| 102 | fi |
| 103 | |
| 104 | install -d ${D}${sbindir} |
| 105 | for b in ${BINS}; do |
| 106 | install -m 0755 $b ${D}${sbindir}/ || exit 1 |
| 107 | done |
| 108 | |
| 109 | install -d ${D}${mandir}/man3 |
| 110 | for m in ${MANS3}; do |
| 111 | install -m 0644 $m.3 ${D}${mandir}/man3/ || exit 1 |
| 112 | done |
| 113 | |
| 114 | install -d ${D}${mandir}/man5 |
| 115 | for m in ${MANS5}; do |
| 116 | install -m 0644 $m.5 ${D}${mandir}/man5/ || exit 1 |
| 117 | done |
| 118 | |
| 119 | install -d ${D}${mandir}/man8 |
| 120 | for m in ${MANS8}; do |
| 121 | install -m 0644 $m.8 ${D}${mandir}/man8/ || exit 1 |
| 122 | done |
| 123 | |
| 124 | install -m 0644 ${WORKDIR}/try-from.8 ${D}${mandir}/man8/ |
| 125 | install -m 0644 ${WORKDIR}/safe_finger.8 ${D}${mandir}/man8/ |
| 126 | |
| 127 | install -d ${D}${includedir} |
| 128 | install -m 0644 tcpd.h ${D}${includedir}/ |
| 129 | |
| 130 | install -d ${D}${sysconfdir} |
| 131 | touch ${D}${sysconfdir}/hosts.allow |
| 132 | touch ${D}${sysconfdir}/hosts.deny |
| 133 | } |
| 134 | |
| 135 | FILES_${PN} += "${sysconfdir}/hosts.allow ${sysconfdir}/hosts.deny" |