More clean-ups

- Splitting out -devel files into a separate package
- Removed several contrib and sample files which makes is not
  strictly needed in this package.
- build: Enable tests runs by default, long running tests can
  be disabled with "--without tests_long"
- build: Removed defined %%{plugins} macro not in use
- Added .rpmlint to whitelist false positives
epel8
David Sommerseth 8 years ago
parent 3938084afc
commit ba1a3a7077

@ -0,0 +1,2 @@
addFilter("E: non-standard-dir-perm /etc/openvpn/server 0750L")
addFilter("E: non-standard-dir-perm /etc/openvpn/client 0750L")

@ -1,11 +1,13 @@
%define _hardened_build 1 %define _hardened_build 1
#define prerelease rc22 #define prerelease rc22
%define plugins down-root auth-pam # Build conditionals
# tests_long - Enabled by default, enables long running tests in %%check
%bcond_without tests_long
Name: openvpn Name: openvpn
Version: 2.4.1 Version: 2.4.1
Release: 2%{?prerelease:.%{prerelease}}%{?dist} Release: 3%{?prerelease:.%{prerelease}}%{?dist}
Summary: A full-featured SSL VPN solution Summary: A full-featured SSL VPN solution
URL: https://community.openvpn.net/ URL: https://community.openvpn.net/
Source0: https://swupdate.openvpn.org/community/releases/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.xz Source0: https://swupdate.openvpn.org/community/releases/%{name}-%{version}%{?prerelease:_%{prerelease}}.tar.xz
@ -43,9 +45,21 @@ Requires(postun): systemd-units
OpenVPN is a robust and highly flexible tunneling application that uses all OpenVPN is a robust and highly flexible tunneling application that uses all
of the encryption, authentication, and certification features of the of the encryption, authentication, and certification features of the
OpenSSL library to securely tunnel IP networks over a single UDP or TCP OpenSSL library to securely tunnel IP networks over a single UDP or TCP
port. It can use the Marcus Franz Xaver Johannes Oberhumer's LZO library port. It can use the Marcus Franz Xaver Johannes Oberhumers LZO library
for compression. for compression.
%package devel
Group: Applications/Internet
Summary: Development headers and examples for OpenVPN plug-ins
%description devel
OpenVPN can be extended through the --plugin option, which provides
possibilities to add specialized authentication, user accounting,
packet filtering and related features. These plug-ins need to be
written in C and provides a more low-level and information rich access
to similar features as the various script-hooks.
%prep %prep
%setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}} %setup -q -n %{name}-%{version}%{?prerelease:_%{prerelease}}
%patch0 -p1 %patch0 -p1
@ -69,34 +83,36 @@ find contrib sample -type f -perm /100 \
# --enable-pkcs11 \ # --enable-pkcs11 \
%{__make} %{__make}
#%check %check
## Test Crypto: # Test Crypto:
#./src/openvpn/openvpn --genkey --secret key ./src/openvpn/openvpn --genkey --secret key
#./src/openvpn/openvpn --test-crypto --secret key ./src/openvpn/openvpn --test-crypto --secret key
#
## Randomize ports for tests to avoid conflicts on the build servers. %if %{with tests_long}
#cport=$[ 50000 + ($RANDOM % 15534) ] # Randomize ports for tests to avoid conflicts on the build servers.
#sport=$[ $cport + 1 ] cport=$[ 50000 + ($RANDOM % 15534) ]
#sed -e 's/^\(rport\) .*$/\1 '$sport'/' \ sport=$[ $cport + 1 ]
# -e 's/^\(lport\) .*$/\1 '$cport'/' \ sed -e 's/^\(rport\) .*$/\1 '$sport'/' \
# < sample/sample-config-files/loopback-client \ -e 's/^\(lport\) .*$/\1 '$cport'/' \
# > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client < sample/sample-config-files/loopback-client \
#sed -e 's/^\(rport\) .*$/\1 '$cport'/' \ > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client
# -e 's/^\(lport\) .*$/\1 '$sport'/' \ sed -e 's/^\(rport\) .*$/\1 '$cport'/' \
# < sample/sample-config-files/loopback-server \ -e 's/^\(lport\) .*$/\1 '$sport'/' \
# > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server < sample/sample-config-files/loopback-server \
# > %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
#pushd sample
## Test SSL/TLS negotiations (runs for 2 minutes): pushd sample
#../src/openvpn/openvpn --config \ # Test SSL/TLS negotiations (runs for 2 minutes):
# %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client & ../src/openvpn/openvpn --config \
#../src/openvpn/openvpn --config \ %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client &
# %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server ../src/openvpn/openvpn --config \
#wait %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
#popd wait
# popd
#rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
# %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server rm -f %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-client \
%{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u})-loopback-server
%endif
%install %install
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{__make} install DESTDIR=$RPM_BUILD_ROOT
@ -108,6 +124,11 @@ cp %{SOURCE2} %{SOURCE3} sample/sample-config-files/
# Add further files # Add further files
cp -a AUTHORS contrib sample %{SOURCE4} $RPM_BUILD_ROOT%{_pkgdocdir} cp -a AUTHORS contrib sample %{SOURCE4} $RPM_BUILD_ROOT%{_pkgdocdir}
# Remove some files which does not really belong here
rm -f $RPM_BUILD_ROOT%{_pkgdocdir}/sample/Makefile{,.in,.am}
rm -f $RPM_BUILD_ROOT%{_pkgdocdir}/contrib/multilevel-init.patch
rm -rf $RPM_BUILD_ROOT%{_pkgdocdir}/sample/sample-keys
rm -rf $RPM_BUILD_ROOT%{_pkgdocdir}/contrib/keychain-mcd
%pre %pre
getent group openvpn &>/dev/null || groupadd -r openvpn getent group openvpn &>/dev/null || groupadd -r openvpn
@ -132,10 +153,9 @@ getent passwd openvpn &>/dev/null || \
%{_pkgdocdir} %{_pkgdocdir}
%exclude %{_pkgdocdir}/README.IPv6 %exclude %{_pkgdocdir}/README.IPv6
%exclude %{_pkgdocdir}/README.polarssl %exclude %{_pkgdocdir}/README.polarssl
%exclude %{_pkgdocdir}/sample/sample-plugins
%{_mandir}/man8/%{name}.8* %{_mandir}/man8/%{name}.8*
%{_sbindir}/%{name} %{_sbindir}/%{name}
%{_includedir}/openvpn-plugin.h
%{_includedir}/openvpn-msg.h
%{_libdir}/%{name}/ %{_libdir}/%{name}/
%{_unitdir}/%{name}-client@.service %{_unitdir}/%{name}-client@.service
%{_unitdir}/%{name}-server@.service %{_unitdir}/%{name}-server@.service
@ -144,8 +164,21 @@ getent passwd openvpn &>/dev/null || \
%config %dir %{_sysconfdir}/%{name}/client %config %dir %{_sysconfdir}/%{name}/client
%config %dir %{_sysconfdir}/%{name}/server %config %dir %{_sysconfdir}/%{name}/server
%files devel
%{_pkgdocdir}/sample/sample-plugins
%{_includedir}/openvpn-plugin.h
%{_includedir}/openvpn-msg.h
%changelog %changelog
* Wed Mar 29 2017 David Sommerseth <dazo@eurephia.org> - 2.4.1-3
- Splitting out -devel files into a separate package
- Removed several contrib and sample files which makes is not
strictly needed in this package.
- build: Enable tests runs by default, long running tests can
be disabled with "--without tests_long"
- build: Removed defined %%{plugins} macro not in use
* Fri Mar 24 2017 David Sommerseth <dazo@eurephia.org> - 2.4.1-2 * Fri Mar 24 2017 David Sommerseth <dazo@eurephia.org> - 2.4.1-2
- Various cleanups - Various cleanups
- Use systemd-rpm macros (rhbz #850257) - Use systemd-rpm macros (rhbz #850257)

Loading…
Cancel
Save