Accepting request 504782 from home:ndas:branches:network:vpn
- use %{_tmpfilesdir} for tmpfiles.d/openvpn.conf (bsc#1044223) OBS-URL: https://build.opensuse.org/request/show/504782 OBS-URL: https://build.opensuse.org/package/show/network:vpn/openvpn?expand=0&rev=122
This commit is contained in:
parent
0c21985672
commit
6eab1b0fe1
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 14 12:05:14 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
- use %{_tmpfilesdir} for tmpfiles.d/openvpn.conf (bsc#1044223)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 6 14:59:29 CEST 2017 - ndas@suse.de
|
Tue Jun 6 14:59:29 CEST 2017 - ndas@suse.de
|
||||||
|
|
||||||
|
10
openvpn.spec
10
openvpn.spec
@ -180,12 +180,14 @@ mkdir -p %{buildroot}/%{_datadir}/openvpn
|
|||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
rm %{buildroot}%{_libdir}/systemd/system/openvpn-client@.service
|
rm %{buildroot}%{_libdir}/systemd/system/openvpn-client@.service
|
||||||
rm %{buildroot}%{_libdir}/systemd/system/openvpn-server@.service
|
rm %{buildroot}%{_libdir}/systemd/system/openvpn-server@.service
|
||||||
|
#use one proveded by suse
|
||||||
|
rm %{buildroot}%{_libdir}/tmpfiles.d/openvpn.conf
|
||||||
install -D -m 644 %{name}.service %{buildroot}/%{_unitdir}/%{name}@.service
|
install -D -m 644 %{name}.service %{buildroot}/%{_unitdir}/%{name}@.service
|
||||||
install -D -m 644 $RPM_SOURCE_DIR/%{name}.target %{buildroot}/%{_unitdir}/%{name}.target
|
install -D -m 644 $RPM_SOURCE_DIR/%{name}.target %{buildroot}/%{_unitdir}/%{name}.target
|
||||||
install -D -m 755 $RPM_SOURCE_DIR/rc%{name} %{buildroot}%{_sbindir}/rc%{name}
|
install -D -m 755 $RPM_SOURCE_DIR/rc%{name} %{buildroot}%{_sbindir}/rc%{name}
|
||||||
# tmpfiles.d
|
# tmpfiles.d
|
||||||
mkdir -p %{buildroot}%{_libdir}/tmpfiles.d
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||||
install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_libdir}/tmpfiles.d/%{name}.conf
|
install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||||
%else
|
%else
|
||||||
install -D -m 755 $RPM_SOURCE_DIR/openvpn.init %{buildroot}/%{_sysconfdir}/init.d/openvpn
|
install -D -m 755 $RPM_SOURCE_DIR/openvpn.init %{buildroot}/%{_sysconfdir}/init.d/openvpn
|
||||||
ln -sv %{_sysconfdir}/init.d/openvpn %{buildroot}/%{_sbindir}/rcopenvpn
|
ln -sv %{_sysconfdir}/init.d/openvpn %{buildroot}/%{_sbindir}/rcopenvpn
|
||||||
@ -204,7 +206,7 @@ find sample -name .gitignore | xargs rm -f
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
systemd-tmpfiles --create %{_libdir}/tmpfiles.d/%{name}.conf ||:
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf ||:
|
||||||
%service_add_post %{name}.target
|
%service_add_post %{name}.target
|
||||||
# try to migrate openvpn.service autostart to openvpn@<CONF>.service
|
# try to migrate openvpn.service autostart to openvpn@<CONF>.service
|
||||||
if test ${FIRST_ARG:-$1} -ge 1 -a \
|
if test ${FIRST_ARG:-$1} -ge 1 -a \
|
||||||
@ -274,7 +276,7 @@ rm -f %{_sysconfdir}/sysconfig/openvpn || :
|
|||||||
%dir %{_libdir}/tmpfiles.d
|
%dir %{_libdir}/tmpfiles.d
|
||||||
%{_unitdir}/%{name}@.service
|
%{_unitdir}/%{name}@.service
|
||||||
%{_unitdir}/%{name}.target
|
%{_unitdir}/%{name}.target
|
||||||
%{_libdir}/tmpfiles.d/%{name}.conf
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
%dir %attr(0750,root,root) %ghost %{_rundir}/openvpn/
|
%dir %attr(0750,root,root) %ghost %{_rundir}/openvpn/
|
||||||
%else
|
%else
|
||||||
%config %{_sysconfdir}/init.d/openvpn
|
%config %{_sysconfdir}/init.d/openvpn
|
||||||
|
Loading…
Reference in New Issue
Block a user