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

Revision 2653, 12.4 KB checked in by Takemikaduchi, 13 years ago (diff)

eog-plugins,perl-Net_SSLeay,hdf5: new upstream release, others: rebuild with openssl-1.0.0c

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