dnl # The existence of spl.release[.in] is used to identify a valid
dnl # source directory. In order of preference:
dnl #
- splver=$(ls -1 /usr/src/ | grep -m1 spl | cut -f2 -d'-')
+ splver=$(ls -1 /usr/src/ | grep ^spl- | cut -f2 -d'-' |
+ sort -V | head -n1)
spldkms="/var/lib/dkms/spl/${splver}"
splsrc1="/usr/src/spl-${splver}/${LINUXRELEASE}"
splsrc2="/usr/src/spl-${splver}"
dnl # The existence of zfs.release[.in] is used to identify a valid
dnl # source directory. In order of preference:
dnl #
- zfsver=$(ls -1 /usr/src/ | grep -m1 zfs | cut -f2 -d'-')
+ zfsver=$(ls -1 /usr/src/ | grep ^zfs- | cut -f2 -d'-' |
+ sort -V | head -n1)
zfsdkms="/var/lib/dkms/zfs/${zfsver}"
zfssrc1="/usr/src/zfs-${zfsver}/${LINUXRELEASE}"
zfssrc2="/usr/src/zfs-${zfsver}"
Obsoletes: @PACKAGE@-client < %{version}
%if %{with zfs}
Requires: zfs-dkms >= 0.6.5
-Requires: @PACKAGE@-osd-zfs-mount
Conflicts: @PACKAGE@-ldiskfs-dkms
Conflicts: @PACKAGE@-client-dkms
# lustre-zfs-dkms replicates the functionality old lustre-dkms package
%if %{with ldiskfs}
Requires: patch
Requires: %{ext4_source_rpm}
-Requires: @PACKAGE@-osd-ldiskfs-mount
Conflicts: @PACKAGE@-zfs-dkms
Conflicts: @PACKAGE@-client-dkms
%if "%{module}" != "@PACKAGE@-all"
%if %{with servers}
%if %{with zfs}
Provides: @PACKAGE@-osd-zfs = %{version}
+Provides: kmod-@PACKAGE@-osd-zfs = %{version}
+Provides: @PACKAGE@-osd-zfs-mount = %{version}
%endif
%if %{with ldiskfs}
Provides: @PACKAGE@-osd-ldiskfs = %{version}
+Provides: kmod-@PACKAGE@-osd-ldiskfs = %{version}
+Provides: @PACKAGE@-osd-ldiskfs-mount = %{version}
%endif
Provides: @PACKAGE@-osd
%else
cp -f "$7/$1/$2/build/config.h" \
"$7/$1/$2/build/Module.symvers" \
"$7/$1/$2/$3/$5/" 2> /dev/null
+
+case $1 in
+ lustre-zfs|lustre-all)
+ # To satisfy the content of lustre-osd-zfs-mount install these scripts:
+ for script in statechange-lustre.sh \
+ vdev_attach-lustre.sh \
+ vdev_clear-lustre.sh \
+ vdev_remove-lustre.sh
+ do
+ install -D -m 0755 lustre/scripts/${script} /etc/zfs/zed.d/${script}
+ done
+ ;;
+esac
fi
# ZFS and SPL are version locked
- ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 | awk -F', ' '{print $2; exit 0}' | grep -v ': added$')
+ ZFS_VERSION=$(dkms status -m zfs -k $3 -a $5 2>/dev/null |
+ sed -e 's:zfs/::g' -e 's:,.*::g' | cut -d: -f1 |
+ sort -V | head -n1)
if [ -z $ZFS_VERSION ] ; then
echo "zfs-dkms package must already be installed and built under DKMS control"
exit 1
SERVER="--enable-server $LDISKFS \
--with-linux=$4 --with-linux-obj=$4 \
- --with-spl=$6/spl-${ZFS_VERSION} \
- --with-spl-obj=$7/spl/${ZFS_VERSION}/$3/$5 \
- --with-zfs=$6/zfs-${ZFS_VERSION} \
- --with-zfs-obj=$7/zfs/${ZFS_VERSION}/$3/$5"
+ --with-spl=$(realpath $7/spl/${ZFS_VERSION}/source) \
+ --with-spl-obj=$(realpath $7/spl/kernel-$3-$5) \
+ --with-zfs=$(realpath $7/zfs/${ZFS_VERSION}/source) \
+ --with-zfs-obj=$(realpath $7/zfs/kernel-$3-$5)"
KERNEL_STUFF="--with-linux=$4 --with-linux-obj=$4"
;;