diff options
author | Yixun Lan <dlan@gentoo.org> | 2023-05-12 07:52:00 +0800 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2023-05-12 07:56:50 +0800 |
commit | a411614149262f826b66443e6cf0ad1d7c66db70 (patch) | |
tree | 9b676aa66674d1b31bc7d266bfb6b94daada2847 /net-misc/autossh | |
parent | stardict.eclass: Mark @DEAD (diff) | |
download | gentoo-a411614149262f826b66443e6cf0ad1d7c66db70.tar.gz gentoo-a411614149262f826b66443e6cf0ad1d7c66db70.tar.bz2 gentoo-a411614149262f826b66443e6cf0ad1d7c66db70.zip |
net-misc/autossh: fix undefined setproctile & QA issue
update EAPI 7 -> 8
Closes: https://bugs.gentoo.org/861596
Closes: https://bugs.gentoo.org/900252
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'net-misc/autossh')
-rw-r--r-- | net-misc/autossh/autossh-1.4g-r2.ebuild | 34 | ||||
-rw-r--r-- | net-misc/autossh/files/autossh-1.4g-libbsd.patch | 28 | ||||
-rw-r--r-- | net-misc/autossh/files/autossh-1.4g-printf.patch | 17 |
3 files changed, 79 insertions, 0 deletions
diff --git a/net-misc/autossh/autossh-1.4g-r2.ebuild b/net-misc/autossh/autossh-1.4g-r2.ebuild new file mode 100644 index 000000000000..d792505d9987 --- /dev/null +++ b/net-misc/autossh/autossh-1.4g-r2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Automatically restart SSH sessions and tunnels" +HOMEPAGE="https://www.harding.motd.ca/autossh/" +SRC_URI="https://www.harding.motd.ca/${PN}/${P}.tgz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +SLOT="0" + +DEPEND="dev-libs/libbsd" +RDEPEND="${DEPEND} + virtual/openssh" + +PATCHES=( + "${FILESDIR}"/autossh-1.4g-libbsd.patch + "${FILESDIR}"/autossh-1.4g-printf.patch +) + +src_prepare() { + default + eautoreconf +} + +src_install() { + dobin autossh + dodoc CHANGES README autossh.host rscreen + doman autossh.1 +} diff --git a/net-misc/autossh/files/autossh-1.4g-libbsd.patch b/net-misc/autossh/files/autossh-1.4g-libbsd.patch new file mode 100644 index 000000000000..09292b8b096d --- /dev/null +++ b/net-misc/autossh/files/autossh-1.4g-libbsd.patch @@ -0,0 +1,28 @@ +diff --git a/configure.ac b/configure.ac +index 4bb9380..8c15089 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,9 +110,10 @@ AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_VPRINTF + AC_CHECK_FUNCS([alarm daemon dup2 gethostbyname gettimeofday memmove]) +-AC_CHECK_FUNCS([memset poll select setproctitle socket strchr strerror]) ++AC_CHECK_FUNCS([memset poll select socket strchr strerror]) + AC_CHECK_FUNCS([strncasecmp strtoul uname vsyslog]) + ++AC_CHECK_LIB(bsd, setproctitle) + AC_CHECK_LIB(nsl, gethostbyname) + AC_CHECK_LIB(socket, connect) + +diff --git a/autossh.c b/autossh.c +index e2e3b84..9d3c1bf 100644 +--- a/autossh.c ++++ b/autossh.c +@@ -52,6 +52,7 @@ typedef int32_t socklen_t; + #include <syslog.h> + #include <time.h> + #include <errno.h> ++#include <bsd/unistd.h> + + #ifndef HAVE_POLL + # ifdef HAVE_SELECT diff --git a/net-misc/autossh/files/autossh-1.4g-printf.patch b/net-misc/autossh/files/autossh-1.4g-printf.patch new file mode 100644 index 000000000000..362232395dd8 --- /dev/null +++ b/net-misc/autossh/files/autossh-1.4g-printf.patch @@ -0,0 +1,17 @@ +diff --git a/configure.ac b/configure.ac +index 4bb9380..38e2cf6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -133,7 +134,11 @@ AC_CHECK_LIB(socket, connect) + # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ + AC_TRY_LINK([], +- [ extern char *__progname; printf("%s", __progname); ], ++ [ ++ #include <stdio.h>; ++ extern char *__progname; ++ printf("%s", __progname); ++ ], + [ ac_cv_libc_defines___progname="yes" ], + [ ac_cv_libc_defines___progname="no" ] + ) |