diff options
author | Timothy Redaelli <tredaelli@redhat.com> | 2017-11-29 17:46:53 +0100 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-11-29 09:05:35 -0800 |
commit | 951d79e638ecdb3b1dcd19df1adb2ff91fe61af8 (patch) | |
tree | 74b7a713d61c6e52a02346d1db5897f40a48db1f /rhel | |
parent | 01393f004488b0a65d290dddf6a7566c330d09f6 (diff) | |
download | openvswitch-951d79e638ecdb3b1dcd19df1adb2ff91fe61af8.tar.gz |
redhat: Create /etc/openvswitch/* with openvswitch as user/group
Without this commit is not possible to upgrade an openvswitch release
that includes the commit ac416a3ab2d2 (for example 2.8.0) with another release
that includes the commit ac416a3ab2d2 (for example master or 2.8.1), because
rpm changes the user/group of /etc/openvswitch to root/root, but ovsdb-server
starts with the user openvswitch and so it doesn't have permissions to write in
/etc/openvswitch/conf.db.
This patch tell rpm to use the openvswitch user and group for
/etc/openvswitch and /etc/openvswitch/default.conf.
Reported-by: Mark Michelson <mmichels@redhat.com>
CC: aaron conole <aconole@redhat.com>
Fixes: ac416a3ab2d2 ("redhat: dynamically allocate and reference ovs user")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
Tested-by: Mark Michelson <mmichels@redhat.com>
Diffstat (limited to 'rhel')
-rw-r--r-- | rhel/openvswitch-fedora.spec.in | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index e600a943c..ed991cf07 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -519,15 +519,16 @@ fi %{_includedir}/ovn/* %files -%defattr(-,root,root) -%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash -%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash +%defattr(-,openvswitch,openvswitch) %dir %{_sysconfdir}/openvswitch %{_sysconfdir}/openvswitch/default.conf %config %ghost %{_sysconfdir}/openvswitch/conf.db %ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~ %config %ghost %{_sysconfdir}/openvswitch/system-id.conf %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch +%defattr(-,root,root) +%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash +%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash %config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch %{_unitdir}/openvswitch.service %{_unitdir}/ovsdb-server.service |