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

Revision 8073, 12.5 KB checked in by Takemikaduchi, 10 years ago (diff)

new upstream release or rebuild

Line 
1#define prerelease rc22
2
3%define plugins down-root auth-pam
4
5Name:              openvpn
6Version:           2.1.3
7Release:           3%{?_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
39Vendor: Project Vine
40Distribution: Vine Linux
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* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.3-3
168- rebuild with VineSeed environment
169
170* Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.1.3-2
171- rebuild with openssl-1.0.0c
172
173* Sun Aug 29 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1.3-1
174- new upstream release
175
176* Mon Aug 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.1-0.1.rc9
177- initial build for Vine Linux
178
179* Fri Aug 01 2008 Steven Pritchard <steve@kspei.com> 2.1-0.27.rc9
180- Update to 2.1_rc9.
181
182* Sat Jun 14 2008 Steven Pritchard <steve@kspei.com> 2.1-0.26.rc8
183- Update to 2.1_rc8.
184- Update License tag.
185
186* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.1-0.25.rc7
187- Autorebuild for GCC 4.3
188
189* Tue Jan 29 2008 Steven Pritchard <steve@kspei.com> 2.1-0.24.rc7
190- Update to 2.1_rc7
191- Drop BETA21-userpriv-fixups.patch (upstream)
192
193* Fri Jan 25 2008 Steven Pritchard <steve@kspei.com> 2.1-0.23.rc6
194- Apply update to BETA21-userpriv-fixups.patch from Alon Bar-Lev
195
196* Thu Jan 24 2008 Steven Pritchard <steve@kspei.com> 2.1-0.22.rc6
197- Update to 2.1_rc6
198- Pass paths to ifconfig, ip, and route to configure
199- BR iproute and Require iproute and net-tools
200- Add BETA21-userpriv-fixups.patch from Alon Bar-Lev
201
202* Wed Jan 23 2008 Steven Pritchard <steve@kspei.com> 2.1-0.21.rc5
203- Update to 2.1_rc5
204
205* Wed Dec 05 2007 Steven Pritchard <steve@kspei.com> 2.1-0.20.rc4
206- Remove check macro cruft.
207
208* Thu Apr 26 2007 Steven Pritchard <steve@kspei.com> 2.1-0.19.rc4
209- Update to 2.1_rc4
210
211* Mon Apr 23 2007 Steven Pritchard <steve@kspei.com> 2.1-0.18.rc3
212- Update to 2.1_rc3
213
214* Fri Mar 02 2007 Steven Pritchard <steve@kspei.com> 2.1-0.17.rc2
215- Update to 2.1_rc2
216
217* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.16.rc1
218- Randomize ports for tests to avoid conflicts on the build servers
219
220* Tue Feb 27 2007 Steven Pritchard <steve@kspei.com> 2.1-0.15.rc1
221- Update to 2.1_rc1
222
223* Mon Oct 02 2006 Steven Pritchard <steve@kspei.com> 2.1-0.14.beta16
224- Update to 2.1_beta16
225- Drop Paul's patch (in upstream)
226
227* Tue Sep 12 2006 Steven Pritchard <steve@kspei.com> 2.1-0.13.beta15
228- Update to 2.1_beta15
229- Add openvpn-2.1_beta15-test-timeout.patch to avoid test hang
230  (from Paul Howarth)
231
232* Mon Aug 28 2006 Steven Pritchard <steve@kspei.com> 2.1-0.12.beta14
233- Rebuild
234
235* Mon Jul 31 2006 Steven Pritchard <steve@kspei.com> 2.1-0.11.beta14
236- Rebuild
237
238* Fri Apr 14 2006 Steven Pritchard <steve@kspei.com> 2.1-0.10.beta14
239- Update to 2.1_beta14
240
241* Wed Apr 12 2006 Steven Pritchard <steve@kspei.com> 2.1-0.9.beta13
242- Update to 2.1_beta13
243
244* Wed Apr 05 2006 Steven Pritchard <steve@kspei.com> 2.1-0.8.beta12
245- Update to 2.1_beta12 (BZ#188050/CVE-2006-1629)
246
247* Tue Feb 21 2006 Steven Pritchard <steve@kspei.com> 2.1-0.7.beta11
248- Update to 2.1_beta11
249
250* Tue Feb 14 2006 Steven Pritchard <steve@kspei.com> 2.1-0.6.beta8
251- Update to 2.1_beta8
252
253* Wed Jan 04 2006 Steven Pritchard <steve@kspei.com> 2.1-0.5.beta7
254- Man page shouldn't be executable (BZ#176953)
255
256* Tue Dec 06 2005 Steven Pritchard <steve@kspei.com> 2.1-0.4.beta7
257- Rebuild
258
259* Fri Nov 18 2005 Steven Pritchard <steve@kspei.com> 2.1-0.3.beta7
260- Update to 2.1_beta7
261
262* Tue Nov 08 2005 Steven Pritchard <steve@kspei.com> 2.1-0.2.beta6
263- Make sample-scripts (etc.) non-executable to avoid some dependencies
264
265* Wed Nov 02 2005 Steven Pritchard <steve@kspei.com> 2.1-0.1.beta6
266- Update to 2.1_beta6
267
268* Mon Oct 17 2005 Steven Pritchard <steve@kspei.com> 2.1-0.1.beta4
269- Update to 2.1_beta4
270
271* Thu Aug 25 2005 Steven Pritchard <steve@kspei.com> 2.0.2-1
272- Update to 2.0.2
273- Refine roadwarrior-server.conf a bit
274
275* Mon Aug 22 2005 Steven Pritchard <steve@kspei.com> 2.0.1-1
276- Update to 2.0.1
277
278* Mon Jun 27 2005 Steven Pritchard <steve@kspei.com> 2.0-2
279- Move the plugin directory to _libdir
280- Drop the easy-rsa/Windows directory
281- Comment cleanups
282- Add "processname" header to init script
283- The init script isn't a config file
284- Tag contrib, sample-config-files, sample-keys, and sample-scripts as doc
285- Create/own pid dir
286
287* Sat Jun 25 2005 Steven Pritchard <steve@kspei.com> 2.0-1
288- Update to 2.0 final
289- Drop Epoch: 0 and rebuild for Fedora Extras
290
291* Wed Feb 16 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.14.rc13
292- Fix/add paths to useradd
293
294* Mon Feb 14 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.13.rc13
295- Update to 2.0_rc13
296- More spec cleanup (suggestions from Matthias Saou)
297
298* Tue Feb 08 2005 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.12.rc12
299- Update to 2.0_rc12
300- Small spec cleanups
301- Drop perl auto-requirements entirely
302
303* Mon Dec 20 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.11.rc6
304- Add down-root and auth-pam plugins
305- Add --enable-password-save and --enable-iproute2
306- Add crypto and loopback tests (somewhat time-consuming)
307
308* Thu Dec 16 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.10.rc5
309- Update to 2.0_rc5
310- Change the port to 1194 in the roadwarrior-*.conf samples
311- Change openvpn-init.patch to reformat the description in the init script
312- Modify the Summary and description (OpenVPN isn't UDP-only)
313
314* Tue Dec 14 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.9.rc1
315- Remove the perl(Authen::PAM) dependency
316
317* Thu Dec 09 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.8.rc1
318- Update to 2.0_rc1
319
320* Tue Nov 16 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.7.beta17
321- Update to 2.0_beta17
322- Require dev instead of /dev/net/tun (for udev compatibility)
323- Change openvpn-init.patch to match upstream (starts even earlier now)
324
325* Wed Aug 04 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.6.beta10
326- Remove unnecessary BuildRequires: kernel-headers
327
328* Tue Aug 03 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.5.beta10
329- Update to 2.0_beta10
330- Minor fix to configuration example
331- Change the init script to start a little earlier and stop much later
332  (after netfs) by default
333- Remove a lot of unnecessary macro use (install/mkdir/cp)
334- Don't create /dev/net/tun, use Requires instead
335
336* Sat Jul 17 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.4.beta7
337- Update to 2.0_beta7
338- Include gpg signature in source rpm
339- Include 2.0-style configuration examples
340- Minor spec cleanup
341
342* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.3.test23
343- Add openvpn-init.patch to leave the init script disabled by default
344
345* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.2.test23
346- Fix URL and Source0
347- Add an openvpn user
348
349* Wed Apr 28 2004 Steven Pritchard <steve@kspei.com> 0:2.0-0.fdr.0.1.test23
350- Update to 2.0_test23
351- BuildRequires lzo-devel, kernel-headers, openssl-devel
352- Lots of spec cleanup
353
354* Sun Feb 23 2003 Matthias Andree <matthias.andree@gmx.de> 1.3.2.14-1
355- Have the version number filled in by autoconf.
356
357* Wed Jul 10 2002 James Yonan <jim@yonan.net> 1.3.1-1
358- Fixed %%preun to only remove service on final uninstall
359
360* Mon Jun 17 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.2.2-1
361- Added condrestart to openvpn.spec & openvpn.init.
362
363* Wed May 22 2002 James Yonan <jim@yonan.net> 1.2.0-1
364- Added mknod for Linux 2.4.
365
366* Wed May 15 2002 Doug Keller <dsk@voidstar.dyndns.org> 1.1.1.16-2
367- Added init scripts
368- Added conf file support
369
370* Mon May 13 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.14-1
371- Added new directories for config examples and such
372
373* Sun May 12 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.13-1
374- Updated buildroot directive and cleanup command
375- added easy-rsa utilities
376
377* Mon Mar 25 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.0-1
378- Initial build.
Note: See TracBrowser for help on using the repository browser.