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 <[email protected]>
---
rhel/openvswitch-fedora.spec.in | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 3a045d304..2b8b72230 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
--
2.13.3
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev