]> git.proxmox.com Git - zfsonlinux.git/blame - zfs-patches/0001-remove-DKMS-modules-and-dracut-build.patch
revert potentially buggy zap_add change
[zfsonlinux.git] / zfs-patches / 0001-remove-DKMS-modules-and-dracut-build.patch
CommitLineData
4e883a4e 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
23db3640 2From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
2d5ff411 3Date: Mon, 6 Feb 2017 11:03:10 +0100
4e883a4e 4Subject: [PATCH] remove DKMS, modules and dracut build
2d5ff411
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
23db3640 8
2d5ff411 9Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23db3640 10---
1fa7e3ca 11 debian/control.in | 41 ++------------------
af052108 12 debian/control | 1 -
026bc5c9 13 debian/not-installed | 2 +
af052108 14 debian/rules | 105 +--------------------------------------------------
026bc5c9 15 4 files changed, 7 insertions(+), 142 deletions(-)
2d5ff411 16
23db3640 17diff --git a/debian/control.in b/debian/control.in
1fa7e3ca 18index aef8cac2e..3cc15a05b 100644
23db3640
FG
19--- a/debian/control.in
20+++ b/debian/control.in
1fa7e3ca 21@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
b9d59150 22 debhelper (>= 10.2),
1fa7e3ca
FG
23 dh-autoreconf,
24 dh-python,
23db3640 25- dkms (>> 2.1.1.2-5),
1fa7e3ca
FG
26 libattr1-dev,
27 libblkid-dev,
23db3640 28 libselinux1-dev,
1fa7e3ca 29@@ -86,27 +85,10 @@ Description: OpenZFS pool library for Linux
23db3640
FG
30 .
31 This zpool library provides support for managing zpools.
e479455e
DM
32
33-Package: zfs-dkms
34-Architecture: all
1fa7e3ca
FG
35-Pre-Depends: spl-dkms (<<${source:Upstream-Version}.),
36- spl-dkms (>= ${source:Upstream-Version})
23db3640 37-Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}
1fa7e3ca
FG
38-Recommends: zfs-zed, zfsutils-linux (>= ${binary:Version}),
39- @LINUX_COMPAT@
23db3640
FG
40-Provides: zfs-modules
41-Description: OpenZFS filesystem kernel modules for Linux
e479455e
DM
42- The Z file system is a pooled filesystem designed for maximum data
43- integrity, supporting data snapshots, multiple copies, and data
44- checksums.
45- .
23db3640
FG
46- This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
47- OpenZFS.
e479455e 48-
23db3640
FG
49 Package: zfs-initramfs
50 Architecture: all
1fa7e3ca
FG
51 Depends: busybox-initramfs | busybox-static | busybox,
52 initramfs-tools,
53- zfs-modules | zfs-dkms,
54 zfsutils-linux (>= ${binary:Version}),
55 ${misc:Depends}
23db3640 56 Description: OpenZFS root filesystem capabilities for Linux - initramfs
1fa7e3ca 57@@ -117,29 +99,14 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
23db3640
FG
58 This package adds OpenZFS to the system initramfs with a hook
59 for the initramfs-tools infrastructure.
60
e479455e 61-Package: zfs-dracut
23db3640 62-Architecture: all
1fa7e3ca
FG
63-Depends: dracut,
64- zfs-modules | zfs-dkms,
65- zfsutils-linux (>= ${binary:Version}),
66- ${misc:Depends}
23db3640 67-Description: OpenZFS root filesystem capabilities for Linux - dracut
e479455e
DM
68- The Z file system is a pooled filesystem designed for maximum data
69- integrity, supporting data snapshots, multiple copies, and data
70- checksums.
71- .
23db3640 72- This package adds OpenZFS to the system initramfs with a hook
e479455e
DM
73- for the dracut infrastructure.
74-
23db3640
FG
75 Package: zfsutils-linux
76 Section: contrib/admin
e479455e 77 Architecture: linux-any
1fa7e3ca 78 Depends: python3, ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}
23db3640 79-Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
1fa7e3ca 80-Breaks: zfs-dkms (<< ${binary:Version}), zfs-dkms (>> ${binary:Version})
23db3640 81+Recommends: lsb-base, zfs-zed
1fa7e3ca
FG
82 Suggests: nfs-kernel-server,
83 samba-common-bin (>= 3.0.23),
84- zfs-initramfs | zfs-dracut
85+ zfs-initramfs
23db3640
FG
86 Conflicts: zfs, zfs-fuse, zutils
87 Provides: zfsutils
88 Description: command-line tools to manage OpenZFS filesystems
1fa7e3ca 89@@ -153,8 +120,7 @@ Description: command-line tools to manage OpenZFS filesystems
23db3640
FG
90 Package: zfs-zed
91 Section: contrib/admin
e479455e 92 Architecture: linux-any
1fa7e3ca
FG
93-Depends: zfs-modules | zfs-dkms,
94- zfsutils-linux (>= ${binary:Version}),
95+Depends: zfsutils-linux (>= ${binary:Version}),
96 ${misc:Depends},
97 ${shlibs:Depends}
23db3640 98 Description: OpenZFS Event Daemon
1fa7e3ca
FG
99@@ -177,7 +143,6 @@ Depends: acl,
100 python,
101 sudo,
102 sysstat,
103- zfs-modules | zfs-dkms,
104 zfsutils-linux (>=${binary:Version}),
105 ${misc:Depends},
106 ${shlibs:Depends}
8dbff718 107diff --git a/debian/control b/debian/control
1fa7e3ca 108index 3cf6fb649..51cfe6a64 100644
8dbff718
FG
109--- a/debian/control
110+++ b/debian/control
1fa7e3ca 111@@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
b9d59150 112 debhelper (>= 10.2),
1fa7e3ca
FG
113 dh-autoreconf,
114 dh-python,
8dbff718 115- dkms (>> 2.1.1.2-5),
1fa7e3ca
FG
116 libattr1-dev,
117 libblkid-dev,
8dbff718 118 libselinux1-dev,
af052108 119diff --git a/debian/not-installed b/debian/not-installed
026bc5c9 120index f54fe7310..c3929d90e 100644
af052108
FG
121--- a/debian/not-installed
122+++ b/debian/not-installed
026bc5c9 123@@ -5,3 +5,5 @@ etc/zfs/vdev_id.conf.alias.example
af052108
FG
124 etc/zfs/vdev_id.conf.multipath.example
125 etc/zfs/vdev_id.conf.sas_direct.example
126 etc/zfs/vdev_id.conf.sas_switch.example
127+usr/lib/dracut
026bc5c9 128+usr/share/zfs/enum-extract.pl
23db3640 129diff --git a/debian/rules b/debian/rules
1fa7e3ca 130index cc47a74a1..a5c37c81d 100755
23db3640
FG
131--- a/debian/rules
132+++ b/debian/rules
b9d59150
FG
133@@ -5,9 +5,6 @@ include /usr/share/dpkg/default.mk
134 LSB_DISTRIBUTOR := $(shell lsb_release -is)
135 NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
23db3640
FG
136
137-DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
138- DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
139-
140 ifndef BUILD_UDEB
141 BUILD_UDEB=false
142 endif
b9d59150 143@@ -17,21 +14,16 @@ KVERS=$(shell uname -r)
e479455e
DM
144 endif
145
146 ifndef SPL
b9d59150 147-SPL=/usr/src/spl-$(DEB_VERSION_UPSTREAM)
23db3640
FG
148-endif
149-
150-ifndef SPLOBJ
b9d59150
FG
151-SPLOBJ=/var/lib/dkms/spl/$(DEB_VERSION_UPSTREAM)/$(KVERS)/$(DEB_TARGET_GNU_CPU)
152+SPL=../spl-build
e479455e
DM
153 endif
154
e479455e
DM
155 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
156 PACKAGE=zfs
23db3640
FG
157-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
158
159 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
e479455e 160
787716f7 161 %:
100fba2d
FG
162- dh $@ --with autoreconf,dkms,python3,systemd --parallel
163+ dh $@ --with autoreconf,python3,systemd --parallel
e479455e 164
23db3640 165 override_dh_auto_configure:
1fa7e3ca 166 sed "s/@LINUX_COMPAT@/linux-libc-dev \(< $(shell debian/get_next.sh)\)/" debian/control.in > debian/control
b9d59150 167@@ -73,36 +65,6 @@ override_dh_auto_install:
2d5ff411
FG
168 $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
169 mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
e479455e
DM
170
171- @# Get a bare copy of the source code for DKMS.
b9d59150 172- @# This creates the $(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/ tree, which does not
e479455e
DM
173- @# contain the userland sources. NB: Remove-userland-dist-rules.patch
174- $(MAKE) distdir
175-
176- @# Install the DKMS source.
177- @# We only want the files needed to build the modules
b9d59150
FG
178- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'
179- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
e479455e
DM
180- @# Hellish awk line:
181- @# * Deletes from configure.ac the parts not needed for building the kernel module
182- @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
183- @# (Makefile$|include/|module/|*.release$)
184- @# * Takes care of spaces and tabs
185- awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/){next} } {print}' \
b9d59150 186- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
e479455e
DM
187- @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
188- sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
b9d59150 189- '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
e479455e 190- @# Sanity test
b9d59150 191- grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
e479455e 192- @# Run autogen on the stripped source tree
b9d59150
FG
193- cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
194- rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
e479455e
DM
195-
196- @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
197- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
b9d59150
FG
198- printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
199- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
e479455e
DM
200-
201 mkdir -p $(CURDIR)/debian/tmp/usr/lib
202 for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
203 ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
b9d59150 204@@ -112,9 +74,6 @@ override_dh_auto_install:
2d5ff411
FG
205 chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
206 chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
787716f7 207
23db3640 208-override_dh_dkms:
b9d59150 209- dh_dkms -V $(DEB_VERSION_UPSTREAM)
23db3640
FG
210-
211 override_dh_makeshlibs:
b9d59150 212 dh_makeshlibs -a -V
23db3640 213 ifeq ($(BUILD_UDEB), true)
b9d59150 214@@ -152,65 +111,5 @@ override_dh_install:
23db3640
FG
215
216 # ------------
217
218-override_dh_prep-deb-files:
219- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
220- 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)/' \
221- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
222- done
223- 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' \
224- < debian/control.modules.in > debian/control
225-
226-override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
227-override_dh_configure_modules_udeb_stamp:
228- ./configure \
229- --without-selinux \
230- --with-config=kernel \
231- --with-linux=$(KSRC) \
232- --with-linux-obj=$(KOBJ) \
233- --with-spl=$(SPL) \
234- --with-spl-obj=$(SPLOBJ)
235- touch override_dh_configure_modules_udeb_stamp
236-
237-override_dh_configure_modules: override_dh_configure_modules_stamp
238-override_dh_configure_modules_stamp:
239- ./configure \
240- --with-config=kernel \
241- --with-linux=$(KSRC) \
242- --with-linux-obj=$(KOBJ) \
243- --with-spl=$(SPL) \
244- --with-spl-obj=$(SPLOBJ)
245- touch override_dh_configure_modules_stamp
246-
247-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
248- dh_testdir
249- dh_testroot
250- dh_prep
251-
252- $(MAKE) -C $(CURDIR)/module modules
253-
254- dh_installdirs -p${pmodules}-di
255- dh_install -p${pmodules}-di
256- dh_gencontrol -p${pmodules}-di
257-
258- dh_builddeb -p${pmodules}-di
259-
260-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
261- dh_testdir
262- dh_testroot
263- dh_prep
264-
265- $(MAKE) -C $(CURDIR)/module modules
266-
267- dh_install -p${pmodules}
268- dh_installdocs -p${pmodules}
269- dh_installchangelogs -p${pmodules}
270- dh_compress -p${pmodules}
271- dh_strip -p${pmodules}
272- dh_fixperms -p${pmodules}
273- dh_installdeb -p${pmodules}
274- dh_gencontrol -p${pmodules}
275- dh_md5sums -p${pmodules}
276- dh_builddeb -p${pmodules}
277-
278 debian-copyright:
279 cme update dpkg-copyright -file debian/copyright.cme
280--
af052108 2812.14.2
23db3640 282