./configure $configure_args $CONFIGURE_FLAGS 2>&1 ||
fatal 1 "Error in configure."
- if type -p apply_kmod_requires; then
- apply_kmod_requires
+ if type -p apply_kmod_requires_conflicts; then
+ apply_kmod_requires_conflicts
fi
make rpms 2>&1 ||
# in build/lbuild)
#BUILD_GEN+=".0"
#BUILD_GEN+=".1" # refactor both rhel5 and rhel6
-BUILD_GEN+=".0" # TT-107: don't cache the BUILD dir (reset major to 5)
+#BUILD_GEN+=".0" # TT-107: don't cache the BUILD dir (reset major to 5)
+BUILD_GEN+=".2" # LU-9850
DEVEL_KERNEL_TYPE="devel"
RPM_HELPERS_DIR="/usr/lib/rpm/redhat"
# patching common to all releases
patch_spec_common() {
- sed -i -e '/find $RPM_BUILD_ROOT\/lib\/modules\/$KernelVer/a\
+ sed -i -e '/Provides: kernel-uname-r =/a\
+Provides: kernel-lustre = %{KVRA}%{?1:.%{1}}\\' \
+ -e '/Provides: kernel-devel-uname-r =/a\
+Provides: kernel-devel-lustre = %{KVRA}%{?1:.%{1}}\\' \
+ -e '/find $RPM_BUILD_ROOT\/lib\/modules\/$KernelVer/a\
cp -a fs/ext3/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext3 \
cp -a fs/ext4/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/fs/ext4' \
SPECS/$SPEC_NAME 2>&1 || \
sed -i "/^%kernel_module_package/,/^)}$/d" $RMAC
}
-apply_kmod_requires() {
+apply_kmod_requires_conflicts() {
# until we have achieved full kABI compatibility we need to
# restrict the kernel range that can be used to the kernel
# version from the RHEL minor release
local linuxrelease=${kver##*-}
local kabiminor=${linuxrelease%%.*}
echo "Requires: kernel < $linuxversion-$((kabiminor+1)), kernel >= $linuxversion-$((kabiminor))" >> rpm/kmp-lustre.preamble
+ if $PATCHLESS; then
+ # don't allow the patched kernel to be considered as a valid kernel
+ # for the patchless client
+ echo "Conflicts: kernel-lustre" >> rpm/kmp-lustre.preamble
+ fi
}