]> git.proxmox.com Git - zfsonlinux.git/blob - spl-patches/fix-control
4a153b3a0a1bfcd7b95e2ee070d4011104cfeca6
[zfsonlinux.git] / spl-patches / fix-control
1 Index: new-spl/debian/rules
2 ===================================================================
3 --- new-spl.orig/debian/rules 2015-04-12 14:06:48.000000000 +0200
4 +++ new-spl/debian/rules 2015-04-12 16:51:10.000000000 +0200
5 @@ -24,15 +24,12 @@
6 KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(DEB_HOST_ARCH) | grep ^Version | sed 's/.*: //')
7
8 %:
9 - dh $@ --with dkms
10 + dh $@
11
12 override_dh_prep-base-deb-files:
13 - sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g ; s/##MODULES_BUILD_DEPENDS##/linux-headers-$(KVERS)-common, linux-headers-$(KVERS)-$(DEB_HOST_ARCH)/g' \
14 + sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g ; s/##MODULES_BUILD_DEPENDS##/pve-headers-$(KVERS)/g' \
15 < debian/control.in > debian/control
16
17 - 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 ; s/_IMGVER_/$(KIMGVER)/g' \
18 - < debian/control.modules.in >> debian/control
19 -
20 for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
21 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' \
22 < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
23 @@ -52,8 +49,7 @@
24 @# Build the userland and the modules
25 dh_auto_configure -- \
26 --prefix=/usr \
27 - --with-linux=$(KSRC) \
28 - --with-linux-obj=$(KOBJ)
29 + --with-config=user
30
31 override_dh_auto_test:
32 # scripts/check.sh tries insmod and rmmod, so it cannot
33 @@ -67,36 +63,6 @@
34 @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
35 $(MAKE) distdir
36
37 - # Install the DKMS source.
38 - @# We only want the files needed to build the modules
39 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
40 - touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
41 - rm -Rf '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/include'
42 - $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
43 - @# Hellish awk line:
44 - @# * Deletes from configure.ac the parts not needed for building the kernel module
45 - @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
46 - @# (Makefile$|include/|module/|*.release$)
47 - @# * Takes care of spaces and tabs
48 - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|spl\.release([ \t]+)?$$))/){next} } {print}' \
49 - '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
50 - @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
51 - sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
52 - '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
53 - @# Sanity test
54 - grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
55 - @# Run autogen on the stripped source tree
56 - cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
57 - rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
58 -
59 - @# This shunt allows DKMS to install the Module.symvers and spl_config.h
60 - @# files to the ${dkms_tree} area through the POST_INSTALL directive.
61 - echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
62 - echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
63 - chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
64 -
65 - find '$(CURDIR)/debian/tmp' -name '*~' | xargs rm
66 -
67 override_dh_dkms:
68 dh_dkms -V $(VERSION)
69
70 Index: new-spl/debian/control.in
71 ===================================================================
72 --- new-spl.orig/debian/control.in 2015-04-12 14:06:48.000000000 +0200
73 +++ new-spl/debian/control.in 2015-04-12 16:11:39.000000000 +0200
74 @@ -18,28 +18,6 @@
75 Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
76 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
77
78 -Package: spl-dkms
79 -Architecture: all
80 -Depends: linux-headers-amd64, libc6-dev, ${misc:Depends}, dkms (>> 2.1.1.2-5), lsb-release, file
81 -Recommends: spl (>= ${source:Upstream-Version})
82 -Provides: spl-modules
83 -Description: Solaris Porting Layer kernel modules for Linux
84 - The Solaris Porting Layer (SPL) is a Linux kernel module which provides
85 - many of the Solaris kernel APIs. This shim layer makes it possible to
86 - run Solaris kernel code in the Linux kernel with relatively minimal
87 - modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
88 - module which provides a testing harness for the SPL module.
89 - .
90 - SPL can be particularly useful when you want to track upstream Illumos
91 - (or any other OpenSolaris fork) development closely and don't want the
92 - overhead of maintaining a large patch which converts Solaris primitives
93 - to Linux primitives.
94 - .
95 - This package contains the source code for the SPL and SPLAT Linux kernel
96 - modules, which can be used with DKMS, so that local kernel modules are
97 - automatically built and installed every time the kernel packages are
98 - upgraded.
99 -
100 Package: spl
101 Architecture: linux-any
102 Depends: ${shlibs:Depends}, ${misc:Depends}