diff mbox series

[v3,1/1] package/pppd: bump package to fix startup issue

Message ID 20240418085858.126825-1-alexis.lothore@bootlin.com
State New
Headers show
Series [v3,1/1] package/pppd: bump package to fix startup issue | expand

Commit Message

Alexis Lothoré April 18, 2024, 8:58 a.m. UTC
pppd fails to start on a systems with buildroot 2024.02.x because of
missing pppd directory in /var/run. There are some logs hinting at this
issue:
Warning: couldn't open ppp database /var/run/pppd/pppd2.tdb
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory
Can't create lock file /var/run/pppd/lock/LCK..ppp-tty-fifo1: No such file or directory

The issue has already been detected and fixed upstream (see [1]) and is
expected to be released on a v2.5.1, but this release seems to be stalled
for now (see [2]). Bump on current master, which currently reflects what
will likely be the 2.5.1.

[1] https://github.com/ppp-project/ppp/issues/419
[2] https://github.com/ppp-project/ppp/issues/460

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
Changes in v3:
- bump package instead of backporting patches, based on Bernd Kuhls'
  suggestion
- remove patches that are now integrated in new version

Changes in v2:
- re-generated correctly patches to preserve original author
- added missing SoB

Link to v2: https://lore.kernel.org/buildroot/20240411133507.82781-1-alexis.lothore@bootlin.com/

Backport to: 2024.02.x
---
 ...eck-to-see-if-we-have-struct-sockadd.patch | 44 -------------
 ...xing-up-parsing-in-radiusclient.conf.patch | 56 ----------------
 ...stray-include-of-an-openssl-header-w.patch | 31 ---------
 ....c-use-uint32_t-instead-of-u_int32_t.patch | 64 -------------------
 package/pppd/pppd.hash                        |  2 +-
 package/pppd/pppd.mk                          |  4 +-
 6 files changed, 3 insertions(+), 198 deletions(-)
 delete mode 100644 package/pppd/0001-Add-configure-check-to-see-if-we-have-struct-sockadd.patch
 delete mode 100644 package/pppd/0002-Closes-411-Fixing-up-parsing-in-radiusclient.conf.patch
 delete mode 100644 package/pppd/0003-Fixes-issue-429-stray-include-of-an-openssl-header-w.patch
 delete mode 100644 package/pppd/0004-pppd-ppp-sha1.c-use-uint32_t-instead-of-u_int32_t.patch
diff mbox series

Patch

diff --git a/package/pppd/0001-Add-configure-check-to-see-if-we-have-struct-sockadd.patch b/package/pppd/0001-Add-configure-check-to-see-if-we-have-struct-sockadd.patch
deleted file mode 100644
index 9e41110400b2..000000000000
--- a/package/pppd/0001-Add-configure-check-to-see-if-we-have-struct-sockadd.patch
+++ /dev/null
@@ -1,44 +0,0 @@ 
-From 9d6d326b2530cffb1414e4c401675117c42d43ce Mon Sep 17 00:00:00 2001
-From: Eivind Naess <eivnaes@yahoo.com>
-Date: Sun, 23 Apr 2023 11:30:43 -0700
-Subject: [PATCH] Add configure check to see if we have struct sockaddr_ll
-
-Fixes issue #411.
-
-Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
-
-Upstream: https://github.com/ppp-project/ppp/commit/9d6d326b2530cffb1414e4c401675117c42d43ce
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- configure.ac                   | 3 ++-
- pppd/plugins/pppoe/config.h.in | 2 ++
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1180f64..38b24af 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -75,7 +75,8 @@ AM_COND_IF([LINUX], [
-         linux/if_ether.h        \
-         linux/if_packet.h       \
-         netinet/if_ether.h      \
--        netpacket/packet.h])])
-+        netpacket/packet.h])
-+    AC_CHECK_TYPES([struct sockaddr_ll], [], [], [#include <linux/if_packet.h>])])
- 
- AC_CHECK_SIZEOF(unsigned int)
- AC_CHECK_SIZEOF(unsigned long)
-diff --git a/pppd/plugins/pppoe/config.h.in b/pppd/plugins/pppoe/config.h.in
-index d447f5e..d7d61c0 100644
---- a/pppd/plugins/pppoe/config.h.in
-+++ b/pppd/plugins/pppoe/config.h.in
-@@ -69,3 +69,5 @@
- /* The size of `unsigned short', as computed by sizeof. */
- #undef SIZEOF_UNSIGNED_SHORT
- 
-+/* Define to 1 if the system has the type `struct sockaddr_ll'. */
-+#undef HAVE_STRUCT_SOCKADDR_LL
--- 
-2.39.2
-
diff --git a/package/pppd/0002-Closes-411-Fixing-up-parsing-in-radiusclient.conf.patch b/package/pppd/0002-Closes-411-Fixing-up-parsing-in-radiusclient.conf.patch
deleted file mode 100644
index 5fa3ded756d0..000000000000
--- a/package/pppd/0002-Closes-411-Fixing-up-parsing-in-radiusclient.conf.patch
+++ /dev/null
@@ -1,56 +0,0 @@ 
-From 7f89208b860ea0c41636410bfdb6a609b2772f47 Mon Sep 17 00:00:00 2001
-From: Eivind Naess <eivnaes@yahoo.com>
-Date: Sun, 23 Apr 2023 11:37:01 -0700
-Subject: [PATCH] Closes #411, Fixing up parsing in radiusclient.conf
-
-Adding curly braces to fix the code.
-
-Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
-
-Upstream: https://github.com/ppp-project/ppp/commit/7f89208b860ea0c41636410bfdb6a609b2772f47
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- pppd/plugins/radius/config.c | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c
-index 39744fc..e1a4814 100644
---- a/pppd/plugins/radius/config.c
-+++ b/pppd/plugins/radius/config.c
-@@ -235,24 +235,28 @@ int rc_read_config(char *filename)
- 
- 		switch (option->type) {
- 			case OT_STR:
--				 if (set_option_str(filename, line, option, p) < 0)
-+				if (set_option_str(filename, line, option, p) < 0) {
- 					fclose(configfd);
- 					return (-1);
-+				}
- 				break;
- 			case OT_INT:
--				 if (set_option_int(filename, line, option, p) < 0)
-+				if (set_option_int(filename, line, option, p) < 0) {
- 					fclose(configfd);
- 					return (-1);
-+				}
- 				break;
- 			case OT_SRV:
--				 if (set_option_srv(filename, line, option, p) < 0)
-+				if (set_option_srv(filename, line, option, p) < 0) {
- 					fclose(configfd);
- 					return (-1);
-+				}
- 				break;
- 			case OT_AUO:
--				 if (set_option_auo(filename, line, option, p) < 0)
-+				if (set_option_auo(filename, line, option, p) < 0) {
- 					fclose(configfd);
- 					return (-1);
-+				}
- 				break;
- 			default:
- 				fatal("rc_read_config: impossible case branch!");
--- 
-2.39.2
-
diff --git a/package/pppd/0003-Fixes-issue-429-stray-include-of-an-openssl-header-w.patch b/package/pppd/0003-Fixes-issue-429-stray-include-of-an-openssl-header-w.patch
deleted file mode 100644
index b5f9f319f976..000000000000
--- a/package/pppd/0003-Fixes-issue-429-stray-include-of-an-openssl-header-w.patch
+++ /dev/null
@@ -1,31 +0,0 @@ 
-From cf7ac82a610bbfee57512cba345f7d49c02563a2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
-Date: Wed, 14 Jun 2023 23:19:46 +0000
-Subject: [PATCH] Fixes issue #429, stray include of an openssl header was
- removed
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
-
-Upstream: https://github.com/ppp-project/ppp/pull/431
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- pppd/crypto_ms.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/pppd/crypto_ms.c b/pppd/crypto_ms.c
-index a9ddd5fda..ccf8129d4 100644
---- a/pppd/crypto_ms.c
-+++ b/pppd/crypto_ms.c
-@@ -122,8 +122,6 @@ MakeKey(const unsigned char *key, unsigned char *des_key)
- 	DES_set_odd_parity((DES_cblock *)des_key);
- }
- 
--#include <openssl/evp.h>
--
- int
- DesEncrypt(const unsigned char *clear, const unsigned char *key, unsigned char *cipher)
- {
diff --git a/package/pppd/0004-pppd-ppp-sha1.c-use-uint32_t-instead-of-u_int32_t.patch b/package/pppd/0004-pppd-ppp-sha1.c-use-uint32_t-instead-of-u_int32_t.patch
deleted file mode 100644
index bce7687b9e9f..000000000000
--- a/package/pppd/0004-pppd-ppp-sha1.c-use-uint32_t-instead-of-u_int32_t.patch
+++ /dev/null
@@ -1,64 +0,0 @@ 
-From 7eb0cc63e38a1fcaff24bc3ca146c13414a1420e Mon Sep 17 00:00:00 2001
-From: Bernd Kuhls <bernd@kuhls.net>
-Date: Sun, 18 Jun 2023 15:53:43 +0200
-Subject: [PATCH] pppd/ppp-sha1.c: use uint32_t instead of u_int32_t
-
-Fixes build with musl-libc toolchains.
-
-Upstream: https://github.com/ppp-project/ppp/pull/432
-
-Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
----
- pppd/ppp-sha1.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/pppd/ppp-sha1.c b/pppd/ppp-sha1.c
-index ab4dcd5..9ff3a24 100644
---- a/pppd/ppp-sha1.c
-+++ b/pppd/ppp-sha1.c
-@@ -110,14 +110,14 @@ static void sha1_clean(PPP_MD_CTX *ctx)
- #include <netinet/in.h>	/* htonl() */
- 
- typedef struct {
--    u_int32_t state[5];
--    u_int32_t count[2];
-+    uint32_t state[5];
-+    uint32_t count[2];
-     unsigned char buffer[64];
- } SHA1_CTX;
- 
- 
- static void
--SHA1_Transform(u_int32_t[5], const unsigned char[64]);
-+SHA1_Transform(uint32_t[5], const unsigned char[64]);
- 
- #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
- 
-@@ -138,12 +138,12 @@ SHA1_Transform(u_int32_t[5], const unsigned char[64]);
- /* Hash a single 512-bit block. This is the core of the algorithm. */
- 
- static void
--SHA1_Transform(u_int32_t state[5], const unsigned char buffer[64])
-+SHA1_Transform(uint32_t state[5], const unsigned char buffer[64])
- {
--    u_int32_t a, b, c, d, e;
-+    uint32_t a, b, c, d, e;
-     typedef union {
- 	unsigned char c[64];
--	u_int32_t l[16];
-+	uint32_t l[16];
-     } CHAR64LONG16;
-     CHAR64LONG16 *block;
- 
-@@ -236,7 +236,7 @@ SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len)
- static void
- SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
- {
--    u_int32_t i, j;
-+    uint32_t i, j;
-     unsigned char finalcount[8];
- 
-     for (i = 0; i < 8; i++) {
--- 
-2.39.2
-
diff --git a/package/pppd/pppd.hash b/package/pppd/pppd.hash
index 9a293e7d8d7c..bf226508849f 100644
--- a/package/pppd/pppd.hash
+++ b/package/pppd/pppd.hash
@@ -1,4 +1,4 @@ 
 # Locally calculated
-sha256  425a5b2df592f4b79e251e5b0d3af48265904162cb0906691a5d35ec355b426d  pppd-2.5.0.tar.gz
+sha256  535efa0e7c36e9d443b1b52c296d63ab2c1ec9458816ea0e37c701e0a921466d  pppd-e1266c76d1ad39f98f11676e34f180f78c5a510c.tar.gz
 sha256  5d588eb3b157d52112afea935c88a7ff9efddc1e2d95a42c25d3b96ad9055008  LICENSE.BSD
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  LICENSE.GPL-2
diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk
index 616b843e3d2e..5b5675d2e5ce 100644
--- a/package/pppd/pppd.mk
+++ b/package/pppd/pppd.mk
@@ -6,8 +6,8 @@ 
 
 # The tarball provided at https://download.samba.org/pub/ppp/ does not
 # include the license files yet so we use the github tarball.
-PPPD_VERSION = 2.5.0
-PPPD_SITE = $(call github,ppp-project,ppp,ppp-$(PPPD_VERSION))
+PPPD_VERSION = e1266c76d1ad39f98f11676e34f180f78c5a510c
+PPPD_SITE = $(call github,ppp-project,ppp,$(PPPD_VERSION))
 PPPD_LICENSE = LGPL-2.0+, LGPL, BSD-4-Clause, BSD-3-Clause, GPL-2.0+
 PPPD_LICENSE_FILES = LICENSE.BSD LICENSE.GPL-2
 PPPD_CPE_ID_VENDOR = point-to-point_protocol_project