:: Re: [devuan-dev] ZFS Packages
Página Inicial
Delete this message
Reply to this message
Autor: Chris Dos
Data:  
Para: devuan developers internal list
Assunto: Re: [devuan-dev] ZFS Packages
On 10/16/18 5:58 PM, Daniel Reurich wrote:
> Hi Chris,
>
> do you have a git repo with the changes?
>
> Thanks,
>     Daniel


I'm afraid I do not. Just the two patches that I've attached to this email,
patched against the 0.7.11-1 ceres zfs source. Nothing was done to the spl
source.

    Chris



Description: Add Devuan compatiblity.
Author: Chris Dos <chris@???>
Bug-Debian: https://bugs.debian.org/900089
Forwarded: no
--- a/debian/zfs-dkms.dkms
+++ b/debian/zfs-dkms.dkms
@@ -7,7 +7,7 @@ PRE_BUILD="configure
   --with-config=kernel
   --with-linux=$(
     case `lsb_release -is` in
-      (Debian)
+      (Debian|Devuan)
         if [[ -e ${kernel_source_dir/%build/source} ]]
         then
           echo ${kernel_source_dir/%build/source}

diff -Nru zfs-linux-0.7.11/debian/changelog zfs-linux-0.7.11/debian/changelog
--- zfs-linux-0.7.11/debian/changelog    2018-09-19 02:45:18.000000000 -0600
+++ zfs-linux-0.7.11/debian/changelog    2018-10-09 11:25:27.000000000 -0600
@@ -1,3 +1,10 @@
+zfs-linux (0.7.11-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add sysvinit scripts.
+
+ -- Chris Dos <chris@???>  Tue, 09 Oct 2018 11:25:27 -0600
+
 zfs-linux (0.7.11-1) unstable; urgency=medium


   [ Aron Xu ]
diff -Nru zfs-linux-0.7.11/debian/patches/1004-zed-service-bindir.patch zfs-linux-0.7.11/debian/patches/1004-zed-service-bindir.patch
--- zfs-linux-0.7.11/debian/patches/1004-zed-service-bindir.patch    2018-09-17 19:36:28.000000000 -0600
+++ zfs-linux-0.7.11/debian/patches/1004-zed-service-bindir.patch    2018-10-09 11:22:50.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@???>
 Author: Fabian Grünbichler <f.gruenbichler@???>
+Author: Chris Dos <chris@???>
 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=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.11/debian/rules zfs-linux-0.7.11/debian/rules
--- zfs-linux-0.7.11/debian/rules    2018-09-19 02:44:55.000000000 -0600
+++ zfs-linux-0.7.11/debian/rules    2018-10-09 11:24:24.000000000 -0600
@@ -115,6 +115,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.11/debian/zfsutils-linux.install zfs-linux-0.7.11/debian/zfsutils-linux.install
--- zfs-linux-0.7.11/debian/zfsutils-linux.install    2018-09-17 19:36:28.000000000 -0600
+++ zfs-linux-0.7.11/debian/zfsutils-linux.install    2018-10-09 11:24:24.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.11/debian/zfs-zed.install zfs-linux-0.7.11/debian/zfs-zed.install
--- zfs-linux-0.7.11/debian/zfs-zed.install    2018-09-17 19:36:28.000000000 -0600
+++ zfs-linux-0.7.11/debian/zfs-zed.install    2018-10-09 11:24:24.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