]> git.proxmox.com Git - zfsonlinux.git/blob - spl-patches/0001-remove-DKMS-and-module-build.patch
rebase SPL on top of debian/0.7.11
[zfsonlinux.git] / spl-patches / 0001-remove-DKMS-and-module-build.patch
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: Wed, 12 Oct 2016 10:57:39 +0200
4 Subject: [PATCH] remove DKMS and module build
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
11 ---
12 debian/control | 1 -
13 debian/control.in | 31 -------------------------
14 debian/rules | 67 +------------------------------------------------------
15 3 files changed, 1 insertion(+), 98 deletions(-)
16
17 diff --git a/debian/control b/debian/control
18 index d83f962..f780c80 100644
19 --- a/debian/control
20 +++ b/debian/control
21 @@ -9,7 +9,6 @@ Build-Depends: autogen,
22 autotools-dev,
23 debhelper (>= 9),
24 dh-autoreconf,
25 - dkms (>> 2.2.0.2-1~),
26 libtool
27 Standards-Version: 4.1.2
28 Homepage: http://www.zfsonlinux.org/
29 diff --git a/debian/control.in b/debian/control.in
30 index 0e6c3fc..c8fe170 100644
31 --- a/debian/control.in
32 +++ b/debian/control.in
33 @@ -9,47 +9,16 @@ Build-Depends: autogen,
34 autotools-dev,
35 debhelper (>= 9),
36 dh-autoreconf,
37 - dkms (>> 2.2.0.2-1~),
38 libtool
39 Standards-Version: 4.1.2
40 Homepage: http://www.zfsonlinux.org/
41 Vcs-Git: https://salsa.debian.org/zfsonlinux-team/spl.git
42 Vcs-Browser: https://salsa.debian.org/zfsonlinux-team/spl
43
44 -Package: spl-dkms
45 -Architecture: all
46 -Depends: dkms (>> 2.2.1.0),
47 - file,
48 - libc-dev,
49 - libelf-dev,
50 - lsb-release,
51 - ${misc:Depends}
52 -Suggests: spl (>= ${source:Upstream-Version}),
53 - @LINUX_COMPAT@
54 -Conflicts: spl (<< 0.7.9~)
55 -Provides: spl-modules
56 -Description: Solaris Porting Layer kernel modules for Linux
57 - The Solaris Porting Layer (SPL) is a Linux kernel module which provides
58 - many of the Solaris kernel APIs. This shim layer makes it possible to
59 - run Solaris kernel code in the Linux kernel with relatively minimal
60 - modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
61 - module which provides a testing harness for the SPL module.
62 - .
63 - SPL can be particularly useful when you want to track upstream Illumos
64 - (or any other OpenSolaris fork) development closely and don't want the
65 - overhead of maintaining a large patch which converts Solaris primitives
66 - to Linux primitives.
67 - .
68 - This package contains the source code for the SPL and SPLAT Linux kernel
69 - modules, which can be used with DKMS, so that local kernel modules are
70 - automatically built and installed every time the kernel packages are
71 - upgraded.
72 -
73 Package: spl
74 Architecture: linux-any
75 Conflicts: spl-dev, splat
76 Depends: ${misc:Depends}, ${shlibs:Depends}
77 -Recommends: spl-modules | spl-dkms
78 Description: Solaris Porting Layer user-space utilities for Linux
79 The Solaris Porting Layer (SPL) is a Linux kernel module which provides
80 many of the Solaris kernel APIs. This shim layer makes it possible to
81 diff --git a/debian/rules b/debian/rules
82 index 72ded49..5abeebb 100755
83 --- a/debian/rules
84 +++ b/debian/rules
85 @@ -14,11 +14,8 @@ ifndef KVERS
86 KVERS=$(shell uname -r)
87 endif
88
89 -non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
90 -pmodules = $(NAME)-modules-$(non_epoch_version)
91 -
92 %:
93 - dh $@ --with dkms,autoreconf --parallel
94 + dh $@ --with autoreconf --parallel
95
96 override_dh_auto_configure:
97 sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)~\)/" debian/control.in > debian/control
98 @@ -44,69 +41,7 @@ override_dh_auto_install:
99 @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
100 $(MAKE) distdir
101
102 - @# This shunt allows DKMS to install the Module.symvers and spl_config.h
103 - @# files to the ${dkms_tree} area through the POST_INSTALL directive.
104 - echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
105 - echo 'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
106 - chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
107 -
108 - # Install the DKMS source.
109 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
110 - mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
111 -
112 -override_dh_dkms:
113 - dh_dkms -V $(VERSION)
114 -
115 override_dh_auto_clean:
116 dh_auto_clean
117 @if test -e META.orig; then mv META.orig META; fi
118 sed "s/@LINUX_COMPAT@/linux-libc-dev \(<< $(LINUX_NEXT)~\)/" debian/control.in > debian/control
119 -
120 -# ------------
121 -
122 -override_dh_prep-deb-files:
123 - for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
124 - 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' \
125 - < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
126 - done
127 - 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' \
128 - < debian/control.modules.in > debian/control
129 -
130 -override_dh_configure_modules: override_dh_configure_modules_stamp
131 -override_dh_configure_modules_stamp:
132 - ./configure --with-config=kernel --with-linux=$(KSRC) \
133 - --with-linux-obj=$(KOBJ) \
134 - --disable-debug-kmem
135 - touch override_dh_configure_modules_stamp
136 -
137 -override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules
138 - dh_testdir
139 - dh_testroot
140 - dh_prep
141 -
142 - $(MAKE) -C $(CURDIR)/module modules
143 -
144 - dh_installdirs -p${pmodules}-di
145 - dh_install -p${pmodules}-di
146 - dh_gencontrol -p${pmodules}-di
147 -
148 - dh_builddeb -p${pmodules}-di
149 -
150 -override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
151 - dh_testdir
152 - dh_testroot
153 - dh_prep
154 -
155 - $(MAKE) -C $(CURDIR)/module modules
156 -
157 - dh_installdocs -p${pmodules}
158 - dh_install -p${pmodules}
159 - dh_installchangelogs -p${pmodules}
160 - dh_compress -p${pmodules}
161 - dh_strip -p${pmodules}
162 - dh_fixperms -p${pmodules}
163 - dh_installdeb -p${pmodules}
164 - dh_gencontrol -p${pmodules}
165 - dh_md5sums -p${pmodules}
166 -
167 - dh_builddeb -p${pmodules}