source: projects/specs/trunk/x/xl2tpd/xl2tpd-vl.spec @ 12465

Revision 12465, 15.7 KB checked in by tomop, 4 years ago (diff)

updated 4 packages

librsvg2-2.48.8-1

nfs-utils-2.5.1-1

quota-4.05-1

xl2tpd-1.3.15-1

Line 
1%bcond_with systemd
2
3%define src_dir_name xl2tpd-%{version}
4
5Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
6Name: xl2tpd
7Version: 1.3.15
8Release: 1%{?_dist_release}%{?with_systemd:.systemd}
9Group: network,servers,security
10Vendor: Project Vine
11Distribution: Vine Linux
12Packager: tomop
13
14# No version specified.
15License: GPL+
16Url: http://www.xelerance.com/software/xl2tpd/
17Source0: https://github.com/xelerance/xl2tpd/archive/v%{version}.tar.gz#/xl2tpd-%{version}.tar.gz
18Source1: xl2tpd.service
19Source2: tmpfiles-xl2tpd.conf
20
21Patch1: 0001-fix-ppp-options.patch
22Patch2: 0002-fix-initscript.patch
23
24BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25Requires: ppp
26BuildRequires: libpcap-devel
27BuildRequires: openssl-devel
28%if %{with systemd}
29%{?systemd_requires}
30%else
31Requires(post): /sbin/chkconfig
32Requires(preun): /sbin/chkconfig
33Requires(preun): /sbin/service
34%endif
35
36%description
37xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
38L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user
39sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP
40servers. Another important application is Virtual Private Networks where
41the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec,
42RFC 3193). The L2TP/IPsec protocol is mainly used by Windows and
43Mac OS X clients. On Linux, xl2tpd can be used in combination with IPsec
44implementations such as Openswan.
45Example configuration files for such a setup are included in this RPM.
46
47xl2tpd works by opening a pseudo-tty for communicating with pppd.
48It runs completely in userspace.
49
50xl2tpd supports IPsec SA Reference tracking to enable overlapping internak
51NAT'ed IP's by different clients (eg all clients connecting from their
52linksys internal IP 192.168.1.101) as well as multiple clients behind
53the same NAT router.
54
55xl2tpd supports the pppol2tp kernel mode operations on 2.6.23 or higher,
56or via a patch in contrib for 2.4.x kernels.
57
58Xl2tpd is based on the 0.69 L2TP by Jeff McAdams <jeffm@iglou.com>
59It was de-facto maintained by Jacco de Leeuw <jacco2@dds.nl> in 2002 and 2003.
60
61
62%prep
63%autosetup -p1 -n %{src_dir_name}
64
65sed -i -e "s|/var/run|/run|" \
66        file.h \
67        l2tp.h \
68        xl2tpd-control.c \
69        packaging/fedora/xl2tpd.init \
70        doc/*
71
72%build
73export CFLAGS="$CFLAGS -fPIC -Wall -DTRUST_PPPD_TO_DIE"
74export DFLAGS="$RPM_OPT_FLAGS -g "
75export LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
76#DFLAGS="$RPM_OPT_FLAGS -g -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_FLOW -DDEBUG_PAYLOAD -DDEBUG_CONTROL -DDEBUG_CONTROL_XMIT -DDEBUG_FLOW_MORE -DDEBUG_MAGIC -DDEBUG_ENTROPY -DDEBUG_HIDDEN -DDEBUG_PPPD -DDEBUG_AAA -DDEBUG_FILE -DDEBUG_FLOW -DDEBUG_HELLO -DDEBUG_CLOSE -DDEBUG_ZLB -DDEBUG_AUTH"
77
78make %{_smp_mflags}
79
80
81%install
82rm -rf %{buildroot}
83make DESTDIR=%{buildroot} PREFIX=%{_prefix} install
84install -p -D -m644 examples/xl2tpd.conf %{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf
85install -p -D -m644 examples/ppp-options.xl2tpd %{buildroot}%{_sysconfdir}/ppp/options.xl2tpd
86install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/xl2tpd/l2tp-secrets
87install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
88install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
89
90%if %{with systemd}
91install -d 0755 %{buildroot}%{_unitdir}
92mkdir -p %{buildroot}/%{_tmpfilesdir}
93install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/xl2tpd.service
94install -m 0644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
95%else
96install -p -D -m755 packaging/fedora/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
97%endif
98
99
100%clean
101rm -rf %{buildroot}
102
103
104%post
105%if %{with systemd}
106%systemd_preun xl2tpd.service
107%else
108/sbin/chkconfig --add xl2tpd
109%endif
110
111%preun
112%if %{with systemd}
113%systemd_post xl2tpd.service
114%else
115if [ $1 -eq 0 -o /bin/systemctl ]; then
116  /sbin/service xl2tpd stop > /dev/null 2>&1
117  /sbin/chkconfig --del xl2tpd
118fi
119%endif
120
121%postun
122%if %{with systemd}
123%systemd_postun_with_restart xl2tpd.service
124%else
125if [ $1 -ge 1 ]; then
126  /sbin/service xl2tpd condrestart 2>&1 >/dev/null
127fi
128%endif
129
130
131%files
132%defattr(-,root,root)
133%license LICENSE
134%doc BUGS CHANGES CREDITS README* TODO
135%doc doc/README.patents examples/chapsecrets.sample
136%{_sbindir}/xl2tpd
137%{_sbindir}/xl2tpd-control
138%{_bindir}/pfc
139%{_mandir}/*/*
140%dir %{_sysconfdir}/xl2tpd
141%config(noreplace) %{_sysconfdir}/xl2tpd/*
142%config(noreplace) %{_sysconfdir}/ppp/*
143%ghost %dir /run/xl2tpd
144%ghost %attr(0600,root,root) /run/xl2tpd/l2tp-control
145%if %{with systemd}
146%{_unitdir}/*
147%{_tmpfilesdir}/*
148%else
149%attr(0755,root,root)  %{_initrddir}/xl2tpd
150%endif
151
152
153%changelog
154* Thu Aug 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.15-1
155- new upstream release.
156- added systemd support (disabled as default).
157
158* Sat Jan 26 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.13-1
159- new upstream release.
160
161* Tue Dec 19 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.10.1-1
162- new upstream release.
163
164* Tue Mar 21 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.9-1
165- new upstream release.
166
167* Wed Apr  2 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.6-1
168- new upstream release.
169
170* Sun Jan 05 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.3-1
171- new upstream release.
172
173* Sat Sep 29 2012 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.1-1
174- new upstream release.
175
176* Fri Sep 16 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.0-1
177- new upstream release.
178
179* Fri Apr 22 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.8-2
180- built for Vine Linux.
181
182* Wed Feb 23 2011 Paul Wouters <paul@xelerance.com> - 1.2.8-1
183- Updated to 1.2.8
184- Add ghosting for l2tp pipe (bz#656725)
185
186* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-3
187- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
188
189* Tue Nov 30 2010 Paul Wouters <paul@xelerance.com> - 1.2.7-2
190- fix md5 of init script in sources
191
192* Tue Nov 30 2010 Paul Wouters <paul@xelerance.com> - 1.2.7-1
193- Updated to 1.2.7
194- Added more DEBUG build options to the make command
195- Minor cleanups
196
197* Sat Jan 09 2010 Paul Wouters <paul@xelerance.com> - 1.2.5-2
198- Bump for EVR
199
200* Sat Jan 09 2010 Paul Wouters <paul@xelerance.com> - 1.2.5-1
201- Upgraded to 1.2.5. (fixes interop with two Windows machines behind same NAT)
202- Fix mix space/tab in spec file
203- Added missing keyword Default-Stop
204
205* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.4-4
206- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
207
208* Sun Mar 08 2009 Paul Wouters <paul@xelerance.com> - 1.2.4-3
209- Bump version for tagging mistake
210
211* Sun Mar 08 2009 Paul Wouters <paul@xelerance.com> - 1.2.4-2
212-Fix initscript for https://bugzilla.redhat.com/show_bug.cgi?id=247100
213
214* Sun Mar 08 2009 Paul Wouters <paul@xelerance.com> - 1.2.4-1
215- Upgraded to 1.2.4
216- Merged spec file with upstream
217
218* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
219- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
220
221* Thu Oct  9 2008 Paul Wouters <paul@xelerance.com> - 1.2.0-1
222- Updated to new upstream release
223
224* Sat Sep  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.1.12-3
225- fix license tag
226
227* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.12-2
228- Autorebuild for GCC 4.3
229
230* Fri Oct 26 2007 Paul Wouters <paul@xelerance.com> 1.1.12-1
231- Upgraded to new release upstream
232- Removed l2tpd to xl2tpd migration in post
233
234* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.1.11-3
235- Rebuild for selinux ppc32 issue.
236
237* Sat Jul 28 2007 Paul Wouters <paul@xelerance.com> 1.1.11-2
238- Upgraded to 1.1.11
239- Include new split README.*
240
241* Mon Mar 19 2007 Paul Wouters <paul@xelerance.com> 1.1.09-1
242- Upgraded to 1.1.09
243
244* Fri Feb 23 2007 Paul Wouters <paul@xelerance.com> 1.1.08-2
245- Bump for EVR
246
247* Fri Feb 23 2007 Paul Wouters <paul@xelerance.com> 1.1.08-1
248- Upgraded to 1.1.08
249- This works around the ppp-2.4.2-6.4 issue of not dying on SIGTERM
250
251* Tue Feb 20 2007 Paul Wouters <paul@xelerance.com> 1.1.07-2
252- Fixed version usage in source macro
253
254* Tue Feb 20 2007 Paul Wouters <paul@xelerance.com> 1.1.07-1
255- Upgraded to 1.1.07
256- Added /var/run/xl2tpd to the spec file so this pacakge
257  owns /var/run/xl2tpd
258 
259* Thu Dec  7 2006 Paul Wouters <paul@xelerance.com> 1.1.06-5
260- Changed space/tab replacing method
261
262* Wed Dec  6 2006 Paul Wouters <paul@xelerance.com> 1.1.06-4
263- Added -p to keep original timestamps
264- Added temporary hack to change space/tab in init file.
265- Added /sbin/service dependancy
266
267* Tue Dec  5 2006 Paul Wouters <paul@xelerance.com> 1.1.06-3
268- Added Requires(post) / Requires(preun)
269- changed init file to create /var/run/xl2tpd fixed a tab/space
270- changed control file to be within /var/run/xl2tpd/
271
272* Tue Dec  5 2006 Paul Wouters <paul@xelerance.com> 1.1.06-2
273- Changed Mr. Karlsen's name to not be a utf8 problem
274- Fixed Obosoletes/Provides to be more specific wrt l2tpd.
275- Added dist tag which accidentally got deleted.
276
277* Mon Dec  4 2006 Paul Wouters <paul@xelerance.com> 1.1.06-1
278- Rebased spec file on Fedora Extras copy, but using xl2tpd as package name
279
280* Sun Nov 27 2005 Paul Wouters <paul@xelerance.com> 0.69.20051030
281- Pulled up sourceforget.net CVS fixes.
282- various debugging added, but debugging should not be on by default.
283- async/sync conversion routines must be ready for possibility that the read
284  will block due to routing loops.
285- refactor control socket handling.
286- move all logic about pty usage to pty.c. Try ptmx first, if it fails try
287  legacy ptys
288- rename log() to l2tp_log(), as "log" is a math function.
289- if we aren't deamonized, then log to stderr.
290- added install: and DESTDIR support.
291
292* Thu Oct 20 2005 Paul Wouters <paul@xelerance.com> 0.69-13
293- Removed suse/mandrake specifics. Comply for Fedora Extras guidelines
294
295* Tue Jun 21 2005 Jacco de Leeuw <jacco2@dds.nl> 0.69-12jdl
296- Added log() patch by Paul Wouters so that l2tpd compiles on FC4.
297
298* Sat Jun 4 2005 Jacco de Leeuw <jacco2@dds.nl>
299- l2tpd.org has been hijacked. Project moved back to SourceForge:
300  http://l2tpd.sourceforge.net
301
302* Tue May 3 2005 Jacco de Leeuw <jacco2@dds.nl>
303- Small Makefile fixes. Explicitly use gcc instead of cc.
304  Network services library was not linked on Solaris due to typo.
305
306* Thu Mar 17 2005 Jacco de Leeuw <jacco2@dds.nl> 0.69-11jdl
307- Choosing between SysV or BSD style ptys is now configurable through
308  a compile-time boolean "unix98pty".
309
310* Fri Feb 4 2005 Jacco de Leeuw <jacco2@dds.nl>
311- Added code from Roaring Penguin (rp-l2tp) to support SysV-style ptys.
312  Requires the N_HDLC kernel module.
313
314* Fri Nov 26 2004 Jacco de Leeuw <jacco2@dds.nl>
315- Updated the README.
316
317* Wed Nov 10 2004 Jacco de Leeuw <jacco2@dds.nl> 0.69-10jdl
318- Patch by Marald Klein and Roger Luethi. Fixes writing PID file.
319  (http://l2tpd.graffl.net/msg01790.html)
320  Long overdue. Rereleasing 10jdl.
321
322* Tue Nov 9 2004 Jacco de Leeuw <jacco2@dds.nl> 0.69-10jdl
323- [SECURITY FIX] Added fix from Debian because of a bss-based
324  buffer overflow.
325  (http://www.mail-archive.com/l2tpd-devel@l2tpd.org/msg01071.html)
326- Mandrake's FreeS/WAN, Openswan and Strongswan RPMS use configuration
327  directories /etc/{freeswan,openswan,strongswan}. Install our
328  configuration files to /etc/ipsec.d and create symbolic links in
329  those directories.
330
331* Wed Aug 18 2004 Jacco de Leeuw <jacco2@dds.nl>
332- Removed 'leftnexthop=' lines. Not relevant for recent versions
333  of FreeS/WAN and derivates.
334
335* Tue Jan 20 2004 Jacco de Leeuw <jacco2@dds.nl>  0.69-9jdl
336- Added "noccp" because of too much MPPE/CCP messages sometimes.
337
338* Wed Dec 31 2003 Jacco de Leeuw <jacco2@dds.nl>
339- Added patch in order to prevent StopCCN messages.
340
341* Sat Aug 23 2003 Jacco de Leeuw <jacco2@dds.nl>
342- MTU/MRU 1410 seems to be the lowest possible for MSL2TP.
343  For Windows 2000/XP it doesn't seem to matter.
344- Typo in l2tpd.conf (192.168.128/25).
345
346* Fri Aug 8 2003 Jacco de Leeuw <jacco2@dds.nl>  0.69-8jdl
347- Added MTU/MRU 1400 to options.l2tpd. I don't know the optimal
348  value but some apps had problems with the default value.
349
350* Fri Aug 1 2003 Jacco de Leeuw <jacco2@dds.nl>
351- Added workaround for the missing hostname bug in the MSL2TP client
352  ('Specify your hostname', error 629: "You have been disconnected
353  from the computer you are dialing").
354
355* Sun Jul 20 2003 Jacco de Leeuw <jacco2@dds.nl>  0.69-7jdl
356- Added the "listen-addr" global parameter for l2tpd.conf. By
357  default, the daemon listens on *all* interfaces. Use
358  "listen-addr" if you want it to bind to one specific
359  IP address (interface), for security reasons. (See also:
360  http://www.jacco2.dds.nl/networking/freeswan-l2tp.html#Firewallwarning)
361- Explained in l2tpd.conf that two different IP addresses should be
362  used for 'listen-addr' and 'local ip'.
363- Modified init script. Upgrades should work better now. You
364  still need to start/chkconfig l2tpd manually.
365- Renamed the example Openswan .conf files to better reflect
366  the situation. There are two variants using different portselectors.
367  Previously I thought Windows 2000/XP used portselector 17/0
368  and the rest used 17/1701. But with the release of an updated
369  IPsec client by Microsoft, it turns out that 17/0 must have
370  been a mistake: the updated client now also uses 17/1701.
371
372* Thu Apr 10 2003 Jacco de Leeuw <jacco2@dds.nl>  0.69-6jdl
373- Changed sample chap-secrets to be valid only for specific
374  IP addresses.
375
376* Thu Mar 13 2003 Bernhard Thoni <tech-role@tronicplanet.de>
377- Adjustments for SuSE8.x (thanks, Bernhard!)
378- Added sample chap-secrets.
379
380* Thu Mar 6 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-5jdl
381- Replaced Dominique's patch by Damion de Soto's, which does not
382  depend on the N_HDLC kernel module.
383
384* Wed Feb 26 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-4jdl
385- Seperate example config files for Win9x (MSL2TP) and Win2K/XP
386  due to left/rightprotoport differences.
387  Fixing preun for Red Hat.
388
389* Mon Feb 3 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-3jdl
390- Mandrake uses /etc/freeswan/ instead of /etc/ipsec.d/
391  Error fixed: source6 was used for both PSK and CERT.
392
393* Wed Jan 29 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-3jdl
394- Added Dominique Cressatti's pty patch in another attempt to
395  prevent the Windows 2000 Professional "loopback detected" error.
396  Seems to work!
397
398* Wed Dec 25 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-2jdl
399- Added 'connect-delay' to PPP parameters in an attempt to
400  prevent the Windows 2000 Professional "loopback detected" error.
401  Didn't seem to work.
402
403* Fri Dec 13 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-1jdl
404- Did not build on Red Hat 8.0. Solved by adding comments(?!).
405  Bug detected in spec file: chkconfig --list l2tpd does not work
406  on Red Hat 8.0. Not important enough to look into yet.
407
408* Sun Nov 17 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-1jdl
409- Tested on Red Hat, required some changes. No gprintf. Used different
410  pty patch, otherwise wouldn't run. Added buildroot sanity check.
411
412* Sun Nov 10 2002 Jacco de Leeuw <jacco2@dds.nl>
413- Specfile adapted from Mandrake Cooker. The original RPM can be
414  retrieved through:
415  http://www.rpmfind.net/linux/rpm2html/search.php?query=l2tpd
416- Config path changed from /etc/l2tp/ to /etc/l2tpd/
417  (Seems more logical and rp-l2tp already uses /etc/l2tp/).
418- Do not run at boot or install. The original RPM uses a config file
419  which is completely commented out, but it still starts l2tpd on all
420  interfaces. Could be a security risk. This RPM does not start l2tpd,
421  the sysadmin has to edit the config file and start l2tpd explicitly.
422- Renamed patches to start with l2tpd-
423- Added dependencies for pppd, glibc-devel.
424- Use %%{name} as much as possible.
425- l2tp-secrets contains passwords, thus should not be world readable.
426- Removed dependency on rpm-helper.
427
428* Mon Oct 21 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.69-3mdk
429- from Per 0yvind Karlsen <peroyvind@delonic.no> :
430 - PreReq and Requires
431 - Fix preun_service
432
433* Thu Oct 17 2002 Per 0yvind Karlsen <peroyvind@delonic.no> 0.69-2mdk
434- Move l2tpd from /usr/bin to /usr/sbin
435- Added SysV initscript
436- Patch0
437- Patch1
438
439* Thu Oct 17 2002 Per 0yvind Karlsen <peroyvind@delonic.no> 0.69-1mdk
440- Initial release
Note: See TracBrowser for help on using the repository browser.