Commit a790da2d authored by Mo Zhou's avatar Mo Zhou

Amend autopkgtest script dkms-zfs-test. (Closes: #921383)

parent eee5ecb1
Pipeline #35219 failed with stages
in 20 minutes and 11 seconds
#!/bin/sh
set -xe
DEB_HOST_ARCH=$(dpkg --print-architecture)
kver=$(apt-cache show linux-headers-$DEB_HOST_ARCH | grep Depends: | sed -e 's@.*linux-headers-\(.*\)\w*@\1@')
kvers=$(apt-cache show linux-headers-$DEB_HOST_ARCH | grep Depends: | sed -e 's@.*linux-headers-\(.*\)\w*@\1@')
zfsver=$(apt-cache show zfs-dkms | grep Version: | head -n1 | sed -e 's@Version: \(.*\)-.*@\1@')
if ! (echo "amd64 arm64 ppc64el s390x" | grep -o $DEB_HOST_ARCH); then
exit 0
fi
echo Building ZFS/$zfsver for Linux/$kver
apt-get install linux-headers-$DEB_HOST_ARCH -y
dkms build -k $kver spl/$zfsver
dkms build -k $kver zfs/$zfsver
# In case there are two linux versions in apt's cache #921383
for kver in $kvers; do
echo Building ZFS/$zfsver for Linux/$kver
apt-get install linux-headers-$DEB_HOST_ARCH -y
dkms build -k $kver spl/$zfsver
dkms build -k $kver zfs/$zfsver
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment