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