diff --git a/openvpn.changes b/openvpn.changes index cc7f008..ed5a43a 100644 --- a/openvpn.changes +++ b/openvpn.changes @@ -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 diff --git a/openvpn.spec b/openvpn.spec index 78db079..ecd016d 100644 --- a/openvpn.spec +++ b/openvpn.spec @@ -180,12 +180,14 @@ mkdir -p %{buildroot}/%{_datadir}/openvpn %if %{with_systemd} rm %{buildroot}%{_libdir}/systemd/system/openvpn-client@.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 $RPM_SOURCE_DIR/%{name}.target %{buildroot}/%{_unitdir}/%{name}.target install -D -m 755 $RPM_SOURCE_DIR/rc%{name} %{buildroot}%{_sbindir}/rc%{name} # tmpfiles.d -mkdir -p %{buildroot}%{_libdir}/tmpfiles.d -install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_libdir}/tmpfiles.d/%{name}.conf +mkdir -p %{buildroot}%{_tmpfilesdir} +install -m 0644 $RPM_SOURCE_DIR/%{name}-tmpfile.conf %{buildroot}%{_tmpfilesdir}/%{name}.conf %else install -D -m 755 $RPM_SOURCE_DIR/openvpn.init %{buildroot}/%{_sysconfdir}/init.d/openvpn ln -sv %{_sysconfdir}/init.d/openvpn %{buildroot}/%{_sbindir}/rcopenvpn @@ -204,7 +206,7 @@ find sample -name .gitignore | xargs rm -f %post %if %{with_systemd} -systemd-tmpfiles --create %{_libdir}/tmpfiles.d/%{name}.conf ||: +systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf ||: %service_add_post %{name}.target # try to migrate openvpn.service autostart to openvpn@.service if test ${FIRST_ARG:-$1} -ge 1 -a \ @@ -274,7 +276,7 @@ rm -f %{_sysconfdir}/sysconfig/openvpn || : %dir %{_libdir}/tmpfiles.d %{_unitdir}/%{name}@.service %{_unitdir}/%{name}.target -%{_libdir}/tmpfiles.d/%{name}.conf +%{_tmpfilesdir}/%{name}.conf %dir %attr(0750,root,root) %ghost %{_rundir}/openvpn/ %else %config %{_sysconfdir}/init.d/openvpn