aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Flogeras <dflogeras2@gmail.com>2020-03-21 12:33:10 -0300
committerAnthony G. Basile <blueness@gentoo.org>2020-03-22 10:42:46 -0400
commit46ef13b54d7779a00a0f06b27488f6bb1661b605 (patch)
treed8288b836bf7f7d8bdf4167bfd628aa49e53e48c /sys-apps
parentsys-devel/gcc: Version bump 9.3.0 (diff)
downloadmusl-46ef13b54d7779a00a0f06b27488f6bb1661b605.tar.gz
musl-46ef13b54d7779a00a0f06b27488f6bb1661b605.tar.bz2
musl-46ef13b54d7779a00a0f06b27488f6bb1661b605.zip
sys-apps/tcp-wrappers sync with tree for stable
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/tcp-wrappers/Manifest1
-rw-r--r--sys-apps/tcp-wrappers/files/tcp-wrappers-7.6.28-no-external-malloc.patch15
-rw-r--r--sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild95
3 files changed, 111 insertions, 0 deletions
diff --git a/sys-apps/tcp-wrappers/Manifest b/sys-apps/tcp-wrappers/Manifest
index 6c115cd..d379adb 100644
--- a/sys-apps/tcp-wrappers/Manifest
+++ b/sys-apps/tcp-wrappers/Manifest
@@ -1,2 +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.tar.gz 99438 BLAKE2B 961d9858866990f0f5e8c6bb782f5f39a03b267a8957dcd89734aeefcc85ca32554e032c73314e0a88110f3bb8a0dbdd81f093392307623a996b0232773e1e67 SHA512 2d9d003791f8d00912a36ae00579e2b8dd7ad8a7bf8eae259659bcaf5365b150540ff6c93c91765872c76041579b7a02b6e3c64528fb7f8235680399ba1d9dac
diff --git a/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6.28-no-external-malloc.patch b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6.28-no-external-malloc.patch
new file mode 100644
index 0000000..eebd600
--- /dev/null
+++ b/sys-apps/tcp-wrappers/files/tcp-wrappers-7.6.28-no-external-malloc.patch
@@ -0,0 +1,15 @@
+We use malloc() from stdlib.h.
+
+--- a/scaffold.c
++++ b/scaffold.c
+@@ -26,10 +26,6 @@ static char sccs_id[] = "@(#) scaffold.c 1.6 97/03/21 19:27:24";
+ #define INADDR_NONE (-1) /* XXX should be 0xffffffff */
+ #endif
+
+-#ifndef INET6
+-extern char *malloc();
+-#endif
+-
+ /* Application-specific. */
+
+ #include "tcpd.h"
diff --git a/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild
new file mode 100644
index 0000000..fd8e3f6
--- /dev/null
+++ b/sys-apps/tcp-wrappers/tcp-wrappers-7.6.28.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 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-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 "${FILESDIR}"/${PN}-7.6.28-no-external-malloc.patch
+ eapply "${FILESDIR}"/${PN}-7.6.22-remove-DECLS.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
+}