On 04/08/2018 12:37 AM, Aron Xu wrote: > Hi, > > This patch modifies upstream source code directly which is undesired. > Would you mind to submit the change upstream? > > > Regards, > Aron Xu >
I've changed the patch to use two quilt patches and I submitted the local_fs dependency to ZoL: https://github.com/zfsonlinux/zfs/issues/7420 I also changed the zfs-share init script to be part of the zfs-zed package as it is dependent on the zed package. I appreciate the help from Richard Laager for assisting me with this patch. Chris
diff -Nru zfs-linux-0.7.6/debian/changelog zfs-linux-0.7.6/debian/changelog --- zfs-linux-0.7.6/debian/changelog 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/changelog 2018-04-09 17:58:34.000000000 -0600 @@ -1,3 +1,10 @@ +zfs-linux (0.7.6-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Add sysvinit scripts + + -- Chris Dos <ch...@chrisdos.com> Mon, 09 Apr 2018 17:58:34 -0600 + zfs-linux (0.7.6-1) unstable; urgency=medium [ Lev Lamberov ] diff -Nru zfs-linux-0.7.6/debian/patches/1004-zed-service-bindir.patch zfs-linux-0.7.6/debian/patches/1004-zed-service-bindir.patch --- zfs-linux-0.7.6/debian/patches/1004-zed-service-bindir.patch 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/patches/1004-zed-service-bindir.patch 2018-04-09 14:19:47.000000000 -0600 @@ -9,7 +9,7 @@ Forwarded: no --- a/etc/systemd/system/zfs-zed.service.in +++ b/etc/systemd/system/zfs-zed.service.in -@@ -5,7 +5,7 @@ After=zfs-import-cache.service +@@ -5,7 +5,7 @@ After=zfs-import-scan.service [Service] @@ -18,3 +18,14 @@ Restart=on-abort [Install] +--- a/etc/init.d/zfs-functions.in ++++ b/etc/init.d/zfs-functions.in +@@ -89,7 +89,7 @@ + + # Paths to what we need + ZFS="@sbindir@/zfs" +-ZED="@sbindir@/zed" ++ZED="/usr/sbin/zed" + ZPOOL="@sbindir@/zpool" + ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache" + diff -Nru zfs-linux-0.7.6/debian/patches/1010-fix-zfs-zed-dependencies.patch zfs-linux-0.7.6/debian/patches/1010-fix-zfs-zed-dependencies.patch --- zfs-linux-0.7.6/debian/patches/1010-fix-zfs-zed-dependencies.patch 1969-12-31 17:00:00.000000000 -0700 +++ zfs-linux-0.7.6/debian/patches/1010-fix-zfs-zed-dependencies.patch 2018-04-09 17:56:15.000000000 -0600 @@ -0,0 +1,20 @@ +Description: Adds zfs-zed dependency + Adds local file system dependencies before zfs mount. +Author: Chris Dos <ch...@chrisdos.com> +Bug-Debian: https://bugs.debian.org/826994 +Forwarded: https://github.com/zfsonlinux/zfs/issues/7420 + +Index: +--- a/etc/init.d/zfs-zed.in ++++ b/etc/init.d/zfs-zed.in +@@ -8,8 +8,8 @@ + # + ### BEGIN INIT INFO + # Provides: zfs-zed +-# Required-Start: zfs-mount +-# Required-Stop: zfs-mount ++# Required-Start: $local_fs zfs-mount ++# Required-Stop: $local_fs zfs-mount + # Default-Start: 2 3 4 5 + # Default-Stop: 0 1 6 + # X-Stop-After: zfs-share diff -Nru zfs-linux-0.7.6/debian/patches/series zfs-linux-0.7.6/debian/patches/series --- zfs-linux-0.7.6/debian/patches/series 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/patches/series 2018-04-09 16:09:12.000000000 -0600 @@ -4,6 +4,7 @@ enable-zed.patch 1001-cmd-python-exec-path.patch 1004-zed-service-bindir.patch +1010-fix-zfs-zed-dependencies.patch 0008-dracut-make-module-setup.sh-shebang-explicit.patch 0009-add-man-page-reference-to-systemd-units.patch 0010-fix-install-path-of-zpool.d-scripts.patch diff -Nru zfs-linux-0.7.6/debian/rules zfs-linux-0.7.6/debian/rules --- zfs-linux-0.7.6/debian/rules 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/rules 2018-04-09 17:35:34.000000000 -0600 @@ -112,6 +112,26 @@ chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs +override_dh_installinit: + @# Install the /etc/init.d/zfs-import script. + dh_installinit -pzfsutils-linux --name=zfs-import \ + --no-restart-on-upgrade --no-start + + @# Install the /etc/init.d/zfs-mount script. + dh_installinit -pzfsutils-linux --name=zfs-mount \ + --no-restart-on-upgrade --no-start + + @# Install the /etc/init.d/zfs-share script. + dh_installinit -pzfsutils-linux --name=zfs-share \ + --no-restart-on-upgrade --no-start + + @# Add a dummy (link to /dev/null) for zfs-import.service + ln -s /dev/null $(CURDIR)/debian/zfsutils-linux/lib/systemd/system/zfs-import.service + + @# Install the ZED init file. + dh_installinit -pzfs-zed --name=zfs-zed \ + --no-restart-on-upgrade --no-start + override_dh_dkms: dh_dkms -V $(DEB_VERSION_UPSTREAM) diff -Nru zfs-linux-0.7.6/debian/zfsutils-linux.install zfs-linux-0.7.6/debian/zfsutils-linux.install --- zfs-linux-0.7.6/debian/zfsutils-linux.install 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/zfsutils-linux.install 2018-04-09 17:35:34.000000000 -0600 @@ -1,6 +1,8 @@ ../tree/zfsutils-linux/* / etc/default/zfs etc/zfs/zfs-functions +etc/init.d/zfs-import +etc/init.d/zfs-mount etc/zfs/zpool.d/ lib/systemd/system-preset/ lib/systemd/system/zfs-import-cache.service diff -Nru zfs-linux-0.7.6/debian/zfs-zed.install zfs-linux-0.7.6/debian/zfs-zed.install --- zfs-linux-0.7.6/debian/zfs-zed.install 2018-02-26 01:32:29.000000000 -0700 +++ zfs-linux-0.7.6/debian/zfs-zed.install 2018-04-09 17:35:34.000000000 -0600 @@ -1,4 +1,6 @@ etc/zfs/zed.d/* +etc/init.d/zfs-zed +etc/init.d/zfs-share lib/systemd/system/zfs-zed.service usr/lib/*/zfs/zed.d/* usr/sbin/zed