1 From 0337ccd47d411a1db11e09dce1a6d183c2542f29 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 1/3] remove DKMS, modules and dracut build
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
11 debian/control.in | 36 +++---------------
13 debian/not-installed | 1 +
14 debian/rules | 105 +--------------------------------------------------
15 4 files changed, 8 insertions(+), 135 deletions(-)
17 diff --git a/debian/control.in b/debian/control.in
18 index 18d2417cc..79bd9b302 100644
19 --- a/debian/control.in
20 +++ b/debian/control.in
21 @@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
22 dh-systemd | debhelper (>= 10.1),
25 - dkms (>> 2.1.1.2-5),
29 @@ -85,25 +84,11 @@ Description: OpenZFS pool library for Linux
31 This zpool library provides support for managing zpools.
35 -Pre-Depends: spl-dkms (>= ${source:Upstream-Version})
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
40 - The Z file system is a pooled filesystem designed for maximum data
41 - integrity, supporting data snapshots, multiple copies, and data
44 - This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
47 Package: zfs-initramfs
49 Depends: initramfs-tools,
50 busybox-initramfs | busybox-static | busybox,
51 - zfs-modules | zfs-dkms, zfsutils-linux,
54 Description: OpenZFS root filesystem capabilities for Linux - initramfs
55 The Z file system is a pooled filesystem designed for maximum data
56 @@ -113,23 +98,12 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
57 This package adds OpenZFS to the system initramfs with a hook
58 for the initramfs-tools infrastructure.
62 -Depends: dracut, zfs-modules | zfs-dkms, zfsutils-linux, ${misc:Depends}
63 -Description: OpenZFS root filesystem capabilities for Linux - dracut
64 - The Z file system is a pooled filesystem designed for maximum data
65 - integrity, supporting data snapshots, multiple copies, and data
68 - This package adds OpenZFS to the system initramfs with a hook
69 - for the dracut infrastructure.
71 Package: zfsutils-linux
72 Section: contrib/admin
73 Architecture: linux-any
74 Depends: ${misc:Depends}, ${shlibs:Depends}, ${python3:Depends}, python3
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
81 Description: command-line tools to manage OpenZFS filesystems
82 @@ -143,7 +117,7 @@ Description: command-line tools to manage OpenZFS filesystems
84 Section: contrib/admin
85 Architecture: linux-any
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
91 @@ -154,7 +128,7 @@ Description: OpenZFS Event Daemon
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
97 Description: OpenZFS test infrastructure an support scripts
98 The Z file system is a pooled filesystem designed for maximum data
99 integrity, supporting data snapshots, multiple copies, and data
100 diff --git a/debian/control b/debian/control
101 index 18d2417cc..b426b93c0 100644
104 @@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
105 dh-systemd | debhelper (>= 10.1),
108 - dkms (>> 2.1.1.2-5),
112 diff --git a/debian/not-installed b/debian/not-installed
113 index 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
121 diff --git a/debian/rules b/debian/rules
122 index 800df22e0..8c5beca10 100755
125 @@ -5,9 +5,6 @@ NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
126 VERSION := $(shell dpkg-parsechangelog \
127 | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1)
129 -DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
130 - DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
135 @@ -21,21 +18,16 @@ KVERS=$(shell uname -r)
139 -SPL=/usr/src/spl-$(VERSION)
143 -SPLOBJ=/var/lib/dkms/spl/$(VERSION)/$(KVERS)/$(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
147 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
149 -pmodules = $(PACKAGE)-modules-$(non_epoch_version)
151 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
154 - dh $@ --with autoreconf,dkms,python3,systemd --parallel
155 + dh $@ --with autoreconf,python3,systemd --parallel
157 override_dh_auto_configure:
158 @cp debian/control.in debian/control
159 @@ -77,36 +69,6 @@ override_dh_auto_install:
160 $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
161 mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
163 - @# Get a bare copy of the source code for DKMS.
164 - @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
165 - @# contain the userland sources. NB: Remove-userland-dist-rules.patch
168 - @# Install the DKMS source.
169 - @# We only want the files needed to build the modules
170 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
171 - $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
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}' \
178 - '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
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;' \
181 - '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
183 - grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
184 - @# Run autogen on the stripped source tree
185 - cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
186 - rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
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.
190 - printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
191 - chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
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}`; \
196 @@ -116,9 +78,6 @@ override_dh_auto_install:
197 chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
198 chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
201 - dh_dkms -V $(VERSION)
203 override_dh_makeshlibs:
205 ifeq ($(BUILD_UDEB), true)
206 @@ -156,65 +115,5 @@ override_dh_install:
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$$//'` ; \
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
218 -override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
219 -override_dh_configure_modules_udeb_stamp:
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
229 -override_dh_configure_modules: override_dh_configure_modules_stamp
230 -override_dh_configure_modules_stamp:
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
239 -override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
244 - $(MAKE) -C $(CURDIR)/module modules
246 - dh_installdirs -p${pmodules}-di
247 - dh_install -p${pmodules}-di
248 - dh_gencontrol -p${pmodules}-di
250 - dh_builddeb -p${pmodules}-di
252 -override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
257 - $(MAKE) -C $(CURDIR)/module modules
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}
271 cme update dpkg-copyright -file debian/copyright.cme