]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
install: problem with rpm update when updating from 2.0.34 or older
authorArlin Davis <arlin.r.davis@intel.com>
Wed, 6 Feb 2013 19:49:29 +0000 (11:49 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Wed, 6 Feb 2013 20:26:12 +0000 (12:26 -0800)
The postun will remove entries on older packages that incorrectly
add and remove entries instead of updating the file. When updating
from these older version we end up with an empty /etc/dat.conf.

In order to fix we have to save the dat.conf and restore during
the upgrade process with the triggerpostun

%triggerpostun -- dapl < 2.0.35-1

intel-mic-ofed-dapl.spec.in

index baaa8ddb6ea971bc11d42d85b6305bd7921dc1a6..38ca01b9e1b0951880c0c17b4ed057d6e412f308 100644 (file)
@@ -110,6 +110,8 @@ rm -f %{buildroot}%{_libdir}/*.la
 rm -rf %{buildroot}
 
 %post
+# fix problem with older dapl packages that clobber dat.conf when updating
+cp $RPM_BUILD_ROOT%{_sysconfdir}/dat.conf /tmp/%{version}-dat.conf
 /sbin/ldconfig
 if [ $1 = 1 ]; then
         /sbin/chkconfig --add mpxyd
@@ -148,6 +150,10 @@ fi
 %{_mandir}/man1/*.1*
 %{_mandir}/man5/*.5*
 
+%triggerpostun -- dapl < 2.0.35-1
+# fix problem with older dapl packages that clobber dat.conf during update
+mv /tmp/%{version}-dat.conf %{_sysconfdir}/dat.conf
+
 %changelog
 * Thu Dec 6 2012 Arlin Davis <ardavis@ichips.intel.com> - 2.0.36.2
 - DAT/DAPL Version 2.0.36.2 Release 1, OFED 3.5, Intel MPSS 2.1