Skip to content

Commit

Permalink
Update PR 3559.
Browse files Browse the repository at this point in the history
* Fixes #200
  • Loading branch information
FransUrbo committed Apr 6, 2016
1 parent 8f041ed commit b622a29
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 39 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
zfs-linux (0.6.5.6-2-wheezy) wheezy; urgency=low

* Update PR 3559.
Fixes https://github.com/zfsonlinux/pkg-zfs/issues/200

-- Turbo Fredriksson <[email protected]> Wed, 06 Apr 2016 16:39:17 +0200

zfs-linux (0.6.5.6-1-wheezy) wheezy; urgency=low

* New upstream release.
Expand Down
89 changes: 50 additions & 39 deletions debian/patches/PR3559.patch
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ Date: Wed Jul 1 17:20:57 2015 +0200

Index: pkg-zfs/contrib/Makefile.am
===================================================================
--- pkg-zfs.orig/contrib/Makefile.am 2016-03-31 19:52:58.365194688 +0200
+++ pkg-zfs/contrib/Makefile.am 2016-03-31 19:52:58.349194689 +0200
--- pkg-zfs.orig/contrib/Makefile.am 2016-04-06 16:36:31.969005967 +0200
+++ pkg-zfs/contrib/Makefile.am 2016-04-06 16:36:31.961005967 +0200
@@ -1,2 +1,2 @@
-SUBDIRS = bash_completion.d dracut initramfs
-DIST_SUBDIRS = bash_completion.d dracut initramfs
+SUBDIRS = bash_completion.d dracut initramfs sysv-init shell-common
+DIST_SUBDIRS = bash_completion.d dracut initramfs sysv-init shell-common
Index: pkg-zfs/contrib/initramfs/scripts/zfs
===================================================================
--- pkg-zfs.orig/contrib/initramfs/scripts/zfs 2016-03-31 19:52:58.365194688 +0200
+++ pkg-zfs/contrib/initramfs/scripts/zfs 2016-03-31 19:52:58.353194688 +0200
--- pkg-zfs.orig/contrib/initramfs/scripts/zfs 2016-04-06 16:36:31.969005967 +0200
+++ pkg-zfs/contrib/initramfs/scripts/zfs 2016-04-06 16:37:21.417004777 +0200
@@ -16,6 +16,10 @@
ZPOOL_CACHE="/etc/zfs/zpool.cache"
export ZFS ZPOOL ZPOOL_CACHE
Expand Down Expand Up @@ -462,7 +462,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
fi

# Wait for all of the /dev/{hd,sd}[a-z] device nodes to appear.
@@ -295,385 +71,18 @@
@@ -295,391 +71,24 @@
# Load the module
load_module "zfs" || return 1

Expand Down Expand Up @@ -853,6 +853,13 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
# ================================================================

# This is the main function.
mountroot()
{
- local snaporig snapsub destfs pool POOLS
+ local snaporig snapsub destfs pool rfs POOLS

# ----------------------------------------------------------------
# I N I T I A L S E T U P
@@ -694,11 +103,15 @@

# ------------
Expand Down Expand Up @@ -964,7 +971,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
then
# Do auto detect. Do this by 'cheating' - set 'root=zfs:AUTO'
# which will be caught later
@@ -820,33 +234,33 @@
@@ -820,33 +234,35 @@
# F I N D A N D I M P O R T C O R R E C T P O O L

# ------------
Expand Down Expand Up @@ -999,8 +1006,10 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs

- import_pool "$pool"
- find_rootfs "$pool"
+ import_pool "${pool}"
+ ZFS_BOOTFS="$(find_rootfs "${pool}")"
+ import_pool "${pool}" && \
+ rfs="$(find_rootfs "${pool}")" && \
+ ZFS_BOOTFS="${rfs}"
+ [ -n "${ZFS_BOOTFS} ] && break
done
- IFS="$OLD_IFS"
+ IFS="${OLD_IFS}"
Expand All @@ -1010,7 +1019,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
else
# No auto - use value from the command line option.

@@ -858,15 +272,10 @@
@@ -858,15 +274,11 @@
fi

# Import the pool (if not already done so in the AUTO check above).
Expand All @@ -1020,15 +1029,17 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
- [ "$quiet" != "y" ] && \
- zfs_log_begin_msg "Importing ZFS root pool '$ZFS_RPOOL'"
-
import_pool "${ZFS_RPOOL}"
- import_pool "${ZFS_RPOOL}"
- find_rootfs "${ZFS_RPOOL}"
-
- [ "$quiet" != "y" ] && zfs_log_end_msg
+ ZFS_BOOTFS="$(find_rootfs "${pool}")"
+ import_pool "${ZFS_RPOOL}" && \
+ rfs="$(find_rootfs "${ZFS_RPOOL}")" && \
+ ZFS_BOOTFS="${rfs}"
fi

if [ -z "${POOL_IMPORTED}" ]
@@ -874,14 +283,14 @@
@@ -874,14 +286,14 @@
# No pool imported, this is serious!
disable_plymouth
echo ""
Expand All @@ -1047,7 +1058,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
fi

# ----------------------------------------------------------------
@@ -904,9 +313,9 @@
@@ -904,9 +316,9 @@
echo "Error: Unknown root filesystem - no 'bootfs' pool property and"
echo " not specified on the kernel command line."
echo ""
Expand All @@ -1060,7 +1071,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
fi

# ----------------------------------------------------------------
@@ -914,7 +323,7 @@
@@ -914,7 +326,7 @@

# * Ideally, the root filesystem would be mounted like this:
#
Expand All @@ -1069,7 +1080,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
# zfs mount -o mountpoint=/ "${ZFS_BOOTFS}"
#
# but the MOUNTPOINT prefix is preserved on descendent filesystem
@@ -925,14 +334,21 @@
@@ -925,14 +337,21 @@
# Such as /usr, /var, /usr/local etc.
# NOTE: Mounted in the order specified in the
# ZFS_INITRD_ADDITIONAL_DATASETS variable so take care!
Expand Down Expand Up @@ -1099,7 +1110,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs

# ------------
# Debugging information
@@ -952,8 +368,8 @@
@@ -952,8 +371,8 @@
echo -n " 'c' for shell, 'r' for reboot, 'ENTER' to continue. "
read b

Expand All @@ -1110,7 +1121,7 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs

set +x
fi
@@ -963,9 +379,9 @@
@@ -963,9 +382,9 @@
if type run_scripts > /dev/null 2>&1 && \
[ -f "/scripts/local-bottom" -o -d "/scripts/local-bottom" ]
then
Expand All @@ -1125,14 +1136,14 @@ Index: pkg-zfs/contrib/initramfs/scripts/zfs
Index: pkg-zfs/contrib/shell-common/.gitignore
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/shell-common/.gitignore 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/shell-common/.gitignore 2016-04-06 16:36:31.961005967 +0200
@@ -0,0 +1,2 @@
+zfs-functions
+zfs
Index: pkg-zfs/contrib/shell-common/Makefile.am
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/shell-common/Makefile.am 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/shell-common/Makefile.am 2016-04-06 16:36:31.961005967 +0200
@@ -0,0 +1,23 @@
+zfsfuncsdir = $(sysconfdir)/zfs
+zfsfuncs_SCRIPTS = zfs-functions
Expand Down Expand Up @@ -1160,7 +1171,7 @@ Index: pkg-zfs/contrib/shell-common/Makefile.am
Index: pkg-zfs/contrib/shell-common/zfs-functions.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/shell-common/zfs-functions.in 2016-03-31 19:54:01.753193163 +0200
+++ pkg-zfs/contrib/shell-common/zfs-functions.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,1147 @@
+# This is a script with common functions etc used by zfs-import, zfs-mount,
+# zfs-share and zfs-zed.
Expand Down Expand Up @@ -2312,7 +2323,7 @@ Index: pkg-zfs/contrib/shell-common/zfs-functions.in
Index: pkg-zfs/contrib/shell-common/zfs.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/shell-common/zfs.in 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/shell-common/zfs.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,132 @@
+# ZoL userland configuration.
+
Expand Down Expand Up @@ -2449,7 +2460,7 @@ Index: pkg-zfs/contrib/shell-common/zfs.in
Index: pkg-zfs/contrib/sysv-init/.gitignore
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/.gitignore 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/sysv-init/.gitignore 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,4 @@
+zfs-import
+zfs-mount
Expand All @@ -2458,7 +2469,7 @@ Index: pkg-zfs/contrib/sysv-init/.gitignore
Index: pkg-zfs/contrib/sysv-init/Makefile.am
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/Makefile.am 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/sysv-init/Makefile.am 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,36 @@
+initdir = $(DEFAULT_INIT_DIR)
+init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
Expand Down Expand Up @@ -2499,7 +2510,7 @@ Index: pkg-zfs/contrib/sysv-init/Makefile.am
Index: pkg-zfs/contrib/sysv-init/README.md
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/README.md 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/sysv-init/README.md 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,72 @@
+DESCRIPTION
+ These script were written with the primary intention of being portable and
Expand Down Expand Up @@ -2576,7 +2587,7 @@ Index: pkg-zfs/contrib/sysv-init/README.md
Index: pkg-zfs/contrib/sysv-init/zfs-import.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/zfs-import.in 2016-03-31 19:52:58.353194688 +0200
+++ pkg-zfs/contrib/sysv-init/zfs-import.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,216 @@
+#!@SHELL@
+#
Expand Down Expand Up @@ -2797,7 +2808,7 @@ Index: pkg-zfs/contrib/sysv-init/zfs-import.in
Index: pkg-zfs/contrib/sysv-init/zfs-mount.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/zfs-mount.in 2016-03-31 19:52:58.357194688 +0200
+++ pkg-zfs/contrib/sysv-init/zfs-mount.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,219 @@
+#!@SHELL@
+#
Expand Down Expand Up @@ -3021,7 +3032,7 @@ Index: pkg-zfs/contrib/sysv-init/zfs-mount.in
Index: pkg-zfs/contrib/sysv-init/zfs-share.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/zfs-share.in 2016-03-31 19:52:58.357194688 +0200
+++ pkg-zfs/contrib/sysv-init/zfs-share.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,85 @@
+#!@SHELL@
+#
Expand Down Expand Up @@ -3111,7 +3122,7 @@ Index: pkg-zfs/contrib/sysv-init/zfs-share.in
Index: pkg-zfs/contrib/sysv-init/zfs-zed.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ pkg-zfs/contrib/sysv-init/zfs-zed.in 2016-03-31 19:52:58.357194688 +0200
+++ pkg-zfs/contrib/sysv-init/zfs-zed.in 2016-04-06 16:36:31.965005967 +0200
@@ -0,0 +1,134 @@
+#!@SHELL@
+#
Expand Down Expand Up @@ -3249,16 +3260,16 @@ Index: pkg-zfs/contrib/sysv-init/zfs-zed.in
+fi
Index: pkg-zfs/etc/Makefile.am
===================================================================
--- pkg-zfs.orig/etc/Makefile.am 2016-03-31 19:52:58.365194688 +0200
+++ pkg-zfs/etc/Makefile.am 2016-03-31 19:52:58.357194688 +0200
--- pkg-zfs.orig/etc/Makefile.am 2016-04-06 16:36:31.969005967 +0200
+++ pkg-zfs/etc/Makefile.am 2016-04-06 16:36:31.965005967 +0200
@@ -1,2 +1,2 @@
-SUBDIRS = zfs $(ZFS_INIT_SYSTEMD) $(ZFS_INIT_SYSV) $(ZFS_MODULE_LOAD)
-DIST_SUBDIRS = init.d zfs systemd modules-load.d
+SUBDIRS = zfs $(ZFS_INIT_SYSTEMD) $(ZFS_MODULE_LOAD)
+DIST_SUBDIRS = zfs systemd modules-load.d
Index: pkg-zfs/etc/init.d/.gitignore
===================================================================
--- pkg-zfs.orig/etc/init.d/.gitignore 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/.gitignore 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,6 +0,0 @@
-zfs-functions
Expand All @@ -3269,7 +3280,7 @@ Index: pkg-zfs/etc/init.d/.gitignore
-zfs
Index: pkg-zfs/etc/init.d/Makefile.am
===================================================================
--- pkg-zfs.orig/etc/init.d/Makefile.am 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/Makefile.am 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,44 +0,0 @@
-initdir = $(DEFAULT_INIT_DIR)
Expand Down Expand Up @@ -3318,7 +3329,7 @@ Index: pkg-zfs/etc/init.d/Makefile.am
- -$(RM) $(init_SCRIPTS) $(initcommon_SCRIPTS) $(initconf_SCRIPTS)
Index: pkg-zfs/etc/init.d/README.md
===================================================================
--- pkg-zfs.orig/etc/init.d/README.md 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/README.md 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,72 +0,0 @@
-DESCRIPTION
Expand Down Expand Up @@ -3395,7 +3406,7 @@ Index: pkg-zfs/etc/init.d/README.md
- Finally, we share filesystems configured with the share\* property.
Index: pkg-zfs/etc/init.d/zfs-functions.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs-functions.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs-functions.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,429 +0,0 @@
-# This is a script with common functions etc used by zfs-import, zfs-mount,
Expand Down Expand Up @@ -3829,7 +3840,7 @@ Index: pkg-zfs/etc/init.d/zfs-functions.in
-}
Index: pkg-zfs/etc/init.d/zfs-import.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs-import.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs-import.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,339 +0,0 @@
-#!@SHELL@
Expand Down Expand Up @@ -4173,7 +4184,7 @@ Index: pkg-zfs/etc/init.d/zfs-import.in
-fi
Index: pkg-zfs/etc/init.d/zfs-mount.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs-mount.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs-mount.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,227 +0,0 @@
-#!@SHELL@
Expand Down Expand Up @@ -4405,7 +4416,7 @@ Index: pkg-zfs/etc/init.d/zfs-mount.in
-fi
Index: pkg-zfs/etc/init.d/zfs-share.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs-share.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs-share.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,85 +0,0 @@
-#!@SHELL@
Expand Down Expand Up @@ -4495,7 +4506,7 @@ Index: pkg-zfs/etc/init.d/zfs-share.in
-fi
Index: pkg-zfs/etc/init.d/zfs-zed.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs-zed.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs-zed.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,134 +0,0 @@
-#!@SHELL@
Expand Down Expand Up @@ -4634,7 +4645,7 @@ Index: pkg-zfs/etc/init.d/zfs-zed.in
-fi
Index: pkg-zfs/etc/init.d/zfs.in
===================================================================
--- pkg-zfs.orig/etc/init.d/zfs.in 2016-03-31 19:52:58.365194688 +0200
--- pkg-zfs.orig/etc/init.d/zfs.in 2016-04-06 16:36:31.969005967 +0200
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,132 +0,0 @@
-# ZoL userland configuration.
Expand Down

0 comments on commit b622a29

Please sign in to comment.