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