source: projects/specs/trunk/o/openvpn/openvpn-vl.spec @ 521

Revision 521, 12.5 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define prerelease rc9
2
3%define plugins down-root auth-pam
4
5Name:              openvpn
6Version:           2.1
7Release:           0.1.rc9%{?_dist_release}
8Summary:           A full-featured SSL VPN solution
9Summary(ja):       SSL VPN ソリューション
10License:           GPLv2
11Group:             Applications/Internet
12URL:               http://openvpn.net/
13
14#Source0:           http://openvpn.net/beta/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
15#Source0:           https://secure.openvpn.net/beta/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
16Source0:           http://openvpn.net/release/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz
17#Source1:           https://secure.openvpn.net/beta/signatures/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz.asc
18Source1:           http://openvpn.net/signatures/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.gz.asc
19# Sample 2.0 config files
20Source2:           roadwarrior-server.conf
21Source3:           roadwarrior-client.conf
22# Don't start openvpn by default.
23Patch0:            openvpn-init.patch
24
25BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
26BuildRequires:     lzo-devel
27BuildRequires:     openssl-devel
28BuildRequires:     pam-devel
29BuildRequires:     iproute
30Requires:          iproute
31# For ifconfig and route.
32Requires:          net-tools
33Requires(pre):     /usr/sbin/useradd
34Requires(post):    /sbin/chkconfig
35Requires(preun):   /sbin/chkconfig, /sbin/service
36Requires(postun):  /sbin/service
37
38# Filter out the perl(Authen::PAM) dependency.
39# No perl dependency is really needed at all.
40%define __perl_requires sh -c 'cat > /dev/null'
41
42%description
43OpenVPN is a robust and highly flexible tunneling application that uses all
44of the encryption, authentication, and certification features of the
45OpenSSL library to securely tunnel IP networks over a single UDP or TCP
46port.  It can use the Marcus Franz Xaver Johannes Oberhumer's LZO library
47for compression.
48
49%prep
50%setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}}
51%patch0 -p0
52sed -i -e 's,%{_datadir}/openvpn/plugin,%{_libdir}/openvpn/plugin,' openvpn.8
53
54# %%doc items shouldn't be executable.
55find contrib sample-config-files sample-keys sample-scripts -type f -perm +100 \
56    -exec chmod a-x {} \;
57
58%build
59#  --enable-pthread        Enable pthread support (Experimental for OpenVPN 2.0)
60#  --enable-password-save  Allow --askpass and --auth-user-pass passwords to be
61#                          read from a file
62#  --enable-iproute2       Enable support for iproute2
63#  --with-ifconfig-path=PATH   Path to ifconfig tool
64#  --with-iproute-path=PATH    Path to iproute tool
65#  --with-route-path=PATH  Path to route tool
66%configure \
67    --enable-pthread \
68    --enable-password-save \
69    --enable-iproute2 \
70    --with-ifconfig-path=/sbin/ifconfig \
71    --with-iproute-path=/sbin/ip \
72    --with-route-path=/sbin/route
73%{__make}
74
75# Build plugins
76for plugin in %{plugins} ; do
77    %{__make} -C plugin/$plugin
78done
79
80%check
81# Test Crypto:
82./openvpn --genkey --secret key
83./openvpn --test-crypto --secret key
84
85# Randomize ports for tests to avoid conflicts on the build servers.
86cport=$[ 50000 + ($RANDOM % 15534) ]
87sport=$[ $cport + 1 ]
88sed -e 's/^\(rport\) .*$/\1 '$sport'/' \
89    -e 's/^\(lport\) .*$/\1 '$cport'/' \
90    < sample-config-files/loopback-client \
91    > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client
92sed -e 's/^\(rport\) .*$/\1 '$cport'/' \
93    -e 's/^\(lport\) .*$/\1 '$sport'/' \
94    < sample-config-files/loopback-server \
95    > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
96
97# Test SSL/TLS negotiations (runs for 2 minutes):
98./openvpn --config \
99    %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client &
100./openvpn --config \
101    %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
102wait
103
104rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
105    %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
106
107%install
108rm -rf $RPM_BUILD_ROOT
109
110install -D -m 0644 %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
111install -D -m 0755 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
112install -D -m 0755 sample-scripts/%{name}.init \
113    $RPM_BUILD_ROOT%{_initrddir}/%{name}
114install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
115
116mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
117cp -pR easy-rsa $RPM_BUILD_ROOT%{_datadir}/%{name}/
118rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/easy-rsa/Windows
119cp %{SOURCE2} %{SOURCE3} sample-config-files/
120
121mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib
122for plugin in %{plugins} ; do
123    install -m 0755 plugin/$plugin/openvpn-$plugin.so \
124        $RPM_BUILD_ROOT%{_libdir}/%{name}/plugin/lib/openvpn-$plugin.so
125    cp plugin/$plugin/README plugin/$plugin.txt
126done
127
128mkdir -m 755 -p $RPM_BUILD_ROOT%{_var}/run/%{name}
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
133%pre
134if ! id openvpn > /dev/null 2>&1 ; then
135    /usr/sbin/useradd -r -s /sbin/nologin -c OpenVPN -d /etc/openvpn openvpn
136fi
137
138%post
139/sbin/chkconfig --add %{name}
140
141%preun
142if [ "$1" = 0 ]; then
143    /sbin/service %{name} stop
144    /sbin/chkconfig --del %{name}
145fi
146
147%postun
148if [ "$1" -ge 1 ]; then
149    /sbin/service %{name} condrestart >/dev/null 2>&1
150fi
151
152%files
153%defattr(-,root,root,0755)
154%doc AUTHORS COPYING COPYRIGHT.GPL INSTALL PORTS README
155# Add NEWS when it isn't zero-length.
156%doc plugin/*.txt
157%doc contrib sample-config-files sample-keys sample-scripts
158%{_mandir}/man8/%{name}.8*
159%{_sbindir}/%{name}
160%{_datadir}/%{name}/
161%{_libdir}/%{name}/
162%{_initrddir}/%{name}
163%{_var}/run/%{name}/
164%config %dir %{_sysconfdir}/%{name}/
165
166%changelog
167* Mon Aug 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1-0.1.rc9
168- initial build for Vine Linux
169
170* Fri Aug 01 2008 Steven Pritchard <steve@kspei.com> 2.1-0.27.rc9
171- Update to 2.1_rc9.
172
173* Sat Jun 14 2008 Steven Pritchard <steve@kspei.com> 2.1-0.26.rc8
174- Update to 2.1_rc8.
175- Update License tag.
176
177* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.1-0.25.rc7
178- Autorebuild for GCC 4.3
179
180* Tue Jan 29 2008 Steven Pritchard <steve@kspei.com> 2.1-0.24.rc7
181- Update to 2.1_rc7
182- Drop BETA21-userpriv-fixups.patch (upstream)
183
184* Fri Jan 25 2008 Steven Pritchard <steve@kspei.com> 2.1-0.23.rc6
185- Apply update to BETA21-userpriv-fixups.patch from Alon Bar-Lev
186
187* Thu Jan 24 2008 Steven Pritchard <steve@kspei.com> 2.1-0.22.rc6
188- Update to 2.1_rc6
189- Pass paths to ifconfig, ip, and route to configure
190- BR iproute and Require iproute and net-tools
191- Add BETA21-userpriv-fixups.patch from Alon Bar-Lev
192
193* Wed Jan 23 2008 Steven Pritchard <steve@kspei.com> 2.1-0.21.rc5
194- Update to 2.1_rc5
195
196* Wed Dec 05 2007 Steven Pritchard <steve@kspei.com> 2.1-0.20.rc4
197- Remove check macro cruft.
198
199* Thu Apr 26 2007 Steven Pritchard <steve@kspei.com> 2.1-0.19.rc4
200- Update to 2.1_rc4
201
202* Mon Apr 23 2007 Steven Pritchard <steve@kspei.com> 2.1-0.18.rc3
203- Update to 2.1_rc3
204
205* Fri Mar 02 2007 Steven Pritchard <steve@kspei.com> 2.1-0.17.rc2
206- Update to 2.1_rc2
207
208* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.16.rc1
209- Randomize ports for tests to avoid conflicts on the build servers
210
211* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.15.rc1
212- Update to 2.1_rc1
213
214* Mon Oct 02 2006 Steven Pritchard <steve@kspei.com> 2.1-0.14.beta16
215- Update to 2.1_beta16
216- Drop Paul's patch (in upstream)
217
218* Tue Sep 12 2006 Steven Pritchard <steve@kspei.com> 2.1-0.13.beta15
219- Update to 2.1_beta15
220- Add openvpn-2.1_beta15-test-timeout.patch to avoid test hang
221  (from Paul Howarth)
222
223* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 2.1-0.12.beta14
224- Rebuild
225
226* Mon Jul 31 2006 Steven Pritchard <steve@kspei.com> 2.1-0.11.beta14
227- Rebuild
228
229* Fri Apr 14 2006 Steven Pritchard <steve@kspei.com> 2.1-0.10.beta14
230- Update to 2.1_beta14
231
232* Wed Apr 12 2006 Steven Pritchard <steve@kspei.com> 2.1-0.9.beta13
233- Update to 2.1_beta13
234
235* Wed Apr 05 2006 Steven Pritchard <steve@kspei.com> 2.1-0.8.beta12
236- Update to 2.1_beta12 (BZ#188050/CVE-2006-1629)
237
238* Tue Feb 21 2006 Steven Pritchard <steve@kspei.com> 2.1-0.7.beta11
239- Update to 2.1_beta11
240
241* Tue Feb 14 2006 Steven Pritchard <steve@kspei.com> 2.1-0.6.beta8
242- Update to 2.1_beta8
243
244* Wed Jan 04 2006 Steven Pritchard <steve@kspei.com> 2.1-0.5.beta7
245- Man page shouldn't be executable (BZ#176953)
246
247* Tue Dec 06 2005 Steven Pritchard <steve@kspei.com> 2.1-0.4.beta7
248- Rebuild
249
250* Fri Nov 18 2005 Steven Pritchard <steve@kspei.com> 2.1-0.3.beta7
251- Update to 2.1_beta7
252
253* Tue Nov 08 2005 Steven Pritchard <steve@kspei.com> 2.1-0.2.beta6
254- Make sample-scripts (etc.) non-executable to avoid some dependencies
255
256* Wed Nov 02 2005 Steven Pritchard <steve@kspei.com> 2.1-0.1.beta6
257- Update to 2.1_beta6
258
259* Mon Oct 17 2005 Steven Pritchard <steve@kspei.com> 2.1-0.1.beta4
260- Update to 2.1_beta4
261
262* Thu Aug 25 2005 Steven Pritchard <steve@kspei.com> 2.0.2-1
263- Update to 2.0.2
264- Refine roadwarrior-server.conf a bit
265
266* Mon Aug 22 2005 Steven Pritchard <steve@kspei.com> 2.0.1-1
267- Update to 2.0.1
268
269* Mon Jun 27 2005 Steven Pritchard <steve@kspei.com> 2.0-2
270- Move the plugin directory to _libdir
271- Drop the easy-rsa/Windows directory
272- Comment cleanups
273- Add "processname" header to init script
274- The init script isn't a config file
275- Tag contrib, sample-config-files, sample-keys, and sample-scripts as doc
276- Create/own pid dir
277
278* Sat Jun 25 2005 Steven Pritchard <steve@kspei.com> 2.0-1
279- Update to 2.0 final
280- Drop Epoch: 0 and rebuild for Fedora Extras
281
282* Wed Feb 16 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.14.rc13
283- Fix/add paths to useradd
284
285* Mon Feb 14 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.13.rc13
286- Update to 2.0_rc13
287- More spec cleanup (suggestions from Matthias Saou)
288
289* Tue Feb 08 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.12.rc12
290- Update to 2.0_rc12
291- Small spec cleanups
292- Drop perl auto-requirements entirely
293
294* Mon Dec 20 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.11.rc6
295- Add down-root and auth-pam plugins
296- Add --enable-password-save and --enable-iproute2
297- Add crypto and loopback tests (somewhat time-consuming)
298
299* Thu Dec 16 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.10.rc5
300- Update to 2.0_rc5
301- Change the port to 1194 in the roadwarrior-*.conf samples
302- Change openvpn-init.patch to reformat the description in the init script
303- Modify the Summary and description (OpenVPN isn't UDP-only)
304
305* Tue Dec 14 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.9.rc1
306- Remove the perl(Authen::PAM) dependency
307
308* Thu Dec 09 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.8.rc1
309- Update to 2.0_rc1
310
311* Tue Nov 16 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.7.beta17
312- Update to 2.0_beta17
313- Require dev instead of /dev/net/tun (for udev compatibility)
314- Change openvpn-init.patch to match upstream (starts even earlier now)
315
316* Wed Aug 04 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.6.beta10
317- Remove unnecessary BuildRequires: kernel-headers
318
319* Tue Aug 03 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.5.beta10
320- Update to 2.0_beta10
321- Minor fix to configuration example
322- Change the init script to start a little earlier and stop much later
323  (after netfs) by default
324- Remove a lot of unnecessary macro use (install/mkdir/cp)
325- Don't create /dev/net/tun, use Requires instead
326
327* Sat Jul 17 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.4.beta7
328- Update to 2.0_beta7
329- Include gpg signature in source rpm
330- Include 2.0-style configuration examples
331- Minor spec cleanup
332
333* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.3.test23
334- Add openvpn-init.patch to leave the init script disabled by default
335
336* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.2.test23
337- Fix URL and Source0
338- Add an openvpn user
339
340* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.1.test23
341- Update to 2.0_test23
342- BuildRequires lzo-devel, kernel-headers, openssl-devel
343- Lots of spec cleanup
344
345* Sun Feb 23 2003 Matthias Andree <matthias.andree@gmx.de> 1.3.2.14-1
346- Have the version number filled in by autoconf.
347
348* Wed Jul 10 2002 James Yonan <jim@yonan.net> 1.3.1-1
349- Fixed %%preun to only remove service on final uninstall
350
351* Mon Jun 17 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.2.2-1
352- Added condrestart to openvpn.spec & openvpn.init.
353
354* Wed May 22 2002 James Yonan <jim@yonan.net> 1.2.0-1
355- Added mknod for Linux 2.4.
356
357* Wed May 15 2002 Doug Keller <dsk@voidstar.dyndns.org> 1.1.1.16-2
358- Added init scripts
359- Added conf file support
360
361* Mon May 13 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.14-1
362- Added new directories for config examples and such
363
364* Sun May 12 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.13-1
365- Updated buildroot directive and cleanup command
366- added easy-rsa utilities
367
368* Mon Mar 25 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.0-1
369- Initial build.
Note: See TracBrowser for help on using the repository browser.