Support Debian DKMS builds
scripts/dkms.mkconf calls configure with `--with-linux=${kernel_source_dir}`, but Debian puts it kernel source at `/lib/modules/<version>/source`. This patch adds the same logic to the DKMS file produced by `scripts/dkms.mkconf` that Debian has shipped in its official ZFS packaging: at DKMS build time, it checks if the system is a Debian system, and adjusts the path accordingly. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com> Closes #7358 Closes #7540 Closes #7554
This commit is contained in:
parent
3eef58c9b6
commit
3350a33908
|
@ -25,7 +25,22 @@ PACKAGE_CONFIG="${pkgcfg}"
|
||||||
PRE_BUILD="configure
|
PRE_BUILD="configure
|
||||||
--prefix=/usr
|
--prefix=/usr
|
||||||
--with-config=kernel
|
--with-config=kernel
|
||||||
--with-linux=\${kernel_source_dir}
|
--with-linux=\$(
|
||||||
|
case \`lsb_release -is\` in
|
||||||
|
(Debian|Devuan)
|
||||||
|
if [[ -e \${kernel_source_dir/%build/source} ]]
|
||||||
|
then
|
||||||
|
echo \${kernel_source_dir/%build/source}
|
||||||
|
else
|
||||||
|
# A kpkg exception for Proxmox 2.0
|
||||||
|
echo \${kernel_source_dir}
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
echo \${kernel_source_dir}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
--with-linux-obj=\${kernel_source_dir}
|
--with-linux-obj=\${kernel_source_dir}
|
||||||
--with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
|
--with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
|
||||||
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
|
--with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
|
||||||
|
|
Loading…
Reference in New Issue