[packages/ppp] - rel 4; fix build with glibc 2.28; disable srp as it's unmaintained and won't work with current ope

arekm arekm at pld-linux.org
Mon Sep 17 20:32:27 CEST 2018


commit c5a9b3d81b8e437dc4660ca89954d1bea5f5fe2f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Sep 17 20:32:19 2018 +0200

    - rel 4; fix build with glibc 2.28; disable srp as it's unmaintained and won't work with current openssl 1.1.1

 ppp-2.4.7-DES-openssl.patch | 79 +++++++++++++++++++++++++++++++++++++++++++++
 ppp-linux48.patch           | 20 ++++++++++++
 ppp.spec                    |  8 +++--
 3 files changed, 105 insertions(+), 2 deletions(-)
---
diff --git a/ppp.spec b/ppp.spec
index 3155a5d..ced813f 100644
--- a/ppp.spec
+++ b/ppp.spec
@@ -5,7 +5,7 @@
 # Conditional build:
 %bcond_without	mppc	# without MPPC support
 %bcond_without	pppoatm	# without PPPoATM plugin (which requires kernel 2.4 and atm-devel)
-%bcond_without	srp	# without SRP support
+%bcond_with	srp	# without SRP support
 #
 Summary:	ppp daemon package for Linux
 Summary(de.UTF-8):	ppp-Dämonpaket für Linux
@@ -18,7 +18,7 @@ Summary(tr.UTF-8):	PPP sunucu süreci
 Summary(zh_CN.UTF-8):	PPP 配置和管理软件包
 Name:		ppp
 Version:	2.4.7
-Release:	3
+Release:	4
 Epoch:		3
 License:	distributable
 Group:		Networking/Daemons
@@ -44,6 +44,8 @@ Patch9:		%{name}-lib64.patch
 Patch10:	%{name}-2.4.3-mppe-mppc-1.1.patch
 Patch11:	%{name}-ifpppstatsreq.patch
 Patch12:	%{name}-libx32.patch
+Patch13:	ppp-2.4.7-DES-openssl.patch
+Patch14:	ppp-linux48.patch
 URL:		http://ppp.samba.org/
 BuildRequires:	libpcap-devel >= 2:0.8.1
 %{?with_pppoatm:BuildRequires:	linux-atm-devel}
@@ -136,6 +138,8 @@ Wtyczka PPPoATM dla pppd.
 %if "%{_lib}" == "libx32"
 %patch12 -p1
 %endif
+%patch13 -p1
+%patch14 -p1
 
 # use headers from llh instead of older supplied by ppp, incompatible with current llh
 %{__rm} include/linux/*.h
diff --git a/ppp-2.4.7-DES-openssl.patch b/ppp-2.4.7-DES-openssl.patch
new file mode 100644
index 0000000..ad3b268
--- /dev/null
+++ b/ppp-2.4.7-DES-openssl.patch
@@ -0,0 +1,79 @@
+diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
+index 534ccc2..cf11b74 100644
+--- a/pppd/Makefile.linux
++++ b/pppd/Makefile.linux
+@@ -41,7 +41,7 @@ COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
+ # Uncomment the next 2 lines 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
+@@ -147,7 +147,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 8b85b13..6b35375 100644
+--- a/pppd/pppcrypt.c
++++ b/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/ppp-linux48.patch b/ppp-linux48.patch
new file mode 100644
index 0000000..81a32aa
--- /dev/null
+++ b/ppp-linux48.patch
@@ -0,0 +1,20 @@
+--- ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe.h~	2014-08-09 14:31:39.000000000 +0200
++++ ppp-2.4.7/pppd/plugins/rp-pppoe/pppoe.h	2018-09-17 20:30:34.820608088 +0200
+@@ -47,6 +47,8 @@
+ #include <sys/socket.h>
+ #endif
+ 
++#include <netinet/in.h>
++
+ /* Ugly header files on some Linux boxes... */
+ #if defined(HAVE_LINUX_IF_H)
+ #include <linux/if.h>
+@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t;
+ #include <linux/if_ether.h>
+ #endif
+ 
+-#include <netinet/in.h>
+-
+ #ifdef HAVE_NETINET_IF_ETHER_H
+ #include <sys/types.h>
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ppp.git/commitdiff/c5a9b3d81b8e437dc4660ca89954d1bea5f5fe2f



More information about the pld-cvs-commit mailing list