summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2023-11-18 17:44:36 +0100
committerJaron Kent-Dobias <jaron@kent-dobias.com>2023-11-18 17:44:36 +0100
commitae0866c1defe8ff81f31618ce8b602ac0a1582ee (patch)
tree7a02a55b3af1b85757b4d9578b9f68009a2e9122
parentc01789f559b5d59fab490f49b7f5594e0154643b (diff)
downloadlinux-kentdobias-ae0866c1defe8ff81f31618ce8b602ac0a1582ee.tar.gz
linux-kentdobias-ae0866c1defe8ff81f31618ce8b602ac0a1582ee.tar.bz2
linux-kentdobias-ae0866c1defe8ff81f31618ce8b602ac0a1582ee.zip
Now builds zfs as a module,
-rw-r--r--PKGBUILD54
-rw-r--r--config1
2 files changed, 33 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4d2d366..151e4eb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,12 +51,12 @@ sha256sums=('2ee24af9282b80923b2da56b70aad7df2e8ee4e3f076452e05ba66be2059b519'
'SKIP'
'42035fd059faa25a09cd511b24a57b8ad1285cb69127f2a0043b98562c5ec690'
'SKIP'
- '17eb40d7db18707b1bca581f28caea1ac0c1451639db4234a0eefd84edee32f2')
+ '277c842427afe59d4016299e8fe197fa10c4c49514536309e9c8de3b49b209a3')
b2sums=('7e3fe230425b7ee403571beff74e4b4e1668aa53c388e2c00b9e5f097d528467f40ae487b61947ad2432c8f64d26690c3996e14cda25e0d43a5c456e50031539'
'SKIP'
'80d94cd5ef0bbeaa570853c10f480e3cd64cb852b53aced2e7d382d097130fcf8f94060126a04321f913bca5d9158813a74e97f1dd0f110359d911a33e4a0d77'
'SKIP'
- '71ef3154ad8bd070deb4ca94be99019e3932db8276b109604b1b761f5dd0001f1e0ccabc0727036568824b9e47d3365f2c2ae38aad88258bb719a80715bc315f')
+ 'f15f74b3e08eddd75d7c169f369e396a7c8d6bba08e3c35bca95ed92fcebc100ed1a3c9d86cea12e5fe0d0bfbb4b0870e14d75f59259ab6d671070b6d9c8d003')
export KBUILD_BUILD_HOST=archlinux
export KBUILD_BUILD_USER=$pkgbase
@@ -83,33 +83,28 @@ prepare() {
echo "Setting config..."
cp ../config .config
make olddefconfig
- make prepare
-
- cd ../zfs-${_zver}
- ./autogen.sh
- KERNEL_LLVM=1 CC=clang ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --with-mounthelperdir=/usr/bin \
- --libdir=/usr/lib --datadir=/usr/share --includedir=/usr/include \
- --with-udevdir=/usr/lib/udev --libexecdir=/usr/lib \
- --enable-systemd --enable-pyzfs \
- --with-zfsexecdir=/usr/lib/zfs --localstatedir=/var \
- --enable-linux-builtin --with-linux=../$_srcname
- ./copy-builtin ../$_srcname
-
- cd ../$_srcname
-
- cp ../config .config
-
- make olddefconfig
diff -u ../config .config || :
make -s kernelrelease > version
echo "Prepared $pkgbase version $(<version)"
+ make prepare
+
+ cd ../zfs-${_zver}
+ ./autogen.sh
+ KERNEL_LLVM=1 CC=clang ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --libdir=/usr/lib \
+ --datadir=/usr/share --includedir=/usr/include --with-udevdir=/usr/lib/udev \
+ --libexecdir=/usr/lib --with-config=kernel \
+ --with-linux="${srcdir}/$_srcname" \
+ --with-linux-obj="${srcdir}/$_srcname"
}
build() {
cd $_srcname
make all
# make htmldocs
+
+ cd ../zfs-${_zver}
+ make
}
_package() {
@@ -149,8 +144,19 @@ _package() {
ZSTD_CLEVEL=19 make INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
DEPMOD=/doesnt/exist modules_install # Suppress depmod
- # remove build link
- rm "$modulesdir"/build
+ cd ../zfs-${_zver}
+
+ ZSTD_CLEVEL=19 make DESTDIR="$pkgdir" INSTALL_MOD_PATH="$pkgdir/usr" INSTALL_MOD_STRIP=1 \
+ DEPMOD=/doesnt/exist install # Suppress depmod
+ # Remove src dir
+ rm -r "${pkgdir}"/usr/src
+
+ # zfs install removes these files
+ cd ../$_srcname
+ install -Dt "$modulesdir" -m644 modules.builtin modules.builtin.modinfo modules.order
+
+ # remove build and source links
+ rm "$modulesdir"/{build,source}
}
_package-headers() {
@@ -233,6 +239,12 @@ _package-headers() {
echo "Adding symlink..."
mkdir -p "$pkgdir/usr/src"
ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase"
+
+ cd ../zfs-${_zver}
+ make DESTDIR="${pkgdir}" DEPMOD=/doesnt/exist install # Suppress depmod
+ rm -r "${pkgdir}/lib"
+ # Remove reference to ${srcdir}
+ sed -i "s+${srcdir}++" ${pkgdir}/usr/src/zfs-*/$(<../${_srcname}/version)/Module.symvers
}
_package-docs() {
diff --git a/config b/config
index 72e72c6..75e72a2 100644
--- a/config
+++ b/config
@@ -10158,7 +10158,6 @@ CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_VALIDATE_FS_PARSER=y
CONFIG_FS_IOMAP=y
CONFIG_LEGACY_DIRECT_IO=y
-CONFIG_ZFS=y
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
CONFIG_EXT4_FS=m