xl2tpd-vl.spec 16 KB

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