1 |
commit: c9ac47f26ac2f21c5e42f9143c1276379884cc97 |
2 |
Author: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 27 08:42:50 2022 +0000 |
4 |
Commit: Marc Schiffbauer <mschiff <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 27 08:43:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9ac47f2 |
7 |
|
8 |
net-misc/telnet-bsd: fix bug 713790 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/713790 |
11 |
Signed-off-by: Marc Schiffbauer <mschiff <AT> gentoo.org> |
12 |
|
13 |
.../telnet-bsd/files/telnet-bsd-1.2-musl.patch | 42 +++++++++++++++++++ |
14 |
net-misc/telnet-bsd/telnet-bsd-1.2-r3.ebuild | 49 ++++++++++++++++++++++ |
15 |
2 files changed, 91 insertions(+) |
16 |
|
17 |
diff --git a/net-misc/telnet-bsd/files/telnet-bsd-1.2-musl.patch b/net-misc/telnet-bsd/files/telnet-bsd-1.2-musl.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..0194015968a7 |
20 |
--- /dev/null |
21 |
+++ b/net-misc/telnet-bsd/files/telnet-bsd-1.2-musl.patch |
22 |
@@ -0,0 +1,42 @@ |
23 |
+diff --git a/telnet/misc-proto.h b/telnet/misc-proto.h |
24 |
+index 5845751..777a700 100644 |
25 |
+--- a/telnet/misc-proto.h |
26 |
++++ b/telnet/misc-proto.h |
27 |
+@@ -63,7 +63,7 @@ |
28 |
+ #ifndef __MISC_PROTO__ |
29 |
+ #define __MISC_PROTO__ |
30 |
+ |
31 |
+-#include <sys/cdefs.h> |
32 |
++#define __P(protos) protos /* full-blown ANSI C */ |
33 |
+ |
34 |
+ void auth_encrypt_init __P((char *, char *, char *, int)); |
35 |
+ void auth_encrypt_user __P((char *)); |
36 |
+diff --git a/telnet/ring.h b/telnet/ring.h |
37 |
+index 9ef8fb8..65762b2 100644 |
38 |
+--- a/telnet/ring.h |
39 |
++++ b/telnet/ring.h |
40 |
+@@ -28,8 +28,8 @@ |
41 |
+ * |
42 |
+ */ |
43 |
+ |
44 |
+-#include <sys/cdefs.h> |
45 |
+ #include <sys/types.h> |
46 |
++#define __P(protos) protos /* full-blown ANSI C */ |
47 |
+ #define P __P |
48 |
+ |
49 |
+ /* |
50 |
+diff --git a/telnetd/sys_term.c b/telnetd/sys_term.c |
51 |
+index 31897d8..3c43f8f 100644 |
52 |
+--- a/telnetd/sys_term.c |
53 |
++++ b/telnetd/sys_term.c |
54 |
+@@ -838,8 +838,10 @@ cleanup (int sig) |
55 |
+ * receive another signal while we're in that function. */ |
56 |
+ sigfillset(&sigset); |
57 |
+ sigprocmask(SIG_SETMASK, &sigset, &sigset); |
58 |
++#if defined(logwtmp) |
59 |
+ if (logout (p)) |
60 |
+ logwtmp (p, "", ""); |
61 |
++#endif |
62 |
+ sigprocmask(SIG_SETMASK, &sigset, NULL); |
63 |
+ #ifdef PARANOID_TTYS |
64 |
+ /* |
65 |
|
66 |
diff --git a/net-misc/telnet-bsd/telnet-bsd-1.2-r3.ebuild b/net-misc/telnet-bsd/telnet-bsd-1.2-r3.ebuild |
67 |
new file mode 100644 |
68 |
index 000000000000..65a05099bf70 |
69 |
--- /dev/null |
70 |
+++ b/net-misc/telnet-bsd/telnet-bsd-1.2-r3.ebuild |
71 |
@@ -0,0 +1,49 @@ |
72 |
+# Copyright 1999-2022 Gentoo Authors |
73 |
+# Distributed under the terms of the GNU General Public License v2 |
74 |
+ |
75 |
+EAPI=8 |
76 |
+ |
77 |
+inherit autotools toolchain-funcs |
78 |
+ |
79 |
+DESCRIPTION="Telnet and telnetd ported from OpenBSD with IPv6 support" |
80 |
+HOMEPAGE="ftp://ftp.suse.com/pub/people/kukuk/ipv6/" |
81 |
+SRC_URI="https://dev.gentoo.org/~mschiff/distfiles/${P}.tar.bz2" |
82 |
+ |
83 |
+LICENSE="BSD" |
84 |
+SLOT="0" |
85 |
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos" |
86 |
+IUSE="nls xinetd" |
87 |
+ |
88 |
+RDEPEND=" |
89 |
+ sys-libs/ncurses:= |
90 |
+ !net-misc/netkit-telnetd |
91 |
+" |
92 |
+RDEPEND="${DEPEND} |
93 |
+ xinetd? ( sys-apps/xinetd ) |
94 |
+ !net-misc/netkit-telnetd |
95 |
+" |
96 |
+BDEPEND="virtual/pkgconfig" |
97 |
+ |
98 |
+PATCHES=( |
99 |
+ "${FILESDIR}"/${P}-fbsd.patch |
100 |
+ "${FILESDIR}"/${PN}-1.2-format-security.patch |
101 |
+ "${FILESDIR}"/${P}-musl.patch |
102 |
+) |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ default |
106 |
+ eautoreconf |
107 |
+} |
108 |
+ |
109 |
+src_compile() { |
110 |
+ emake LIBS="$("$(tc-getPKG_CONFIG)" --libs ncurses)" |
111 |
+} |
112 |
+ |
113 |
+src_install() { |
114 |
+ default |
115 |
+ |
116 |
+ if use xinetd ; then |
117 |
+ insinto /etc/xinetd.d |
118 |
+ newins "${FILESDIR}"/telnetd.xinetd telnetd |
119 |
+ fi |
120 |
+} |