diff mbox

[rdma-core,4/6] redhat/spec: fix up %post scriptlets

Message ID 20161221220840.36268-5-jarod@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jarod Wilson Dec. 21, 2016, 10:08 p.m. UTC
The split packaging spec is missing systemd restart bits for ibacm and
iwpmd, and has incorrect ldconfig calls. The base package has no libs in
it, that should have been on the libibverbs sub-package, and the other
lib sub-packages need one as well.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
 redhat/rdma-core.spec | 37 +++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 42d624b..1f51720 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -267,20 +267,45 @@  install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/
 # Delete the package's init.d scripts
 rm -rf %{buildroot}/%{_initrddir}/
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+# libibverbs
+%post -n libibverbs -p /sbin/ldconfig
+%postun -n libibverbs -p /sbin/ldconfig
 
+# libibcm
+%post -n libibcm -p /sbin/ldconfig
+%postun -n libibcm -p /sbin/ldconfig
+
+# libibumad
+%post -n libibumad -p /sbin/ldconfig
+%postun -n libibumad -p /sbin/ldconfig
+
+# librdmacm
+%post -n librdmacm -p /sbin/ldconfig
+%postun -n librdmacm -p /sbin/ldconfig
+
+# ibacm
 %post -n ibacm
 %systemd_post ibacm.service
-
 %preun -n ibacm
 %systemd_preun ibacm.service
-
 %postun -n ibacm
 %systemd_postun_with_restart ibacm.service
 
-%post -n libibcm -p /sbin/ldconfig
-%postun -n libibcm -p /sbin/ldconfig
+# srp_daemon
+%post -n srp_daemon
+%systemd_post srp_daemon.service
+%preun -n srp_daemon
+%systemd_preun srp_daemon.service
+%postun -n srp_daemon
+%systemd_postun_with_restart srp_daemon.service
+
+# iwpmd
+%post -n iwpmd
+%systemd_post iwpmd.service
+%preun -n iwpmd
+%systemd_preun iwpmd.service
+%postun -n iwpmd
+%systemd_postun_with_restart iwpmd.service
 
 %files
 %dir %{_sysconfdir}/rdma