Skip to content

Commit

Permalink
redhat: make the rpm aware of the lock file
Browse files Browse the repository at this point in the history
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/.

Acked-by: Flavio Leitner <[email protected]>
Reviewed-by: Markos Chandras <[email protected]>
Signed-off-by: Aaron Conole <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
apconole authored and blp committed Jun 13, 2017
1 parent e170fc0 commit c1c7480
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rhel/openvswitch-fedora.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c1c7480

Please sign in to comment.