Commit 4ac541a6 authored by Mo Zhou's avatar Mo Zhou

Amend autopkgtest script dkms-zfs-test

parent 44e2a958
Pipeline #30953 failed with stages
in 19 minutes and 48 seconds
...@@ -2,6 +2,6 @@ Tests: kernel-smoke-test ...@@ -2,6 +2,6 @@ Tests: kernel-smoke-test
Restrictions: needs-root, isolation-machine Restrictions: needs-root, isolation-machine
Depends: zfsutils-linux [ amd64 arm64 ppc64el s390x ], zfs-zed [ amd64 arm64 ppc64el s390x ], zfs-initramfs [ amd64 arm64 ppc64el s390x ], zfs-dkms [ amd64 arm64 ppc64el s390x ], zfs-test [ amd64 arm64 ppc64el s390x ] Depends: zfsutils-linux [ amd64 arm64 ppc64el s390x ], zfs-zed [ amd64 arm64 ppc64el s390x ], zfs-initramfs [ amd64 arm64 ppc64el s390x ], zfs-dkms [ amd64 arm64 ppc64el s390x ], zfs-test [ amd64 arm64 ppc64el s390x ]
Test: dkms-zfs-test Tests: dkms-zfs-test
Restrictions: needs-root, Restrictions: needs-root, allow-stderr
Depends: dkms, zfs-dkms [ amd64 arm64 ppc64el s390x ], linux-headers-amd64 [ amd64 ], Depends: dkms, spl-dkms, zfs-dkms [ amd64 arm64 ppc64el s390x ],
#!/bin/sh #!/bin/sh
set -e set -xe
kver=$(dpkg -s linux-headers-amd64 | grep Depends: | sed -e 's@.*linux-headers-\(.*-amd64\).*@\1@') DEB_HOST_ARCH=$(dpkg --print-architecture)
zfsver=$(dpkg -s zfs-dkms | grep Version: | sed -e 's@Version: \(.*\)-.*@\1@') kver=$(apt-cache show linux-headers-$DEB_HOST_ARCH | grep Depends: | sed -e 's@.*linux-headers-\(.*\)\w*@\1@')
echo dkms build -k $kver zfs/$zfsver zfsver=$(apt-cache show zfs-dkms | grep Version: | 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 dkms build -k $kver zfs/$zfsver
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