openvpn-vl.spec 13 KB

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