From 1123dc47e17c0102e1bf9dff930d37c8a032cc35 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Lopez Perez Date: Tue, 9 Apr 2013 01:39:22 +0200 Subject: [PATCH] Remove patch to support legacy zdev.conf configuration files. * This complements previous commit dd1eb91 * zdev.conf syntax is not longer supported by upstream. * We aren't interested in shipping a patch with our _first_ _release_ to support an already deprecated feature by upstream that will only make the future maintenance of the package harder in Debian. * This was the last patch. So remove also the series file. --- ...evert-Retire-zpool_id-infrastructure.patch | 1121 ----------------- debian/patches/series | 1 - 2 files changed, 1122 deletions(-) delete mode 100644 debian/patches/0001-Revert-Retire-zpool_id-infrastructure.patch delete mode 100644 debian/patches/series diff --git a/debian/patches/0001-Revert-Retire-zpool_id-infrastructure.patch b/debian/patches/0001-Revert-Retire-zpool_id-infrastructure.patch deleted file mode 100644 index 17584406..00000000 --- a/debian/patches/0001-Revert-Retire-zpool_id-infrastructure.patch +++ /dev/null @@ -1,1121 +0,0 @@ -From 786ba6f06aec144dd126318e6a0f751c6b307af5 Mon Sep 17 00:00:00 2001 -From: Darik Horn -Date: Sat, 2 Feb 2013 16:31:47 -0600 -Subject: [PATCH] Revert "Retire zpool_id infrastructure" - -On managed Debian installations, `/etc/zfs/zdev.conf` is a registered -configuration file, so we must carry this patch until a debconf for converting -it to the new `/etc/zfs/vdev.conf` syntax is implemented. - -This reverts commit dbf763b39b232996f0d6bb0022e4446643c18e05. ---- - PKGBUILD-zfs.in | 1 + - cmd/Makefile.am | 2 +- - cmd/zpool_id/Makefile.am | 1 + - cmd/zpool_id/zpool_id | 86 ++++++++++ - cmd/zpool_layout/Makefile.am | 1 + - cmd/zpool_layout/zpool_layout | 281 +++++++++++++++++++++++++++++++++ - configure.ac | 3 + - dracut/90zfs/module-setup.sh.in | 4 +- - etc/zfs/Makefile.am | 6 +- - etc/zfs/zdev.conf | 9 ++ - etc/zfs/zdev.conf.dragon.example | 176 +++++++++++++++++++++ - etc/zfs/zdev.conf.supermicro.example | 30 ++++ - etc/zfs/zdev.conf.x4550.example | 66 ++++++++ - include/libzfs.h | 2 +- - lib/libzfs/libzfs_import.c | 1 + - scripts/Makefile.am | 2 +- - scripts/common.sh.in | 5 +- - scripts/zpool-config/zpool-raid0.sh | 7 +- - scripts/zpool-config/zpool-raid10.sh | 7 +- - scripts/zpool-config/zpool-raidz.sh | 7 +- - scripts/zpool-layout/Makefile.am | 22 +++ - scripts/zpool-layout/dragon.ddn.conf | 67 ++++++++ - scripts/zpool-layout/dragon.llnl.conf | 67 ++++++++ - udev/rules.d/60-zpool.rules.in | 9 ++ - udev/rules.d/Makefile.am | 2 + - zfs-script-config.sh.in | 1 + - zfs.spec.in | 2 + - 27 files changed, 851 insertions(+), 16 deletions(-) - create mode 100644 cmd/zpool_id/Makefile.am - create mode 100755 cmd/zpool_id/zpool_id - create mode 100644 cmd/zpool_layout/Makefile.am - create mode 100755 cmd/zpool_layout/zpool_layout - create mode 100644 etc/zfs/zdev.conf - create mode 100644 etc/zfs/zdev.conf.dragon.example - create mode 100644 etc/zfs/zdev.conf.supermicro.example - create mode 100644 etc/zfs/zdev.conf.x4550.example - create mode 100644 scripts/zpool-layout/Makefile.am - create mode 100644 scripts/zpool-layout/dragon.ddn.conf - create mode 100644 scripts/zpool-layout/dragon.llnl.conf - create mode 100644 udev/rules.d/60-zpool.rules.in - -Index: b/cmd/Makefile.am -=================================================================== ---- a/cmd/Makefile.am -+++ b/cmd/Makefile.am -@@ -1,2 +1,2 @@ - SUBDIRS = zfs zpool zdb zhack zinject zstreamdump ztest zpios --SUBDIRS += mount_zfs fsck_zfs zvol_id vdev_id -+SUBDIRS += mount_zfs fsck_zfs zpool_layout zvol_id zpool_id vdev_id -Index: b/cmd/zpool_id/Makefile.am -=================================================================== ---- /dev/null -+++ b/cmd/zpool_id/Makefile.am -@@ -0,0 +1 @@ -+dist_udev_SCRIPTS = zpool_id -Index: b/cmd/zpool_id/zpool_id -=================================================================== ---- /dev/null -+++ b/cmd/zpool_id/zpool_id -@@ -0,0 +1,86 @@ -+#!/bin/sh -+ -+CONFIG="${CONFIG:-/etc/zfs/zdev.conf}" -+ -+if [ -z "${PATH_ID}" ]; then -+ # The path_id helper became a builtin command in udev 174. -+ if [ -x '/lib/udev/path_id' ]; then -+ PATH_ID='/lib/udev/path_id' -+ else -+ PATH_ID='udevadm test-builtin path_id' -+ fi -+fi -+ -+die() { -+ echo "Error: $*" -+ exit 1 -+} -+ -+usage() { -+ cat << EOF -+Usage: zpool_id [-h] [-c configfile] -+ -c Alternate config file [default /etc/zfs/zdev.conf] -+ -d Use path_id from device as the mapping key -+ -h Show this message -+EOF -+ exit 1 -+} -+ -+while getopts 'c:d:h' OPTION; do -+ case ${OPTION} in -+ c) -+ CONFIG="${OPTARG}" -+ ;; -+ d) -+ DEVICE="${OPTARG}" -+ ;; -+ h) -+ usage -+ ;; -+ esac -+done -+ -+# Check that a device was requested -+[ -z "${DEVICE}" ] && usage -+ -+# Check for the existence of a configuration file -+[ ! -f "${CONFIG}" ] && die "Missing config file: ${CONFIG}" -+ -+# If we are handling a multipath device then $DM_UUID will be -+# exported and we'll use its value (prefixed with dm-uuid per -+# multipathd's naming convention) as our unique persistent key. -+# For traditional devices we'll obtain the key from udev's -+# path_id. -+if [ -n "${DM_UUID}" ] && echo "${DM_UUID}" | grep -q -e '^mpath' ; then -+ ID_PATH="dm-uuid-${DM_UUID}" -+else -+ eval `${PATH_ID} ${DEVICE}` -+ [ -z "${ID_PATH}" ] && die "Missing ID_PATH for ${DEVICE}" -+fi -+ -+# Use the persistent key to lookup the zpool device id in the -+# configuration file which is of the format . -+# Lines starting with #'s are treated as comments and ignored. -+# Exact matches are required, wild cards are not supported, -+# and only the first match is returned. -+ID_ZPOOL='' -+while read CONFIG_ZPOOL CONFIG_PATH REPLY; do -+ if [ "${CONFIG_ZPOOL}" != "${CONFIG_ZPOOL#\#}" ]; then -+ # Skip comment lines. -+ continue -+ fi -+ if [ "${CONFIG_PATH}" = "${ID_PATH}" ]; then -+ ID_ZPOOL="${CONFIG_ZPOOL}" -+ break -+ fi -+done <"${CONFIG}" -+ -+[ -z "${ID_ZPOOL}" ] && die "Missing ID_ZPOOL for ID_PATH: ${ID_PATH}" -+ -+if [ -n "${ID_ZPOOL}" ]; then -+ echo "ID_PATH=${ID_PATH}" -+ echo "ID_ZPOOL=${ID_ZPOOL}" -+ echo "ID_ZPOOL_PATH=disk/zpool/${ID_ZPOOL}" -+fi -+ -+exit 0 -Index: b/cmd/zpool_layout/Makefile.am -=================================================================== ---- /dev/null -+++ b/cmd/zpool_layout/Makefile.am -@@ -0,0 +1 @@ -+dist_bin_SCRIPTS = zpool_layout -Index: b/cmd/zpool_layout/zpool_layout -=================================================================== ---- /dev/null -+++ b/cmd/zpool_layout/zpool_layout -@@ -0,0 +1,281 @@ -+#!/bin/bash -+# -+# Direct-Attached Mode -+# -------------------- -+# Set BUSES and HOST_PORTS to match the topology of your system. As -+# each port is enumerated it will be assigned the next channel name. -+# The current script enumerates each port on a bus before moving on -+# to enumerate the next bus. -+# -+# Every distribution, version of udev, and type of attached storage -+# seems to result in slightly different formatting of the by-path -+# name. For this reason you may need to adjust the parsing below -+# to suit your needs. This is one of the reasons to use a custom -+# /etc/zfs/zdev.conf file, it allows the by-path naming convention -+# to change and still keep the simple naming. -+# -+# SAS-Switch Mode -+# ------------------------- -+# When the host accesses disk via SAS switches the combination of -+# bus and port number does not necessarily uniquely identify a -+# channel or disk drawer. In this case we must resort to other -+# means to infer the physical topology. For a single-level network -+# (i.e. no switch cascading) we can assign alphabetic channel labels -+# based on the switch port number that the drawer is connected to. -+# If support for more complex topologies is needed this script will -+# need to be customized or replaced. -+# -+# In SAS-Switch mode (enabled with "-g switch" ) we require that -+# udev has been configured to create per-disk symbolic links in -+# /dev/disk/by-id of the form -+#