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 | 41 ++------------------
13 debian/not-installed | 1 +
14 debian/rules | 105 +--------------------------------------------------
15 4 files changed, 6 insertions(+), 142 deletions(-)
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,
25 - dkms (>> 2.1.1.2-5),
29 @@ -86,27 +85,10 @@ Description: OpenZFS pool library for Linux
31 This zpool library provides support for managing zpools.
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}),
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
46 - This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
49 Package: zfs-initramfs
51 Depends: busybox-initramfs | busybox-static | busybox,
53 - zfs-modules | zfs-dkms,
54 zfsutils-linux (>= ${binary:Version}),
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.
64 - zfs-modules | zfs-dkms,
65 - zfsutils-linux (>= ${binary:Version}),
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
72 - This package adds OpenZFS to the system initramfs with a hook
73 - for the dracut infrastructure.
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
86 Conflicts: zfs, zfs-fuse, zutils
88 Description: command-line tools to manage OpenZFS filesystems
89 @@ -153,8 +120,7 @@ Description: command-line tools to manage OpenZFS filesystems
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}),
98 Description: OpenZFS Event Daemon
99 @@ -177,7 +143,6 @@ Depends: acl,
103 - zfs-modules | zfs-dkms,
104 zfsutils-linux (>=${binary:Version}),
107 diff --git a/debian/control b/debian/control
108 index 3cf6fb649..51cfe6a64 100644
111 @@ -9,7 +9,6 @@ Build-Depends: autotools-dev,
115 - dkms (>> 2.1.1.2-5),
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
128 diff --git a/debian/rules b/debian/rules
129 index cc47a74a1..a5c37c81d 100755
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)
136 -DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
137 - DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
142 @@ -17,21 +14,16 @@ KVERS=$(shell uname -r)
146 -SPL=/usr/src/spl-$(DEB_VERSION_UPSTREAM)
150 -SPLOBJ=/var/lib/dkms/spl/$(DEB_VERSION_UPSTREAM)/$(KVERS)/$(DEB_TARGET_GNU_CPU)
154 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
156 -pmodules = $(PACKAGE)-modules-$(non_epoch_version)
158 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
161 - dh $@ --with autoreconf,dkms,python3,systemd --parallel
162 + dh $@ --with autoreconf,python3,systemd --parallel
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'
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
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'
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'
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'
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
208 - dh_dkms -V $(DEB_VERSION_UPSTREAM)
210 override_dh_makeshlibs:
212 ifeq ($(BUILD_UDEB), true)
213 @@ -152,65 +111,5 @@ override_dh_install:
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$$//'` ; \
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
225 -override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
226 -override_dh_configure_modules_udeb_stamp:
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
236 -override_dh_configure_modules: override_dh_configure_modules_stamp
237 -override_dh_configure_modules_stamp:
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
246 -override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
251 - $(MAKE) -C $(CURDIR)/module modules
253 - dh_installdirs -p${pmodules}-di
254 - dh_install -p${pmodules}-di
255 - dh_gencontrol -p${pmodules}-di
257 - dh_builddeb -p${pmodules}-di
259 -override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
264 - $(MAKE) -C $(CURDIR)/module modules
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}
278 cme update dpkg-copyright -file debian/copyright.cme