]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/fix-control.patch
update to update to 0.6.4.2
[zfsonlinux.git] / zfs-patches / fix-control.patch
1 Index: pkg-zfs/debian/control.in
2 ===================================================================
3 --- pkg-zfs.orig/debian/control.in
4 +++ pkg-zfs/debian/control.in
5 @@ -102,39 +102,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: zfs-dkms
10 -Architecture: all
11 -Pre-Depends: spl-dkms
12 -Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}, file
13 -Recommends: zfsutils
14 -Replaces: lzfs, lzfs-dkms
15 -Provides: lustre-backend-fs, lzfs, lzfs-dkms, zfs-modules, zfs-modules-source
16 -Conflicts: lzfs, lzfs-dkms
17 -Description: Native ZFS filesystem kernel modules for Linux
18 - The Z file system is a pooled filesystem designed for maximum data
19 - integrity, supporting data snapshots, multiple copies, and data
20 - checksums.
21 - .
22 - This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of ZFS.
23 -
24 -Package: zfs-dracut
25 -Section: utils
26 -Architecture: linux-any
27 -Depends: dracut,
28 - zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version}),
29 - zfsutils, ${misc:Depends}
30 -Description: Native ZFS root filesystem capabilities for Linux
31 - The Z file system is a pooled filesystem designed for maximum data
32 - integrity, supporting data snapshots, multiple copies, and data
33 - checksums.
34 - .
35 - This package adds ZFS to the system initramfs with a hook
36 - for the dracut infrastructure.
37 -
38 Package: zfs-initramfs
39 Architecture: linux-any
40 Depends: initramfs-tools, busybox,
41 - zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version}),
42 zfsutils, ${misc:Depends}
43 Description: Native ZFS root filesystem capabilities for Linux
44 The Z file system is a pooled filesystem designed for maximum data
45 @@ -148,7 +118,6 @@ Package: zfsutils
46 Section: admin
47 Architecture: linux-any
48 Depends: initscripts, lsb-base, python, ${misc:Depends}, ${shlibs:Depends}
49 -Recommends: zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version})
50 Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs
51 Conflicts: zfs, zfs-fuse
52 Replaces: zfs
53 Index: pkg-zfs/debian/rules
54 ===================================================================
55 --- pkg-zfs.orig/debian/rules
56 +++ pkg-zfs/debian/rules
57 @@ -25,12 +25,10 @@ KARCH=$(shell uname -r | sed "s/.*-\([a-
58 endif
59
60 ifndef SPL
61 -SPLSRC=/usr/src/spl-$(VERSION)
62 +SPLSRC=../pkg-spl
63 endif
64
65 -CFG_OPTS=--with-linux=$(KSRC) \
66 - --with-linux-obj=$(KOBJ) \
67 - --with-spl=$(SPLSRC)
68 +CFG_OPTS=--with-spl=$(SPLSRC)
69
70 non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
71 PACKAGE=zfs
72 @@ -41,7 +39,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
73 KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(KARCH) | grep ^Version | sed 's/.*: //')
74
75 %:
76 - dh $@ --with dkms --parallel
77 + dh $@ --parallel
78
79 override_dh_prep-base-deb-files:
80 sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g' < debian/control.in > debian/control
81 @@ -83,42 +81,6 @@ override_dh_auto_install:
82 @# Install the utilities.
83 $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
84
85 - @# Get a bare copy of the source code for DKMS.
86 - @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
87 - @# contain the userland sources. NB: Remove-userland-dist-rules.patch
88 - $(MAKE) distdir
89 -
90 - @# Install the DKMS source.
91 - @# We only want the files needed to build the modules
92 - mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
93 - touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
94 - cp '$(CURDIR)/autogen.sh' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/'
95 - ( for d in include module config; do \
96 - rm -Rf $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/$$d; \
97 - done)
98 - $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
99 - @# Hellish awk line:
100 - @# * Deletes from configure.ac the parts not needed for building the kernel module
101 - @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
102 - @# (Makefile$|include/|module/|*.release$)
103 - @# * Takes care of spaces and tabs
104 - awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|zfs\.release([ \t]+)?$$))/){next} } {print}' \
105 - '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
106 - @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
107 - sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
108 - '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
109 - @# Sanity test
110 - grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
111 - @# Run autogen on the stripped source tree
112 - cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
113 - rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
114 -
115 - @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
116 - @# files to the ${dkms_tree} area through the POST_INSTALL directive.
117 - echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
118 - echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
119 - chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
120 -
121 mkdir -p $(CURDIR)/debian/tmp/usr/lib
122 for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
123 ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
124 @@ -137,28 +99,6 @@ override_dh_auto_install:
125 # Fix the includes according to https://github.com/zfsonlinux/zfs/issues/2903
126 ./debian/fix_includes-libspl.sh
127
128 - @# Duplicate the dkms directory for module-assistant source package
129 - install -d $(CURDIR)/debian/tmp/usr/src/modules
130 - cp -r $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION) $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)
131 - mkdir -p $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian
132 - cp debian/copyright debian/module/* \
133 - $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/
134 - sed 's/^zfs-linux /zfs-modules /' debian/changelog \
135 - > $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/changelog
136 - chmod 755 $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/rules
137 - chown -R root.src $(CURDIR)/debian/tmp
138 - find $(CURDIR)/debian/tmp/usr/src -type d | xargs chmod 755
139 - find $(CURDIR)/debian/tmp/usr/src -type f -perm -100 | xargs chmod 755
140 - find $(CURDIR)/debian/tmp/usr/src -type f -not -perm -100 | xargs chmod 644
141 - chmod 775 $(CURDIR)/debian/tmp/usr/src/modules
142 - cd $(CURDIR)/debian/tmp/usr/src && tar cf $(PACKAGE).tar modules
143 - rm -Rf $(CURDIR)/debian/tmp/usr/src/modules
144 - bzip2 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar
145 - chmod 644 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2
146 - install -d $(CURDIR)/debian/zfs-modules-source/usr/src
147 - mv $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2 $(CURDIR)/debian/zfs-modules-source/usr/src/
148 - rm -Rf $(CURDIR)/debian/zfs-modules-source/usr/src/$(NAME)-$(VERSION)
149 -
150 override_dh_installinit:
151 @# Install systemd files
152 dh_systemd_enable -pzfsutils etc/systemd/system/zfs.target