Allow IPv6 address entry in tools>ping - Loosens valid character check
[tomato/davidwu.git] / release / src / router / xl2tpd / packaging / suse / xl2tpd.spec
blobf732b732ce7df42145d85e7cbf77bf9dc49995ef
1 Summary: Layer 2 Tunnelling Protocol Daemon (RFC 2661)
2 Name: xl2tpd
3 Version: 1.3.0
4 Release: 1%{?dist}
5 License: GPLv2
6 Url: http://www.xelerance.com/software/xl2tpd/
7 Group: System Environment/Daemons
8 Source0: http://www.xelerance.com/software/xl2tpd/xl2tpd-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
10 Requires: ppp >= 2.4.3
11 %if %{sles_version} == 0
12 BuildRequires: linux-kernel-headers => 2.6.19, libpcap-devel
13 %else
14 BuildRequires: glibc-devel, libpcap
15 %endif
16 Obsoletes: l2tpd <= 0.69
17 Provides: l2tpd = 0.69
18 Requires(post): /sbin/chkconfig
19 Requires(preun): /sbin/chkconfig
20 Requires(preun): /sbin/service
22 %description
23 xl2tpd is an implementation of the Layer 2 Tunnelling Protocol (RFC 2661).
24 L2TP allows you to tunnel PPP over UDP. Some ISPs use L2TP to tunnel user
25 sessions from dial-in servers (modem banks, ADSL DSLAMs) to back-end PPP
26 servers. Another important application is Virtual Private Networks where
27 the IPsec protocol is used to secure the L2TP connection (L2TP/IPsec,
28 RFC 3193). The L2TP/IPsec protocol is mainly used by Windows and
29 Mac OS X clients. On Linux, xl2tpd can be used in combination with IPsec
30 implementations such as Openswan.
31 Example configuration files for such a setup are included in this RPM.
33 xl2tpd works by opening a pseudo-tty for communicating with pppd.
34 It runs completely in userspace but supports kernel mode L2TP.
36 xl2tpd supports IPsec SA Reference tracking to enable overlapping internak
37 NAT'ed IP's by different clients (eg all clients connecting from their
38 linksys internal IP 192.168.1.101) as well as multiple clients behind
39 the same NAT router.
41 xl2tpd supports the pppol2tp kernel mode operations on 2.6.23 or higher,
42 or via a patch in contrib for 2.4.x kernels.
44 Xl2tpd is based on the 0.69 L2TP by Jeff McAdams <jeffm@iglou.com>
45 It was de-facto maintained by Jacco de Leeuw <jacco2@dds.nl> in 2002 and 2003.
47 %prep
48 %setup -q
50 %build
51 make DFLAGS="$RPM_OPT_FLAGS -g -DDEBUG_PPPD -DDEBUG_CONTROL -DDEBUG_ENTROPY -DTRUST_PPPD_TO_DIE"
53 %install
54 rm -rf %{buildroot}
55 make PREFIX=%{_prefix} DESTDIR=%{buildroot} MANDIR=%{buildroot}/%{_mandir} install
56 install -p -D -m644 examples/xl2tpd.conf %{buildroot}%{_sysconfdir}/xl2tpd/xl2tpd.conf
57 install -p -D -m644 examples/ppp-options.xl2tpd %{buildroot}%{_sysconfdir}/ppp/options.xl2tpd
58 install -p -D -m600 doc/l2tp-secrets.sample %{buildroot}%{_sysconfdir}/xl2tpd/l2tp-secrets
59 install -p -D -m600 examples/chapsecrets.sample %{buildroot}%{_sysconfdir}/ppp/chap-secrets.sample
60 install -p -D -m755 packaging/suse/xl2tpd.init %{buildroot}%{_initrddir}/xl2tpd
61 ln -sf /etc/init.d/xl2tpd $RPM_BUILD_ROOT/usr/sbin/rcxl2tpd
62 install -p -D -m755 -d %{buildroot}%{_localstatedir}/run/xl2tpd
65 %clean
66 rm -rf %{buildroot}
68 %post
69 %{fillup_and_insserv xl2tpd}
71 /sbin/chkconfig --add xl2tpd
72 # if we migrate from l2tpd to xl2tpd, copy the configs
73 if [ -f /etc/l2tpd/l2tpd.conf ]
74 then
75 echo "Old /etc/l2tpd configuration found, migrating to /etc/xl2tpd"
76 mv /etc/xl2tpd/xl2tpd.conf /etc/xl2tpd/xl2tpd.conf.rpmsave
77 cat /etc/l2tpd/l2tpd.conf | sed "s/options.l2tpd/options.xl2tpd/" > /etc/xl2tpd/xl2tpd.conf
78 mv /etc/ppp/options.xl2tpd /etc/ppp/options.xl2tpd.rpmsave
79 mv /etc/ppp/options.l2tpd /etc/ppp/options.xl2tpd
80 mv /etc/xl2tpd/l2tp-secrets /etc/xl2tpd/l2tpd-secrets.rpmsave
81 cp -pa /etc/l2tpd/l2tp-secrets /etc/xl2tpd/l2tp-secrets
86 %preun
87 %stop_on_removal xl2tpd
88 exit 0
90 %postun
91 %restart_on_update xl2tpd
92 %insserv_cleanup
93 exit 0
95 %files
96 %defattr(-,root,root)
97 %doc BUGS CHANGES CREDITS LICENSE README.* TODO doc/rfc2661.txt
98 %doc doc/README.patents examples/chapsecrets.sample
99 %{_sbindir}/rcxl2tpd
100 %{_sbindir}/xl2tpd
101 %{_bindir}/pfc
102 %{_mandir}/*/*
103 %dir %{_sysconfdir}/xl2tpd
104 %config(noreplace) %{_sysconfdir}/xl2tpd/*
105 %config(noreplace) %{_sysconfdir}/ppp/*
106 %attr(0755,root,root) %{_initrddir}/xl2tpd
107 %dir %{_localstatedir}/run/xl2tpd
109 %changelog
110 * Sun Oct 26 2008 Paul Wouters <paul@xelerance.com> 1.2.2-1
111 - Updated Suse init scripts and spec file
112 - Added pfc for pppd's precompiled-active-filter
114 * Fri Apr 18 2008 Paul Wouters <paul@xelerance.com> 1.2.1-1
115 - Updated Suse init scripts and spec file
117 * Tue Jun 26 2007 Paul Wouters <paul@xelerance.com> 1.1.11-1
118 - Minor changes to spec file to accomodate new README files
120 * Fri Feb 23 2007 Paul Wouters <paul@xelerance.com> 1.1.08-1
121 - Upgraded to 1.1.08
122 - This works around the ppp-2.4.2-6.4 issue of not dying on SIGTERM
124 * Mon Feb 19 2007 Paul Wouters <paul@xelerance.com> 1.1.07-2
125 - Upgraded to 1.1.07
126 - Fixes from Tuomo Soini for pidfile handling with Fedora
127 - Fix hardcoded version for Source in spec file.
129 * Thu Dec 7 2006 Paul Wouters <paul@xelerance.com> 1.1.06-5
130 - Changed space/tab replacing method
132 * Wed Dec 6 2006 Paul Wouters <paul@xelerance.com> 1.1.06-4
133 - Added -p to keep original timestamps
134 - Added temporary hack to change space/tab in init file.
135 - Added /sbin/service dependancy
137 * Tue Dec 5 2006 Paul Wouters <paul@xelerance.com> 1.1.06-3
138 - Added Requires(post) / Requires(preun)
139 - changed init file to create /var/run/xl2tpd fixed a tab/space
140 - changed control file to be within /var/run/xl2tpd/
142 * Tue Dec 5 2006 Paul Wouters <paul@xelerance.com> 1.1.06-2
143 - Changed Mr. Karlsen's name to not be a utf8 problem
144 - Fixed Obosoletes/Provides to be more specific wrt l2tpd.
145 - Added dist tag which accidentally got deleted.
147 * Mon Dec 4 2006 Paul Wouters <paul@xelerance.com> 1.1.06-1
148 - Rebased spec file on Fedora Extras copy, but using xl2tpd as package name
150 * Sun Nov 27 2005 Paul Wouters <paul@xelerance.com> 0.69.20051030
151 - Pulled up sourceforget.net CVS fixes.
152 - various debugging added, but debugging should not be on by default.
153 - async/sync conversion routines must be ready for possibility that the read
154 will block due to routing loops.
155 - refactor control socket handling.
156 - move all logic about pty usage to pty.c. Try ptmx first, if it fails try
157 legacy ptys
158 - rename log() to l2tp_log(), as "log" is a math function.
159 - if we aren't deamonized, then log to stderr.
160 - added install: and DESTDIR support.
162 * Thu Oct 20 2005 Paul Wouters <paul@xelerance.com> 0.69-13
163 - Removed suse/mandrake specifics. Comply for Fedora Extras guidelines
165 * Tue Jun 21 2005 Jacco de Leeuw <jacco2@dds.nl> 0.69-12jdl
166 - Added log() patch by Paul Wouters so that l2tpd compiles on FC4.
168 * Sat Jun 4 2005 Jacco de Leeuw <jacco2@dds.nl>
169 - l2tpd.org has been hijacked. Project moved back to SourceForge:
170 http://l2tpd.sourceforge.net
172 * Tue May 3 2005 Jacco de Leeuw <jacco2@dds.nl>
173 - Small Makefile fixes. Explicitly use gcc instead of cc.
174 Network services library was not linked on Solaris due to typo.
176 * Thu Mar 17 2005 Jacco de Leeuw <jacco2@dds.nl> 0.69-11jdl
177 - Choosing between SysV or BSD style ptys is now configurable through
178 a compile-time boolean "unix98pty".
180 * Fri Feb 4 2005 Jacco de Leeuw <jacco2@dds.nl>
181 - Added code from Roaring Penguin (rp-l2tp) to support SysV-style ptys.
182 Requires the N_HDLC kernel module.
184 * Fri Nov 26 2004 Jacco de Leeuw <jacco2@dds.nl>
185 - Updated the README.
187 * Wed Nov 10 2004 Jacco de Leeuw <jacco2@dds.nl> 0.69-10jdl
188 - Patch by Marald Klein and Roger Luethi. Fixes writing PID file.
189 (http://l2tpd.graffl.net/msg01790.html)
190 Long overdue. Rereleasing 10jdl.
192 * Tue Nov 9 2004 Jacco de Leeuw <jacco2@dds.nl> 0.69-10jdl
193 - [SECURITY FIX] Added fix from Debian because of a bss-based
194 buffer overflow.
195 (http://www.mail-archive.com/l2tpd-devel@l2tpd.org/msg01071.html)
196 - Mandrake's FreeS/WAN, Openswan and Strongswan RPMS use configuration
197 directories /etc/{freeswan,openswan,strongswan}. Install our
198 configuration files to /etc/ipsec.d and create symbolic links in
199 those directories.
201 * Tue Aug 18 2004 Jacco de Leeuw <jacco2@dds.nl>
202 - Removed 'leftnexthop=' lines. Not relevant for recent versions
203 of FreeS/WAN and derivates.
205 * Tue Jan 20 2004 Jacco de Leeuw <jacco2@dds.nl> 0.69-9jdl
206 - Added "noccp" because of too much MPPE/CCP messages sometimes.
208 * Wed Dec 31 2003 Jacco de Leeuw <jacco2@dds.nl>
209 - Added patch in order to prevent StopCCN messages.
211 * Sat Aug 23 2003 Jacco de Leeuw <jacco2@dds.nl>
212 - MTU/MRU 1410 seems to be the lowest possible for MSL2TP.
213 For Windows 2000/XP it doesn't seem to matter.
214 - Typo in l2tpd.conf (192.168.128/25).
216 * Fri Aug 8 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-8jdl
217 - Added MTU/MRU 1400 to options.l2tpd. I don't know the optimal
218 value but some apps had problems with the default value.
220 * Fri Aug 1 2003 Jacco de Leeuw <jacco2@dds.nl>
221 - Added workaround for the missing hostname bug in the MSL2TP client
222 ('Specify your hostname', error 629: "You have been disconnected
223 from the computer you are dialing").
225 * Thu Jul 20 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-7jdl
226 - Added the "listen-addr" global parameter for l2tpd.conf. By
227 default, the daemon listens on *all* interfaces. Use
228 "listen-addr" if you want it to bind to one specific
229 IP address (interface), for security reasons. (See also:
230 http://www.jacco2.dds.nl/networking/freeswan-l2tp.html#Firewallwarning)
231 - Explained in l2tpd.conf that two different IP addresses should be
232 used for 'listen-addr' and 'local ip'.
233 - Modified init script. Upgrades should work better now. You
234 still need to start/chkconfig l2tpd manually.
235 - Renamed the example Openswan .conf files to better reflect
236 the situation. There are two variants using different portselectors.
237 Previously I thought Windows 2000/XP used portselector 17/0
238 and the rest used 17/1701. But with the release of an updated
239 IPsec client by Microsoft, it turns out that 17/0 must have
240 been a mistake: the updated client now also uses 17/1701.
242 * Mon Apr 10 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-6jdl
243 - Changed sample chap-secrets to be valid only for specific
244 IP addresses.
246 * Thu Mar 13 2003 Bernhard Thoni <tech-role@tronicplanet.de>
247 - Adjustments for SuSE8.x (thanks, Bernhard!)
248 - Added sample chap-secrets.
250 * Thu Mar 6 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-5jdl
251 - Replaced Dominique's patch by Damion de Soto's, which does not
252 depend on the N_HDLC kernel module.
254 * Wed Feb 26 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-4jdl
255 - Seperate example config files for Win9x (MSL2TP) and Win2K/XP
256 due to left/rightprotoport differences.
257 Fixing preun for Red Hat.
259 * Mon Feb 3 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-3jdl
260 - Mandrake uses /etc/freeswan/ instead of /etc/ipsec.d/
261 Error fixed: source6 was used for both PSK and CERT.
263 * Wed Jan 29 2003 Jacco de Leeuw <jacco2@dds.nl> 0.69-3jdl
264 - Added Dominique Cressatti's pty patch in another attempt to
265 prevent the Windows 2000 Professional "loopback detected" error.
266 Seems to work!
268 * Wed Dec 25 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-2jdl
269 - Added 'connect-delay' to PPP parameters in an attempt to
270 prevent the Windows 2000 Professional "loopback detected" error.
271 Didn't seem to work.
273 * Fri Dec 13 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-1jdl
274 - Did not build on Red Hat 8.0. Solved by adding comments(?!).
275 Bug detected in spec file: chkconfig --list l2tpd does not work
276 on Red Hat 8.0. Not important enough to look into yet.
278 * Sun Nov 17 2002 Jacco de Leeuw <jacco2@dds.nl> 0.69-1jdl
279 - Tested on Red Hat, required some changes. No gprintf. Used different
280 pty patch, otherwise wouldn't run. Added buildroot sanity check.
282 * Sun Nov 10 2002 Jacco de Leeuw <jacco2@dds.nl>
283 - Specfile adapted from Mandrake Cooker. The original RPM can be
284 retrieved through:
285 http://www.rpmfind.net/linux/rpm2html/search.php?query=l2tpd
286 - Config path changed from /etc/l2tp/ to /etc/l2tpd/
287 (Seems more logical and rp-l2tp already uses /etc/l2tp/).
288 - Do not run at boot or install. The original RPM uses a config file
289 which is completely commented out, but it still starts l2tpd on all
290 interfaces. Could be a security risk. This RPM does not start l2tpd,
291 the sysadmin has to edit the config file and start l2tpd explicitly.
292 - Renamed patches to start with l2tpd-
293 - Added dependencies for pppd, glibc-devel.
294 - Use %%{name} as much as possible.
295 - l2tp-secrets contains passwords, thus should not be world readable.
296 - Removed dependency on rpm-helper.
298 * Mon Oct 21 2002 Lenny Cartier <lenny@mandrakesoft.com> 0.69-3mdk
299 - from Per 0yvind Karlsen <peroyvind@delonic.no> :
300 - PreReq and Requires
301 - Fix preun_service
303 * Thu Oct 17 2002 Per 0yvind Karlsen <peroyvind@delonic.no> 0.69-2mdk
304 - Move l2tpd from /usr/bin to /usr/sbin
305 - Added SysV initscript
306 - Patch0
307 - Patch1
309 * Thu Oct 17 2002 Per 0yvind Karlsen <peroyvind@delonic.no> 0.69-1mdk
310 - Initial release