lsb_release -is = Devuan

Also installed the sysvinit patch:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826994

I deployed a Stretch test system from an upgrade from Jessie along with the
sysvinit patch.  To my surprise, zfs-dkms compiled fine.

So it seams that on the entire server with 1733 packages, only the spl-dkms
zfs-dkms zfs-initramfs zfs-zed require the lsb-release package dependency.

Can this dependency be removed so Devuan and other Debian based distributions
will continue to work with these packages?

Looking at the source:
grep -r lsb_release *
debian/zfs-dkms.dkms:    case `lsb_release -is` in
debian/zfs-dkms.dkms.debhelper:    case `lsb_release -is` in
debian/zfs-dkms/usr/src/zfs-0.7.9/dkms.conf:    case `lsb_release -is` in
So there are three references.

Looking at: debian/zfs-dkms.dkms, debian/zfs-dkms.dkms.debhelper,
debian/zfs-dkms/usr/src/zfs-0.7.9/dkms.conf, all three have the same check.
  --with-linux=$(
    case `lsb_release -is` in
      (Debian)
        if [[ -e ${kernel_source_dir/%build/source} ]]
        then
          echo ${kernel_source_dir/%build/source}
        else
          # A kpkg exception for Proxmox 2.0
          echo ${kernel_source_dir}
        fi
      ;;
      (*)
        echo ${kernel_source_dir}
      ;;
    esac
  )

Is it necessary to use the lsb_release case statement?  Would it not be best
just to use something like this for maximum compatibility with Debian based
distros?
  --with-linux=$(
        if [[ -e ${kernel_source_dir/%build/source} ]]
        then
          echo ${kernel_source_dir/%build/source}
        else
          # A kpkg exception for Proxmox 2.0
          echo ${kernel_source_dir}
        fi
  )


I would like to see the entire debian folder tree go into ZoL source.  Debian
is the core for a lot of distributions and it would be good see a debian
folder added to ZoL source.

I have attached a patch to remove the lsb_release check listed above.
zfs-dkms installed and compiled cleanly on Devuan Jessie, Devuan Ascii
(Stretch), and Devuan Ceres (Sid).

I guess this bug can be changed from Grave to Wishlist, though I hope
lsb_release dependency is removed.

        Chris

Description: Remove lsb_release dependency to work on other distributions.
Author: Chris Dos <ch...@chrisdos.com>
Bug-Debian: https://bugs.debian.org/900089
Forwarded: no
--- a/scripts/dkms.mkconf
+++ b/scripts/dkms.mkconf
@@ -25,7 +25,15 @@
 PRE_BUILD="configure
   --prefix=/usr
   --with-config=kernel
-  --with-linux=\${kernel_source_dir}
+  --with-linux=\$(
+        if [[ -e \${kernel_source_dir/%build/source} ]]
+        then
+          echo \${kernel_source_dir/%build/source}
+        else
+          # A kpkg exception for Proxmox 2.0
+          echo \${kernel_source_dir}
+        fi
+  )
   --with-linux-obj=\${kernel_source_dir}
   --with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
   --with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
--- 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}
--- a/debian/zfs-dkms.dkms.debhelper
+++ /dev/null
@@ -1,93 +0,0 @@
-BUILD_DEPENDS[0]="spl"
-AUTOINSTALL="yes"
-PACKAGE_NAME="zfs"
-PACKAGE_VERSION="0.7.9"
-PRE_BUILD="configure
-  --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}
-        else
-          # 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}
-  --with-spl-obj=${dkms_tree}/spl/${PACKAGE_VERSION}/${kernelver}/${arch}
-  $(
-    [[ -r /etc/default/zfs ]] \
-    && source /etc/default/zfs \
-    && shopt -q -s extglob \
-    && \
-    {
-      if [[ ${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
-      then
-        echo --enable-debug
-      fi
-      if [[ ${ZFS_DKMS_ENABLE_DEBUG_DMU_TX,,} == @(y|yes) ]]
-      then
-        echo --enable-debug-dmu-tx
-      fi
-    }
-  )
-  --with-spl-timeout=600
-"
-POST_BUILD="cp
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/zfs_config.h
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/module/Module.symvers
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/
-"
-REMAKE_INITRD="$(
-  if [ -e /usr/share/initramfs-tools/hooks/zfs \
-       -o -e /usr/share/dracut/modules.d/90zfs ]
-  then
-    echo -n yes
-  else
-    echo -n no
-  fi
-)"
-MAKE[0]="make"
-STRIP[0]="$(
-  [[ -r /etc/default/zfs ]] \
-  && source /etc/default/zfs \
-  && shopt -q -s extglob \
-  && [[ ${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \
-  && echo -n no
-)"
-STRIP[1]="${STRIP[0]}"
-STRIP[2]="${STRIP[0]}"
-STRIP[3]="${STRIP[0]}"
-STRIP[4]="${STRIP[0]}"
-STRIP[5]="${STRIP[0]}"
-STRIP[6]="${STRIP[0]}"
-BUILT_MODULE_NAME[0]="zavl"
-BUILT_MODULE_LOCATION[0]="module/avl/"
-DEST_MODULE_LOCATION[0]="/extra/zfs/zavl"
-BUILT_MODULE_NAME[1]="zcommon"
-BUILT_MODULE_LOCATION[1]="module/zcommon/"
-DEST_MODULE_LOCATION[1]="/extra/zfs/zcommon"
-BUILT_MODULE_NAME[2]="znvpair"
-BUILT_MODULE_LOCATION[2]="module/nvpair/"
-DEST_MODULE_LOCATION[2]="/extra/zfs/znvpair"
-BUILT_MODULE_NAME[3]="zpios"
-BUILT_MODULE_LOCATION[3]="module/zpios/"
-DEST_MODULE_LOCATION[3]="/extra/zfs/zpios"
-BUILT_MODULE_NAME[4]="zunicode"
-BUILT_MODULE_LOCATION[4]="module/unicode/"
-DEST_MODULE_LOCATION[4]="/extra/zfs/zunicode"
-BUILT_MODULE_NAME[5]="zfs"
-BUILT_MODULE_LOCATION[5]="module/zfs/"
-DEST_MODULE_LOCATION[5]="/extra/zfs/zfs"
-BUILT_MODULE_NAME[6]="icp"
-BUILT_MODULE_LOCATION[6]="module/icp/"
-DEST_MODULE_LOCATION[6]="/extra/zfs/icp"
--- a/debian/zfs-dkms/usr/src/zfs-0.7.9/dkms.conf
+++ /dev/null
@@ -1,93 +0,0 @@
-BUILD_DEPENDS[0]="spl"
-AUTOINSTALL="yes"
-PACKAGE_NAME="zfs"
-PACKAGE_VERSION="0.7.9"
-PRE_BUILD="configure
-  --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}
-        else
-          # 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}
-  --with-spl-obj=${dkms_tree}/spl/${PACKAGE_VERSION}/${kernelver}/${arch}
-  $(
-    [[ -r /etc/default/zfs ]] \
-    && source /etc/default/zfs \
-    && shopt -q -s extglob \
-    && \
-    {
-      if [[ ${ZFS_DKMS_ENABLE_DEBUG,,} == @(y|yes) ]]
-      then
-        echo --enable-debug
-      fi
-      if [[ ${ZFS_DKMS_ENABLE_DEBUG_DMU_TX,,} == @(y|yes) ]]
-      then
-        echo --enable-debug-dmu-tx
-      fi
-    }
-  )
-  --with-spl-timeout=600
-"
-POST_BUILD="cp
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/zfs_config.h
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/module/Module.symvers
-  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/
-"
-REMAKE_INITRD="$(
-  if [ -e /usr/share/initramfs-tools/hooks/zfs \
-       -o -e /usr/share/dracut/modules.d/90zfs ]
-  then
-    echo -n yes
-  else
-    echo -n no
-  fi
-)"
-MAKE[0]="make"
-STRIP[0]="$(
-  [[ -r /etc/default/zfs ]] \
-  && source /etc/default/zfs \
-  && shopt -q -s extglob \
-  && [[ ${ZFS_DKMS_DISABLE_STRIP,,} == @(y|yes) ]] \
-  && echo -n no
-)"
-STRIP[1]="${STRIP[0]}"
-STRIP[2]="${STRIP[0]}"
-STRIP[3]="${STRIP[0]}"
-STRIP[4]="${STRIP[0]}"
-STRIP[5]="${STRIP[0]}"
-STRIP[6]="${STRIP[0]}"
-BUILT_MODULE_NAME[0]="zavl"
-BUILT_MODULE_LOCATION[0]="module/avl/"
-DEST_MODULE_LOCATION[0]="/extra/zfs/zavl"
-BUILT_MODULE_NAME[1]="zcommon"
-BUILT_MODULE_LOCATION[1]="module/zcommon/"
-DEST_MODULE_LOCATION[1]="/extra/zfs/zcommon"
-BUILT_MODULE_NAME[2]="znvpair"
-BUILT_MODULE_LOCATION[2]="module/nvpair/"
-DEST_MODULE_LOCATION[2]="/extra/zfs/znvpair"
-BUILT_MODULE_NAME[3]="zpios"
-BUILT_MODULE_LOCATION[3]="module/zpios/"
-DEST_MODULE_LOCATION[3]="/extra/zfs/zpios"
-BUILT_MODULE_NAME[4]="zunicode"
-BUILT_MODULE_LOCATION[4]="module/unicode/"
-DEST_MODULE_LOCATION[4]="/extra/zfs/zunicode"
-BUILT_MODULE_NAME[5]="zfs"
-BUILT_MODULE_LOCATION[5]="module/zfs/"
-DEST_MODULE_LOCATION[5]="/extra/zfs/zfs"
-BUILT_MODULE_NAME[6]="icp"
-BUILT_MODULE_LOCATION[6]="module/icp/"
-DEST_MODULE_LOCATION[6]="/extra/zfs/icp"

Reply via email to