]> TLD Linux GIT Repositories - packages/openvpn.git/blobdiff - openvpn.spec
- updated to 2.6.10
[packages/openvpn.git] / openvpn.spec
index f8dfcbac4abfe3e77345fea3e98f68bd3a5ed2e4..51669069e05ba0648cfe96e5887d32a42e532164 100644 (file)
@@ -1,33 +1,44 @@
-
+#
 # Conditional build:
-%bcond_without pkcs11          # build without PKCS#11 support
+%bcond_without pkcs11          # PKCS#11 support
 
 Summary:       VPN Daemon
 Summary(pl.UTF-8):     Serwer VPN
 Name:          openvpn
-Version:       2.3.6
+Version:       2.6.10
 Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://swupdate.openvpn.net/community/releases/%{name}-%{version}.tar.gz
-# Source0-md5: 6ca03fe0fd093e0d01601abee808835c
+# Source0-md5: 8cab67fd3d9cdee9d35ecd7997d04989
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
-Source3:       %{name}-update-resolv-conf
+Source7:       %{name}-update-resolv-conf
 Patch0:                %{name}-pam.patch
 URL:           http://www.openvpn.net/
 BuildRequires: autoconf >= 2.59
-BuildRequires: automake
+BuildRequires: automake >= 1:1.9
 BuildRequires: libselinux-devel
+BuildRequires: libtool
+BuildRequires: lz4-devel >= 1:1.7
 BuildRequires: lzo-devel
-BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: mbedtls-devel
+BuildRequires: openssl-devel >= 0.9.8
+%{?with_pkcs11:BuildRequires:  p11-kit-devel}
 BuildRequires: pam-devel
-%{?with_pkcs11:BuildRequires:  pkcs11-helper-devel}
+%{?with_pkcs11:BuildRequires:  pkcs11-helper-devel >= 1.11}
+BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.671
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
 Requires(post,preun):  /sbin/chkconfig
 Requires:      /sbin/ip
+Requires:      openssl >= 0.9.8
+%{?with_pkcs11:Requires:       pkcs11-helper >= 1.11}
 Requires:      rc-scripts >= 0.4.3.0
-Conflicts:     kernel < 2.4
+Requires:      uname(release) >= 2.4
+Suggests:      %{name}-plugin-auth-pam
+Suggests:      %{name}-plugin-down-root
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _localstatedir  /var
@@ -43,6 +54,66 @@ Sieci Prywatne), który może być użyty do bezpiecznego łączenia dwóch
 lub więcej prywatnych sieci używając zaszyfrowanego tunelu poprzez
 internet.
 
+%package plugin-auth-pam
+Summary:       Plugin for username/password authentication via PAM
+Summary(pl.UTF-8):     Wtyczka do uwierzytelniania nazwą użytkownika i hasłem poprzez PAM
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-auth-pam
+The openvpn-auth-pam module implements username/password
+authentication via PAM, and essentially allows any authentication
+method supported by PAM (such as LDAP, RADIUS, or Linux Shadow
+passwords) to be used with OpenVPN. While PAM supports
+username/password authentication, this can be combined with X509
+certificates to provide two indepedent levels of authentication.
+
+This module uses a split privilege execution model which will function
+even if you drop openvpn daemon privileges using the user, group, or
+chroot directives.
+
+%description plugin-auth-pam -l pl.UTF-8
+Moduł openvpn-auth-pam implementuje uwierzytelnianie nazwą użytkownika
+i hasłem poprzez PAM, zasadniczo pozwalając na korzystanie z dowolnej
+metody uwierzytelniania obsługiwanej przez PAM (np. LDAP, RADIUS,
+hasła shadow) z OpenVPN. Jako że PAM obsługuje uwierzytelnianie nazwą
+użytkownika i hasłem, to można je łączyć z certyfikatami X509 w celu
+zapewniania dwóch różnych poziomów uwierzytelnienia.
+
+Ten moduł wykorzystuje model wykonywania z podziałem uprawnień, co
+działa nawet przy odrzuceniu uprawnień demona openvpn przy użyciu
+dyrektyw user, group lub chroot.
+
+%package plugin-down-root
+Summary:       Plugin to allow root after privilege drop
+Summary(pl.UTF-8):     Wtyczka pozwalająca na wykorzystanie uprawnień roota po odrzuceniu uprawnień
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description plugin-down-root
+The down-root module allows an OpenVPN configuration to call a down
+script with root privileges, even when privileges have been dropped
+using --user/--group/--chroot.
+
+This module uses a split privilege execution model which will fork()
+before OpenVPN drops root privileges, at the point where the --up
+script is usually called. The module will then remain in a wait state
+until it receives a message from OpenVPN via pipe to execute the down
+script. Thus, the down script will be run in the same execution
+environment as the up script.
+
+%description plugin-down-root -l pl.UTF-8
+Moduł down-root pozwala na wywołanie skryptu down z uprawnieniami
+roota z poziomu konfiguracji OpenVPN-a nawet w przypadku odrzucenia
+uprawnień przy użyciu opcji --user/--group/--chroot.
+
+Ten moduł wykorzystuje model wykonywania z podziałem uprawnień, który
+wykonuje fork() przed odrzuceniem uprawnień roota, w miejscu, gdzie
+zwykle jest wywoływany skrypt --up. Moduł pozostaje w stanie
+oczekiwania do odebrania przez potok od OpenVPN-a komunikatu, aby
+wykonać skrypt down. Dzięki temu skrypt down zostanie uruchomiony w
+tym samym środowisku, co skrypt up.
+
 %package devel
 Summary:       Header files for OpenVPN plugins development
 Summary(pl.UTF-8):     Pliki nagłówkowe do tworzenia wtyczek OpenVPN
@@ -59,23 +130,28 @@ Ten pakiet zawiera pliki nagłówkowe do tworzenia wtyczek OpenVPN.
 %setup -q
 %patch0 -p1
 
-sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE3} > contrib/update-resolv-conf
+sed -e 's,/''usr/lib/openvpn,%{_libdir}/%{name},' %{SOURCE7} > contrib/update-resolv-conf
 
 %build
+%{__libtoolize}
 %{__aclocal} -I m4
 %{__autoheader}
 %{__autoconf}
 %{__automake}
-
+CPPFLAGS="%{rpmcppflags} $(pkg-config --cflags liblz4)"
 %configure \
-       %{!?with_pkcs11:--disable-pkcs11} \
-       --enable-password-save \
-       --enable-iproute2 \
-       --enable-selinux \
        IFCONFIG=/sbin/ifconfig \
        IPROUTE=/sbin/ip \
+       NETSTAT=/bin/netstat \
        ROUTE=/sbin/route \
-       NETSTAT=/bin/netstat
+       ac_cv_nsl_inet_ntoa=no \
+       ac_cv_socket_socket=no \
+       ac_cv_resolv_gethostbyname=no \
+       --enable-iproute2 \
+       --enable-password-save \
+       %{?with_pkcs11:--enable-pkcs11} \
+       --enable-selinux \
+       --disable-systemd
 
 %{__make}
 
@@ -88,10 +164,16 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/openvpn,%{_sbindir},%{_mandir}/man8} \
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
+# we use "cp", not "install", not to pull /bin/bash dependency
+cp -p contrib/pull-resolv-conf/client.down $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -p contrib/pull-resolv-conf/client.up $RPM_BUILD_ROOT%{_libdir}/%{name}
+cp -p contrib/update-resolv-conf $RPM_BUILD_ROOT%{_libdir}/%{name}
 
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/*.la
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -109,18 +191,30 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README* ChangeLog sample/sample-{config-files,keys,scripts} doc/management-notes.txt
-%doc *.IPv6 src/plugins/*/README.*
 %dir %{_sysconfdir}/openvpn
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %attr(755,root,root) %{_sbindir}/openvpn
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %dir %{_libdir}/%{name}
+%attr(755,root,root) %{_libdir}/%{name}/client.down
+%attr(755,root,root) %{_libdir}/%{name}/client.up
+%attr(755,root,root) %{_libdir}/%{name}/update-resolv-conf
 %dir %{_libdir}/%{name}/plugins
-%attr(755,root,root) %{_libdir}/%{name}/plugins/*.so
 %{_mandir}/man8/openvpn.8*
 %dir /var/run/openvpn
 
+%files plugin-auth-pam
+%defattr(644,root,root,755)
+%doc src/plugins/auth-pam/README.auth-pam
+%attr(755,root,root) %{_libdir}/%{name}/plugins/openvpn-plugin-auth-pam.so
+
+%files plugin-down-root
+%defattr(644,root,root,755)
+%doc src/plugins/down-root/README.down-root
+%attr(755,root,root) %{_libdir}/%{name}/plugins/openvpn-plugin-down-root.so
+
 %files devel
 %defattr(644,root,root,755)
 %doc doc/README.plugins sample/sample-plugins
+%{_includedir}/openvpn-msg.h
 %{_includedir}/openvpn-plugin.h