[packages/openl2tp] - added tirpc patch, build with libtirpc+rpcsvc-proto; release 7
qboosh
qboosh at pld-linux.org
Tue Sep 1 18:13:55 CEST 2020
commit 536c1bf86098a1d21c7457fcdd15bc91ba8ac481
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Sep 1 18:16:27 2020 +0200
- added tirpc patch, build with libtirpc+rpcsvc-proto; release 7
openl2tp-tirpc.patch | 38 ++++++++++++++++++++++++++++++++++
openl2tp.spec | 58 +++++++++++++++++++++++++++++++++++++---------------
2 files changed, 80 insertions(+), 16 deletions(-)
---
diff --git a/openl2tp.spec b/openl2tp.spec
index ce0784e..38dac42 100644
--- a/openl2tp.spec
+++ b/openl2tp.spec
@@ -1,11 +1,11 @@
-#
Summary: An L2TP client/server, designed for VPN use
+Summary(pl.UTF-8): Klient/serwer L2TP, zaprojektowany pod kątem VPN
Name: openl2tp
Version: 1.8
-Release: 6
-License: GPL
+Release: 7
+License: GPL v2+
Group: Networking/Daemons
-Source0: http://dl.sourceforge.net//openl2tp/%{name}-%{version}.tar.gz
+Source0: http://downloads.sourceforge.net//openl2tp/%{name}-%{version}.tar.gz
# Source0-md5: e3d08dedfb9e6a9a1e24f6766f6dadd0
Source1: %{name}d.init
Source2: %{name}d.sysconfig
@@ -13,14 +13,19 @@ Source3: %{name}.tmpfiles
Patch0: %{name}-no_Werror.patch
Patch1: %{name}-setkey.patch
Patch2: no-hardcoded-libdir.patch
+Patch3: %{name}-tirpc.patch
URL: http://www.openl2tp.org/
BuildRequires: bison
BuildRequires: flex
+BuildRequires: libtirpc-devel
BuildRequires: linux-libc-headers >= 2.6.23
+BuildRequires: pkgconfig
BuildRequires: readline-devel >= 4.2
-Requires: portmap
+BuildRequires: rpcsvc-proto
+BuildRequires: rpmbuild(macros) >= 1.644
Requires: ppp >= 2.4.5
Requires: readline >= 4.2
+Requires: rpcbind
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -31,42 +36,63 @@ than 100 simultaneous connected users. It may also be used as a client
on a home PC or roadwarrior laptop.
OpenL2TP has been designed and implemented specifically for Linux. It
-consists of
-
+consists of:
- a daemon, openl2tpd, handling the L2TP control protocol exchanges
for all tunnels and sessions
-
- a plugin for pppd to allow its PPP connections to run over L2TP
sessions
-
- a Linux kernel driver for efficient datapath (integrated into the
standard kernel from 2.6.23).
-
- a command line application, l2tpconfig, for management.
+%description -l pl.UTF-8
+OpenL2TP to kompletna implementacja RFC2661 - Layer Two Tunneling
+Protocol (protokołu tunelowania warstwy drugiej) w wersji 2, będąca w
+stanie działać zarówno jako serwer, jak i klient. Nadaje się do użycia
+jako serwer VPN L2TP, obsługujący ponad 100 jednocześnie podłączonych
+użytkowników. Może być także używana jako klient na domowym komputerze
+lub podróżnym laptopie.
+
+OpenL2TP został zaprojektowany i zaimplementowany dla Linuksa. Składa
+się z:
+- demona openl2tpd, obsługującego protokół sterujący L2TP dla
+ wszystkich tuneli i sesji
+- wtyczki pppd, pozwalającej na uruchamianie połączeń PPP po sesjach
+ L2TP
+- serwownika jądra Linuksa umożliwiającego wydajne przesyłanie danych
+ (zintegrowanego do jądra od wersji 2.6.23)
+- aplikacji linii poleceń l2tpconfig do zarządzania.
+
%package devel
Summary: OpenL2TP support files for plugin development
+Summary(pl.UTF-8): Pliki OpenL2TP do tworzenia wtyczek
Group: Development/Libraries
%description devel
This package contains support files for building plugins for OpenL2TP,
or applications that use the OpenL2TP APIs.
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki wspomagające budowanie wtyczek OpenL2TP oraz
+aplikacji wykorzystujących API OpenL2TP.
+
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__make} -j1 \
- CFLAGS.optimize="%{rpmcflags}" \
+ CC="%{__cc}" \
+ CFLAGS.optimize="%{rpmcflags} %{rpmcppflags} $(pkg-config --cflags libtirpc)" \
SYS_LIBDIR=%{_libdir}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/var/run/%{name}} \
- $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+ $RPM_BUILD_ROOT%{systemdtmpfilesdir}
%{__make} install \
SYS_LIBDIR=%{_libdir} \
@@ -74,7 +100,7 @@ install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,/var/run/%{name}} \
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/openl2tpd
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/openl2tpd
-install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
touch $RPM_BUILD_ROOT%{_sysconfdir}/openl2tpd.conf
@@ -83,7 +109,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README LICENSE
+%doc CHANGES LICENSE README
%dir %{_libdir}/openl2tp
%attr(755,root,root) %{_bindir}/l2tpconfig
%attr(755,root,root) %{_sbindir}/openl2tpd
@@ -92,7 +118,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/openl2tp/ipsec.so
%attr(755,root,root) %{_libdir}/openl2tp/event_sock.so
%{_mandir}/man1/l2tpconfig.1*
-%{_mandir}/man4/openl2tp_rpc.4*
%{_mandir}/man5/openl2tpd.conf.5*
%{_mandir}/man7/openl2tp.7*
%{_mandir}/man8/openl2tpd.8*
@@ -100,7 +125,7 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/openl2tpd
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/openl2tpd.conf
%dir /var/run/%{name}
-/usr/lib/tmpfiles.d/%{name}.conf
+%{systemdtmpfilesdir}/%{name}.conf
%files devel
%defattr(644,root,root,755)
@@ -108,3 +133,4 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/openl2tp/l2tp_rpc.x
%{_libdir}/openl2tp/l2tp_event.h
%{_libdir}/openl2tp/event_sock.h
+%{_mandir}/man4/openl2tp_rpc.4*
diff --git a/openl2tp-tirpc.patch b/openl2tp-tirpc.patch
new file mode 100644
index 0000000..744ef07
--- /dev/null
+++ b/openl2tp-tirpc.patch
@@ -0,0 +1,38 @@
+--- openl2tp-1.8/l2tp_api.c.orig 2008-04-09 18:50:12.000000000 +0200
++++ openl2tp-1.8/l2tp_api.c 2020-08-31 21:05:56.928710570 +0200
+@@ -25,6 +25,7 @@
+
+ #include <rpc/pmap_clnt.h>
+ #include <net/ethernet.h>
++#include <netinet/in.h>
+
+ #include "usl.h"
+
+@@ -447,10 +448,12 @@
+ * non-loopback interface, reject the request.
+ */
+ if ((!l2tp_opt_remote_rpc) &&
+- ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
+- (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
++ memcmp(&xprt->xp_raddr.sin6_addr.s6_addr, &in6addr_loopback, 16) &&
++ memcmp(&xprt->xp_raddr.sin6_addr.s6_addr, &in6addr_any, 16)) {
+ if (l2tp_opt_trace_flags & L2TP_DEBUG_API) {
+- l2tp_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
++ char straddr[INET6_ADDRSTRLEN];
++ inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
++ l2tp_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
+ }
+ svcerr_auth(xprt, AUTH_TOOWEAK);
+ return -EPERM;
+--- openl2tp-1.8/Makefile.orig 2020-08-31 21:06:29.711866302 +0200
++++ openl2tp-1.8/Makefile 2020-08-31 21:07:45.718121207 +0200
+@@ -135,7 +135,7 @@
+ -MMD -Wall -Wno-strict-aliasing \
+ $(CPPFLAGS) $(CPPFLAGS.dmalloc) \
+ -DSYS_LIBDIR=$(SYS_LIBDIR)
+-LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc
+-LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
++LDFLAGS.l2tpd= -Wl,-E -L. -Lusl -lusl -ltirpc -ldl $(LIBS.dmalloc) -lc
++LDFLAGS.l2tpconfig= -Lcli -lcli -lreadline -ltirpc $(LIBS.dmalloc) $(READLINE_LDFLAGS) -lc
+
+ OPT_CFLAGS?= -O
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/openl2tp.git/commitdiff/536c1bf86098a1d21c7457fcdd15bc91ba8ac481
More information about the pld-cvs-commit
mailing list