Whamcloud - gitweb
LU-2675 llapi: find_param cleanup part I
[fs/lustre-release.git] / lustre.spec.in
index 487a08d..fb757d8 100644 (file)
@@ -312,10 +312,25 @@ make install DESTDIR=$RPM_BUILD_ROOT
 # hack to avoid changing the libsysio code for "make install"
 rm -f $RPM_BUILD_ROOT%{_libdir}/libsysio.a
 
+:> lustre.files
+
+%if %{with servers}
 # The .ha_v2 extension identifies the heartbeat resource agent as using
 # legacy syntax. Install a compatibility symlink to avoid conflicts when
 # newer-style agents are added.
 ln -s Lustre.ha_v2 $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/Lustre
+echo '%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2' >>lustre.files
+echo '%{_sysconfdir}/ha.d/resource.d/Lustre' >>lustre.files
+
+if [ -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/lustre ]; then
+       echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
+       echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
+fi
+%endif
+
+if [ -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/lnet ]; then
+       echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
+fi
 
 # Create the pristine source directory.
 cd $RPM_BUILD_DIR/lustre-%{version}
@@ -327,8 +342,6 @@ chmod -R go-w lustre-source/lustre-%{version}
 # fc18 needs 'x' permission for library files
 find $RPM_BUILD_ROOT -name '*.so' | xargs chmod +x
 
-:> lustre.files
-
 if [ -f $RPM_BUILD_ROOT%{_libdir}/liblustre.so ] ; then
   echo '%{_libdir}/liblustre.a' >>lustre.files
   echo '%{_libdir}/liblustre.so' >>lustre.files
@@ -402,14 +415,9 @@ find $RPM_BUILD_ROOT%{?rootdir}/lib/modules/%{kversion}/%{kmoddir} -name "*.ko"
 %{_includedir}/libcfs
 %{_includedir}/linux/lustre_user.h
 %{_libexecdir}/lustre/lc_common
+%{_libexecdir}/lustre/haconfig
 %{_sysconfdir}/udev/rules.d/99-lustre.rules
-%{_sysconfdir}/init.d/lnet
-%{_sysconfdir}/init.d/lustre
 %config(noreplace) %{_sysconfdir}/ldev.conf
-%{_sysconfdir}/sysconfig/lustre
-%{_libexecdir}/lustre/haconfig
-%{_sysconfdir}/ha.d/resource.d/Lustre.ha_v2
-%{_sysconfdir}/ha.d/resource.d/Lustre
 
 %if %{with lustre_modules}
 %files modules
@@ -731,8 +739,8 @@ rm /var/run/%{name}-osd-zfs
 %endif # with lustre_modules
 
 %if %{with lustre_tests}
-%post tests
 %if %{defined rpm_post_base}
+%post tests
 if [ -x %{rpm_post_base}-tests.sh ]; then
        %{rpm_post_base}-tests.sh %{cross_path} create
 fi
@@ -742,6 +750,8 @@ if [ -x %{rpm_post_base}-tests.sh ]; then
        %{rpm_post_base}-tests.sh %{cross_path} remove
 fi
 %else
+%if %{with lustre_modules}
+%post tests
 if [ -f /boot/System.map-%{kversion} ]; then
        depmod -ae -F /boot/System.map-%{kversion} %{kversion} || exit 0
 else
@@ -756,6 +766,7 @@ else
 fi
 %endif
 %endif
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT