dahdi-tools icon indicating copy to clipboard operation
dahdi-tools copied to clipboard

ppp-2.5.0 support?

Open Pro-pra opened this issue 1 year ago • 6 comments

ppp-2.5.0 now not have pppd/patchlevel.h

Pro-pra avatar Jan 19 '24 02:01 Pro-pra

For information, PPP 2.5.2 has been released (2024-12-31):

  • https://github.com/ppp-project/ppp/releases/tag/v2.5.2

Neustradamus avatar Jan 02 '25 04:01 Neustradamus

ppp-2.5.0 now not have pppd/patchlevel.h

Since it sounds like you use the ppp functionality, for those of us less familiar with the ppp project, do you have a suggested fix or knowledge of what should be used instead of patchlevel.h?

Obviously, the code in configure.ac that looks for that file could be removed, but I imagine it should probably be looking for something else instead.

InterLinked1 avatar Jan 10 '25 02:01 InterLinked1

My attempt patch for ppp-2.5.0

diff -ruN a/configure b/configure
--- a/configure	2025-01-12 12:09:26.719518784 +0900
+++ b/configure	2025-01-12 12:13:23.456540826 +0900
@@ -21030,7 +21030,7 @@
 	*) ppp_path="$with_ppp" ;;
 esac
 
-level_file="$ppp_path/include/pppd/patchlevel.h"
+level_file="$ppp_path/include/pppd/pppdconf.h"
 PPP_VERSION=
 if test "$ppp_path" != '' && test -r "$level_file"; then
 	PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
@@ -21042,7 +21042,7 @@
 	# If we asked explicitly for ppp support
 	if test "$PPPD_VERSION" = ''; then
 		# but have not detected it
-		as_fn_error $? "failed to find pppd/patchlevel.h: no ppp support." "$LINENO" 5
+		as_fn_error $? "failed to find pppd/pppdconf.h: no ppp support." "$LINENO" 5
 	fi
 	;;
 esac
diff -ruN a/configure.ac b/configure.ac
--- a/configure.ac	2025-01-12 12:09:24.036382529 +0900
+++ b/configure.ac	2025-01-12 12:13:46.962734523 +0900
@@ -333,7 +333,7 @@
 	*) ppp_path="$with_ppp" ;;
 esac
 
-level_file="$ppp_path/include/pppd/patchlevel.h"
+level_file="$ppp_path/include/pppd/pppdconf.h"
 PPP_VERSION=
 if test "$ppp_path" != '' && test -r "$level_file"; then
 	PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
@@ -345,7 +345,7 @@
 	# If we asked explicitly for ppp support
 	if test "$PPPD_VERSION" = ''; then
 		# but have not detected it
-		AC_MSG_ERROR(failed to find pppd/patchlevel.h: no ppp support.)
+		AC_MSG_ERROR(failed to find pppd/pppdconf.h: no ppp support.)
 	fi
 	;;
 esac
diff -ruN a/ppp/dahdi.c b/ppp/dahdi.c
--- a/ppp/dahdi.c	2016-03-02 07:04:19.000000000 +0900
+++ b/ppp/dahdi.c	2025-01-12 12:27:49.534472066 +0900
@@ -41,13 +41,15 @@
 #include <pppd/lcp.h>
 #include <pppd/ipcp.h>
 #include <pppd/ccp.h>
-#include <pppd/pathnames.h>
+#include <pppd/pppdconf.h>
+#include <pppd/options.h>
+#include <pppd/pppd.h>
 
 #include <dahdi/user.h>
 
 extern int new_style_driver;
 
-const char pppd_version[] = VERSION;
+const char pppd_version[] = PPPD_VERSION;
 
 #define _PATH_DAHDI_OPT         _ROOT_PATH "/etc/ppp/options."
 
@@ -166,7 +168,7 @@
     int ret;
     char buf[256];
     snprintf(buf, 256, _PATH_DAHDI_OPT "%s",devnam);
-    if(!options_from_file(buf, 0, 0, 1))
+    if(!ppp_options_from_file(buf, 0, 0, 1))
 	exit(EXIT_OPTION_ERROR);
 
 }

Pro-pra avatar Jan 12 '25 03:01 Pro-pra

patch need more work, some functions renamed or removed :(

Pro-pra avatar Jan 12 '25 03:01 Pro-pra

Thanks @Pro-pra!

Can you check for PPP 2.5.2?

Neustradamus avatar Jan 12 '25 05:01 Neustradamus

My patch not work! i'm maintainer, not programmer, need more changes in patch.

Pro-pra avatar Jan 12 '25 06:01 Pro-pra