* [gentoo-commits] repo/gentoo:master commit in: net-vpn/pptpd/files/, net-vpn/pptpd/
@ 2020-07-08 9:45 Sergey Popov
0 siblings, 0 replies; 3+ messages in thread
From: Sergey Popov @ 2020-07-08 9:45 UTC (permalink / raw
To: gentoo-commits
commit: 79eb49c4b63ab163c6633247610596195f237bda
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 8 09:30:29 2020 +0000
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Wed Jul 8 09:43:38 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79eb49c4
net-vpn/pptpd: revision bump
Fix library path for plugins
Fix building with Musl
Closes: https://bugs.gentoo.org/716210
Closes: https://bugs.gentoo.org/730068
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>
net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch | 24 +++++++++
net-vpn/pptpd/files/pptpd-1.4.0-musl.patch | 16 ++++++
net-vpn/pptpd/pptpd-1.4.0-r3.ebuild | 81 ++++++++++++++++++++++++++++
3 files changed, 121 insertions(+)
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch b/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch
new file mode 100644
index 00000000000..898c3aea89d
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-libdir.patch
@@ -0,0 +1,24 @@
+diff -r -U 3 pptpd-1.4.0.orig/Makefile.am pptpd-1.4.0/Makefile.am
+--- pptpd-1.4.0.orig/Makefile.am 2020-06-29 00:24:23.301857353 +0300
++++ pptpd-1.4.0/Makefile.am 2020-06-29 00:25:16.072686760 +0300
+@@ -11,7 +11,7 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++CFLAGS += -fno-builtin -Wall -DSBINDIR='"$(sbindir)"' -DLIBDIR='"$(libdir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+diff -r -U 3 pptpd-1.4.0.orig/pptpctrl.c pptpd-1.4.0/pptpctrl.c
+--- pptpd-1.4.0.orig/pptpctrl.c 2013-10-23 08:53:19.000000000 +0400
++++ pptpd-1.4.0/pptpctrl.c 2020-06-29 00:25:23.356525131 +0300
+@@ -786,7 +786,7 @@
+
+ if (pptp_logwtmp) {
+ pppd_argv[an++] = "plugin";
+- pppd_argv[an++] = "/usr/lib/pptpd/pptpd-logwtmp.so";
++ pppd_argv[an++] = LIBDIR "/pptpd/pptpd-logwtmp.so";
+ pppd_argv[an++] = "pptpd-original-ip";
+ pppd_argv[an++] = inet_ntoa(inetaddrs[1]);
+ }
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch b/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch
new file mode 100644
index 00000000000..998a07acf7e
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-musl.patch
@@ -0,0 +1,16 @@
+Modified patch from Alpine Linux
+https://git.alpinelinux.org/aports/plain/main/pptpd/fix_MSG_TRYHARD.patch
+
+--- a/bcrelay.c
++++ b/bcrelay.c
+@@ -103,6 +103,10 @@
+ #include "our_syslog.h"
+ #include "our_getopt.h"
+
++#ifndef MSG_TRYHARD
++ #define MSG_TRYHARD MSG_DONTROUTE
++#endif
++
+ //#define VERSION "1.0"
+
+ /* uncomment if you compile this without poptop's configure script */
diff --git a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
new file mode 100644
index 00000000000..17768c52b76
--- /dev/null
+++ b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Linux Point-to-Point Tunnelling Protocol Server"
+HOMEPAGE="http://poptop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/poptop/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gre-extreme-debug tcpd"
+
+DEPEND="net-dialup/ppp:=
+ tcpd? ( sys-apps/tcp-wrappers )"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+ "${FILESDIR}/${P}-sandbox-fix.patch"
+ "${FILESDIR}/${P}-pidfile.patch"
+ "${FILESDIR}/${P}-libdir.patch"
+ "${FILESDIR}/${P}-musl.patch"
+)
+
+src_prepare() {
+ # Match pptpd-logwtmp.so's version with pppd's version (#89895)
+ local PPPD_VER=`best_version net-dialup/ppp`
+ PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
+ PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
+ sed -i -e "s:\\(#define[ \\t]*VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" plugins/patchlevel.h || die
+
+ # configure.in is actually configure.ac
+ mv configure.in configure.ac || die
+
+ # Automake 1.13 compatibility, bug #469476
+ sed -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac || die 'sed on configure.ac failed'
+
+ # remove 'missing' script to prevent warnings
+ rm missing || die 'remove missing script failed'
+
+ # respect compiler, bug #461722
+ tc-export CC
+
+ # Call to default src_prepare to apply patches
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ use gre-extreme-debug && append-cppflags "-DLOG_DEBUG_GRE_ACCEPTING_PACKET"
+ econf \
+ --enable-bcrelay \
+ $(use tcpd && echo "--with-libwrap")
+}
+
+src_compile() {
+ emake COPTS="${CFLAGS}"
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins samples/pptpd.conf
+
+ insinto /etc/ppp
+ doins samples/options.pptpd
+
+ newinitd "${FILESDIR}/pptpd-init-r2" pptpd
+ newconfd "${FILESDIR}/pptpd-confd" pptpd
+
+ dodoc README.*
+ dodoc -r samples
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/pptpd/files/, net-vpn/pptpd/
@ 2023-04-28 20:52 Mike Gilbert
0 siblings, 0 replies; 3+ messages in thread
From: Mike Gilbert @ 2023-04-28 20:52 UTC (permalink / raw
To: gentoo-commits
commit: ba13e6934df6244c76a02674ae55c81af2716c5d
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 28 20:50:35 2023 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 28 20:50:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba13e693
net-vpn/pptpd: fix build with ppp-2.5.0
Closes: https://bugs.gentoo.org/904877
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
net-vpn/pptpd/files/pptpd-1.4.0-ppp-2.5.0.patch | 83 +++++++++++++++++++++++++
net-vpn/pptpd/pptpd-1.4.0-r3.ebuild | 29 +++++----
2 files changed, 97 insertions(+), 15 deletions(-)
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-ppp-2.5.0.patch b/net-vpn/pptpd/files/pptpd-1.4.0-ppp-2.5.0.patch
new file mode 100644
index 000000000000..b3525052a873
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-ppp-2.5.0.patch
@@ -0,0 +1,83 @@
+https://bugs.gentoo.org/904877
+
+From ea207b89c61e3a201155b973307ee45413f0d058 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 28 Apr 2023 16:37:44 -0400
+Subject: [PATCH] pptp-logwtmp: update for ppp-2.5.0
+
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ plugins/pptpd-logwtmp.c | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/plugins/pptpd-logwtmp.c b/plugins/pptpd-logwtmp.c
+index ac5ecc2..457bbce 100644
+--- a/plugins/pptpd-logwtmp.c
++++ b/plugins/pptpd-logwtmp.c
+@@ -12,14 +12,16 @@
+ #include <unistd.h>
+ #include <utmp.h>
+ #include <string.h>
++#include <limits.h>
+ #include <pppd/pppd.h>
++#include <pppd/options.h>
+
+-char pppd_version[] = VERSION;
++char pppd_version[] = PPPD_VERSION;
+
+ static char pptpd_original_ip[PATH_MAX+1];
+ static bool pptpd_logwtmp_strip_domain = 0;
+
+-static option_t options[] = {
++static struct option options[] = {
+ { "pptpd-original-ip", o_string, pptpd_original_ip,
+ "Original IP address of the PPTP connection",
+ OPT_STATIC, NULL, PATH_MAX },
+@@ -28,7 +30,7 @@ static option_t options[] = {
+ { NULL }
+ };
+
+-static char *reduce(char *user)
++static const char *reduce(const char *user)
+ {
+ char *sep;
+ if (!pptpd_logwtmp_strip_domain) return user;
+@@ -42,8 +44,10 @@ static char *reduce(char *user)
+
+ static void ip_up(void *opaque, int arg)
+ {
+- char *user = reduce(peer_authname);
+- if (debug)
++ const char *peer_authname = ppp_peer_authname(NULL, 0);
++ const char *user = reduce(peer_authname);
++ const char *ifname = ppp_ifname();
++ if (debug_on())
+ notice("pptpd-logwtmp.so ip-up %s %s %s", ifname, user,
+ pptpd_original_ip);
+ logwtmp(ifname, user, pptpd_original_ip);
+@@ -51,16 +55,17 @@ static void ip_up(void *opaque, int arg)
+
+ static void ip_down(void *opaque, int arg)
+ {
+- if (debug)
++ const char *ifname = ppp_ifname();
++ if (debug_on())
+ notice("pptpd-logwtmp.so ip-down %s", ifname);
+ logwtmp(ifname, "", "");
+ }
+
+ void plugin_init(void)
+ {
+- add_options(options);
+- add_notifier(&ip_up_notifier, ip_up, NULL);
+- add_notifier(&ip_down_notifier, ip_down, NULL);
+- if (debug)
++ ppp_add_options(options);
++ ppp_add_notify(NF_IP_UP, ip_up, NULL);
++ ppp_add_notify(NF_IP_DOWN, ip_down, NULL);
++ if (debug_on())
+ notice("pptpd-logwtmp: $Version$");
+ }
+--
+2.40.1
+
diff --git a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
index 227b7be9450d..3a013c769e13 100644
--- a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
+++ b/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
@@ -14,28 +14,14 @@ LICENSE="GPL-2"
KEYWORDS="amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
IUSE="gre-extreme-debug tcpd"
-RDEPEND="<net-dialup/ppp-2.5.0:=
+RDEPEND="net-dialup/ppp:=
tcpd? ( sys-apps/tcp-wrappers )"
DEPEND="${RDEPEND}
elibc_musl? ( net-libs/ppp-defs )"
DOCS=( AUTHORS ChangeLog NEWS README TODO )
-PATCHES=(
- "${FILESDIR}/${P}-gentoo.patch"
- "${FILESDIR}/${P}-sandbox-fix.patch"
- "${FILESDIR}/${P}-pidfile.patch"
- "${FILESDIR}/${P}-libdir.patch"
- "${FILESDIR}/${P}-musl.patch"
-)
-
src_prepare() {
- # Match pptpd-logwtmp.so's version with pppd's version (#89895)
- local PPPD_VER=$(best_version net-dialup/ppp)
- PPPD_VER=${PPPD_VER#*/*-} #reduce it to ${PV}-${PR}
- PPPD_VER=${PPPD_VER%%[_-]*} # main version without beta/pre/patch/revision
- sed -i -e "s:\\(#define[ \\t]*VERSION[ \\t]*\\)\".*\":\\1\"${PPPD_VER}\":" plugins/patchlevel.h || die
-
# configure.in is actually configure.ac
mv configure.in configure.ac || die
@@ -48,6 +34,19 @@ src_prepare() {
# respect compiler, bug #461722
tc-export CC
+ local PATCHES=(
+ "${FILESDIR}/${P}-gentoo.patch"
+ "${FILESDIR}/${P}-sandbox-fix.patch"
+ "${FILESDIR}/${P}-pidfile.patch"
+ "${FILESDIR}/${P}-libdir.patch"
+ "${FILESDIR}/${P}-musl.patch"
+ )
+
+ if has_version -d ">=net-dialup/ppp-2.5.0"; then
+ # https://bugs.gentoo.org/904877
+ PATCHES+=( "${FILESDIR}/${P}-ppp-2.5.0.patch" )
+ fi
+
# Call to default src_prepare to apply patches
default
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-vpn/pptpd/files/, net-vpn/pptpd/
@ 2024-04-27 1:11 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-04-27 1:11 UTC (permalink / raw
To: gentoo-commits
commit: de42887364fb0681a6045f33b48dfefe58c46298
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 27 00:55:29 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 00:55:29 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de428873
net-vpn/pptpd: fix Modern C issue
Interestingly, this only seems to manifest with >=glibc-2.38, because
the include had a '#ifndef HAVE_STRLCPY' guard.
Closes: https://bugs.gentoo.org/920775
Closes: https://bugs.gentoo.org/927333
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-vpn/pptpd/files/pptpd-1.4.0-c99.patch | 16 ++++++++++++++++
.../{pptpd-1.4.0-r3.ebuild => pptpd-1.4.0-r4.ebuild} | 3 ++-
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch b/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch
new file mode 100644
index 000000000000..902a275d5f35
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/920775
+https://bugs.gentoo.org/927333
+
+--- a/compat.c
++++ b/compat.c
+@@ -10,9 +10,9 @@
+
+ #include "compat.h"
+ #include "our_syslog.h"
++#include <string.h>
+
+ #ifndef HAVE_STRLCPY
+-#include <string.h>
+ #include <stdio.h>
+
+ void strlcpy(char *dst, const char *src, size_t size)
diff --git a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild b/net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
similarity index 96%
rename from net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
rename to net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
index 425dcbcb8d78..c5805c7696e2 100644
--- a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
+++ b/net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -40,6 +40,7 @@ src_prepare() {
"${FILESDIR}/${P}-pidfile.patch"
"${FILESDIR}/${P}-libdir.patch"
"${FILESDIR}/${P}-musl.patch"
+ "${FILESDIR}/${P}-c99.patch"
)
if has_version -d ">=net-dialup/ppp-2.5.0"; then
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-27 1:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-27 1:11 [gentoo-commits] repo/gentoo:master commit in: net-vpn/pptpd/files/, net-vpn/pptpd/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-04-28 20:52 Mike Gilbert
2020-07-08 9:45 Sergey Popov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox