summaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
authorTimothy Redaelli <tredaelli@redhat.com>2017-07-19 14:56:28 +0200
committerRussell Bryant <russell@ovn.org>2017-07-20 20:02:34 -0400
commitf1ea8916299415b94db4fa507f09b1f036ea098a (patch)
tree9f59bd5b5a21631013ae21f5485817ddad971c18 /rhel
parent52425efbfa5ca58d92fa4c422282fd545a6be8a5 (diff)
downloadopenvswitch-f1ea8916299415b94db4fa507f09b1f036ea098a.tar.gz
rhel: Fix creation of symlink for ocf script
The policy is to use %files to track installed files. If %files is not used the resulting file is not owned by any package. Before this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers file /usr/lib/ocf/resource.d/ovn/ovndb-servers is not owned by any package After this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers openvswitch-ovn-common-2.7.90-1.fc26.x86_64 Fixes: a4245b7869c8 ("ovn: Add ovn db servers ocf script in fedora packager") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'rhel')
-rw-r--r--rhel/openvswitch-fedora.spec.in15
1 files changed, 5 insertions, 10 deletions
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 3a045d304..367207bc2 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -285,6 +285,10 @@ install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.
install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \
$RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml
+install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn
+ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \
+ $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers
+
# remove unpackaged files
rm -f $RPM_BUILD_ROOT%{_bindir}/ovs-parse-backtrace \
$RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \
@@ -363,10 +367,6 @@ rm -rf $RPM_BUILD_ROOT
fi
%endif
-%post ovn-common
-mkdir -p /usr/lib/ocf/resource.d/ovn
-ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d/ovn/ovndb-servers
-
%post ovn-central
%if 0%{?systemd_post:1}
%systemd_post ovn-northd.service
@@ -407,12 +407,6 @@ ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
-%postun ovn-common
-if [ $1 -eq 0 ] ; then
- # Package removal, not upgrade
- rm -rf /usr/lib/ocf/resource.d/ovn
-fi
-
%postun ovn-central
%if 0%{?systemd_postun:1}
%systemd_postun ovn-northd.service
@@ -560,6 +554,7 @@ fi
%{_mandir}/man8/ovn-sbctl.8*
%{_mandir}/man5/ovn-nb.5*
%{_mandir}/man5/ovn-sb.5*
+%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers
%files ovn-central
%{_bindir}/ovn-northd