zfsonlinux/zfs-patches/0001-remove-DKMS-modules-and-dracut-build.patch

283 lines
11 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
Date: Mon, 6 Feb 2017 11:03:10 +0100
Subject: [PATCH] remove DKMS, modules and dracut build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
debian/control | 1 -
debian/control.in | 40 ++-----------------
debian/not-installed | 2 +
debian/rules | 106 +--------------------------------------------------
4 files changed, 7 insertions(+), 142 deletions(-)
diff --git a/debian/control b/debian/control
index 9e4f8fa7..42fbec35 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
debhelper (>= 10.2),
dh-autoreconf,
dh-python,
- dkms (>> 2.1.1.2-5),
libattr1-dev,
libblkid-dev,
libselinux1-dev,
diff --git a/debian/control.in b/debian/control.in
index e193f017..2cb2f614 100644
--- a/debian/control.in
+++ b/debian/control.in
2018-04-03 15:08:19 +03:00
@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
2017-12-19 14:47:27 +03:00
debhelper (>= 10.2),
2018-04-03 15:08:19 +03:00
dh-autoreconf,
dh-python,
- dkms (>> 2.1.1.2-5),
2018-04-03 15:08:19 +03:00
libattr1-dev,
libblkid-dev,
libselinux1-dev,
@@ -86,26 +85,10 @@ Description: OpenZFS pool library for Linux
.
This zpool library provides support for managing zpools.
2015-04-14 11:21:59 +03:00
-Package: zfs-dkms
-Architecture: all
2018-04-03 15:08:19 +03:00
-Pre-Depends: spl-dkms (<<${source:Upstream-Version}.),
- spl-dkms (>= ${source:Upstream-Version})
-Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}
-Recommends: zfs-zed, zfsutils-linux (>= ${binary:Version}), @LINUX_COMPAT@
-Provides: zfs-modules
-Description: OpenZFS filesystem kernel modules for Linux
2015-04-14 11:21:59 +03:00
- The Z file system is a pooled filesystem designed for maximum data
- integrity, supporting data snapshots, multiple copies, and data
- checksums.
- .
- This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
- OpenZFS.
2015-04-14 11:21:59 +03:00
-
Package: zfs-initramfs
Architecture: all
2018-04-03 15:08:19 +03:00
Depends: busybox-initramfs | busybox-static | busybox,
initramfs-tools,
- zfs-modules | zfs-dkms,
zfsutils-linux (>= ${binary:Version}),
${misc:Depends}
Description: OpenZFS root filesystem capabilities for Linux - initramfs
@@ -116,29 +99,14 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
This package adds OpenZFS to the system initramfs with a hook
for the initramfs-tools infrastructure.
2015-04-14 11:21:59 +03:00
-Package: zfs-dracut
-Architecture: all
2018-04-03 15:08:19 +03:00
-Depends: dracut,
- zfs-modules | zfs-dkms,
- zfsutils-linux (>= ${binary:Version}),
- ${misc:Depends}
-Description: OpenZFS root filesystem capabilities for Linux - dracut
2015-04-14 11:21:59 +03:00
- The Z file system is a pooled filesystem designed for maximum data
- integrity, supporting data snapshots, multiple copies, and data
- checksums.
- .
- This package adds OpenZFS to the system initramfs with a hook
2015-04-14 11:21:59 +03:00
- for the dracut infrastructure.
-
Package: zfsutils-linux
Section: contrib/admin
2015-04-14 11:21:59 +03:00
Architecture: linux-any
2018-04-03 15:08:19 +03:00
Depends: python3, ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
-Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
2018-04-03 15:08:19 +03:00
-Breaks: zfs-dkms (<< ${binary:Version}), zfs-dkms (>> ${binary:Version})
+Recommends: lsb-base, zfs-zed
2018-04-03 15:08:19 +03:00
Suggests: nfs-kernel-server,
samba-common-bin (>= 3.0.23),
- zfs-initramfs | zfs-dracut
+ zfs-initramfs
Conflicts: zfs, zfs-fuse
Provides: zfsutils
Description: command-line tools to manage OpenZFS filesystems
@@ -152,8 +120,7 @@ Description: command-line tools to manage OpenZFS filesystems
Package: zfs-zed
Section: contrib/admin
2015-04-14 11:21:59 +03:00
Architecture: linux-any
2018-04-03 15:08:19 +03:00
-Depends: zfs-modules | zfs-dkms,
- zfsutils-linux (>= ${binary:Version}),
+Depends: zfsutils-linux (>= ${binary:Version}),
${misc:Depends},
${shlibs:Depends}
Description: OpenZFS Event Daemon
@@ -176,7 +143,6 @@ Depends: acl,
2018-04-03 15:08:19 +03:00
python,
sudo,
sysstat,
- zfs-modules | zfs-dkms,
zfsutils-linux (>=${binary:Version}),
${misc:Depends},
${shlibs:Depends}
diff --git a/debian/not-installed b/debian/not-installed
index a008985c..c60b0016 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -6,3 +6,5 @@ etc/zfs/vdev_id.conf.alias.example
etc/zfs/vdev_id.conf.multipath.example
etc/zfs/vdev_id.conf.sas_direct.example
etc/zfs/vdev_id.conf.sas_switch.example
+usr/lib/dracut
+usr/share/zfs/enum-extract.pl
diff --git a/debian/rules b/debian/rules
index e2c5a25f..86b5994d 100755
--- a/debian/rules
+++ b/debian/rules
2017-12-19 14:47:27 +03:00
@@ -5,9 +5,6 @@ include /usr/share/dpkg/default.mk
LSB_DISTRIBUTOR := $(shell lsb_release -is)
NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
-DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
- DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
-
ifndef BUILD_UDEB
BUILD_UDEB=false
endif
2017-12-19 14:47:27 +03:00
@@ -17,21 +14,16 @@ KVERS=$(shell uname -r)
2015-04-14 11:21:59 +03:00
endif
ifndef SPL
2017-12-19 14:47:27 +03:00
-SPL=/usr/src/spl-$(DEB_VERSION_UPSTREAM)
-endif
-
-ifndef SPLOBJ
2017-12-19 14:47:27 +03:00
-SPLOBJ=/var/lib/dkms/spl/$(DEB_VERSION_UPSTREAM)/$(KVERS)/$(DEB_TARGET_GNU_CPU)
+SPL=../spl-build
2015-04-14 11:21:59 +03:00
endif
non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
PACKAGE=zfs
-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
2015-04-14 11:21:59 +03:00
2015-07-21 12:16:26 +03:00
%:
- dh $@ --with autoreconf,dkms,python3,systemd --parallel
+ dh $@ --with autoreconf,python3,systemd --parallel
2015-04-14 11:21:59 +03:00
override_dh_auto_configure:
sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
@@ -74,37 +66,6 @@ override_dh_auto_install:
$(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
2015-04-14 11:21:59 +03:00
- @# Get a bare copy of the source code for DKMS.
2017-12-19 14:47:27 +03:00
- @# This creates the $(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/ tree, which does not
2015-04-14 11:21:59 +03:00
- @# contain the userland sources. NB: Remove-userland-dist-rules.patch
- $(MAKE) distdir
-
- @# Install the DKMS source.
- @# We only want the files needed to build the modules
- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
- cp '$(CURDIR)/scripts/enum-extract.pl' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/scripts'
2017-12-19 14:47:27 +03:00
- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
2015-04-14 11:21:59 +03:00
- @# Hellish awk line:
- @# * Deletes from configure.ac the parts not needed for building the kernel module
- @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
- @# (Makefile$|include/|module/|*.release$)
- @# * Takes care of spaces and tabs
- awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/){next} } {print}' \
2017-12-19 14:47:27 +03:00
- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
2015-04-14 11:21:59 +03:00
- @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
- sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
2017-12-19 14:47:27 +03:00
- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
2015-04-14 11:21:59 +03:00
- @# Sanity test
2017-12-19 14:47:27 +03:00
- grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
2015-04-14 11:21:59 +03:00
- @# Run autogen on the stripped source tree
2017-12-19 14:47:27 +03:00
- cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
- rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
2015-04-14 11:21:59 +03:00
-
- @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
2017-12-19 14:47:27 +03:00
- printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
2015-04-14 11:21:59 +03:00
-
mkdir -p $(CURDIR)/debian/tmp/usr/lib
for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
@@ -114,9 +75,6 @@ override_dh_auto_install:
chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
2015-07-21 12:16:26 +03:00
-override_dh_dkms:
2017-12-19 14:47:27 +03:00
- dh_dkms -V $(DEB_VERSION_UPSTREAM)
-
override_dh_makeshlibs:
2017-12-19 14:47:27 +03:00
dh_makeshlibs -a -V
ifeq ($(BUILD_UDEB), true)
@@ -154,65 +112,5 @@ override_dh_install:
# ------------
-override_dh_prep-deb-files:
- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/' \
- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
- done
- sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
- < debian/control.modules.in > debian/control
-
-override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
-override_dh_configure_modules_udeb_stamp:
- ./configure \
- --without-selinux \
- --with-config=kernel \
- --with-linux=$(KSRC) \
- --with-linux-obj=$(KOBJ) \
- --with-spl=$(SPL) \
- --with-spl-obj=$(SPLOBJ)
- touch override_dh_configure_modules_udeb_stamp
-
-override_dh_configure_modules: override_dh_configure_modules_stamp
-override_dh_configure_modules_stamp:
- ./configure \
- --with-config=kernel \
- --with-linux=$(KSRC) \
- --with-linux-obj=$(KOBJ) \
- --with-spl=$(SPL) \
- --with-spl-obj=$(SPLOBJ)
- touch override_dh_configure_modules_stamp
-
-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
- dh_testdir
- dh_testroot
- dh_prep
-
- $(MAKE) -C $(CURDIR)/module modules
-
- dh_installdirs -p${pmodules}-di
- dh_install -p${pmodules}-di
- dh_gencontrol -p${pmodules}-di
-
- dh_builddeb -p${pmodules}-di
-
-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
- dh_testdir
- dh_testroot
- dh_prep
-
- $(MAKE) -C $(CURDIR)/module modules
-
- dh_install -p${pmodules}
- dh_installdocs -p${pmodules}
- dh_installchangelogs -p${pmodules}
- dh_compress -p${pmodules}
- dh_strip -p${pmodules}
- dh_fixperms -p${pmodules}
- dh_installdeb -p${pmodules}
- dh_gencontrol -p${pmodules}
- dh_md5sums -p${pmodules}
- dh_builddeb -p${pmodules}
-
debian-copyright:
cme update dpkg-copyright -file debian/copyright.cme
--
2.11.0