[pve-devel] [RFC zfsonlinux 1/3] switch pkg source to Debian Jessie
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Oct 14 15:22:37 CEST 2016
update to 0.6.5.8
drop unneeded patches
refresh no-DKMS and no-dracut patches
---
Note: this patch does not apply because of the binary diff lines,
remove those before applying.
Makefile | 26 +--
pkg-spl.tar.gz | Bin 14477761 -> 4036845 bytes
pkg-zfs.tar.gz | Bin 38521842 -> 11020426 bytes
spl-patches/fix-control.patch | 200 +++++++++---------
zfs-patches/add-zfsutils-preinst-postinst.patch | 63 ++++++
zfs-patches/fix-control.patch | 259 ++++++++++++++++--------
zfs-patches/fix-dh-installinit.patch | 96 ---------
zfs-patches/series | 3 +-
zfs-patches/skip-unneeded-pull-requests.patch | 21 --
9 files changed, 354 insertions(+), 314 deletions(-)
create mode 100644 zfs-patches/add-zfsutils-preinst-postinst.patch
delete mode 100644 zfs-patches/fix-dh-installinit.patch
delete mode 100644 zfs-patches/skip-unneeded-pull-requests.patch
diff --git a/Makefile b/Makefile
index 15bbbcf..942617b 100644
--- a/Makefile
+++ b/Makefile
@@ -17,14 +17,15 @@ SPL_DEBS= \
spl_${SPLPKGVER}_amd64.deb
ZFS_DEBS= \
-libnvpair1_${ZFSPKGVER}_amd64.deb \
-libuutil1_${ZFSPKGVER}_amd64.deb \
-libzfs2_${ZFSPKGVER}_amd64.deb \
-libzfs-dev_${ZFSPKGVER}_amd64.deb \
-libzpool2_${ZFSPKGVER}_amd64.deb \
+libnvpair1linux_${ZFSPKGVER}_amd64.deb \
+libuutil1linux_${ZFSPKGVER}_amd64.deb \
+libzfs2linux_${ZFSPKGVER}_amd64.deb \
+libzfslinux-dev_${ZFSPKGVER}_amd64.deb \
+libzpool2linux_${ZFSPKGVER}_amd64.deb \
zfs-dbg_${ZFSPKGVER}_amd64.deb \
-zfs-initramfs_${ZFSPKGVER}_amd64.deb \
-zfsutils_${ZFSPKGVER}_amd64.deb
+zfs-zed_${ZFSPKGVER}_amd64.deb \
+zfs-initramfs_${ZFSPKGVER}_all.deb \
+zfsutils-linux_${ZFSPKGVER}_amd64.deb
DEBS=${SPL_DEBS} ${ZFS_DEBS}
@@ -43,7 +44,6 @@ spl ${SPL_DEBS}: ${SPLSRC}
cd ${SPLDIR}; ln -s ../spl-patches patches
cd ${SPLDIR}; quilt push -a
cd ${SPLDIR}; rm -rf .pc ./patches
- cd ${SPLDIR}; ./debian/rules override_dh_prep-base-deb-files
cd ${SPLDIR}; dpkg-buildpackage -b -uc -us
.PHONY: zfs
@@ -55,16 +55,16 @@ zfs ${ZFS_DEBS}: ${ZFSSRC}
cd ${ZFSDIR}; ln -s ../zfs-patches patches
cd ${ZFSDIR}; quilt push -a
cd ${ZFSDIR}; rm -rf .pc ./patches
- cd ${ZFSDIR}; ./debian/rules override_dh_prep-base-deb-files
cd ${ZFSDIR}; dpkg-buildpackage -b -uc -us
.PHONY: download
download:
rm -rf pkg-spl pkg-zfs ${SPLSRC} ${ZFSSRC}
- # clone pkg-spl and checkout 0.6.5.7-5
- git clone -b master/debian/jessie/0.6.5.7-5-jessie https://github.com/zfsonlinux/pkg-spl.git
- # clone pkg-zfs and checkout 0.6.5.7-8
- git clone -b master/debian/jessie/0.6.5.7-8-jessie https://github.com/zfsonlinux/pkg-zfs.git
+ # clone pkg-zfsonlinux/spl and checkout 0.6.5.8-2
+ git clone -b debian/0.6.5.8-2 git://anonscm.debian.org/pkg-zfsonlinux/spl.git pkg-spl
+ # clone pkg-zfsonlinux/zfs and checkout 0.6.5.8-1
+ git clone git://anonscm.debian.org/pkg-zfsonlinux/zfs.git pkg-zfs
+ cd pkg-zfs; git checkout dcd337ff3c03ed63a2435960a6290b9ee847e5f2
tar czf ${SPLSRC} pkg-spl
tar czf ${ZFSSRC} pkg-zfs
diff --git a/pkg-spl.tar.gz b/pkg-spl.tar.gz
index c4ac665..96c79f7 100644
Binary files a/pkg-spl.tar.gz and b/pkg-spl.tar.gz differ
diff --git a/pkg-zfs.tar.gz b/pkg-zfs.tar.gz
index 967c1c4..fa0afb9 100644
Binary files a/pkg-zfs.tar.gz and b/pkg-zfs.tar.gz differ
diff --git a/spl-patches/fix-control.patch b/spl-patches/fix-control.patch
index 5714f00..1c3a25a 100644
--- a/spl-patches/fix-control.patch
+++ b/spl-patches/fix-control.patch
@@ -1,18 +1,29 @@
-Index: new/debian/control.in
-===================================================================
---- new.orig/debian/control.in
-+++ new/debian/control.in
-@@ -35,34 +35,9 @@ Description: Native ZFS filesystem kerne
- This package provides the source to the SPL kernel module in a form
- suitable for use by module-assistant or kernel-package.
+From 764866342a7b4090c0530953db2d9dc5ed6a3b0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at proxmox.com>
+Date: Wed, 12 Oct 2016 10:57:39 +0200
+Subject: [PATCH] remove DKMS and module build
+
+---
+diff --git a/debian/control.in b/debian/control.in
+index 6392ddc..dc6ee96 100644
+--- a/debian/control.in
++++ b/debian/control.in
+@@ -8,40 +8,16 @@ Build-Depends: autogen,
+ autotools-dev,
+ debhelper (>= 9),
+ dh-autoreconf,
+- dkms (>> 2.2.0.2-1~),
+ libtool
+ Standards-Version: 3.9.8
+ Homepage: http://www.zfsonlinux.org/
+ Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
+ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
-Package: spl-dkms
-Architecture: all
--Depends: linux-headers-amd64, ${misc:Depends}, dkms (>> 2.1.1.2-5), lsb-release, file
+-Depends: dkms (>> 2.1.1.2-5), file, libc-dev, lsb-release, ${misc:Depends}
-Recommends: spl (>= ${source:Upstream-Version})
-Provides: spl-modules
--Conflicts: spl-modules-source
--Replaces: spl-modules-source
-Description: Solaris Porting Layer kernel modules for Linux
- The Solaris Porting Layer (SPL) is a Linux kernel module which provides
- many of the Solaris kernel APIs. This shim layer makes it possible to
@@ -32,97 +43,100 @@ Index: new/debian/control.in
-
Package: spl
Architecture: linux-any
- Depends: ${shlibs:Depends}, ${misc:Depends}
+ Conflicts: spl-dev, splat
+ Depends: ${misc:Depends}, ${shlibs:Depends}
-Recommends: spl-modules | spl-dkms
Description: Solaris Porting Layer user-space utilities for Linux
The Solaris Porting Layer (SPL) is a Linux kernel module which provides
many of the Solaris kernel APIs. This shim layer makes it possible to
-Index: new/debian/rules
-===================================================================
---- new.orig/debian/rules
-+++ new/debian/rules
-@@ -22,9 +22,7 @@ ifndef KVERS
- KVERS=$(shell uname -r | sed 's/-$(DEB_HOST_ARCH)//')
+diff --git a/debian/rules b/debian/rules
+index b2fc86c..a474ca4 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -14,12 +14,8 @@ ifndef KVERS
+ KVERS=$(shell uname -r)
endif
--CFG_OPTS=--without-selinux \
-- --with-linux=$(KSRC) \
-- --with-linux-obj=$(KOBJ)
-+CFG_OPTS=--without-selinux
-
- non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
- PACKAGE=spl
-@@ -33,7 +31,7 @@ pmodules = $(PACKAGE)-modules-$(non_epoc
- KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(DEB_HOST_ARCH) | grep ^Version | sed 's/.*: //')
-
+-non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
+-PACKAGE=spl
+-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
+-
%:
-- dh $@ --with dkms --parallel
-+ dh $@ --parallel
+- dh $@ --with dkms,autoreconf --parallel
++ dh $@ --with autoreconf --parallel
- override_dh_prep-base-deb-files:
- sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g' < debian/control.in > debian/control
-@@ -70,64 +68,6 @@ override_dh_auto_install:
- @# Install the utilities.
- $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
+ override_dh_auto_configure:
+ @cp debian/control.in debian/control
+@@ -45,69 +41,7 @@ override_dh_auto_install:
+ @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
+ $(MAKE) distdir
-- @# Get a bare copy of the source code for DKMS.
-- @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree, which does not
-- @# contain the userland sources. NB: Remove-userland-dist-rules.patch
-- $(MAKE) distdir
--
-- @# Install the DKMS source.
-- @# We only want the files needed to build the modules
-- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
-- touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
-- cp '$(CURDIR)/autogen.sh' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/'
-- ( for d in include module config; do \
-- rm -Rf $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/$$d; \
-- done)
-- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
-- @# Hellish awk line:
-- @# * Deletes from configure.ac the parts not needed for building the kernel module
-- @# * It deletes from inside AC_CONFIG_FILES([]) everything except:
-- @# (Makefile$|include/|module/|*.release$)
-- @# * Takes care of spaces and tabs
-- awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|spl\.release([ \t]+)?$$))/){next} } {print}' \
-- '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
-- @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
-- sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
-- '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
-- @# Sanity test
-- grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
-- @# Run autogen on the stripped source tree
-- cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
-- rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
--
- @# This shunt allows DKMS to install the Module.symvers and spl_config.h
- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
-- echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
-- echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
-- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
--
-- @# Duplicate the dkms directory for module-assistant source package
-- install -d $(CURDIR)/debian/tmp/usr/src/modules
-- cp -r $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION) $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)
-- mkdir -p $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian
-- cp debian/copyright debian/module/* \
-- $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/
-- sed 's/^spl-linux /spl-modules /' debian/changelog \
-- > $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/changelog
-- chmod 755 $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/rules
-- chown -R root.src $(CURDIR)/debian/tmp
-- find $(CURDIR)/debian/tmp/usr/src -type d | xargs chmod 755
-- find $(CURDIR)/debian/tmp/usr/src -type f -perm -100 | xargs chmod 755
-- find $(CURDIR)/debian/tmp/usr/src -type f -not -perm -100 | xargs chmod 644
-- chmod 775 $(CURDIR)/debian/tmp/usr/src/modules
-- cd $(CURDIR)/debian/tmp/usr/src && tar cf $(PACKAGE).tar modules
-- rm -Rf $(CURDIR)/debian/tmp/usr/src/modules
-- bzip2 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar
-- chmod 644 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2
-- install -d $(CURDIR)/debian/spl-modules-source/usr/src
-- mv $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2 $(CURDIR)/debian/spl-modules-source/usr/src/
-- rm -Rf $(CURDIR)/debian/spl-modules-source/usr/src/$(NAME)-$(VERSION)
--
- override_dh_dkms:
- dh_dkms -V $(VERSION)
-
+- echo '#!/bin/sh' >'$(CURDIR)/$(NAME)-$(VERSION)/cp'
+- echo 'cp "$$@"' >>'$(CURDIR)/$(NAME)-$(VERSION)/cp'
+- chmod 755 '$(CURDIR)/$(NAME)-$(VERSION)/cp'
+-
+- # Install the DKMS source.
+- mkdir -p '$(CURDIR)/debian/tmp/usr/src/'
+- mv '$(CURDIR)/$(NAME)-$(VERSION)' '$(CURDIR)/debian/tmp/usr/src/'
+-
+-override_dh_dkms:
+- dh_dkms -V $(VERSION)
+-
+ override_dh_auto_clean:
+ dh_auto_clean
+ @if test -e META.orig; then mv META.orig META; fi
+ cp debian/control.in debian/control
+-
+-# ------------
+-
+-override_dh_prep-deb-files:
+- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
+- 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' \
+- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
+- done
+- 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' \
+- < debian/control.modules.in > debian/control
+-
+-override_dh_configure_modules: override_dh_configure_modules_stamp
+-override_dh_configure_modules_stamp:
+- ./configure --with-config=kernel --with-linux=$(KSRC) \
+- --with-linux-obj=$(KOBJ) \
+- --disable-debug-kmem
+- touch override_dh_configure_modules_stamp
+-
+-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules
+- dh_testdir
+- dh_testroot
+- dh_prep
+-
+- $(MAKE) -C $(CURDIR)/module modules
+-
+- dh_installdirs -p${pmodules}-di
+- dh_install -p${pmodules}-di
+- dh_gencontrol -p${pmodules}-di
+-
+- dh_builddeb -p${pmodules}-di
+-
+-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
+- dh_testdir
+- dh_testroot
+- dh_prep
+-
+- $(MAKE) -C $(CURDIR)/module modules
+-
+- dh_installdocs -p${pmodules}
+- dh_install -p${pmodules}
+- dh_installchangelogs -p${pmodules}
+- dh_compress -p${pmodules}
+- dh_strip -p${pmodules}
+- dh_fixperms -p${pmodules}
+- dh_installdeb -p${pmodules}
+- dh_gencontrol -p${pmodules}
+- dh_md5sums -p${pmodules}
+-
+- dh_builddeb -p${pmodules}
+--
+2.1.4
+
diff --git a/zfs-patches/add-zfsutils-preinst-postinst.patch b/zfs-patches/add-zfsutils-preinst-postinst.patch
new file mode 100644
index 0000000..ed77647
--- /dev/null
+++ b/zfs-patches/add-zfsutils-preinst-postinst.patch
@@ -0,0 +1,63 @@
+From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at proxmox.com>
+Date: Wed, 12 Oct 2016 11:32:17 +0200
+Subject: [PATCH] add zfsutils.preinst/postinst for wheezy upgrade path
+
+---
+ debian/zfsutils-linux.postinst | 20 ++++++++++++++++++++
+ debian/zfsutils-linux.preinst | 17 +++++++++++++++++
+ 2 files changed, 37 insertions(+)
+ create mode 100755 debian/zfsutils-linux.postinst
+ create mode 100755 debian/zfsutils-linux.preinst
+
+diff --git a/debian/zfsutils-linux.postinst b/debian/zfsutils-linux.postinst
+new file mode 100755
+index 0000000..7d57919
+--- /dev/null
++++ b/debian/zfsutils-linux.postinst
+@@ -0,0 +1,20 @@
++#!/bin/sh
++
++set -e
++
++# Source debconf library
++. /usr/share/debconf/confmodule
++
++if dpkg-maintscript-helper supports rm_conffile 2>/dev/null
++then
++ dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
++fi
++
++#DEBHELPER#
++
+diff --git a/debian/zfsutils-linux.preinst b/debian/zfsutils-linux.preinst
+new file mode 100755
+index 0000000..9338a7c
+--- /dev/null
++++ b/debian/zfsutils-linux.preinst
+@@ -0,0 +1,17 @@
++#!/bin/sh
++
++set -e
++
++if dpkg-maintscript-helper supports rm_conffile 2>/dev/null
++then
++ dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
++ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
++fi
++
++#DEBHELPER#
++
+--
+2.1.4
+
diff --git a/zfs-patches/fix-control.patch b/zfs-patches/fix-control.patch
index b9307c1..f06b755 100644
--- a/zfs-patches/fix-control.patch
+++ b/zfs-patches/fix-control.patch
@@ -1,84 +1,121 @@
-Index: new/debian/control.in
-===================================================================
---- new.orig/debian/control.in
-+++ new/debian/control.in
-@@ -104,39 +104,9 @@ Description: Native ZFS filesystem kerne
- This package provides the source to the SPL kernel module in a form
- suitable for use by module-assistant or kernel-package.
+From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at proxmox.com>
+Date: Wed, 12 Oct 2016 11:25:40 +0200
+Subject: [PATCH 1/2] remove DKMS, modules and dracut build
+
+---
+diff --git a/debian/control.in b/debian/control.in
+index db75496..22dd958 100644
+--- a/debian/control.in
++++ b/debian/control.in
+@@ -9,7 +9,6 @@ Build-Depends: dh-autoreconf,
+ dh-systemd,
+ autotools-dev,
+ debhelper (>= 9),
+- dkms (>> 2.1.1.2-5),
+ libselinux1-dev,
+ libtool,
+ lsb-release,
+@@ -85,25 +84,11 @@ Description: OpenZFS pool library for Linux
+ .
+ This zpool library provides support for managing zpools.
-Package: zfs-dkms
-Architecture: all
--Pre-Depends: spl-dkms
--Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}, file
--Recommends: zfsutils
--Replaces: lzfs, lzfs-dkms, zfs-modules-source
--Provides: lustre-backend-fs, lzfs, lzfs-dkms, zfs-modules, zfs-modules-source
--Conflicts: lzfs, lzfs-dkms, zfs-modules-source
--Description: Native ZFS filesystem kernel modules for Linux
+-Pre-Depends: spl-dkms (>= ${source:Upstream-Version})
+-Depends: dkms (>> 2.1.1.2-5), lsb-release, ${misc:Depends}
+-Recommends: zfsutils-linux, zfs-zed
+-Provides: zfs-modules
+-Description: OpenZFS filesystem kernel modules for Linux
- The Z file system is a pooled filesystem designed for maximum data
- integrity, supporting data snapshots, multiple copies, and data
- checksums.
- .
-- This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of ZFS.
+- This DKMS package includes the SPA, DMU, ZVOL, and ZPL components of
+- OpenZFS.
-
+ Package: zfs-initramfs
+ Architecture: all
+ Depends: initramfs-tools,
+ busybox-initramfs | busybox-static | busybox,
+- zfs-modules | zfs-dkms, zfsutils-linux,
++ zfsutils-linux,
+ ${misc:Depends}
+ Description: OpenZFS root filesystem capabilities for Linux - initramfs
+ The Z file system is a pooled filesystem designed for maximum data
+@@ -113,23 +98,12 @@ Description: OpenZFS root filesystem capabilities for Linux - initramfs
+ This package adds OpenZFS to the system initramfs with a hook
+ for the initramfs-tools infrastructure.
+
-Package: zfs-dracut
--Section: utils
--Architecture: linux-any
--Depends: dracut,
-- zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version}),
-- zfsutils, ${misc:Depends}
--Description: Native ZFS root filesystem capabilities for Linux
+-Architecture: all
+-Depends: dracut, zfs-modules | zfs-dkms, zfsutils-linux, ${misc:Depends}
+-Description: OpenZFS root filesystem capabilities for Linux - dracut
- The Z file system is a pooled filesystem designed for maximum data
- integrity, supporting data snapshots, multiple copies, and data
- checksums.
- .
-- This package adds ZFS to the system initramfs with a hook
+- This package adds OpenZFS to the system initramfs with a hook
- for the dracut infrastructure.
-
- Package: zfs-initramfs
+ Package: zfsutils-linux
+ Section: contrib/admin
Architecture: linux-any
- Depends: initramfs-tools, busybox,
-- zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version}),
- zfsutils, ${misc:Depends}
- Description: Native ZFS root filesystem capabilities for Linux
- The Z file system is a pooled filesystem designed for maximum data
-@@ -150,7 +120,6 @@ Package: zfsutils
- Section: admin
+ Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
+-Recommends: lsb-base, zfs-modules | zfs-dkms, zfs-zed
+-Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs | zfs-dracut
++Recommends: lsb-base, zfs-zed
++Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs
+ Conflicts: zfs, zfs-fuse, zutils
+ Provides: zfsutils
+ Description: command-line tools to manage OpenZFS filesystems
+@@ -143,7 +117,7 @@ Description: command-line tools to manage OpenZFS filesystems
+ Package: zfs-zed
+ Section: contrib/admin
Architecture: linux-any
- Depends: initscripts, lsb-base, python, ${misc:Depends}, ${shlibs:Depends}
--Recommends: zfs-modules | zfs-dkms | zfs-modules-source (>= ${source:Version})
- Suggests: nfs-kernel-server, samba-common-bin (>= 3.0.23), zfs-initramfs
- Conflicts: zfs, zfs-fuse
- Replaces: zfs
-Index: new/debian/rules
-===================================================================
---- new.orig/debian/rules
-+++ new/debian/rules
-@@ -25,12 +25,10 @@ KARCH=$(shell uname -r | sed "s/.*-\([a-
+-Depends: ${misc:Depends}, ${shlibs:Depends}, zfs-modules | zfs-dkms, zfsutils-linux
++Depends: ${misc:Depends}, ${shlibs:Depends}, zfsutils-linux
+ Description: OpenZFS Event Daemon
+ The Z file system is a pooled filesystem designed for maximum data
+ integrity, supporting data snapshots, multiple copies, and data
+diff --git a/debian/rules b/debian/rules
+index 5036f42..6fc3e39 100755
+--- a/debian/rules
++++ b/debian/rules
+@@ -5,9 +5,6 @@ NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
+ VERSION := $(shell dpkg-parsechangelog \
+ | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1)
+
+-DKMSFILES := module include config zfs.release.in autogen.sh META AUTHORS \
+- DISCLAIMER COPYRIGHT OPENSOLARIS.LICENSE README.markdown
+-
+ ifndef BUILD_UDEB
+ BUILD_UDEB=false
+ endif
+@@ -21,21 +18,16 @@ KVERS=$(shell uname -r)
endif
ifndef SPL
--SPLSRC=/usr/src/spl-$(VERSION)
-+SPLSRC=../pkg-spl
+-SPL=/usr/src/spl-$(VERSION)
+-endif
+-
+-ifndef SPLOBJ
+-SPLOBJ=/var/lib/dkms/spl/$(VERSION)/$(KVERS)/$(shell dpkg-architecture -qDEB_TARGET_GNU_CPU)
++SPL=../pkg-spl
endif
--CFG_OPTS=--with-linux=$(KSRC) \
-- --with-linux-obj=$(KOBJ) \
-- --with-spl=$(SPLSRC)
-+CFG_OPTS=--with-spl=$(SPLSRC)
-
non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
PACKAGE=zfs
-@@ -41,7 +39,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
- KIMGVER=$(shell dpkg -s linux-image-$(KVERS)-$(KARCH) | grep ^Version | sed 's/.*: //')
+-pmodules = $(PACKAGE)-modules-$(non_epoch_version)
+
+ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
-- dh $@ --with dkms --parallel
-+ dh $@ --parallel
+- dh $@ --with autoreconf,dkms,python2,systemd --parallel
++ dh $@ --with autoreconf,python2,systemd --parallel
- override_dh_prep-base-deb-files:
- sed -e 's/##SHLIB_MAJOR##/$(SHLIB_MAJOR)/g' < debian/control.in > debian/control
-@@ -83,42 +81,6 @@ override_dh_auto_install:
+ override_dh_auto_configure:
+ @cp debian/control.in debian/control
+@@ -62,36 +54,6 @@ override_dh_auto_install:
@# Install the utilities.
$(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
@@ -90,11 +127,6 @@ Index: new/debian/rules
- @# Install the DKMS source.
- @# We only want the files needed to build the modules
- mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
-- touch '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/.nogitrelease'
-- cp '$(CURDIR)/autogen.sh' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/'
-- ( for d in include module config; do \
-- rm -Rf $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/$$d; \
-- done)
- $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
- @# Hellish awk line:
- @# * Deletes from configure.ac the parts not needed for building the kernel module
@@ -114,39 +146,88 @@ Index: new/debian/rules
-
- @# This shunt allows DKMS to install the Module.symvers and zfs_config.h
- @# files to the ${dkms_tree} area through the POST_INSTALL directive.
-- echo '#!/bin/sh' >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
-- echo 'cp "$$@"' >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
+- printf '#!/bin/sh\ncp "$$@"\n' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
- chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
-
mkdir -p $(CURDIR)/debian/tmp/usr/lib
for i in `ls $(CURDIR)/debian/tmp/lib/*.so`; do \
ln -s /lib/`readlink $${i}` $(CURDIR)/debian/tmp/usr/lib/`basename $${i}`; \
-@@ -137,28 +99,6 @@ override_dh_auto_install:
- # Fix the includes according to https://github.com/zfsonlinux/zfs/issues/2903
- ./debian/fix_includes-libspl.sh
+@@ -101,9 +63,6 @@ override_dh_auto_install:
+ chmod -x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
+ chmod -x $(CURDIR)/debian/tmp/etc/default/zfs
-- @# Duplicate the dkms directory for module-assistant source package
-- install -d $(CURDIR)/debian/tmp/usr/src/modules
-- cp -r $(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION) $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)
-- mkdir -p $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian
-- cp debian/copyright debian/module/* \
-- $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/
-- sed 's/^zfs-linux /zfs-modules /' debian/changelog \
-- > $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/changelog
-- chmod 755 $(CURDIR)/debian/tmp/usr/src/modules/$(PACKAGE)/debian/rules
-- chown -R root.src $(CURDIR)/debian/tmp
-- find $(CURDIR)/debian/tmp/usr/src -type d | xargs chmod 755
-- find $(CURDIR)/debian/tmp/usr/src -type f -perm -100 | xargs chmod 755
-- find $(CURDIR)/debian/tmp/usr/src -type f -not -perm -100 | xargs chmod 644
-- chmod 775 $(CURDIR)/debian/tmp/usr/src/modules
-- cd $(CURDIR)/debian/tmp/usr/src && tar cf $(PACKAGE).tar modules
-- rm -Rf $(CURDIR)/debian/tmp/usr/src/modules
-- bzip2 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar
-- chmod 644 $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2
-- install -d $(CURDIR)/debian/zfs-modules-source/usr/src
-- mv $(CURDIR)/debian/tmp/usr/src/$(PACKAGE).tar.bz2 $(CURDIR)/debian/zfs-modules-source/usr/src/
-- rm -Rf $(CURDIR)/debian/zfs-modules-source/usr/src/$(NAME)-$(VERSION)
--
- override_dh_installinit:
- @# Install systemd files
- dh_systemd_enable -pzfsutils contrib/systemd/system/zfs.target
+-override_dh_dkms:
+- dh_dkms -V $(VERSION)
+-
+ override_dh_makeshlibs:
+ dh_makeshlibs -a
+ ifeq ($(BUILD_UDEB), true)
+@@ -141,65 +100,5 @@ override_dh_install:
+
+ # ------------
+
+-override_dh_prep-deb-files:
+- for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
+- 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)/' \
+- < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
+- done
+- 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' \
+- < debian/control.modules.in > debian/control
+-
+-override_dh_configure_modules_udeb: override_dh_configure_modules_udeb_stamp
+-override_dh_configure_modules_udeb_stamp:
+- ./configure \
+- --without-selinux \
+- --with-config=kernel \
+- --with-linux=$(KSRC) \
+- --with-linux-obj=$(KOBJ) \
+- --with-spl=$(SPL) \
+- --with-spl-obj=$(SPLOBJ)
+- touch override_dh_configure_modules_udeb_stamp
+-
+-override_dh_configure_modules: override_dh_configure_modules_stamp
+-override_dh_configure_modules_stamp:
+- ./configure \
+- --with-config=kernel \
+- --with-linux=$(KSRC) \
+- --with-linux-obj=$(KOBJ) \
+- --with-spl=$(SPL) \
+- --with-spl-obj=$(SPLOBJ)
+- touch override_dh_configure_modules_stamp
+-
+-override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules_udeb
+- dh_testdir
+- dh_testroot
+- dh_prep
+-
+- $(MAKE) -C $(CURDIR)/module modules
+-
+- dh_installdirs -p${pmodules}-di
+- dh_install -p${pmodules}-di
+- dh_gencontrol -p${pmodules}-di
+-
+- dh_builddeb -p${pmodules}-di
+-
+-override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
+- dh_testdir
+- dh_testroot
+- dh_prep
+-
+- $(MAKE) -C $(CURDIR)/module modules
+-
+- dh_install -p${pmodules}
+- dh_installdocs -p${pmodules}
+- dh_installchangelogs -p${pmodules}
+- dh_compress -p${pmodules}
+- dh_strip -p${pmodules}
+- dh_fixperms -p${pmodules}
+- dh_installdeb -p${pmodules}
+- dh_gencontrol -p${pmodules}
+- dh_md5sums -p${pmodules}
+- dh_builddeb -p${pmodules}
+-
+ debian-copyright:
+ cme update dpkg-copyright -file debian/copyright.cme
+--
+2.1.4
+
diff --git a/zfs-patches/fix-dh-installinit.patch b/zfs-patches/fix-dh-installinit.patch
deleted file mode 100644
index 27cea11..0000000
--- a/zfs-patches/fix-dh-installinit.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-Do not install sysv init scripts
-
-We use systemd on PVE, so there is no need to install old sysv init scripts.
-Also, provided scripts are buggy, because they do not
-include /lib/lsb/init-functions, thus do not call systemctl to start
-services.
-
-Adittionally, service names differ, so some services are started
-twice (zed => zfs-zed).
-
-Index: new/debian/rules
-===================================================================
---- new.orig/debian/rules
-+++ new/debian/rules
-@@ -113,7 +113,7 @@ override_dh_installinit:
- @# Install the /etc/init.d/zfs-import script.
- ifeq ($(LSB_DISTRIBUTOR),Debian)
- dh_installinit -pzfsutils --onlyscripts --name=zfs-import \
-- --no-restart-on-upgrade --no-start -- start 07 S . stop 07 0 1 6 .
-+ --no-restart-on-upgrade --no-start
- else
- dh_installinit -pzfsutils --onlyscripts --name=zfs-import \
- --no-restart-on-upgrade --no-start
-@@ -123,21 +123,23 @@ endif
- ifeq ($(LSB_DISTRIBUTOR),Debian)
- @# Debian runs local mounts at sysv sequences [10..12] [08..09].
- dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \
-- --no-restart-on-upgrade --no-start -- start 02 2 3 4 5 . stop 06 0 1 6 .
-+ --no-restart-on-upgrade --no-start
- else
- dh_installinit -pzfsutils --onlyscripts --name=zfs-mount \
- --no-restart-on-upgrade --no-start
- endif
-
-- @# Install the ZED init file.
-- dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \
-- --no-restart-on-upgrade --no-start -- start 07 2 3 4 5 . stop 08 0 1 6 .
-+ # zed is started with systemd zed.service
-+ # so do not install zfs-zed init script
-+ #@# Install the ZED init file.
-+ #dh_installinit -pzfsutils --onlyscripts --name=zfs-zed \
-+ # --no-restart-on-upgrade --no-start
-
- @# Install the /etc/init.d/zfs-share script.
- ifeq ($(LSB_DISTRIBUTOR),Debian)
- @# Debian runs nfs-kernel-server at sysv sequence 17 01.
- dh_installinit -pzfsutils --onlyscripts --name=zfs-share \
-- --no-restart-on-upgrade --no-start -- start 27 2 3 4 5 . stop 05 0 1 6 .
-+ --no-restart-on-upgrade --no-start
- else ifeq ($(LSB_DISTRIBUTOR),Ubuntu)
- @# Ubuntu runs nfs-kernel-server at sysv sequence 20 80.
- @# iscsitarget at 20 20, and samba through upstart.
-Index: new/debian/zfsutils.install
-===================================================================
---- new.orig/debian/zfsutils.install
-+++ new/debian/zfsutils.install
-@@ -1,9 +1,5 @@
- ../tree/zfsutils/* /
- contrib/bash_completion.d/zfs /etc/bash_completion.d/
--contrib/sysv-init/zfs-import /etc/init.d/
--contrib/sysv-init/zfs-mount /etc/init.d/
--contrib/sysv-init/zfs-share /etc/init.d/
--contrib/sysv-init/zfs-zed /etc/init.d/
- lib/udev
- sbin
- usr/share/man
-Index: new/debian/zfsutils.postinst
-===================================================================
---- new.orig/debian/zfsutils.postinst
-+++ new/debian/zfsutils.postinst
-@@ -10,6 +10,10 @@ then
- dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
- dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
- dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
- fi
-
- #DEBHELPER#
-Index: new/debian/zfsutils.preinst
-===================================================================
---- new.orig/debian/zfsutils.preinst
-+++ new/debian/zfsutils.preinst
-@@ -6,6 +6,10 @@ then
- dpkg-maintscript-helper rm_conffile /etc/default/zfsload -- "$@"
- dpkg-maintscript-helper rm_conffile /etc/init.d/zfs -- "$@"
- dpkg-maintscript-helper rm_conffile /etc/init.d/zed -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-zed -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-mount -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-share -- "$@"
-+ dpkg-maintscript-helper rm_conffile /etc/init.d/zfs-import -- "$@"
- fi
-
- #DEBHELPER#
diff --git a/zfs-patches/series b/zfs-patches/series
index 1c9b404..f06e1bd 100644
--- a/zfs-patches/series
+++ b/zfs-patches/series
@@ -1,3 +1,2 @@
fix-control.patch
-fix-dh-installinit.patch
-skip-unneeded-pull-requests.patch
+add-zfsutils-preinst-postinst.patch
diff --git a/zfs-patches/skip-unneeded-pull-requests.patch b/zfs-patches/skip-unneeded-pull-requests.patch
deleted file mode 100644
index 62f5640..0000000
--- a/zfs-patches/skip-unneeded-pull-requests.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/debian/patches/series b/debian/patches/series
-index ffafe6c..9823273 100644
---- a/debian/patches/series
-+++ b/debian/patches/series
-@@ -1,12 +1,12 @@
- 0002-Prevent-manual-builds-in-the-DKMS-source.patch
- 0005-Remove-userland-dist-rules.patch
- libzfs-dependencies
--PR1099.patch
--PR1476.patch
-+#PR1099.patch
-+#PR1476.patch
- PR1867.patch
- PR2668.patch
--PR2790.patch
--PR3238.patch
-+#PR2790.patch
-+#PR3238.patch
- PR3465.patch
- PR3559.patch
- PR3560.patch
--
2.1.4
More information about the pve-devel
mailing list