Ltest uses 'lbuild' to make rpms. When there're multiple ltestds do 'lbuild' at the same time, there's a good chance in a kernel or lustre building race if they build the rpms in a same directory. So we should use separate buildroot to avoid such issue. Also make changes to get 'make rpms' and 'make srpm' work smoothly with this change to lustre.spec.in.
./config.status build/lustre.spec
rpms: build/lustre.spec dist Makefile
- rpmbuild -ta $(distdir).tar.gz
+ rpmbuild -ta $(distdir).tar.gz \
+ --define "_tmppath $TMP"
srpm: build/lustre.spec dist Makefile
- rpmbuild -ts $(distdir).tar.gz
+ rpmbuild -ts $(distdir).tar.gz \
+ --define "_tmppath $TMP"
Group: Utilities/System
Source: lustre-%{version}.tar.gz
URL: http://clusterfs.com/
-BuildRoot: /var/tmp/lustre-%{version}-root
+BuildRoot: %{_tmppath}/lustre-%{version}-root
Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap
Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}