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