Message ID | 20170603151001.19716-4-aconole@redhat.com |
---|---|
State | Superseded |
Headers | show |
On Sat, Jun 03, 2017 at 11:09:58AM -0400, Aaron Conole wrote: > Currently, the db lockfile will cause the openvswitch directory to > linger after uninstall because the rpm database isn't aware that it > should be treated as part of the system. This commit informs the rpmdb > properly as a 'ghost' so that when the package is uninstalled, it will > be removed automatically. This means that if no extra files exist in > /etc/openvswitch, the whole directory will be removed from /etc/. > > Signed-off-by: Aaron Conole <aconole@redhat.com> > --- This looks unrelated to the userspace work as the previous patch, other than that it looks good to me. Acked-by: Flavio Leitner <fbl@sysclose.org>
On 07/06/17 22:00, Flavio Leitner wrote: > On Sat, Jun 03, 2017 at 11:09:58AM -0400, Aaron Conole wrote: >> Currently, the db lockfile will cause the openvswitch directory to >> linger after uninstall because the rpm database isn't aware that it >> should be treated as part of the system. This commit informs the rpmdb >> properly as a 'ghost' so that when the package is uninstalled, it will >> be removed automatically. This means that if no extra files exist in >> /etc/openvswitch, the whole directory will be removed from /etc/. >> >> Signed-off-by: Aaron Conole <aconole@redhat.com> >> --- > > This looks unrelated to the userspace work as the previous patch, > other than that it looks good to me. > > Acked-by: Flavio Leitner <fbl@sysclose.org> > Reviewed-by: Markos Chandras <mchandra@suse.de>
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 95533aa..fe6f15f 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -273,6 +273,7 @@ rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db +touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/.conf.db.~lock~ touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf install -p -m 644 -D selinux/openvswitch-custom.pp \ @@ -481,6 +482,7 @@ fi %{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash %dir %{_sysconfdir}/openvswitch %config %ghost %{_sysconfdir}/openvswitch/conf.db +%ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~ %config %ghost %{_sysconfdir}/openvswitch/system-id.conf %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch
Currently, the db lockfile will cause the openvswitch directory to linger after uninstall because the rpm database isn't aware that it should be treated as part of the system. This commit informs the rpmdb properly as a 'ghost' so that when the package is uninstalled, it will be removed automatically. This means that if no extra files exist in /etc/openvswitch, the whole directory will be removed from /etc/. Signed-off-by: Aaron Conole <aconole@redhat.com> --- rhel/openvswitch-fedora.spec.in | 2 ++ 1 file changed, 2 insertions(+)