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
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 | 37 +++---------------
13 debian/not-installed | 1 +
14 debian/rules | 105 +--------------------------------------------------
15 4 files changed, 8 insertions(+), 136 deletions(-)
17 diff --git a/debian/control.in b/debian/control.in
18 index b3ef99870..8e69b6e37 100644
19 --- a/debian/control.in
20 +++ b/debian/control.in
21 @@ -8,7 +8,6 @@ Uploaders: Aron Xu <aron@debian.org>,
22 Build-Depends: dh-autoreconf,
25 - dkms (>> 2.1.1.2-5),
29 @@ -84,25 +83,11 @@ Description: OpenZFS pool library for Linux
31 This zpool library provides support for managing zpools.
35 -Pre-Depends: spl-dkms (>= ${source:Upstream-Version}), spl-dkms (<<${source:Upstream-Version}.)
36 -Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}
37 -Recommends: zfsutils-linux (>= ${binary:Version}), 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 (>= ${binary:Version}),
52 + zfsutils-linux (>= ${binary:Version}),
54 Description: OpenZFS root filesystem capabilities for Linux - initramfs
55 The Z file system is a pooled filesystem designed for maximum data
56 @@ -112,24 +97,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 (>= ${binary:Version}), ${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 -Breaks: zfs-dkms (>> ${binary:Version}), zfs-dkms (<< ${binary:Version})
77 -Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
78 +Recommends: lsb-base, zfs-zed
79 +Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs
80 Conflicts: zfs, zfs-fuse, zutils
82 Description: command-line tools to manage OpenZFS filesystems
83 @@ -143,7 +116,7 @@ Description: command-line tools to manage OpenZFS filesystems
85 Section: contrib/admin
86 Architecture: linux-any
87 -Depends: ${misc:Depends}, ${shlibs:Depends}, zfs-modules | zfs-dkms, zfsutils-linux (>= ${binary:Version})
88 +Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux (>= ${binary:Version})
89 Description: OpenZFS Event Daemon
90 The Z file system is a pooled filesystem designed for maximum data
91 integrity, supporting data snapshots, multiple copies, and data
92 @@ -154,7 +127,7 @@ Description: OpenZFS Event Daemon
94 Section: contrib/admin
95 Architecture: linux-any
96 -Depends: ${misc:Depends}, ${shlibs:Depends}, zfs-modules | zfs-dkms, zfsutils-linux (>=${binary:Version}), parted, lsscsi, mdadm, bc, ksh, fio, acl, sudo, sysstat, python
97 +Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux (>=${binary:Version}), parted, lsscsi, mdadm, bc, ksh, fio, acl, sudo, sysstat, python
98 Breaks: zfsutils-linux (<= 0.6.5.11-1)
99 Replaces: zfsutils-linux (<= 0.6.5.11-1)
100 Description: OpenZFS test infrastructure an support scripts
101 diff --git a/debian/control b/debian/control
102 index b3ef99870..816403e44 100644
105 @@ -8,7 +8,6 @@ Uploaders: Aron Xu <aron@debian.org>,
106 Build-Depends: dh-autoreconf,
109 - dkms (>> 2.1.1.2-5),
113 diff --git a/debian/not-installed b/debian/not-installed
114 index f54fe7310..16b1cef6c 100644
115 --- a/debian/not-installed
116 +++ b/debian/not-installed
117 @@ -5,3 +5,4 @@ etc/zfs/vdev_id.conf.alias.example
118 etc/zfs/vdev_id.conf.multipath.example
119 etc/zfs/vdev_id.conf.sas_direct.example
120 etc/zfs/vdev_id.conf.sas_switch.example
122 diff --git a/debian/rules b/debian/rules
123 index f445b58c5..d71926b33 100755
126 @@ -5,9 +5,6 @@ include /usr/share/dpkg/default.mk
127 LSB_DISTRIBUTOR := $(shell lsb_release -is)
128 NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
130 -DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
131 - DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
136 @@ -17,21 +14,16 @@ KVERS=$(shell uname -r)
140 -SPL=/usr/src/spl-$(DEB_VERSION_UPSTREAM)
144 -SPLOBJ=/var/lib/dkms/spl/$(DEB_VERSION_UPSTREAM)/$(KVERS)/$(DEB_TARGET_GNU_CPU)
148 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
150 -pmodules = $(PACKAGE)-modules-$(non_epoch_version)
152 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
155 - dh $@ --with autoreconf,dkms,python3,systemd --parallel
156 + dh $@ --with autoreconf,python3,systemd --parallel
158 override_dh_auto_configure:
159 @cp debian/control.in debian/control
160 @@ -73,36 +65,6 @@ override_dh_auto_install:
161 $(INSTALL) -d '$(CURDIR)/debian/tmp/usr/sbin/'
162 mv '$(CURDIR)/debian/tmp/sbin/zed' '$(CURDIR)/debian/tmp/usr/sbin/zed'
164 - @# Get a bare copy of the source code for DKMS.
165 - @# This creates the $(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/ tree, which does not
166 - @# contain the userland sources. NB: Remove-userland-dist-rules.patch
169 - @# Install the DKMS source.
170 - @# We only want the files needed to build the modules
171 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'
172 - $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)' || exit 1;)
173 - @# Hellish awk line:
174 - @# * Deletes from configure.ac the parts not needed for building the kernel module
175 - @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
176 - @# (Makefile$|include/|module/|*.release$)
177 - @# * Takes care of spaces and tabs
178 - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/){next} } {print}' \
179 - '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/configure.ac'
180 - @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
181 - sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
182 - '$(CURDIR)/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
184 - grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/Makefile.am'
185 - @# Run autogen on the stripped source tree
186 - cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)'; ./autogen.sh
187 - rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/autom4te.cache'
189 - @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
190 - @# files to the ${dkms_tree} area through the POST_INSTALL directive.
191 - printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
192 - chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(DEB_VERSION_UPSTREAM)/cp'
194 mkdir -p $(CURDIR)/debian/tmp/usr/lib
195 for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
196 ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
197 @@ -112,9 +74,6 @@ override_dh_auto_install:
198 chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
199 chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
202 - dh_dkms -V $(DEB_VERSION_UPSTREAM)
204 override_dh_makeshlibs:
206 ifeq ($(BUILD_UDEB), true)
207 @@ -152,65 +111,5 @@ override_dh_install:
211 -override_dh_prep-deb-files:
212 - for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
213 - 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)/' \
214 - < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
216 - 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' \
217 - < debian/control.modules.in > debian/control
219 -override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
220 -override_dh_configure_modules_udeb_stamp:
222 - --without-selinux \
223 - --with-config=kernel \
224 - --with-linux=$(KSRC) \
225 - --with-linux-obj=$(KOBJ) \
226 - --with-spl=$(SPL) \
227 - --with-spl-obj=$(SPLOBJ)
228 - touch override_dh_configure_modules_udeb_stamp
230 -override_dh_configure_modules: override_dh_configure_modules_stamp
231 -override_dh_configure_modules_stamp:
233 - --with-config=kernel \
234 - --with-linux=$(KSRC) \
235 - --with-linux-obj=$(KOBJ) \
236 - --with-spl=$(SPL) \
237 - --with-spl-obj=$(SPLOBJ)
238 - touch override_dh_configure_modules_stamp
240 -override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
245 - $(MAKE) -C $(CURDIR)/module modules
247 - dh_installdirs -p${pmodules}-di
248 - dh_install -p${pmodules}-di
249 - dh_gencontrol -p${pmodules}-di
251 - dh_builddeb -p${pmodules}-di
253 -override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
258 - $(MAKE) -C $(CURDIR)/module modules
260 - dh_install -p${pmodules}
261 - dh_installdocs -p${pmodules}
262 - dh_installchangelogs -p${pmodules}
263 - dh_compress -p${pmodules}
264 - dh_strip -p${pmodules}
265 - dh_fixperms -p${pmodules}
266 - dh_installdeb -p${pmodules}
267 - dh_gencontrol -p${pmodules}
268 - dh_md5sums -p${pmodules}
269 - dh_builddeb -p${pmodules}
272 cme update dpkg-copyright -file debian/copyright.cme