summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-11-17 16:12:19 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2024-11-17 20:09:21 -0800
commit37a413aba50f53e16c5acb82495b4a2604db3791 (patch)
treeec3c93c7471e3e1745baf5d829f824ca77e52ccd
parentsys-apps/inxi: Stabilize 3.3.35.1 ppc, #943700 (diff)
downloadgentoo-37a413aba50f53e16c5acb82495b4a2604db3791.tar.gz
gentoo-37a413aba50f53e16c5acb82495b4a2604db3791.tar.bz2
gentoo-37a413aba50f53e16c5acb82495b4a2604db3791.zip
net-proxy/dante: version bump
Closes: https://bugs.gentoo.org/908548 Closes: https://bugs.gentoo.org/900280 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--net-proxy/dante/Manifest2
-rw-r--r--net-proxy/dante/dante-1.4.3.ebuild116
-rw-r--r--net-proxy/dante/files/dante-1.4.2-cflags.patch32
-rw-r--r--net-proxy/dante/files/dante-1.4.3-gai-symbol.patch32
-rw-r--r--net-proxy/dante/files/dante-1.4.3-osdep-debug.patch16
5 files changed, 198 insertions, 0 deletions
diff --git a/net-proxy/dante/Manifest b/net-proxy/dante/Manifest
index 3ea3f92b4dd9..8550b56047b6 100644
--- a/net-proxy/dante/Manifest
+++ b/net-proxy/dante/Manifest
@@ -1 +1,3 @@
DIST dante-1.4.1.tar.gz 1284288 BLAKE2B 34c78007245339088d79e0b969b8f55d20b0ee59d89c1bf19510b563799ac3c54c6b8b5f37bfb64410d60e893beb0e2d1d79893c0264b7481aeb4cdab2037e90 SHA512 1c8e2966ba68c8584fb99ff76ae1d9c8dfe669c7e5e61c7e6e7f87295d1280c3e7849491a6369ce27795040f951dcc11f4f2b3d7e46c54219594c89315d0487e
+DIST dante-1.4.3.tar.gz 1343935 BLAKE2B dc069fd99a0d4a606b1eb7ce5dabbb20be63a4b4b3b02ee5e7c6d9b5614ae89226559df9c0bdaa3bee803b04e452311ab016c9116d57f3f8f48205ec797c5475 SHA512 c19675b2dee931366caf4a0dd4f44045ae731cc2f986e5d2e4bf498925c7d93a92a32088234d4a9443424f6dfb0796a1fa3fdc7c47e5aa11612c29a101f47888
+DIST dante_1.4.3+dfsg-2.debian.tar.xz 42736 BLAKE2B 3e385eb4dee0278edfe72720139b19d4900b828372e6dc5b8361dbcf2ba76f0a0a5b523680068aa0c61fcbabac25ce413f23c96ab56c368ddda1ef8dd1fee528 SHA512 0acbb82eba1e37af0b485ac5b43cb06f5d699e5cac427a8c678fe8633a08ce5697ff936d3f1dd747cb2cc3c7ac7c713193ae07c1913e794f35fd55278c8fec16
diff --git a/net-proxy/dante/dante-1.4.3.ebuild b/net-proxy/dante/dante-1.4.3.ebuild
new file mode 100644
index 000000000000..10bfc9b77559
--- /dev/null
+++ b/net-proxy/dante/dante-1.4.3.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools systemd
+
+DESCRIPTION="A free socks4,5 and msproxy implementation"
+HOMEPAGE="https://www.inet.no/dante/"
+SRC_URI="https://www.inet.no/dante/files/${P}.tar.gz"
+
+PATCH_LEVEL="dfsg-2"
+[[ -n "${PATCH_LEVEL}" ]] && \
+ SRC_URI+=" mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV/_p*}+${PATCH_LEVEL}.debian.tar.xz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="debug kerberos pam selinux static-libs tcpd upnp"
+
+CDEPEND="
+ sys-apps/shadow
+ virtual/libcrypt:=
+ kerberos? ( virtual/krb5 )
+ pam? ( sys-libs/pam )
+ tcpd? ( sys-apps/tcp-wrappers )
+ upnp? ( net-libs/miniupnpc:= )
+"
+DEPEND="${CDEPEND}
+ app-alternatives/yacc
+ app-alternatives/lex
+"
+RDEPEND="${CDEPEND}
+ acct-group/sockd
+ acct-user/sockd
+ selinux? ( sec-policy/selinux-dante )
+"
+
+DOCS="BUGS CREDITS NEWS README SUPPORT doc/README* doc/*.txt doc/SOCKS4.protocol"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0-socksify.patch
+ "${FILESDIR}"/${PN}-1.4.0-osdep-format-macro.patch
+ "${FILESDIR}"/${PN}-1.4.2-cflags.patch
+ #"${FILESDIR}"/${PN}-1.4.0-HAVE_SENDBUF_IOCTL.patch # included in debian series
+ #${FILESDIR}"/${PN}-1.4.1-sigpwr-siginfo.patch #517528 # included in debian series
+ #"${FILESDIR}"/${PN}-1.4.1-miniupnp14.patch #564680 # upstreamed
+ "${FILESDIR}"/${PN}-1.4.3-osdep-debug.patch
+ "${FILESDIR}"/${PN}-1.4.3-gai-symbol.patch
+)
+
+src_prepare() {
+ DEB_PATCHES=${S}/../debian/patches
+ PATCHES+=(
+ $( sed "s,^,${DEB_PATCHES}/," < "${DEB_PATCHES}"/series )
+ )
+ default
+
+ # 780039
+ sed -e 's/-all-dynamic//' -i dlib/Makefile.am dlib64/Makefile.am || die
+
+ sed -i \
+ -e 's:/etc/socks\.conf:"${EPREFIX}"/etc/socks/socks.conf:' \
+ -e 's:/etc/sockd\.conf:"${EPREFIX}"/etc/socks/sockd.conf:' \
+ doc/{socksify.1,socks.conf.5,sockd.conf.5,sockd.8} \
+ || die
+
+ sed -i \
+ -e 's:AM_CONFIG_HEADER\>:AC_CONFIG_HEADERS:' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # hardcoded the libc name otherwise the scan on a amd64 multilib system
+ # ends up finding /usr/lib32/libc.so.5. That cascades and causes the
+ # preload/libdsocks to not be built.
+ econf -C \
+ --with-socks-conf="${EPREFIX}"/etc/socks/socks.conf \
+ --with-sockd-conf="${EPREFIX}"/etc/socks/sockd.conf \
+ --enable-preload \
+ --enable-clientdl \
+ --enable-serverdl \
+ --enable-drt-fallback \
+ --with-libc=libc.so.6 \
+ $(use_enable debug) \
+ $(use_with kerberos gssapi) \
+ $(use_with pam) \
+ $(use_with upnp) \
+ $(use_enable static-libs static) \
+ $(use_with tcpd libwrap)
+}
+
+src_install() {
+ default
+
+ # default configuration files
+ insinto /etc/socks
+ doins "${FILESDIR}"/sock?.conf
+ pushd "${ED}"/etc/socks > /dev/null
+ use pam && eapply -p0 "${FILESDIR}"/sockd.conf-with-pam.patch
+ use tcpd && eapply -p0 "${FILESDIR}"/sockd.conf-with-libwrap.patch
+ popd > /dev/null
+
+ # init script
+ newinitd "${FILESDIR}"/${PN}-1.3.2-sockd-init dante-sockd
+ newconfd "${FILESDIR}"/dante-sockd-conf dante-sockd
+
+ systemd_dounit "${FILESDIR}"/dante-sockd.service
+
+ # example configuration files
+ docinto examples
+ dodoc example/*.conf
+
+ find "${ED}" -name '*.la' -delete || die
+}
diff --git a/net-proxy/dante/files/dante-1.4.2-cflags.patch b/net-proxy/dante/files/dante-1.4.2-cflags.patch
new file mode 100644
index 000000000000..84798de3a65f
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.2-cflags.patch
@@ -0,0 +1,32 @@
+The upstream code tries to remove -g from CFLAGS, but the logic also matches
+the -g in the middle of flags, like:
+-frecord-gcc-switches => -frecordcc-switches
+-ggdb3 => ggdb3
+Both of which cause GCC to fail horribly!
+
+Fix the grep & sed to only match standalone instances.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar dante-1.4.2.orig/compiler.m4 dante-1.4.2/compiler.m4
+--- dante-1.4.2.orig/compiler.m4 2013-10-24 13:20:23.000000000 -0700
++++ dante-1.4.2/compiler.m4 2014-01-05 15:18:03.544336373 -0800
+@@ -375,14 +375,14 @@
+ gcc)
+ if test x"$aixldbug" != x; then
+ #disable debug info
+- if echo $CFLAGS | grep -- "-g " >/dev/null; then
+- CFLAGS="`echo $CFLAGS | sed -e 's/-g //g'`"
++ if echo $CFLAGS | grep -w -- "-g" >/dev/null; then
++ CFLAGS="`echo $CFLAGS | sed -e 's/\<-g\>//g'`"
+ fi
+ CFLAGS="$CFLAGS${CFLAGS:+ }-g0"
+ else
+ #use -ggdb also when not debugging
+- if echo $CFLAGS | grep -- "-g " >/dev/null; then
+- CFLAGS="`echo $CFLAGS | sed -e 's/-g //g'`"
++ if echo $CFLAGS | grep -w -- "-g" >/dev/null; then
++ CFLAGS="`echo $CFLAGS | sed -e 's/\<-g\>//g'`"
+ fi
+ CFLAGS="$CFLAGS${CFLAGS:+ }-ggdb"
+ fi
diff --git a/net-proxy/dante/files/dante-1.4.3-gai-symbol.patch b/net-proxy/dante/files/dante-1.4.3-gai-symbol.patch
new file mode 100644
index 000000000000..5f0b0303de5b
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.3-gai-symbol.patch
@@ -0,0 +1,32 @@
+Dante's packaging design has some very pretty macro usage, but also fragile.
+
+The error & getaddrinfo error checking tries to expand a macro outside a
+string, leading to it expanding empty in some cases. Quoting the string makes
+it show up as expected.
+
+```
+checking getaddrinfo() error symbols... configure: error: in `/var/tmp/portage/net-proxy/dante-1.4.3/work/dante-1.4.3':
+configure: error: error: getaddrinfo() error value count too low
+See `config.log' for more details`
+```
+
+--- dante-1.4.3//acinclude.m4 2017-01-23 11:28:08.000000000 -0800
++++ dante-1.4.3//acinclude.m4 2024-11-17 19:51:39.398597593 -0800
+@@ -1110,7 +1114,7 @@
+ [AC_LANG_PROGRAM([[#include <errno.h>]],
+ [[
+ #ifdef $3
+-errnoval: $3
++"errnoval: $3"
+ #else
+ #error "errno value $3 not defined"
+ #endif]])],
+@@ -1134,7 +1138,7 @@
+ #include <netdb.h>]],
+ [[
+ #ifdef $3
+-gaierrval: $3
++"gaierrval: $3"
+ #else
+ #error "gai error value $3 not defined"
+ #endif]])],
diff --git a/net-proxy/dante/files/dante-1.4.3-osdep-debug.patch b/net-proxy/dante/files/dante-1.4.3-osdep-debug.patch
new file mode 100644
index 000000000000..f626f5b3ea9a
--- /dev/null
+++ b/net-proxy/dante/files/dante-1.4.3-osdep-debug.patch
@@ -0,0 +1,16 @@
+--- dante-1.4.3.orig/osdep.m4 2017-01-18 06:11:20.000000000 -0800
++++ dante-1.4.3/osdep.m4 2024-11-17 16:05:24.798720697 -0800
+@@ -957,11 +957,11 @@
+ if test -s $ERRVALFILE; then
+ UNIQUEVALS=`sort $ERRVALFILE | uniq | wc -l | awk '{ print $1 }'`
+ if test $UNIQUEVALS -le 1; then
+- AC_MSG_FAILURE([error: getaddrinfo() error value count too low])
++ AC_MSG_FAILURE([error: getaddrinfo() error value count too low; got $UNIQUEVALS from $ERRVALFILE])
+ fi
+ UNIQUESYMBOLS=`cat $ERRVALFILE | wc -l | awk '{ print $1 }'`
+ if test $UNIQUESYMBOLS -le 1; then
+- AC_MSG_FAILURE([error: getaddrinfo() error symbol count too low])
++ AC_MSG_FAILURE([error: getaddrinfo() error symbol count too low; got $UNIQUESYMBOLS from $ERRVALFILE])
+ fi
+
+ if test $ERRNOCNT -ne $UNIQUESYMBOLS; then