%_tmpfilesdir/openvpn.conf: fix legacy support for /run/openvpn [release 2.6.8-3mamba;Mon Dec 04 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 08:18:01 +01:00
parent f51c74ab65
commit 9252dae49f
2 changed files with 31 additions and 6 deletions

View File

@ -1,6 +1,6 @@
Name: openvpn
Version: 2.6.8
Release: 1mamba
Release: 3mamba
Summary: A full-featured SSL VPN solution which can accomodate a wide range of configurations
Group: Network/Security
Vendor: openmamba
@ -20,6 +20,7 @@ BuildRequires: libnl-devel
BuildRequires: libnsl-devel
BuildRequires: libopenssl-devel
BuildRequires: libpam-devel
BuildRequires: libsystemd-devel
## AUTOBUILDREQ-END
BuildRequires: easy-rsa2
Requires: openssl
@ -35,7 +36,11 @@ OpenVPN is not a web application proxy and does not operate through a web browse
%setup -q
%build
%configure
%configure \
--enable-systemd \
SYSTEMD_UNIT_DIR=%{_unitdir} \
TMPFILES_DIR=%{_tmpfilesdir}
%make
%install
@ -52,8 +57,15 @@ for s in sample-config-files sample-scripts; do
cp -a sample/$s %{buildroot}%{_docdir}/openvpn/
done
# Legacy service script openvpn@
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/openvpn@.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/openvpn.conf
#install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/openvpn.conf
cat >> %{buildroot}%{_tmpfilesdir}/openvpn.conf << _EOF
d /run/openvpn 0710 root root -
_EOF
install -d -m0755 %{buildroot}%{_sysconfdir}/openvpn/{client,server}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -67,6 +79,8 @@ fi
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/openvpn
%dir %{_sysconfdir}/openvpn/client
%dir %{_sysconfdir}/openvpn/server
%dir %{_sysconfdir}/openvpn/easy-rsa
%{_sysconfdir}/openvpn/easy-rsa/*
%config(noreplace) %{_sysconfdir}/openvpn/easy-rsa/vars
@ -78,6 +92,8 @@ fi
%{_libdir}/openvpn/plugins/openvpn-plugin-auth-pam.so
%{_libdir}/openvpn/plugins/openvpn-plugin-down-root.so
%{_unitdir}/openvpn@.service
%{_unitdir}/openvpn-client@.service
%{_unitdir}/openvpn-server@.service
%dir %{_datadir}/doc/openvpn
%{_datadir}/doc/openvpn/*
%{_mandir}/man5/openvpn-examples.5*
@ -86,6 +102,12 @@ fi
#ChangeLog README
%changelog
* Mon Dec 04 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.8-3mamba
- %_tmpfilesdir/openvpn.conf: fix legacy support for /run/openvpn
* Sat Dec 02 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.8-2mamba
- rebuilt with --enable-systemd
* Fri Nov 17 2023 Automatic Build System <autodist@mambasoft.it> 2.6.8-1mamba
- automatic version update by autodist

View File

@ -1,7 +1,10 @@
[Unit]
Description=OpenVPN tunneling application on %i
After=network.target NetworkManager-wait-online.service
Requires=network.target NetworkManager-wait-online.service
Description=OpenVPN tunnel for %I (obsolete: use openvpn-client@ or openvpn-server@)
After=syslog.target network-online.target
Wants=network-online.target
Documentation=man:openvpn(8)
Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO
[Service]
Type=forking