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