Devuan bug report logs - #14
zfs: missing sysvinit scripts

Package: zfs; Severity: critical; Reported by: katolaz <katolaz@freaknet.org>; Keywords: ascii; dated Thu, 23 Mar 2017 15:18:22 UTC; Maintainer for zfs is KatolaZ <katolaz@freaknet.org>.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 3 Jun 2018 14:30:04 +0000
To: 14@bugs.devuan.org
From: Chris Dos <chris@chrisdos.com>
Subject: Updated Patches and Debian LSB_Release Check
Date: Sun, 3 Jun 2018 08:24:13 -0600

This is a multi-part message in MIME format.
--------------3891CED4ED03F308D1F47D70
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Debian has added a specific lsb_release check to make sure the packages are
running on Debian in the zfs-dkms package when it tries to compile against the
kernel source.

See: https://bugs.debian.org/900089

So the zfs-dkms Debian package will refuse to work on Devuan now.

And it has been few days shy of two years and Debian still won't commit the
sysvinit patch.  :(
https://bugs.debian.org/826994

I've attached patches to remove the lsb_release and install the sysvinit
patches against zfs-0.7.9-3:

	Chris

--------------3891CED4ED03F308D1F47D70
Content-Type: text/x-patch;
 name="remove_lsb_release_dependency_900089.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="remove_lsb_release_dependency_900089.patch"

--- a/debian/zfs-dkms/usr/src/zfs-0.7.9/dkms.conf
+++ b/debian/zfs-dkms/usr/src/zfs-0.7.9/dkms.conf
@@ -6,8 +6,6 @@
   --prefix=/usr
   --with-config=kernel
   --with-linux=$(
-    case `lsb_release -is` in
-      (Debian)
         if [[ -e ${kernel_source_dir/%build/source} ]]
         then
           echo ${kernel_source_dir/%build/source}
@@ -15,11 +13,6 @@
           # A kpkg exception for Proxmox 2.0
           echo ${kernel_source_dir}
         fi
-      ;;
-      (*)
-        echo ${kernel_source_dir}
-      ;;
-    esac
   )
   --with-linux-obj=${kernel_source_dir}
   --with-spl=${source_tree}/spl-${PACKAGE_VERSION}
--- a/debian/zfs-dkms.dkms.debhelper
+++ b/debian/zfs-dkms.dkms.debhelper
@@ -6,8 +6,6 @@
   --prefix=/usr
   --with-config=kernel
   --with-linux=$(
-    case `lsb_release -is` in
-      (Debian)
         if [[ -e ${kernel_source_dir/%build/source} ]]
         then
           echo ${kernel_source_dir/%build/source}
@@ -15,11 +13,6 @@
           # A kpkg exception for Proxmox 2.0
           echo ${kernel_source_dir}
         fi
-      ;;
-      (*)
-        echo ${kernel_source_dir}
-      ;;
-    esac
   )
   --with-linux-obj=${kernel_source_dir}
   --with-spl=${source_tree}/spl-${PACKAGE_VERSION}
--- a/debian/zfs-dkms.dkms
+++ b/debian/zfs-dkms.dkms
@@ -6,8 +6,6 @@
   --prefix=/usr
   --with-config=kernel
   --with-linux=$(
-    case `lsb_release -is` in
-      (Debian)
         if [[ -e ${kernel_source_dir/%build/source} ]]
         then
           echo ${kernel_source_dir/%build/source}
@@ -15,11 +13,6 @@
           # A kpkg exception for Proxmox 2.0
           echo ${kernel_source_dir}
         fi
-      ;;
-      (*)
-        echo ${kernel_source_dir}
-      ;;
-    esac
   )
   --with-linux-obj=${kernel_source_dir}
   --with-spl=${source_tree}/spl-${PACKAGE_VERSION}

--------------3891CED4ED03F308D1F47D70
Content-Type: text/x-patch;
 name="sysvinit_patch_5_826994_0.7.9-3.diff"
Content-Disposition: attachment;
 filename="sysvinit_patch_5_826994_0.7.9-3.diff"
Content-Transfer-Encoding: quoted-printable

diff -Nru zfs-linux-0.7.9/debian/changelog zfs-linux-0.7.9/debian/changel=
og
--- zfs-linux-0.7.9/debian/changelog	2018-05-28 04:22:02.000000000 -0600
+++ zfs-linux-0.7.9/debian/changelog	2018-06-03 07:12:43.000000000 -0600
@@ -1,3 +1,10 @@
+zfs-linux (0.7.9-3.1) UNRELEASED; urgency=3Dmedium
+
+  * Non-maintainer upload.
+  * Add sysvinit scripts.=20
+
+ -- Chris Dos <chris@chrisdos.com>  Sun, 03 Jun 2018 07:12:43 -0600
+
 zfs-linux (0.7.9-3) unstable; urgency=3Dmedium
=20
   [ Antonio Russo ]
diff -Nru zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch zf=
s-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch
--- zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch	2018-05-=
16 07:38:12.000000000 -0600
+++ zfs-linux-0.7.9/debian/patches/1004-zed-service-bindir.patch	2018-06-=
03 07:08:42.000000000 -0600
@@ -1,11 +1,14 @@
-Description: Fix the path to the zed binary on the systemd unit.
+Description: Fix the path to the zed binary on the systemd unit and
+ the sysvinit script.
  We install zed into /usr/sbin manually meanwhile the upstream default
  is installing it into /sbin.
  Ubuntu packages also install zed to /usr/sbin, but they ship their own
  zfs-zed unit.
 Author: Carlos Alberto Lopez <clopez@igalia.com>
 Author: Fabian Gr=FCnbichler <f.gruenbichler@proxmox.com>
+Author: Chris Dos <chris@chrisdos.com>
 Bug-Debian: https://bugs.debian.org/849813
+Bug-Debian: https://bugs.debian.org/826994
 Forwarded: no
 --- a/etc/systemd/system/zfs-zed.service.in
 +++ b/etc/systemd/system/zfs-zed.service.in
@@ -18,3 +21,13 @@
  Restart=3Don-abort
 =20
  [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=3D"@sbindir@/zfs"
+-ZED=3D"@sbindir@/zed"
++ZED=3D"/usr/sbin/zed"
+ ZPOOL=3D"@sbindir@/zpool"
+ ZPOOL_CACHE=3D"@sysconfdir@/zfs/zpool.cache"
diff -Nru zfs-linux-0.7.9/debian/rules zfs-linux-0.7.9/debian/rules
--- zfs-linux-0.7.9/debian/rules	2018-05-17 10:11:36.000000000 -0600
+++ zfs-linux-0.7.9/debian/rules	2018-06-03 07:10:41.000000000 -0600
@@ -114,6 +114,26 @@
 	chmod a-x $(CURDIR)/debian/tmp/etc/zfs/zfs-functions
 	chmod a-x $(CURDIR)/debian/tmp/etc/default/zfs
=20
+override_dh_installinit:
+	@# Install the /etc/init.d/zfs-import script.
+	dh_installinit -pzfsutils-linux --name=3Dzfs-import \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-mount script.
+	dh_installinit -pzfsutils-linux --name=3Dzfs-mount \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-share script.
+	dh_installinit -pzfsutils-linux --name=3Dzfs-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=3Dzfs-zed \
+	--no-restart-on-upgrade --no-start
+
 override_dh_dkms:
 	dh_dkms -V $(DEB_VERSION_UPSTREAM)
=20
diff -Nru zfs-linux-0.7.9/debian/zfsutils-linux.install zfs-linux-0.7.9/d=
ebian/zfsutils-linux.install
--- zfs-linux-0.7.9/debian/zfsutils-linux.install	2018-05-28 04:07:08.000=
000000 -0600
+++ zfs-linux-0.7.9/debian/zfsutils-linux.install	2018-06-03 07:10:41.000=
000000 -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.9/debian/zfs-zed.install zfs-linux-0.7.9/debian/z=
fs-zed.install
--- zfs-linux-0.7.9/debian/zfs-zed.install	2018-05-16 07:38:12.000000000 =
-0600
+++ zfs-linux-0.7.9/debian/zfs-zed.install	2018-06-03 07:10:41.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

--------------3891CED4ED03F308D1F47D70--


Acknowledgement sent to Chris Dos <chris@chrisdos.com>:
Extra info received and forwarded to list. Copy sent to KatolaZ <katolaz@freaknet.org>. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org, KatolaZ <katolaz@freaknet.org>:
bug#14; Package zfs. Full text available.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 4 Mar 2018 18:20:06 +0000
To: 14@bugs.devuan.org
From: Chris Dos <chris@chrisdos.com>
Subject: Patch for ZFS 0.7.6-1
Date: Sun, 4 Mar 2018 11:19:45 -0700

This is a multi-part message in MIME format.
--------------0BBABAEE66055FE8D72C19B2
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

I've attached a patch that patches against Debian's 0.7.6-1 package.

--------------0BBABAEE66055FE8D72C19B2
Content-Type: text/x-patch;
 name="sysvinit_patch_3_826994.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="sysvinit_patch_3_826994.diff"

diff --git a/debian/rules b/debian/rules
index f445b58..ecb9448 100755
--- a/debian/rules
+++ b/debian/rules
@@ -112,6 +112,31 @@ override_dh_auto_install:
 	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 --onlyscripts --name=zfs-import \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-mount script.
+	dh_installinit -pzfsutils-linux --onlyscripts --name=zfs-mount \
+	--no-restart-on-upgrade --no-start
+
+	@# Install the /etc/init.d/zfs-share script.
+	# Disabled, as it does not start on install due to zfs-zed not
+	# being installed yet, and zfs-zed depends on zfsutils-linux.
+	# Error report:
+	# insserv: Service zfs-zed has to be enabled to start service zfs-share
+	# insserv: exiting now!
+	#dh_installinit -pzfsutils-linux --onlyscripts --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 --onlyscripts --name=zfs-zed \
+	--no-restart-on-upgrade --no-start
+
 override_dh_dkms:
	dh_dkms -V $(DEB_VERSION_UPSTREAM)
 
diff --git a/debian/zfs-zed.install b/debian/zfs-zed.install
index b7c1fa9..998471b 100644
--- a/debian/zfs-zed.install
+++ b/debian/zfs-zed.install
@@ -1,4 +1,5 @@
 etc/zfs/zed.d/*
+etc/init.d/zfs-zed
 lib/systemd/system/zfs-zed.service
 usr/lib/*/zfs/zed.d/*
 usr/sbin/zed
diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install
index b985ade..2cc4cb4 100644
--- a/debian/zfsutils-linux.install
+++ b/debian/zfsutils-linux.install
@@ -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 --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in
index d0086ee..a5bb2e3 100755
--- a/etc/init.d/zfs-zed.in
+++ b/etc/init.d/zfs-zed.in
@@ -10,6 +10,8 @@
 # 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 --git a/etc/init.d/zfs-functions.in b/etc/init.d/zfs-functions.in
index 97f2ea0..589cb6d 100644
--- a/etc/init.d/zfs-functions.in
+++ b/etc/init.d/zfs-functions.in
@@ -89,7 +89,7 @@ fi
 
 # Paths to what we need
 ZFS="@sbindir@/zfs"
-ZED="@sbindir@/zed"
+ZED="/usr/sbin/zed"
 ZPOOL="@sbindir@/zpool"
 ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
 


--------------0BBABAEE66055FE8D72C19B2--


Acknowledgement sent to Chris Dos <chris@chrisdos.com>:
Extra info received and forwarded to list. Copy sent to KatolaZ <katolaz@freaknet.org>. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org, KatolaZ <katolaz@freaknet.org>:
bug#14; Package zfs. Full text available.


Tags added: ascii Request was from OmegaPhil <OmegaPhil@startmail.com> to control@bugs.devuan.org. Full text available.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 18 Dec 2017 02:00:02 +0000
Date: Mon, 18 Dec 2017 01:56:45 +0000
From: KatolaZ <katolaz@freaknet.org>
To: 14@bugs.devuan.org
Subject: solved?


--2/yrOQL5y1WUNiDj
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi there,

I have built the zfs packages for ascii-proposed. They should be
available from pkgmaster.devuan.org soon. Please test them and report
any problem. I will migrate it to ascii as soon as we know that
everything is all right.

I am also backporting the same version (0.6.5.9-5+devuan1.1) to
jessie. It should be available in jessie-backports soon.

If everithing goes fine with this version, I will probably backport
version 0.7.3 to ascii as well.

HH

--2/yrOQL5y1WUNiDj
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlo3IF0ACgkQXyCzrgtfBi9m7ACcDyXsFa20f4zdvtNCLSLMzPqT
y8wAni2pLFWA84iknJIXtJymy8mTtJpg
=0PjO
-----END PGP SIGNATURE-----

--2/yrOQL5y1WUNiDj--


Acknowledgement sent to KatolaZ <katolaz@freaknet.org>:
Extra info received and forwarded to list. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org:
bug#14; Package zfs. Full text available.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 30 May 2017 11:20:02 +0000
To: 14@bugs.devuan.org
From: Chris Dos <chris@chrisdos.com>
Subject: Testing
Date: Tue, 30 May 2017 05:13:01 -0600

I've been testing the patch for awhile now in four different systems and it's been working great for me.

There is also a patch against grub for ZFS that also seems to be ignored:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848945


Acknowledgement sent to Chris Dos <chris@chrisdos.com>:
Extra info received and forwarded to list. Copy sent to KatolaZ <katolaz@freaknet.org>. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org, KatolaZ <katolaz@freaknet.org>:
bug#14; Package zfs. Full text available.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 18 May 2017 10:20:05 +0000
Date: Thu, 18 May 2017 11:18:44 +0100
From: KatolaZ <katolaz@freaknet.org>
To: 14@bugs.devuan.org
Subject: follow-up

Hi Chris,

thank you for your report. I have been following the corresponding bug
report in Debian (#826996) to which you have actively contributed. If
they don't decide to put those scripts back soon, we will. But we need
people to test them, so please be ready to help with that ;)


Acknowledgement sent to KatolaZ <katolaz@freaknet.org>:
Extra info received and forwarded to list. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org:
bug#14; Package zfs. Full text available.


Message received at 14@bugs.devuan.org:


Received: (at 14) by bugs.devuan.org; 14 May 2017 20:40:06 +0000
To: 14@bugs.devuan.org
From: Chris Dos <chris@chrisdos.com>
Subject: ZFS Init Scripts Available Patch
Date: Sun, 14 May 2017 14:29:56 -0600

There is a working patch in Debian bug report that could be used for the init scripts.:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826994

The Debian maintainer seems to be ignoring it.

    Chris



Acknowledgement sent to Chris Dos <chris@chrisdos.com>:
Extra info received and forwarded to list. Copy sent to KatolaZ <katolaz@freaknet.org>. Full text available.


Information forwarded to devuan-bugs@lists.dyne.org, KatolaZ <katolaz@freaknet.org>:
bug#14; Package zfs. Full text available.


Severity set to `critical'. Request was from katolaz <katolaz@freaknet.org> to control@bugs.devuan.org. Full text available.


Message received at submit@bugs.devuan.org:


Received: (at submit) by bugs.devuan.org; 23 Mar 2017 15:18:02 +0000
From: katolaz <katolaz@freaknet.org>
To: Debian Bug Tracking System <submit@bugs.devuan.org>
Subject: zfs: missing sysvinit scripts

Package: zfs
Severity: critical

zfs is missing proper sysvinit configuration scripts


Acknowledgement sent to katolaz <katolaz@freaknet.org>:
New bug report received and forwarded. Copy sent to KatolaZ <katolaz@freaknet.org>. Full text available.


Report forwarded to owner@bugs.devuan.org@, KatolaZ <katolaz@freaknet.org>:
bug#14; Package zfs. Full text available.


Devuan BTS -- Powered by Debian bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.

Devuan Bugs Owner <owner@bugs.devuan.org>.
Last modified: Wed, 18 Jul 2018 14:39:01 UTC