]> git.proxmox.com Git - zfsonlinux.git/blob - spl-patches/fix-control.patch
update to update to 0.6.4.2
[zfsonlinux.git] / spl-patches / fix-control.patch
1 Index: pkg-spl/debian/control.in
2 ===================================================================
3 --- pkg-spl.orig/debian/control.in
4 +++ pkg-spl/debian/control.in
5 @@ -33,32 +33,9 @@ Description: Native ZFS filesystem kerne
6 This package provides the source to the SPL kernel module in a form
7 suitable for use by module-assistant or kernel-package.
8
9 -Package: spl-dkms
10 -Architecture: all
11 -Depends: linux-headers-amd64, ${misc:Depends}, dkms (>> 2.1.1.2-5), lsb-release, file
12 -Recommends: spl (>= ${source:Upstream-Version})
13 -Provides: spl-modules
14 -Description: Solaris Porting Layer kernel modules for Linux
15 - The Solaris Porting Layer (SPL) is a Linux kernel module which provides
16 - many of the Solaris kernel APIs. This shim layer makes it possible to
17 - run Solaris kernel code in the Linux kernel with relatively minimal
18 - modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
19 - module which provides a testing harness for the SPL module.
20 - .
21 - SPL can be particularly useful when you want to track upstream Illumos
22 - (or any other OpenSolaris fork) development closely and don't want the
23 - overhead of maintaining a large patch which converts Solaris primitives
24 - to Linux primitives.
25 - .
26 - This package contains the source code for the SPL and SPLAT Linux kernel
27 - modules, which can be used with DKMS, so that local kernel modules are
28 - automatically built and installed every time the kernel packages are
29 - upgraded.
30 -
31 Package: spl
32 Architecture: linux-any
33 Depends: ${shlibs:Depends}, ${misc:Depends}
34 -Recommends: spl-modules | spl-dkms
35 Description: Solaris Porting Layer user-space utilities for Linux
36 The Solaris Porting Layer (SPL) is a Linux kernel module which provides
37 many of the Solaris kernel APIs. This shim layer makes it possible to
38 Index: pkg-spl/debian/rules
39 ===================================================================
40 --- pkg-spl.orig/debian/rules
41 +++ pkg-spl/debian/rules
42 @@ -22,9 +22,7 @@ ifndef KVERS
43 KVERS=$(shell uname -r | sed 's/-$(DEB_HOST_ARCH)//')
44 endif
45
46 -CFG_OPTS=--without-selinux \
47 - --with-linux=$(KSRC) \
48 - --with-linux-obj=$(KOBJ)
49 +CFG_OPTS=--without-selinux
50
51 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
52 PACKAGE=spl
53 @@ -33,7 +31,7 @@ pmodules = $(PACKAGE)-modules-$(non_epoc
54 KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(DEB_HOST_ARCH) | grep ^Version | sed 's/.*: //')
55
56 %:
57 - dh $@ --with dkms --parallel
58 + dh $@ --parallel
59
60 override_dh_prep-base-deb-files:
61 sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g' < debian/control.in > debian/control
62 @@ -70,64 +68,6 @@ override_dh_auto_install:
63 @# Install the utilities.
64 $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
65
66 - @# Get a bare copy of the source code for DKMS.
67 - @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
68 - @# contain the userland sources. NB: Remove-userland-dist-rules.patch
69 - $(MAKE) distdir
70 -
71 - @# Install the DKMS source.
72 - @# We only want the files needed to build the modules
73 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
74 - touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
75 - cp '$(CURDIR)/autogen.sh' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/'
76 - ( for d in include module config; do \
77 - rm -Rf $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/$$d; \
78 - done)
79 - $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
80 - @# Hellish awk line:
81 - @# * Deletes from configure.ac the parts not needed for building the kernel module
82 - @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
83 - @# (Makefile$|include/|module/|*.release$)
84 - @# * Takes care of spaces and tabs
85 - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|spl\.release([ \t]+)?$$))/){next} } {print}' \
86 - '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
87 - @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
88 - sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
89 - '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
90 - @# Sanity test
91 - grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
92 - @# Run autogen on the stripped source tree
93 - cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
94 - rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
95 -
96 - @# This shunt allows DKMS to install the Module.symvers and spl_config.h
97 - @# files to the ${dkms_tree} area through the POST_INSTALL directive.
98 - echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
99 - echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
100 - chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
101 -
102 - @# Duplicate the dkms directory for module-assistant source package
103 - install -d $(CURDIR)/debian/tmp/usr/src/modules
104 - cp -r $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION) $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)
105 - mkdir -p $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian
106 - cp debian/copyright debian/module/* \
107 - $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/
108 - sed 's/^spl-linux /spl-modules /' debian/changelog \
109 - > $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/changelog
110 - chmod 755 $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/rules
111 - chown -R root.src $(CURDIR)/debian/tmp
112 - find $(CURDIR)/debian/tmp/usr/src -type d | xargs chmod 755
113 - find $(CURDIR)/debian/tmp/usr/src -type f -perm -100 | xargs chmod 755
114 - find $(CURDIR)/debian/tmp/usr/src -type f -not -perm -100 | xargs chmod 644
115 - chmod 775 $(CURDIR)/debian/tmp/usr/src/modules
116 - cd $(CURDIR)/debian/tmp/usr/src && tar cf $(PACKAGE).tar modules
117 - rm -Rf $(CURDIR)/debian/tmp/usr/src/modules
118 - bzip2 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar
119 - chmod 644 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2
120 - install -d $(CURDIR)/debian/spl-modules-source/usr/src
121 - mv $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2 $(CURDIR)/debian/spl-modules-source/usr/src/
122 - rm -Rf $(CURDIR)/debian/spl-modules-source/usr/src/$(NAME)-$(VERSION)
123 -
124 override_dh_dkms:
125 dh_dkms -V $(VERSION)
126