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