[Pkg-ganeti-devel] [SCM] Instance debootstrap packaging branch, master, updated. debian/0.7-1-7-g72603d4

Iustin Pop iusty at k1024.org
Sun Dec 6 15:22:59 UTC 2009


The following commit has been merged in the master branch:
commit d3c180513dd03aab705b92ee9ff7e6b4defe77dc
Author: Iustin Pop <iusty at k1024.org>
Date:   Sat Dec 5 22:56:09 2009 +0100

    Cherry-pick blktype support from upstream tree
    
    This is unreleased yet but is needed in squeeze.

diff --git a/debian/patches/blktype-support.patch b/debian/patches/blktype-support.patch
new file mode 100644
index 0000000..392f4ec
--- /dev/null
+++ b/debian/patches/blktype-support.patch
@@ -0,0 +1,97 @@
+commit 17b5b2da0af36d75dc47d545cdf46eb0a0fc0d93
+Author: Guido Trotter <ultrotter at google.com>
+Date:   Mon Oct 19 19:18:07 2009 -0400
+Subject: Support blktype as an alternative to vol_id
+
+    This is needed to run when the node os is debian squeeze or ubuntu
+    karmik. Since blktype and vol_id need different options, we include the
+    options in the command variable. Moreover we add a new VOL_TYPE command,
+    for that usage of vol_id/blktype.
+
+    Signed-off-by: Guido Trotter <ultrotter at google.com>
+    Reviewed-by: Michael Hanselmann <hansmi at google.com>
+
+Origin: upstream, http://git.ganeti.org/instance-debootstrap.git/?a=commitdiff;h=17b5b2da0af36d75dc47d545cdf46eb0a0fc0d93
+
+diff --git a/common.sh.in b/common.sh.in
+index 2acab86..6c6c3b9 100644
+--- a/common.sh.in
++++ b/common.sh.in
+@@ -160,15 +160,21 @@ CACHE_DIR="@localstatedir@/cache/ganeti-instance-debootstrap"
+ 
+ SCRIPT_NAME=$(basename $0)
+ 
+-for dir in /lib/udev /sbin; do
+-  if [ -f $dir/vol_id -a -x $dir/vol_id ]; then
+-    VOL_ID=$dir/vol_id
+-  fi
+-done
++if [ -f /sbin/blkid -a -x /sbin/blkid ]; then
++  VOL_ID="/sbin/blkid -o value -s UUID"
++  VOL_TYPE="/sbin/blkid -o value -s TYPE"
++else
++  for dir in /lib/udev /sbin; do
++    if [ -f $dir/vol_id -a -x $dir/vol_id ]; then
++      VOL_ID="$dir/vol_id -u"
++      VOL_TYPE="$dir/vol_id -t"
++    fi
++  done
++fi
+ 
+ if [ -z "$VOL_ID" ]; then
+-    log_error "vol_id not found, please install udev"
+-    exit 1
++  log_error "vol_id or blkid not found, please install udev or util-linux"
++  exit 1
+ fi
+ 
+ if [ -z "$OS_API_VERSION" -o "$OS_API_VERSION" = "5" ]; then
+diff --git a/create b/create
+index 5933f0b..252a512 100755
+--- a/create
++++ b/create
+@@ -49,11 +49,11 @@ else
+ fi
+ 
+ mke2fs -Fjq $filesystem_dev
+-root_uuid=$($VOL_ID -u $filesystem_dev )
++root_uuid=$($VOL_ID $filesystem_dev )
+ 
+ if [ -n "$swapdev" ]; then
+   mkswap $swapdev
+-  swap_uuid=$($VOL_ID -u $swapdev || true )
++  swap_uuid=$($VOL_ID $swapdev || true )
+ fi
+ 
+ TMPDIR=`mktemp -d` || exit 1
+diff --git a/export b/export
+index b127754..fccf4b0 100755
+--- a/export
++++ b/export
+@@ -39,7 +39,7 @@ else
+   exit 1
+ fi
+ 
+-vol_type=$($VOL_ID -t $filesystem_dev)
++vol_type=$($VOL_TYPE $filesystem_dev)
+ 
+ if [ "$vol_type" = "ext3" -o "$vol_type" = "ext2" ]; then
+   dump -0 -q -f - "$filesystem_dev"
+diff --git a/import b/import
+index 0d95450..2d9b58e 100755
+--- a/import
++++ b/import
+@@ -42,11 +42,11 @@ else
+ fi
+ 
+ mke2fs -Fjq $filesystem_dev
+-root_uuid=$($VOL_ID -u $filesystem_dev )
++root_uuid=$($VOL_ID $filesystem_dev )
+ 
+ if [ -n "$swapdev" ]; then
+   mkswap $swapdev
+-  swap_uuid=$($VOL_ID -u $swapdev || true )
++  swap_uuid=$($VOL_ID $swapdev || true )
+ fi
+ 
+ TMPDIR=`mktemp -d` || exit 1
diff --git a/debian/patches/series b/debian/patches/series
index 08f1dad..9ca7dc3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 # comment to keep empty file in the diff.gz
+blktype-support.patch

-- 
Instance debootstrap packaging



More information about the Pkg-ganeti-devel mailing list