From 6eab1b0fe1f3e988ed69059497404158659738ee52a5d096f7854e92443e01c7 Mon Sep 17 00:00:00 2001 From: Nirmoy Das Date: Mon, 19 Jun 2017 14:48:58 +0000 Subject: [PATCH] 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 --- openvpn.changes | 5 +++++ openvpn.spec | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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