diff options
Diffstat (limited to 'sys-apps/tcp-wrappers')
-rw-r--r-- | sys-apps/tcp-wrappers/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch | 295 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch | 35 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/metadata.xml | 2 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild | 93 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild | 93 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/tcp-wrappers-7.6.31-r1.ebuild | 115 | ||||
-rw-r--r-- | sys-apps/tcp-wrappers/tcp-wrappers-7.6.31.ebuild | 111 |
8 files changed, 229 insertions, 519 deletions
diff --git a/sys-apps/tcp-wrappers/Manifest b/sys-apps/tcp-wrappers/Manifest index d379adb218f4..d2a178c14286 100644 --- a/sys-apps/tcp-wrappers/Manifest +++ b/sys-apps/tcp-wrappers/Manifest @@ -1,3 +1,3 @@ -DIST tcp-wrappers_7.6.q-22.debian.tar.gz 41730 BLAKE2B 2e507269b14e5cf3e1a599b4cdae40c2900b098a1e40fc1b74e6b5565183fc71e25306e8dd0863fb16e6e52a6c471aeccb73c0b7c42d6f3f98aa9f95274583fb SHA512 cee45f265c34ec1c4e9e81d54be636dcd9702964f9cf5bb076f72d6772d2dbc638d2ef366560b51c24a216724807826bb3b7bf9d5d0f5c0923b71de7d0b002a8 -DIST tcp-wrappers_7.6.q-28.debian.tar.xz 36104 BLAKE2B 209fd9730785db8afc8ebec581f7132cfb4352f8807d2cea4715daf5c11aa08a92cf084ab1ff31222f5b265f032286ce2dcf49a238e9dc5616161c400fce4f08 SHA512 2c63201937737c19b4e5ca97dbc0ede9fc2d3b8fc344f8854a7d2afc0109ccb9ee52af94ba8a8498da910336a4f473825daa7a0cca26a0d93e1078e67abe16b0 +DIST tcp-wrappers-7.6.31-patches.tar.xz 8040 BLAKE2B 03e08afaf52bd8e24161cae8f92cbbf47f6dbceae4accc900963c179ff8ee5ce290a973028fd43cc6bffa82714c8a269ba9d2499c3033226d025f4c644462286 SHA512 cee360016361dd69473e57d36ea87b720ef7f31d58472fb1b9efe752fb250c2c758e95d1ca747f8a613a16c60ab9fa991db65e983d678e285fc1372dbad114c9 +DIST tcp-wrappers_7.6.q-31.debian.tar.xz 36256 BLAKE2B 3ffd8b014c120f54b9231f375d3ec77a1894db8c48e56a57b52c5d796be42b78a1ddc35a45c816a05a1cbc603b88e3fe6131b4a562fb9d2169685031ecbf44d5 SHA512 de2bd7b081fca0f182def93795014332baf7b5edf339eaf81dff82772aea1dc866ccddccd5273e7dc49cf760953e164a66f1e5945cb54f2b8dab090c11712c33 DIST tcp_wrappers_7.6.tar.gz 99438 BLAKE2B 961d9858866990f0f5e8c6bb782f5f39a03b267a8957dcd89734aeefcc85ca32554e032c73314e0a88110f3bb8a0dbdd81f093392307623a996b0232773e1e67 SHA512 2d9d003791f8d00912a36ae00579e2b8dd7ad8a7bf8eae259659bcaf5365b150540ff6c93c91765872c76041579b7a02b6e3c64528fb7f8235680399ba1d9dac diff --git a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch deleted file mode 100644 index 328a4a102618..000000000000 --- a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-headers.patch +++ /dev/null @@ -1,295 +0,0 @@ ---- a/options.c -+++ b/options.c -@@ -34,6 +34,8 @@ - - /* System libraries. */ - -+#include <unistd.h> -+#include <stdlib.h> - #include <sys/types.h> - #include <sys/param.h> - #include <sys/socket.h> ---- a/safe_finger.c -+++ b/safe_finger.c -@@ -20,6 +20,11 @@ - - /* System libraries */ - -+#include <unistd.h> -+#include <fcntl.h> -+#include <stdlib.h> -+#include <sys/wait.h> -+#include <grp.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <signal.h> -@@ -27,7 +31,7 @@ - #include <ctype.h> - #include <pwd.h> - --extern void exit(); -+int pipe_stdin(char **argv); - - /* Local stuff */ - ---- a/scaffold.c -+++ b/scaffold.c -@@ -10,6 +10,7 @@ - - /* System libraries. */ - -+#include <stdlib.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/socket.h> -@@ -27,7 +27,4 @@ - #endif - --#ifndef INET6 --extern char *malloc(); --#endif - - /* Application-specific. */ ---- a/shell_cmd.c -+++ b/shell_cmd.c -@@ -14,6 +14,10 @@ - - /* System libraries. */ - -+#include <unistd.h> -+#include <stdlib.h> -+#include <fcntl.h> -+#include <sys/wait.h> - #include <sys/types.h> - #include <sys/param.h> - #include <signal.h> -@@ -25,8 +25,6 @@ - #include <syslog.h> - #include <string.h> - --extern void exit(); -- - /* Local stuff. */ - - #include "tcpd.h" ---- a/tcpdchk.c -+++ b/tcpdchk.c -@@ -20,6 +20,8 @@ - - /* System libraries. */ - -+#include <unistd.h> -+#include <stdlib.h> - #include <sys/types.h> - #include <sys/stat.h> - #ifdef INET6 -@@ -35,10 +36,7 @@ - #include <netdb.h> - #include <string.h> - --extern int errno; --extern void exit(); --extern int optind; --extern char *optarg; -+int cidr_mask_addr(char *str); - - #ifndef INADDR_NONE - #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ ---- a/clean_exit.c -+++ b/clean_exit.c -@@ -13,8 +13,8 @@ - #endif - - #include <stdio.h> -- --extern void exit(); -+#include <unistd.h> -+#include <stdlib.h> - - #include "tcpd.h" - ---- a/hosts_access.c -+++ b/hosts_access.c -@@ -23,6 +23,7 @@ - - /* System libraries. */ - -+#include <stdlib.h> - #include <sys/types.h> - #ifdef INT32_T - typedef uint32_t u_int32_t; -@@ -43,8 +44,8 @@ - #include <netdb.h> - #endif - --extern char *fgets(); --extern int errno; -+static int match_pattern_ylo(const char *s, const char *pattern); -+int cidr_mask_addr(char *str); - - #ifndef INADDR_NONE - #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ ---- a/inetcf.c -+++ b/inetcf.c -@@ -9,15 +9,14 @@ - static char sccsid[] = "@(#) inetcf.c 1.7 97/02/12 02:13:23"; - #endif - -+#include <stdlib.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <stdio.h> - #include <errno.h> - #include <string.h> - --extern int errno; --extern void exit(); -- -+#include "scaffold.h" - #include "tcpd.h" - #include "inetcf.h" - ---- a/percent_x.c -+++ b/percent_x.c -@@ -16,12 +16,12 @@ - - /* System libraries. */ - -+#include <unistd.h> -+#include <stdlib.h> - #include <stdio.h> - #include <syslog.h> - #include <string.h> - --extern void exit(); -- - /* Local stuff. */ - - #include "tcpd.h" ---- a/rfc931.c -+++ b/rfc931.c -@@ -15,6 +15,7 @@ - - /* System libraries. */ - -+#include <unistd.h> - #include <stdio.h> - #include <syslog.h> - #include <sys/types.h> ---- a/tcpd.c -+++ b/tcpd.c -@@ -16,6 +16,7 @@ - - /* System libraries. */ - -+#include <unistd.h> - #include <sys/types.h> - #include <sys/param.h> - #include <sys/stat.h> -@@ -39,6 +39,8 @@ - #include "patchlevel.h" - #include "tcpd.h" - -+void fix_options(struct request_info *request); -+ - int allow_severity = SEVERITY; /* run-time adjustable */ - int deny_severity = LOG_WARNING; /* ditto */ - ---- a/tcpdmatch.c -+++ b/tcpdmatch.c -@@ -19,6 +19,8 @@ - - /* System libraries. */ - -+#include <unistd.h> -+#include <stdlib.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/socket.h> -@@ -30,9 +32,6 @@ - #include <setjmp.h> - #include <string.h> - --extern void exit(); --extern int optind; --extern char *optarg; - - #ifndef INADDR_NONE - #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ ---- a/update.c -+++ b/update.c -@@ -19,6 +19,7 @@ - - /* System libraries */ - -+#include <unistd.h> - #include <stdio.h> - #include <syslog.h> - #include <string.h> ---- a/misc.c -+++ b/misc.c -@@ -14,11 +14,10 @@ - #include <arpa/inet.h> - #include <stdio.h> - #include <string.h> -+#include <stdlib.h> - - #include "tcpd.h" - --extern char *fgets(); -- - #ifndef INADDR_NONE - #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ - #endif ---- a/fix_options.c -+++ b/fix_options.c -@@ -32,6 +32,7 @@ - - /* fix_options - get rid of IP-level socket options */ - -+void - fix_options(request) - struct request_info *request; - { -@@ -38,11 +38,8 @@ - #ifdef IP_OPTIONS - unsigned char optbuf[BUFFER_SIZE / 3], *cp; - char lbuf[BUFFER_SIZE], *lp; --#ifdef __GLIBC__ -- size_t optsize = sizeof(optbuf), ipproto; --#else -- int optsize = sizeof(optbuf), ipproto; --#endif -+ socklen_t optsize = sizeof(optbuf); -+ int ipproto; - struct protoent *ip; - int fd = request->fd; - unsigned int opt; ---- a/socket.c -+++ b/socket.c -@@ -95,11 +95,7 @@ - static struct sockaddr_in client; - static struct sockaddr_in server; - #endif --#ifdef __GLIBC__ -- size_t len; --#else -- int len; --#endif -+ socklen_t len; - char buf[BUFSIZ]; - int fd = request->fd; - -@@ -430,11 +426,7 @@ - #else - struct sockaddr_in sin; - #endif --#ifdef __GLIBC__ -- size_t size = sizeof(sin); --#else -- int size = sizeof(sin); --#endif -+ socklen_t size; - - /* - * Eat up the not-yet received datagram. Some systems insist on a diff --git a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch deleted file mode 100644 index 4a6847621c57..000000000000 --- a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6-redhat-bug11881.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- tcp_wrappers_7.6/tcpd.c.bug11881 -+++ tcp_wrappers_7.6/tcpd.c -@@ -60,10 +60,10 @@ - */ - - if (argv[0][0] == '/') { -- strcpy(path, argv[0]); -+ strncpy(path, argv[0], sizeof(path)); - argv[0] = strrchr(argv[0], '/') + 1; - } else { -- sprintf(path, "%s/%s", REAL_DAEMON_DIR, argv[0]); -+ snprintf(path, sizeof(path), "%s/%s", REAL_DAEMON_DIR, argv[0]); - } - - /* ---- tcp_wrappers_7.6/eval.c.bug11881 -+++ tcp_wrappers_7.6/eval.c -@@ -111,7 +111,7 @@ - return (hostinfo); - #endif - if (STR_NE(eval_user(request), unknown)) { -- sprintf(both, "%s@%s", request->user, hostinfo); -+ snprintf(both, sizeof(both), "%s@%s", request->user, hostinfo); - return (both); - } else { - return (hostinfo); -@@ -128,7 +128,7 @@ - char *daemon = eval_daemon(request); - - if (STR_NE(host, unknown)) { -- sprintf(both, "%s@%s", daemon, host); -+ snprintf(both, sizeof(both), "%s@%s", daemon, host); - return (both); - } else { - return (daemon); diff --git a/sys-apps/tcp-wrappers/metadata.xml b/sys-apps/tcp-wrappers/metadata.xml index aedbb1a2c097..95687368f98d 100644 --- a/sys-apps/tcp-wrappers/metadata.xml +++ b/sys-apps/tcp-wrappers/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>base-system@gentoo.org</email> diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild deleted file mode 100644 index f1edc84189b8..000000000000 --- a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.22-r1.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" - -inherit eutils toolchain-funcs versionator flag-o-matic multilib-minimal usr-ldscript - -MY_PV=$(get_version_component_range 1-2) -DEB_PV=$(get_version_component_range 3) -MY_P="${PN//-/_}_${MY_PV}" -DESCRIPTION="TCP Wrappers" -HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html" -SRC_URI="ftp://ftp.porcupine.org/pub/security/${MY_P}.tar.gz - mirror://debian/pool/main/t/${PN}/${PN}_${MY_PV}.q-${DEB_PV}.debian.tar.gz" - -LICENSE="tcp_wrappers_license" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="ipv6 netgroups static-libs" - -RDEPEND="" - -S=${WORKDIR}/${MY_P} - -src_prepare() { - EPATCH_OPTS="-p1" \ - epatch $(sed -e 's:^:../debian/patches/:' ../debian/patches/series) - epatch "${FILESDIR}"/${PN}-7.6-headers.patch - epatch "${FILESDIR}"/${PN}-7.6-redhat-bug11881.patch - - multilib_copy_sources -} - -temake() { - local mycppflags="-DHAVE_WEAKSYMS -DHAVE_STRERROR -DSYS_ERRLIST_DEFINED" - use ipv6 && mycppflags+=" -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" - emake \ - REAL_DAEMON_DIR="${EPREFIX}"/usr/sbin \ - TLI= VSYSLOG= PARANOID= BUGS= \ - AUTH="-DALWAYS_RFC931" \ - AUX_OBJ="weak_symbols.o" \ - DOT="-DAPPEND_DOT" \ - HOSTNAME="-DALWAYS_HOSTNAME" \ - NETGROUP=$(usex netgroups -DNETGROUPS "") \ - STYLE="-DPROCESS_OPTIONS" \ - LIBS=$(usex netgroups -lnsl "") \ - LIB=$(usex static-libs libwrap.a "") \ - AR="$(tc-getAR)" ARFLAGS=rc \ - CC="$(tc-getCC)" \ - RANLIB="$(tc-getRANLIB)" \ - COPTS="${CFLAGS} ${CPPFLAGS} ${mycppflags}" \ - LDFLAGS="${LDFLAGS}" \ - "$@" || die -} - -multilib_src_configure() { - tc-export AR RANLIB - temake config-check -} - -multilib_src_compile() { - temake all -} - -multilib_src_install() { - into /usr - use static-libs && dolib.a libwrap.a - dolib.so shared/libwrap.so* - - insinto /usr/include - doins tcpd.h - - if multilib_is_native_abi; then - gen_usr_ldscript -a wrap - dosbin tcpd tcpdchk tcpdmatch safe_finger try-from - fi -} - -multilib_src_install_all() { - doman *.[358] - dosym hosts_access.5 /usr/share/man/man5/hosts.allow.5 - dosym hosts_access.5 /usr/share/man/man5/hosts.deny.5 - - insinto /etc - newins "${FILESDIR}"/hosts.allow.example hosts.allow - - dodoc BLURB CHANGES DISCLAIMER README* -} - -pkg_preinst() { - # don't clobber people with our default example config - [[ -e ${EROOT}/etc/hosts.allow ]] && cp -pP "${EROOT}"/etc/hosts.allow "${ED}"/etc/hosts.allow -} diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild deleted file mode 100644 index 00e58c8c433f..000000000000 --- a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit toolchain-funcs flag-o-matic multilib-minimal usr-ldscript - -MY_PV=$(ver_cut 1-2) -DEB_PV=$(ver_cut 3) -MY_P="${PN//-/_}_${MY_PV}" -DESCRIPTION="TCP Wrappers" -HOMEPAGE="http://ftp.porcupine.org/pub/security" -SRC_URI="http://ftp.porcupine.org/pub/security/${MY_P}.tar.gz - mirror://debian/pool/main/t/${PN}/${PN}_${MY_PV}.q-${DEB_PV}.debian.tar.xz" - -LICENSE="tcp_wrappers_license" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="ipv6 netgroups static-libs" - -RDEPEND="" - -S=${WORKDIR}/${MY_P} - -src_prepare() { - eapply $(sed -e 's:^:../debian/patches/:' ../debian/patches/series) - eapply "${FILESDIR}"/${PN}-7.6-redhat-bug11881.patch - - eapply_user - - multilib_copy_sources -} - -temake() { - local mycppflags="-DHAVE_WEAKSYMS -DHAVE_STRERROR -DSYS_ERRLIST_DEFINED" - use ipv6 && mycppflags+=" -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" - emake \ - REAL_DAEMON_DIR="${EPREFIX}/usr/sbin" \ - TLI= VSYSLOG= PARANOID= BUGS= \ - AUTH="-DALWAYS_RFC931" \ - AUX_OBJ="weak_symbols.o" \ - DOT="-DAPPEND_DOT" \ - HOSTNAME="-DALWAYS_HOSTNAME" \ - NETGROUP=$(usex netgroups -DNETGROUPS "") \ - STYLE="-DPROCESS_OPTIONS" \ - LIBS=$(usex netgroups -lnsl "") \ - LIB=$(usex static-libs libwrap.a "") \ - AR="$(tc-getAR)" ARFLAGS=rc \ - CC="$(tc-getCC)" \ - RANLIB="$(tc-getRANLIB)" \ - COPTS="${CFLAGS} ${CPPFLAGS} ${mycppflags}" \ - LDFLAGS="${LDFLAGS}" \ - "$@" || die -} - -multilib_src_configure() { - tc-export AR RANLIB - temake config-check -} - -multilib_src_compile() { - temake all -} - -multilib_src_install() { - into /usr - use static-libs && dolib.a libwrap.a - dolib.so shared/libwrap.so* - - insinto /usr/include - doins tcpd.h - - if multilib_is_native_abi; then - gen_usr_ldscript -a wrap - dosbin tcpd tcpdchk tcpdmatch safe_finger try-from - fi -} - -multilib_src_install_all() { - doman *.[358] - dosym hosts_access.5 /usr/share/man/man5/hosts.allow.5 - dosym hosts_access.5 /usr/share/man/man5/hosts.deny.5 - - insinto /etc - newins "${FILESDIR}"/hosts.allow.example hosts.allow - - dodoc BLURB CHANGES DISCLAIMER README* -} - -pkg_preinst() { - # don't clobber people with our default example config - [[ -e ${EROOT}/etc/hosts.allow ]] && cp -pP "${EROOT}"/etc/hosts.allow "${ED}"/etc/hosts.allow -} diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31-r1.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31-r1.ebuild new file mode 100644 index 000000000000..39b3480ea920 --- /dev/null +++ b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31-r1.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs multilib-minimal + +MY_PV=$(ver_cut 1-2) +DEB_PV=$(ver_cut 3) +MY_P="${PN//-/_}_${MY_PV}" + +DESCRIPTION="TCP Wrappers" +HOMEPAGE="http://ftp.porcupine.org/pub/security" +SRC_URI=" + http://ftp.porcupine.org/pub/security/${MY_P}.tar.gz + mirror://debian/pool/main/t/${PN}/${PN}_${MY_PV}.q-${DEB_PV}.debian.tar.xz + https://dev.gentoo.org/~soap/distfiles/${P}-patches.tar.xz +" +S="${WORKDIR}/${MY_P}" + +LICENSE="tcp_wrappers_license" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="ipv6 netgroups selinux" + +DEPEND=" + netgroups? ( net-libs/libnsl:= ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-tcpd ) +" + +PATCHES=( "${WORKDIR}"/gentoo-patches/ ) + +src_prepare() { + # Apply Debian patchset except for the series file which just lists + # the patches + eapply $(sed -e 's:^:../debian/patches/:' ../debian/patches/series || die) + + default + + multilib_copy_sources +} + +temake() { + # Broken with lld-17 (bug #919689) + append-ldflags $(test-flags-CCLD -Wl,--undefined-version) + + append-cppflags "-DHAVE_WEAKSYMS -DHAVE_STRERROR -DSYS_ERRLIST_DEFINED" + + if use ipv6; then + append-cppflags "-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" + fi + + local myemakeargs=( + REAL_DAEMON_DIR="${EPREFIX}/usr/sbin" + TLI= VSYSLOG= PARANOID= BUGS= + AUTH="-DALWAYS_RFC931" + AUX_OBJ="weak_symbols.o" + DOT="-DAPPEND_DOT" + HOSTNAME="-DALWAYS_HOSTNAME" + NETGROUP=$(usev netgroups -DNETGROUPS) + STYLE="-DPROCESS_OPTIONS" + LIBS=$(usev netgroups -lnsl) + LIB="" # disable static-libs + AR="$(tc-getAR)" ARFLAGS=rc + CC="$(tc-getCC)" + RANLIB="$(tc-getRANLIB)" + COPTS="${CFLAGS} ${CPPFLAGS}" + LDFLAGS="${LDFLAGS}" + "$@" + ) + + emake "${myemakeargs[@]}" +} + +multilib_src_configure() { + tc-export AR RANLIB + temake config-check +} + +multilib_src_compile() { + # https://bugs.gentoo.org/728348 + unset STRINGS + temake all +} + +multilib_src_install() { + into /usr + dolib.so shared/libwrap.so* + + insinto /usr/include + doins tcpd.h + + if multilib_is_native_abi; then + dosbin tcpd tcpdchk tcpdmatch safe_finger try-from + fi +} + +multilib_src_install_all() { + doman *.[358] + dosym hosts_access.5 /usr/share/man/man5/hosts.allow.5 + dosym hosts_access.5 /usr/share/man/man5/hosts.deny.5 + + insinto /etc + newins "${FILESDIR}"/hosts.allow.example hosts.allow + + dodoc BLURB CHANGES DISCLAIMER README* +} + +pkg_preinst() { + # don't clobber people with our default example config + [[ -e ${EROOT}/etc/hosts.allow ]] && cp -pP "${EROOT}"/etc/hosts.allow "${ED}"/etc/hosts.allow +} diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31.ebuild new file mode 100644 index 000000000000..8b0be6d3f702 --- /dev/null +++ b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.31.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs multilib-minimal usr-ldscript + +MY_PV=$(ver_cut 1-2) +DEB_PV=$(ver_cut 3) +MY_P="${PN//-/_}_${MY_PV}" + +DESCRIPTION="TCP Wrappers" +HOMEPAGE="http://ftp.porcupine.org/pub/security" +SRC_URI="http://ftp.porcupine.org/pub/security/${MY_P}.tar.gz + mirror://debian/pool/main/t/${PN}/${PN}_${MY_PV}.q-${DEB_PV}.debian.tar.xz + https://dev.gentoo.org/~soap/distfiles/${P}-patches.tar.xz" +S="${WORKDIR}/${MY_P}" + +LICENSE="tcp_wrappers_license" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +IUSE="ipv6 netgroups selinux" + +DEPEND=" + netgroups? ( net-libs/libnsl:= ) +" +RDEPEND=" + ${DEPEND} + selinux? ( sec-policy/selinux-tcpd ) +" + +PATCHES=( "${WORKDIR}"/gentoo-patches/ ) + +src_prepare() { + # Apply Debian patchset except for the series file which just lists + # the patches + eapply $(sed -e 's:^:../debian/patches/:' ../debian/patches/series || die) + + default + + multilib_copy_sources +} + +temake() { + append-cppflags "-DHAVE_WEAKSYMS -DHAVE_STRERROR -DSYS_ERRLIST_DEFINED" + + if use ipv6; then + append-cppflags "-DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" + fi + + local myemakeargs=( + REAL_DAEMON_DIR="${EPREFIX}/usr/sbin" + TLI= VSYSLOG= PARANOID= BUGS= + AUTH="-DALWAYS_RFC931" + AUX_OBJ="weak_symbols.o" + DOT="-DAPPEND_DOT" + HOSTNAME="-DALWAYS_HOSTNAME" + NETGROUP=$(usex netgroups -DNETGROUPS "") + STYLE="-DPROCESS_OPTIONS" + LIBS=$(usex netgroups -lnsl "") + LIB="" # disable static-libs + AR="$(tc-getAR)" ARFLAGS=rc + CC="$(tc-getCC)" + RANLIB="$(tc-getRANLIB)" + COPTS="${CFLAGS} ${CPPFLAGS}" + LDFLAGS="${LDFLAGS}" + "$@" + ) + + emake "${myemakeargs[@]}" +} + +multilib_src_configure() { + tc-export AR RANLIB + temake config-check +} + +multilib_src_compile() { + # https://bugs.gentoo.org/728348 + unset STRINGS + temake all +} + +multilib_src_install() { + into /usr + dolib.so shared/libwrap.so* + + insinto /usr/include + doins tcpd.h + + if multilib_is_native_abi; then + gen_usr_ldscript -a wrap + dosbin tcpd tcpdchk tcpdmatch safe_finger try-from + fi +} + +multilib_src_install_all() { + doman *.[358] + dosym hosts_access.5 /usr/share/man/man5/hosts.allow.5 + dosym hosts_access.5 /usr/share/man/man5/hosts.deny.5 + + insinto /etc + newins "${FILESDIR}"/hosts.allow.example hosts.allow + + dodoc BLURB CHANGES DISCLAIMER README* +} + +pkg_preinst() { + # don't clobber people with our default example config + [[ -e ${EROOT}/etc/hosts.allow ]] && cp -pP "${EROOT}"/etc/hosts.allow "${ED}"/etc/hosts.allow +} |