Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] ppp: update to 2.4.9.
@ 2021-03-08 15:38 unspecd
  2021-03-08 15:46 ` [PR PATCH] [Updated] " unspecd
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: unspecd @ 2021-03-08 15:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

There is a new pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 14456 bytes --]

From 32c7a3aa3115e7438c95b6b1bd0fc6571ad72479 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  43 ++-----
 6 files changed, 9 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b5..000000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0a..000000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc9800..7ed236180aab 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caafc..000000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e5..000000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd6..f046e690a8c2 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,19 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	if [ $CROSS_BUILD ]; then
+		configure_args="--cross_compile=${XBPS_CROSS_TRIPLET}-"
+	fi
+	./configure --cflags="${CFLAGS}" ${configure_args}
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +46,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
@ 2021-03-08 15:46 ` unspecd
  2021-03-08 16:19 ` unspecd
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-08 15:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 16999 bytes --]

From 1f875dceacaeb3169813ea7b7b959d011dc9518e Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH 1/4] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  43 ++-----
 srcpkgs/ppp/version                        |   1 +
 7 files changed, 10 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch
 create mode 100644 srcpkgs/ppp/version

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b..00000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0..00000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc980..7ed236180aa 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caaf..00000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e..00000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd..f046e690a8c 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,19 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	if [ $CROSS_BUILD ]; then
+		configure_args="--cross_compile=${XBPS_CROSS_TRIPLET}-"
+	fi
+	./configure --cflags="${CFLAGS}" ${configure_args}
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +46,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp
diff --git a/srcpkgs/ppp/version b/srcpkgs/ppp/version
new file mode 100644
index 00000000000..4aca89a87a0
--- /dev/null
+++ b/srcpkgs/ppp/version
@@ -0,0 +1 @@
+pattern="ppp \K[\d\.]+"

From 00937c2f9bb0c1ca1fd5ecea8ca3539a1b9fd87a Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:09 +1100
Subject: [PATCH 2/4] NetworkManager: revbump for ppp

---
 srcpkgs/NetworkManager/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index e482bba98de..ac9fca862aa 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -3,7 +3,7 @@
 # patch in gnome-control-center and rebuild it
 pkgname=NetworkManager
 version=1.22.10
-revision=2
+revision=3
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false

From 652c90656f8164bd6115b9ad06dc83a08d4e9586 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:34 +1100
Subject: [PATCH 3/4] NetworkManager-l2tp: revbump for ppp

---
 srcpkgs/NetworkManager-l2tp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-l2tp/template b/srcpkgs/NetworkManager-l2tp/template
index 51e24d1465e..55715e71eac 100644
--- a/srcpkgs/NetworkManager-l2tp/template
+++ b/srcpkgs/NetworkManager-l2tp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-l2tp'
 pkgname=NetworkManager-l2tp
 version=1.8.6
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--runstatedir=/run"
 hostmakedepends="pkg-config intltool glib-devel"

From 015c6d4cd4b2a9d3e69647ab81d6cc469be0c77a Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:51 +1100
Subject: [PATCH 4/4] NetworkManager-pptp: revbump for ppp

---
 srcpkgs/NetworkManager-pptp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-pptp/template b/srcpkgs/NetworkManager-pptp/template
index 09568b2cec0..22028d52088 100644
--- a/srcpkgs/NetworkManager-pptp/template
+++ b/srcpkgs/NetworkManager-pptp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-pptp'
 pkgname=NetworkManager-pptp
 version=1.2.8
-revision=5
+revision=6
 build_style=gnu-configure
 configure_args="--without-libnm-glib"
 hostmakedepends="pkg-config intltool glib-devel"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
  2021-03-08 15:46 ` [PR PATCH] [Updated] " unspecd
@ 2021-03-08 16:19 ` unspecd
  2021-03-08 19:50 ` ericonr
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-08 16:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

New comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-792871326

Comment:
NetworkManager:
```
assertion failed (error == NULL): Cannot autolaunch D-Bus without X11 $DISPLAY (g-io-error-quark, 0)
```

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
  2021-03-08 15:46 ` [PR PATCH] [Updated] " unspecd
  2021-03-08 16:19 ` unspecd
@ 2021-03-08 19:50 ` ericonr
  2021-03-09  5:19 ` [PR PATCH] [Updated] " unspecd
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2021-03-08 19:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 270 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-793028268

Comment:
You can add `make_check=extended` to the networkmanager template, with a comment about tests requiring network namespaces to run.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (2 preceding siblings ...)
  2021-03-08 19:50 ` ericonr
@ 2021-03-09  5:19 ` unspecd
  2021-03-11 15:43 ` unspecd
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-09  5:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 17416 bytes --]

From 1f875dceacaeb3169813ea7b7b959d011dc9518e Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH 1/4] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  43 ++-----
 srcpkgs/ppp/version                        |   1 +
 7 files changed, 10 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch
 create mode 100644 srcpkgs/ppp/version

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b..00000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0..00000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc980..7ed236180aa 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caaf..00000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e..00000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd..f046e690a8c 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,19 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	if [ $CROSS_BUILD ]; then
+		configure_args="--cross_compile=${XBPS_CROSS_TRIPLET}-"
+	fi
+	./configure --cflags="${CFLAGS}" ${configure_args}
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +46,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp
diff --git a/srcpkgs/ppp/version b/srcpkgs/ppp/version
new file mode 100644
index 00000000000..4aca89a87a0
--- /dev/null
+++ b/srcpkgs/ppp/version
@@ -0,0 +1 @@
+pattern="ppp \K[\d\.]+"

From a925620f1a1c7b610d2b964ecf5006e7e76fccdd Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:09 +1100
Subject: [PATCH 2/4] NetworkManager: revbump for ppp

---
 srcpkgs/NetworkManager/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index e482bba98de..5a0bb3f5fbc 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -3,7 +3,7 @@
 # patch in gnome-control-center and rebuild it
 pkgname=NetworkManager
 version=1.22.10
-revision=2
+revision=3
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
@@ -36,6 +36,8 @@ license="GPL-2.0-or-later"
 homepage="https://wiki.gnome.org/Projects/NetworkManager"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77
+# TODO: Some tests require network namespaces to run.
+make_check=extended
 lib32disabled=yes
 conf_files="/etc/${pkgname}/${pkgname}.conf"
 make_dirs="

From efeb073986fe8047b5f06162c14bc1213e8e09c7 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:34 +1100
Subject: [PATCH 3/4] NetworkManager-l2tp: revbump for ppp

---
 srcpkgs/NetworkManager-l2tp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-l2tp/template b/srcpkgs/NetworkManager-l2tp/template
index 51e24d1465e..55715e71eac 100644
--- a/srcpkgs/NetworkManager-l2tp/template
+++ b/srcpkgs/NetworkManager-l2tp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-l2tp'
 pkgname=NetworkManager-l2tp
 version=1.8.6
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--runstatedir=/run"
 hostmakedepends="pkg-config intltool glib-devel"

From 17c420903eda74e3990dbb2c20885077a127b765 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:51 +1100
Subject: [PATCH 4/4] NetworkManager-pptp: revbump for ppp

---
 srcpkgs/NetworkManager-pptp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-pptp/template b/srcpkgs/NetworkManager-pptp/template
index 09568b2cec0..22028d52088 100644
--- a/srcpkgs/NetworkManager-pptp/template
+++ b/srcpkgs/NetworkManager-pptp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-pptp'
 pkgname=NetworkManager-pptp
 version=1.2.8
-revision=5
+revision=6
 build_style=gnu-configure
 configure_args="--without-libnm-glib"
 hostmakedepends="pkg-config intltool glib-devel"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (3 preceding siblings ...)
  2021-03-09  5:19 ` [PR PATCH] [Updated] " unspecd
@ 2021-03-11 15:43 ` unspecd
  2021-03-11 20:07 ` ericonr
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-11 15:43 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 17318 bytes --]

From 644a020414cb919a5db0a8564ac67749ea856a68 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH 1/4] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  40 +------
 srcpkgs/ppp/version                        |   1 +
 7 files changed, 7 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch
 create mode 100644 srcpkgs/ppp/version

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b..00000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0..00000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc980..7ed236180aa 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caaf..00000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e..00000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd..74316632883 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,16 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	./configure --cc="${CC}" --cflags="${CFLAGS}"
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +43,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp
diff --git a/srcpkgs/ppp/version b/srcpkgs/ppp/version
new file mode 100644
index 00000000000..4aca89a87a0
--- /dev/null
+++ b/srcpkgs/ppp/version
@@ -0,0 +1 @@
+pattern="ppp \K[\d\.]+"

From b67e1655fcd15da5265b187e48aedcf1249e7e85 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:09 +1100
Subject: [PATCH 2/4] NetworkManager: revbump for ppp

---
 srcpkgs/NetworkManager/template | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index e482bba98de..5a0bb3f5fbc 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -3,7 +3,7 @@
 # patch in gnome-control-center and rebuild it
 pkgname=NetworkManager
 version=1.22.10
-revision=2
+revision=3
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
@@ -36,6 +36,8 @@ license="GPL-2.0-or-later"
 homepage="https://wiki.gnome.org/Projects/NetworkManager"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77
+# TODO: Some tests require network namespaces to run.
+make_check=extended
 lib32disabled=yes
 conf_files="/etc/${pkgname}/${pkgname}.conf"
 make_dirs="

From b4d07cc556a5cd245b040b79ec687d3913897a6d Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:34 +1100
Subject: [PATCH 3/4] NetworkManager-l2tp: revbump for ppp

---
 srcpkgs/NetworkManager-l2tp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-l2tp/template b/srcpkgs/NetworkManager-l2tp/template
index 51e24d1465e..55715e71eac 100644
--- a/srcpkgs/NetworkManager-l2tp/template
+++ b/srcpkgs/NetworkManager-l2tp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-l2tp'
 pkgname=NetworkManager-l2tp
 version=1.8.6
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--runstatedir=/run"
 hostmakedepends="pkg-config intltool glib-devel"

From 4a72cc320de01340cd22d69b2c67e8ba3abe46b2 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:51 +1100
Subject: [PATCH 4/4] NetworkManager-pptp: revbump for ppp

---
 srcpkgs/NetworkManager-pptp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-pptp/template b/srcpkgs/NetworkManager-pptp/template
index 09568b2cec0..22028d52088 100644
--- a/srcpkgs/NetworkManager-pptp/template
+++ b/srcpkgs/NetworkManager-pptp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-pptp'
 pkgname=NetworkManager-pptp
 version=1.2.8
-revision=5
+revision=6
 build_style=gnu-configure
 configure_args="--without-libnm-glib"
 hostmakedepends="pkg-config intltool glib-devel"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (4 preceding siblings ...)
  2021-03-11 15:43 ` unspecd
@ 2021-03-11 20:07 ` ericonr
  2021-03-11 20:09 ` ericonr
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2021-03-11 20:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-797014871

Comment:
Can you explain the reason for the revbumps? I can't figure it out...

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (5 preceding siblings ...)
  2021-03-11 20:07 ` ericonr
@ 2021-03-11 20:09 ` ericonr
  2021-03-12  4:33 ` unspecd
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2021-03-11 20:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-797015651

Comment:
Do any of them dlopen the modules shipped by `ppp`? If yes, we should probably revbump other dependants, like ModemManager...

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (6 preceding siblings ...)
  2021-03-11 20:09 ` ericonr
@ 2021-03-12  4:33 ` unspecd
  2021-03-12  5:32 ` unspecd
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-12  4:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

New comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-797227730

Comment:
> Can you explain the reason for the revbumps
```sh
# Template file for 'ppp'
# rev-bump:
# * NetworkManager
# * NetworkManager-pptp
# * NetworkManager-l2tp
# When update this package
```

> Do any of them dlopen the modules shipped by `ppp`?

This is definitely not the case. I assume you are talking about these modules:
```shell
$ xbps-query -Rf ppp | grep so
/usr/lib/pppd/2.4.7/minconn.so
/usr/lib/pppd/2.4.7/openl2tp.so
/usr/lib/pppd/2.4.7/passprompt.so
/usr/lib/pppd/2.4.7/passwordfd.so
/usr/lib/pppd/2.4.7/pppoatm.so
…
```
`README.pppoe` says:
```
4.  Add the following line to /etc/ppp/options:

    plugin pppoe.so
```
Now let's see some source code. File `pppd/options.c`:
```c
/*
 * Valid arguments.
 */
option_t general_options[] = {
…
#ifdef PLUGIN
    { "plugin", o_special, (void *)loadplugin,
      "Load a plug-in module into pppd", OPT_PRIV | OPT_A2LIST },
#endif
```
```c
#ifdef PLUGIN
static int
loadplugin(char **argv)
{
…
    if (strchr(arg, '/') == 0) {
	const char *base = _PATH_PLUGIN;
…
    }
    handle = dlopen(path, RTLD_GLOBAL | RTLD_NOW);
…
    init = (void (*)(void))dlsym(handle, "plugin_init");
```
File `pppd/pathnames.c`:
```c
#define _PATH_PLUGIN	DESTDIR "/lib/pppd/" VERSION
```


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (7 preceding siblings ...)
  2021-03-12  4:33 ` unspecd
@ 2021-03-12  5:32 ` unspecd
  2021-03-12  5:35 ` unspecd
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-12  5:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

New comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-797246254

Comment:
> Do any of them dlopen the modules shipped by ppp?

It turned out that these packages themselves provide plugins for `ppp`:
```console
$ xlocate /usr/lib/pppd/
NetworkManager-1.22.10_2	/usr/lib/pppd/2.4.7/nm-pppd-plugin.so
NetworkManager-l2tp-1.8.6_2	/usr/lib/pppd/2.4.7/nm-l2tp-pppd-plugin.so
NetworkManager-pptp-1.2.8_5	/usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.a
NetworkManager-pptp-1.2.8_5	/usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so
ppp-2.4.7_14	/usr/lib/pppd/2.4.7/minconn.so
…
```
```console
$ ( cd $(xdistdir) && find srcpkgs -name template -exec grep 'usr/lib/pppd' {} + )
srcpkgs/NetworkManager-l2tp/template:	./configure ${configure_args} --with-pppd-plugin-dir=/usr/lib/pppd/${PPP_VERSION}
srcpkgs/NetworkManager-pptp/template:	./configure ${configure_args} --with-pppd-plugin-dir=/usr/lib/pppd/${PPP_VERSION}
srcpkgs/NetworkManager/template: -Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
srcpkgs/ppp/template:	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
```
As we can see, `ModemManager` does not require `ppp`.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (8 preceding siblings ...)
  2021-03-12  5:32 ` unspecd
@ 2021-03-12  5:35 ` unspecd
  2021-03-12  5:37 ` [PR PATCH] [Updated] " unspecd
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-12  5:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

New comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#issuecomment-797246254

Comment:
> Do any of them dlopen the modules shipped by ppp?

It turned out that these packages themselves provide plugins for `ppp`:
```console
$ xlocate /usr/lib/pppd/
NetworkManager-1.22.10_2	/usr/lib/pppd/2.4.7/nm-pppd-plugin.so
NetworkManager-l2tp-1.8.6_2	/usr/lib/pppd/2.4.7/nm-l2tp-pppd-plugin.so
NetworkManager-pptp-1.2.8_5	/usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.a
NetworkManager-pptp-1.2.8_5	/usr/lib/pppd/2.4.7/nm-pptp-pppd-plugin.so
ppp-2.4.7_14	/usr/lib/pppd/2.4.7/minconn.so
…
```
```console
$ ( cd $(xdistdir) && find srcpkgs -name template -exec grep -B2 'usr/lib/pppd' {} + )
srcpkgs/NetworkManager-l2tp/template-	PPP_VERSION=$(awk '/VERSION/{print $3}' ${XBPS_CROSS_BASE}/usr/include/pppd/patchlevel.h)
srcpkgs/NetworkManager-l2tp/template:	./configure ${configure_args} --with-pppd-plugin-dir=/usr/lib/pppd/${PPP_VERSION}
--
srcpkgs/NetworkManager-pptp/template-	PPP_VERSION=$(sed -n '/VERSION/s/.*"\(.*\)".*/\1/p' ${XBPS_CROSS_BASE}/usr/include/pppd/patchlevel.h)
srcpkgs/NetworkManager-pptp/template:	./configure ${configure_args} --with-pppd-plugin-dir=/usr/lib/pppd/${PPP_VERSION}
--
srcpkgs/NetworkManager/template- -Dpppd=/usr/bin/pppd -Dqt=false
srcpkgs/NetworkManager/template- -Dsession_tracking_consolekit=false
srcpkgs/NetworkManager/template: -Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
```
As we can see, `ModemManager` does not require `ppp`.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (9 preceding siblings ...)
  2021-03-12  5:35 ` unspecd
@ 2021-03-12  5:37 ` unspecd
  2021-03-12 20:00 ` [PR REVIEW] " ericonr
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-12  5:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 17879 bytes --]

From 644a020414cb919a5db0a8564ac67749ea856a68 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH 1/4] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  40 +------
 srcpkgs/ppp/version                        |   1 +
 7 files changed, 7 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch
 create mode 100644 srcpkgs/ppp/version

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b..00000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0..00000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc980..7ed236180aa 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caaf..00000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e..00000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd..74316632883 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,16 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	./configure --cc="${CC}" --cflags="${CFLAGS}"
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +43,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp
diff --git a/srcpkgs/ppp/version b/srcpkgs/ppp/version
new file mode 100644
index 00000000000..4aca89a87a0
--- /dev/null
+++ b/srcpkgs/ppp/version
@@ -0,0 +1 @@
+pattern="ppp \K[\d\.]+"

From 140cbedeacbe7e9d4b1776ad3a1763889ada65a9 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:09 +1100
Subject: [PATCH 2/4] NetworkManager: revbump for ppp

---
 srcpkgs/NetworkManager/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index e482bba98de..d439d8b1028 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -3,7 +3,7 @@
 # patch in gnome-control-center and rebuild it
 pkgname=NetworkManager
 version=1.22.10
-revision=2
+revision=3
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
@@ -11,7 +11,7 @@ configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
  -Dmodify_system=true -Dpolkit_agent=true -Dsystemdsystemunitdir=no
  -Dpppd=/usr/bin/pppd -Dqt=false
  -Dsession_tracking_consolekit=false
- -Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
+ -Dpppd_plugin_dir=/usr/lib/pppd/2.4.9 -Dresolvconf=/usr/bin/resolvconf
  -Ddhclient=/usr/bin/dhclient -Dkernel_firmware_dir=/usr/lib/firmware
  -Ddnsmasq=/usr/bin/dnsmasq -Ddbus_conf_dir=/etc/dbus-1/system.d
  -Ddhcpcd=/usr/bin/dhcpcd -Diptables=/usr/bin/iptables
@@ -36,6 +36,8 @@ license="GPL-2.0-or-later"
 homepage="https://wiki.gnome.org/Projects/NetworkManager"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77
+# TODO: Some tests require network namespaces to run.
+make_check=extended
 lib32disabled=yes
 conf_files="/etc/${pkgname}/${pkgname}.conf"
 make_dirs="

From b62b2ba674055f0608c69907e2bc1087e026e524 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:34 +1100
Subject: [PATCH 3/4] NetworkManager-l2tp: revbump for ppp

---
 srcpkgs/NetworkManager-l2tp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-l2tp/template b/srcpkgs/NetworkManager-l2tp/template
index 51e24d1465e..55715e71eac 100644
--- a/srcpkgs/NetworkManager-l2tp/template
+++ b/srcpkgs/NetworkManager-l2tp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-l2tp'
 pkgname=NetworkManager-l2tp
 version=1.8.6
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--runstatedir=/run"
 hostmakedepends="pkg-config intltool glib-devel"

From f5810d470336715e04f6eb822acd9a18002a5b87 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:51 +1100
Subject: [PATCH 4/4] NetworkManager-pptp: revbump for ppp

---
 srcpkgs/NetworkManager-pptp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-pptp/template b/srcpkgs/NetworkManager-pptp/template
index 09568b2cec0..22028d52088 100644
--- a/srcpkgs/NetworkManager-pptp/template
+++ b/srcpkgs/NetworkManager-pptp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-pptp'
 pkgname=NetworkManager-pptp
 version=1.2.8
-revision=5
+revision=6
 build_style=gnu-configure
 configure_args="--without-libnm-glib"
 hostmakedepends="pkg-config intltool glib-devel"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (10 preceding siblings ...)
  2021-03-12  5:37 ` [PR PATCH] [Updated] " unspecd
@ 2021-03-12 20:00 ` ericonr
  2021-03-13  5:04 ` [PR PATCH] [Updated] " unspecd
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2021-03-12 20:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#discussion_r593417347

Comment:
This one is still disabled by default. You can try building with `CBCP=y` in `do_build` instead of doing this sed dance, though.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Updated] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (11 preceding siblings ...)
  2021-03-12 20:00 ` [PR REVIEW] " ericonr
@ 2021-03-13  5:04 ` unspecd
  2021-03-13  5:06 ` [PR REVIEW] " unspecd
  2021-03-17 13:30 ` [PR PATCH] [Merged]: " ericonr
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-13  5:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

There is an updated pull request by unspecd against master on the void-packages repository

https://github.com/unspecd/void-packages pkg/ppp
https://github.com/void-linux/void-packages/pull/29322

ppp: update to 2.4.9.
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/29322.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pkg/ppp-29322.patch --]
[-- Type: text/x-diff, Size: 17906 bytes --]

From f3f66e5c6adea9f9bbde7200e37853dbe4caeb1f Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:31:45 +1100
Subject: [PATCH 1/4] ppp: update to 2.4.9.

---
 srcpkgs/ppp/patches/CVE-2015-3310.patch    |  18 ---
 srcpkgs/ppp/patches/CVE-2020-8597.patch    |  39 -------
 srcpkgs/ppp/patches/musl.patch             | 123 ---------------------
 srcpkgs/ppp/patches/netinet_in_h_fix.patch |  38 -------
 srcpkgs/ppp/patches/openssl_DES.patch      | 110 ------------------
 srcpkgs/ppp/template                       |  40 +------
 srcpkgs/ppp/version                        |   1 +
 7 files changed, 7 insertions(+), 362 deletions(-)
 delete mode 100644 srcpkgs/ppp/patches/CVE-2015-3310.patch
 delete mode 100644 srcpkgs/ppp/patches/CVE-2020-8597.patch
 delete mode 100644 srcpkgs/ppp/patches/netinet_in_h_fix.patch
 delete mode 100644 srcpkgs/ppp/patches/openssl_DES.patch
 create mode 100644 srcpkgs/ppp/version

diff --git a/srcpkgs/ppp/patches/CVE-2015-3310.patch b/srcpkgs/ppp/patches/CVE-2015-3310.patch
deleted file mode 100644
index e60751a032b5..000000000000
--- a/srcpkgs/ppp/patches/CVE-2015-3310.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Fix buffer overflow in rc_mksid()
-
-rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
-If the process id is bigger than 65535 (FFFF), its hex representation will be
-longer than 4 characters, resulting in a buffer overflow.
- 
-The bug can be exploited to cause a remote DoS.
---- pppd/plugins/radius/util.c
-+++ pppd/plugins/radius/util.c
-@@ -77,7 +77,7 @@ rc_mksid (void)
-   static unsigned short int cnt = 0;
-   sprintf (buf, "%08lX%04X%02hX",
- 	   (unsigned long int) time (NULL),
--	   (unsigned int) getpid (),
-+	   (unsigned int) getpid () & 0xFFFF,
- 	   cnt & 0xFF);
-   cnt++;
-   return buf;
diff --git a/srcpkgs/ppp/patches/CVE-2020-8597.patch b/srcpkgs/ppp/patches/CVE-2020-8597.patch
deleted file mode 100644
index e0988a886e0a..000000000000
--- a/srcpkgs/ppp/patches/CVE-2020-8597.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426.patch
-
-From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
-From: Paul Mackerras <paulus@ozlabs.org>
-Date: Mon, 3 Feb 2020 15:53:28 +1100
-Subject: [PATCH] pppd: Fix bounds check in EAP code
-
-Given that we have just checked vallen < len, it can never be the case
-that vallen >= len + sizeof(rhostname).  This fixes the check so we
-actually avoid overflowing the rhostname array.
-
-Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/eap.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/pppd/eap.c b/pppd/eap.c
-index 94407f56..1b93db01 100644
---- pppd/eap.c
-+++ pppd/eap.c
-@@ -1420,7 +1420,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
-@@ -1846,7 +1846,7 @@ int len;
- 		}
- 
- 		/* Not so likely to happen. */
--		if (vallen >= len + sizeof (rhostname)) {
-+		if (len - vallen >= sizeof (rhostname)) {
- 			dbglog("EAP: trimming really long peer name down");
- 			BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
- 			rhostname[sizeof (rhostname) - 1] = '\0';
diff --git a/srcpkgs/ppp/patches/musl.patch b/srcpkgs/ppp/patches/musl.patch
index 802409fc9800..7ed236180aab 100644
--- a/srcpkgs/ppp/patches/musl.patch
+++ b/srcpkgs/ppp/patches/musl.patch
@@ -1,128 +1,5 @@
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -126,7 +126,7 @@ LIBS        += -lcrypt
- endif
- 
- ifdef USE_LIBUTIL
--CFLAGS += -DHAVE_LOGWTMP=1
-+#CFLAGS        += -DHAVE_LOGWTMP=1
- LIBS   += -lutil
- endif
- 
---- pppd/plugins/rp-pppoe/if.c
-+++ pppd/plugins/rp-pppoe/if.c
-@@ -30,10 +30,6 @@ static char const RCSID[] =
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
---- pppd/plugins/rp-pppoe/plugin.c
-+++ pppd/plugins/rp-pppoe/plugin.c
-@@ -46,7 +46,6 @@ static char const RCSID[] =
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
--#include <net/ethernet.h>
- #include <net/if_arp.h>
- #include <linux/ppp_defs.h>
- #include <linux/if_pppox.h>
---- pppd/plugins/rp-pppoe/pppoe-discovery.c
-+++ pppd/plugins/rp-pppoe/pppoe-discovery.c
-@@ -27,10 +27,6 @@
- #include <linux/if_packet.h>
- #endif
- 
--#ifdef HAVE_NET_ETHERNET_H
--#include <net/ethernet.h>
--#endif
--
- #ifdef HAVE_ASM_TYPES_H
- #include <asm/types.h>
- #endif
-@@ -55,6 +51,8 @@ void die(int status)
-        exit(status);
- }
- 
-+#define error(x...) fprintf(stderr, x)
-+
- /* Initialize frame types to RFC 2516 values.  Some broken peers apparently
-    use different frame types... sigh... */
- 
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -86,18 +86,6 @@ typedef unsigned long UINT32_t;
- 
- #include <netinet/in.h>
- 
--#ifdef HAVE_NETINET_IF_ETHER_H
--#include <sys/types.h>
--
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
--#ifndef HAVE_SYS_DLPI_H
--#include <netinet/if_ether.h>
--#endif
--#endif
--
--
- 
  /* Ethernet frame types according to RFC 2516 */
  #define ETH_PPPOE_DISCOVERY 0x8863
---- pppd/sys-linux.c
-+++ pppd/sys-linux.c
-@@ -102,19 +102,11 @@
- #define MAX_ADDR_LEN 7
- #endif
- 
--#if __GLIBC__ >= 2
- #include <asm/types.h>         /* glibc 2 conflicts with linux/types.h */
- #include <net/if.h>
- #include <net/if_arp.h>
- #include <net/route.h>
- #include <netinet/if_ether.h>
--#else
--#include <linux/types.h>
--#include <linux/if.h>
--#include <linux/if_arp.h>
--#include <linux/route.h>
--#include <linux/if_ether.h>
--#endif
- #include <netinet/in.h>
- #include <arpa/inet.h>
- 
-
---- include/linux/ppp_defs.h.orig	2015-05-10 10:59:27.959155977 +0200
-+++ include/linux/ppp_defs.h	2015-05-10 10:59:50.190403246 +0200
-@@ -50,6 +50,9 @@
- #ifndef _PPP_DEFS_H_
- #define _PPP_DEFS_H_
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
- /*
-  * The basic PPP frame.
-  */
---- pppd/magic.h.orig	2015-05-10 11:00:16.687697962 +0200
-+++ pppd/magic.h	2015-05-10 11:00:34.030890864 +0200
-@@ -42,6 +42,10 @@
-  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
-  */
- 
-+#ifndef __P
-+# define __P(x) x
-+#endif
-+
- void magic_init __P((void));	/* Initialize the magic number generator */
- u_int32_t magic __P((void));	/* Returns the next magic number */
- 
 --- include/net/ppp_defs.h.orig	2015-05-10 11:09:54.505127657 +0200
 +++ include/net/ppp_defs.h	2015-05-10 11:10:10.753309024 +0200
 @@ -38,6 +38,8 @@
diff --git a/srcpkgs/ppp/patches/netinet_in_h_fix.patch b/srcpkgs/ppp/patches/netinet_in_h_fix.patch
deleted file mode 100644
index ac69c98caafc..000000000000
--- a/srcpkgs/ppp/patches/netinet_in_h_fix.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 50a2997b256e0e0ef7a46fae133f56f60fce539c Mon Sep 17 00:00:00 2001
-From: Lubomir Rintel <lkundrak@v3.sk>
-Date: Mon, 9 Jan 2017 13:34:23 +0000
-Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
-
-This fixes builds with newer kernels. Basically, <netinet/in.h> needs to be
-included before <linux/in.h> otherwise the earlier, unaware of the latter,
-tries to redefine symbols and structures. Also, <linux/if_pppox.h> doesn't work
-alone anymore, since it pulls the headers in the wrong order, so we better
-include <netinet/in.h> early.
----
- pppd/plugins/rp-pppoe/pppoe.h | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
-index 9ab2eee3..c4aaa6e6 100644
---- pppd/plugins/rp-pppoe/pppoe.h
-+++ pppd/plugins/rp-pppoe/pppoe.h
-@@ -47,6 +47,10 @@
- #include <sys/socket.h>
- #endif
- 
-+/* This has to be included before Linux 4.8's linux/in.h
-+ * gets dragged in. */
-+#include <netinet/in.h>
-+
- /* Ugly header files on some Linux boxes... */
- #if defined(HAVE_LINUX_IF_H)
- #include <linux/if.h>
-@@ -84,8 +88,6 @@ typedef unsigned long UINT32_t;
- #include <linux/if_ether.h>
- #endif
- 
--#include <netinet/in.h>
--
-
- /* Ethernet frame types according to RFC 2516 */
- #define ETH_PPPOE_DISCOVERY 0x8863
diff --git a/srcpkgs/ppp/patches/openssl_DES.patch b/srcpkgs/ppp/patches/openssl_DES.patch
deleted file mode 100644
index c631039446e5..000000000000
--- a/srcpkgs/ppp/patches/openssl_DES.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
-Date: Fri, 6 Apr 2018 14:27:18 +0200
-Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
-libcrypt.  The libxcrypt standalone package can be used instead, but
-it dropped the old setkey/encrypt API which ppp uses for DES.  There
-is support for using openssl in pppcrypt.c, but it contains typos
-preventing it from compiling and seems to be written for an ancient
-openssl version.
-
-This updates the code to use current openssl.
-
-[paulus@ozlabs.org - wrote the commit description, fixed comment in
- Makefile.linux.]
-
-Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
-Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
----
- pppd/Makefile.linux |  7 ++++---
- pppd/pppcrypt.c     | 18 +++++++++---------
- 2 files changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index 36d2b036..8d5ce99d 100644
---- pppd/Makefile.linux
-+++ pppd/Makefile.linux
-@@ -35,10 +35,10 @@ endif
- COPTS = -O2 -pipe -Wall -g
- LIBS =
- 
--# Uncomment the next 2 lines to include support for Microsoft's
-+# Uncomment the next line to include support for Microsoft's
- # MS-CHAP authentication protocol.  Also, edit plugins/radius/Makefile.linux.
- CHAPMS=y
--USE_CRYPT=y
-+#USE_CRYPT=y
- # Don't use MSLANMAN unless you really know what you're doing.
- #MSLANMAN=y
- # Uncomment the next line to include support for MPPE.  CHAPMS (above) must
-@@ -137,7 +137,8 @@ endif
- 
- ifdef NEEDDES
- ifndef USE_CRYPT
--LIBS     += -ldes $(LIBS)
-+#CFLAGS   += -I/usr/include/openssl
-+LIBS     += -lcrypto
- else
- CFLAGS   += -DUSE_CRYPT=1
- endif
-diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
-index 8b85b132..6b35375e 100644
---- pppd/pppcrypt.c
-+++ pppd/pppcrypt.c
-@@ -64,7 +64,7 @@ u_char *des_key;	/* OUT 64 bit DES key with parity bits added */
- 	des_key[7] = Get7Bits(key, 49);
- 
- #ifndef USE_CRYPT
--	des_set_odd_parity((des_cblock *)des_key);
-+	DES_set_odd_parity((DES_cblock *)des_key);
- #endif
- }
- 
-@@ -158,25 +158,25 @@ u_char *clear;	/* OUT 8 octets */
- }
- 
- #else /* USE_CRYPT */
--static des_key_schedule	key_schedule;
-+static DES_key_schedule	key_schedule;
- 
- bool
- DesSetkey(key)
- u_char *key;
- {
--	des_cblock des_key;
-+	DES_cblock des_key;
- 	MakeKey(key, des_key);
--	des_set_key(&des_key, key_schedule);
-+	DES_set_key(&des_key, &key_schedule);
- 	return (1);
- }
- 
- bool
--DesEncrypt(clear, key, cipher)
-+DesEncrypt(clear, cipher)
- u_char *clear;	/* IN  8 octets */
- u_char *cipher;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
--	    key_schedule, 1);
-+	DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
-+	    &key_schedule, 1);
- 	return (1);
- }
- 
-@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
- u_char *cipher;	/* IN  8 octets */
- u_char *clear;	/* OUT 8 octets */
- {
--	des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
--	    key_schedule, 0);
-+	DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
-+	    &key_schedule, 0);
- 	return (1);
- }
- 
diff --git a/srcpkgs/ppp/template b/srcpkgs/ppp/template
index 5986bd713fd6..265de99e0753 100644
--- a/srcpkgs/ppp/template
+++ b/srcpkgs/ppp/template
@@ -5,15 +5,15 @@
 # * NetworkManager-l2tp
 # When update this package
 pkgname=ppp
-version=2.4.7
-revision=14
+version=2.4.9
+revision=1
 makedepends="libpcap-devel openssl-devel"
 short_desc="PPP (Point-to-Point Protocol) daemon"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause, LGPL-2.0-or-later, GPL-2.0-or-later, Public Domain"
 homepage="https://ppp.samba.org/"
 distfiles="https://ftp.samba.org/pub/ppp/ppp-$version.tar.gz"
-checksum=02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30
+checksum=f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d
 make_dirs="
  /etc/ppp/ipv6-down.d 0755 root root
  /etc/ppp/peers 0755 root root"
@@ -26,39 +26,16 @@ conf_files="
  /etc/ppp/chap-secrets
  /etc/ppp/pap-secrets"
 
-CFLAGS="-D_GNU_SOURCE"
-
-if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
-	makedepends+=" musl-legacy-compat"
-fi
-
 do_configure() {
-	# Custom CFLAGS.
-	find -name "Makefile.linux" -exec sed -i "{}" \
-		-e "s;CFLAGS\\s*=\(.*\);CFLAGS = ${CFLAGS} \1;" \;
-	# Custom LDFLAGS for chat, pppoe-discovery and pppdump
-	sed -i chat/Makefile.linux \
-		-e "s;-o chat ;${LDFLAGS} -o chat ;"
-	sed -i pppd/plugins/rp-pppoe/Makefile.linux \
-		-e "s;-o pppoe-discovery ;${LDFLAGS} -o pppoe-discovery ;"
-	sed -i pppdump/Makefile.linux \
-		-e "s;-o pppdump ;${LDFLAGS} -o pppdump ;"
-	# Enable active filter
-	sed -i "s:^#FILTER=y:FILTER=y:" pppd/Makefile.linux
-	# Enable ipv6 support
-	sed -i "s:^#HAVE_INET6=y:HAVE_INET6=y:" pppd/Makefile.linux
-	# Enable Microsoft Proprietary Callback Control Protocol
-	sed -i "s:^#CBCP=y:CBCP=y:" pppd/Makefile.linux
-
-	./configure ${configure_args}
+	./configure --cc="${CC}" --cflags="${CFLAGS}"
 }
 
 do_build() {
-	make COPTS="${CFLAGS} ${LDFLAGS}" ${makejobs}
+	make LDFLAGS="${LDFLAGS}" CBCP=y ${makejobs}
 }
 
 do_install() {
-	make DESTDIR=${DESTDIR}/usr install
+	make DESTDIR=${DESTDIR}/usr BINDIR=${DESTDIR}/usr/bin install
 
 	case "$XBPS_TARGET_MACHINE" in
 		*-musl) vinstall include/net/ppp_defs.h 644 usr/include/net;;
@@ -66,11 +43,6 @@ do_install() {
 
 	chmod 755 ${DESTDIR}/usr/lib/pppd/${version}/*.so
 
-	vmkdir usr/bin
-	mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin
-	vbin pppd/pppd
-	vbin chat/chat
-
 	vinstall ${FILESDIR}/options 644 etc/ppp
 	vinstall ${FILESDIR}/ip-up 755 etc/ppp
 	vinstall ${FILESDIR}/ip-down 755 etc/ppp
diff --git a/srcpkgs/ppp/version b/srcpkgs/ppp/version
new file mode 100644
index 000000000000..4aca89a87a05
--- /dev/null
+++ b/srcpkgs/ppp/version
@@ -0,0 +1 @@
+pattern="ppp \K[\d\.]+"

From 589b6b93878e55e46c540eef3d95949e8aea8725 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:09 +1100
Subject: [PATCH 2/4] NetworkManager: revbump for ppp

---
 srcpkgs/NetworkManager/template | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/NetworkManager/template b/srcpkgs/NetworkManager/template
index e482bba98de7..d439d8b10286 100644
--- a/srcpkgs/NetworkManager/template
+++ b/srcpkgs/NetworkManager/template
@@ -3,7 +3,7 @@
 # patch in gnome-control-center and rebuild it
 pkgname=NetworkManager
 version=1.22.10
-revision=2
+revision=3
 build_style=meson
 build_helper="gir qemu"
 configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
@@ -11,7 +11,7 @@ configure_args="-Dpolkit_agent=true -Dsystemd_journal=false
  -Dmodify_system=true -Dpolkit_agent=true -Dsystemdsystemunitdir=no
  -Dpppd=/usr/bin/pppd -Dqt=false
  -Dsession_tracking_consolekit=false
- -Dpppd_plugin_dir=/usr/lib/pppd/2.4.7 -Dresolvconf=/usr/bin/resolvconf
+ -Dpppd_plugin_dir=/usr/lib/pppd/2.4.9 -Dresolvconf=/usr/bin/resolvconf
  -Ddhclient=/usr/bin/dhclient -Dkernel_firmware_dir=/usr/lib/firmware
  -Ddnsmasq=/usr/bin/dnsmasq -Ddbus_conf_dir=/etc/dbus-1/system.d
  -Ddhcpcd=/usr/bin/dhcpcd -Diptables=/usr/bin/iptables
@@ -36,6 +36,8 @@ license="GPL-2.0-or-later"
 homepage="https://wiki.gnome.org/Projects/NetworkManager"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
 checksum=2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77
+# TODO: Some tests require network namespaces to run.
+make_check=extended
 lib32disabled=yes
 conf_files="/etc/${pkgname}/${pkgname}.conf"
 make_dirs="

From 97566e129cea62702ac05e34db321ec0031876a1 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:34 +1100
Subject: [PATCH 3/4] NetworkManager-l2tp: revbump for ppp

---
 srcpkgs/NetworkManager-l2tp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-l2tp/template b/srcpkgs/NetworkManager-l2tp/template
index 51e24d1465ee..55715e71eac3 100644
--- a/srcpkgs/NetworkManager-l2tp/template
+++ b/srcpkgs/NetworkManager-l2tp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-l2tp'
 pkgname=NetworkManager-l2tp
 version=1.8.6
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--runstatedir=/run"
 hostmakedepends="pkg-config intltool glib-devel"

From 9caa9085b93f8f6251c4d21f4a8cf20056273b50 Mon Sep 17 00:00:00 2001
From: Evgeny Ermakov <evgeny.v.ermakov@gmail.com>
Date: Tue, 9 Mar 2021 02:44:51 +1100
Subject: [PATCH 4/4] NetworkManager-pptp: revbump for ppp

---
 srcpkgs/NetworkManager-pptp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/NetworkManager-pptp/template b/srcpkgs/NetworkManager-pptp/template
index 09568b2cec06..22028d520886 100644
--- a/srcpkgs/NetworkManager-pptp/template
+++ b/srcpkgs/NetworkManager-pptp/template
@@ -1,7 +1,7 @@
 # Template file for 'NetworkManager-pptp'
 pkgname=NetworkManager-pptp
 version=1.2.8
-revision=5
+revision=6
 build_style=gnu-configure
 configure_args="--without-libnm-glib"
 hostmakedepends="pkg-config intltool glib-devel"

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR REVIEW] ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (12 preceding siblings ...)
  2021-03-13  5:04 ` [PR PATCH] [Updated] " unspecd
@ 2021-03-13  5:06 ` unspecd
  2021-03-17 13:30 ` [PR PATCH] [Merged]: " ericonr
  14 siblings, 0 replies; 16+ messages in thread
From: unspecd @ 2021-03-13  5:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

New review comment by unspecd on void-packages repository

https://github.com/void-linux/void-packages/pull/29322#discussion_r593597126

Comment:
Thanks for pointing that out. Updated.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PR PATCH] [Merged]: ppp: update to 2.4.9.
  2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
                   ` (13 preceding siblings ...)
  2021-03-13  5:06 ` [PR REVIEW] " unspecd
@ 2021-03-17 13:30 ` ericonr
  14 siblings, 0 replies; 16+ messages in thread
From: ericonr @ 2021-03-17 13:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

There's a merged pull request on the void-packages repository

ppp: update to 2.4.9.
https://github.com/void-linux/void-packages/pull/29322

Description:
Fixes #29313.

<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, x86_64-musl
- [x] I built this PR locally for these architectures:
  - [x] aarch64
  - [x] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-03-17 13:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 15:38 [PR PATCH] ppp: update to 2.4.9 unspecd
2021-03-08 15:46 ` [PR PATCH] [Updated] " unspecd
2021-03-08 16:19 ` unspecd
2021-03-08 19:50 ` ericonr
2021-03-09  5:19 ` [PR PATCH] [Updated] " unspecd
2021-03-11 15:43 ` unspecd
2021-03-11 20:07 ` ericonr
2021-03-11 20:09 ` ericonr
2021-03-12  4:33 ` unspecd
2021-03-12  5:32 ` unspecd
2021-03-12  5:35 ` unspecd
2021-03-12  5:37 ` [PR PATCH] [Updated] " unspecd
2021-03-12 20:00 ` [PR REVIEW] " ericonr
2021-03-13  5:04 ` [PR PATCH] [Updated] " unspecd
2021-03-13  5:06 ` [PR REVIEW] " unspecd
2021-03-17 13:30 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).