[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Permission to upload ganeti-instance-debootstrap 0.9-2



Hi,

I'd like to upload version 0.9-2 which fixes #596009 and a
so-far-unreported bug. The ganeti-instance-debootstrap package contains
an OS definition for the Ganeti virtualization manager.

This OS creation can be customized using hooks (which are run via
run-parts), so I've added two hook to fix these issues.

#596009 is about the fact that Xen in squeeze uses hvc0 as the console
name, not tty0, so I've added a hook to add a getty on hvc0.

The other hook I've added removes root's password, since I realized that
the change to enable shadow by default makes root's account (after a
plain debootstrap run) have a disabled password, which makes login
impossible (and need manual editing). Since the Ganeti "gnt-instance
console" command which accesses the virtual machine console can only be
run by root, this is IMHO safe.

For these hooks I've used the mountpoint command, so I've added a
dependency on initscripts (non-versioned, as Lenny has the right
version, and possibly even Etch).

The other changes is the bumping of Standards version and replacing
Conflicts with Breaks. Both these are unimportant and can be reverted if
you think they shouldn't go in.

I've tested the new package and it makes creations of Xen instance work
fine again. Let me know if uploading is allright, and/or any comments
you might have. Attached is the debdiff on the dsc's, and the debs.

thanks!
iustin
diff -Nru ganeti-instance-debootstrap-0.9/debian/changelog ganeti-instance-debootstrap-0.9/debian/changelog
--- ganeti-instance-debootstrap-0.9/debian/changelog	2010-04-18 13:54:36.000000000 +0200
+++ ganeti-instance-debootstrap-0.9/debian/changelog	2010-09-12 20:36:27.000000000 +0200
@@ -1,3 +1,12 @@
+ganeti-instance-debootstrap (0.9-2) unstable; urgency=low
+
+  * Add a hook for fixing Xen PVM console issues (Closes: #596009)
+  * Add a hook to set the root account to no password, to allow the
+    initial login to proceed
+  * Standards version 3.9.1 (replace Conflicts with Breaks)
+
+ -- Iustin Pop <iustin@debian.org>  Sun, 12 Sep 2010 19:58:52 +0200
+
 ganeti-instance-debootstrap (0.9-1) unstable; urgency=low
 
   * New Upstream version
diff -Nru ganeti-instance-debootstrap-0.9/debian/control ganeti-instance-debootstrap-0.9/debian/control
--- ganeti-instance-debootstrap-0.9/debian/control	2010-04-18 13:54:36.000000000 +0200
+++ ganeti-instance-debootstrap-0.9/debian/control	2010-09-12 20:36:27.000000000 +0200
@@ -4,15 +4,15 @@
 Maintainer: Debian Ganeti Team <pkg-ganeti-devel@lists.alioth.debian.org>
 Uploaders: Guido Trotter <ultrotter@debian.org>, Iustin Pop <iustin@debian.org>
 Build-Depends: debhelper (>= 7)
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Homepage: http://code.google.com/p/ganeti/
 Vcs-Browser: http://git.debian.org/?p=pkg-ganeti/instance-debootstrap.git
 Vcs-Git: git://git.debian.org/pkg-ganeti/instance-debootstrap.git
 
 Package: ganeti-instance-debootstrap
 Architecture: all
-Depends: ${misc:Depends}, debootstrap, dump, kpartx
-Conflicts: ganeti (<< 1.2.7)
+Depends: ${misc:Depends}, debootstrap, dump, kpartx, initscripts
+Breaks: ganeti (<< 1.2.7)
 Enhances: ganeti
 Description: debootstrap-based instance OS definition for ganeti
  Ganeti is a virtual server cluster management software tool built on
diff -Nru ganeti-instance-debootstrap-0.9/debian/hooks/clear-root-password ganeti-instance-debootstrap-0.9/debian/hooks/clear-root-password
--- ganeti-instance-debootstrap-0.9/debian/hooks/clear-root-password	1970-01-01 01:00:00.000000000 +0100
+++ ganeti-instance-debootstrap-0.9/debian/hooks/clear-root-password	2010-09-12 20:36:27.000000000 +0200
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+# Make sure we're not working on the root directory
+if [ -z "$TARGET" -o "$TARGET" = "/" ]; then
+    echo "Invalid target directory '$TARGET', aborting." 1>&2
+    exit 1
+fi
+
+if [ "$(mountpoint /)" = "$(mountpoint "$TARGET")" ]; then
+    echo "The target directory seems to be the root dir, aborting."  1>&2
+    exit 1
+fi
+
+# Disable root's password, as the switch to enable shadow by default
+# has left root with a disabled password, preventing the initial login
+echo "Disabling root's password"
+chroot "$TARGET" passwd -d root
+
+exit 0
diff -Nru ganeti-instance-debootstrap-0.9/debian/hooks/xen-hvc0 ganeti-instance-debootstrap-0.9/debian/hooks/xen-hvc0
--- ganeti-instance-debootstrap-0.9/debian/hooks/xen-hvc0	1970-01-01 01:00:00.000000000 +0100
+++ ganeti-instance-debootstrap-0.9/debian/hooks/xen-hvc0	2010-09-12 20:36:27.000000000 +0200
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+# Make sure we're not working on the root directory
+if [ -z "$TARGET" -o "$TARGET" = "/" ]; then
+    echo "Invalid target directory '$TARGET', aborting." 1>&2
+    exit 1
+fi
+
+if [ "$(mountpoint /)" = "$(mountpoint "$TARGET")" ]; then
+    echo "The target directory seems to be the root dir, aborting."  1>&2
+    exit 1
+fi
+
+# Fix the console information for xen-pvm mode
+if [ "$HYPERVISOR" = "xen-pvm" ]; then
+    echo "xen-pvm hypervisor detected, adding getty on hvc0"
+    cat >> "$TARGET"/etc/inittab <<EOF
+hvc0:2345:respawn:/sbin/getty 38400 hvc0
+EOF
+fi
+
+exit 0
diff -Nru ganeti-instance-debootstrap-0.9/debian/install ganeti-instance-debootstrap-0.9/debian/install
--- ganeti-instance-debootstrap-0.9/debian/install	1970-01-01 01:00:00.000000000 +0100
+++ ganeti-instance-debootstrap-0.9/debian/install	2010-09-12 20:36:27.000000000 +0200
@@ -0,0 +1 @@
+debian/hooks/* etc/ganeti/instance-debootstrap/hooks/
[The following lists of changes regard files as different if they have
different names, permissions or owners.]

Files in second .deb but not in first
-------------------------------------
-rwxr-xr-x  root/root   /etc/ganeti/instance-debootstrap/hooks/clear-root-password
-rwxr-xr-x  root/root   /etc/ganeti/instance-debootstrap/hooks/xen-hvc0

Control files: lines which differ (wdiff format)
------------------------------------------------
[-Conflicts:-]
{+Breaks:+} ganeti (<< 1.2.7)
Depends: debootstrap, dump, [-kpartx-] {+kpartx, initscripts+}
Installed-Size: [-72-] {+80+}
Version: [-0.9-1-] {+0.9-2+}

Attachment: signature.asc
Description: Digital signature


Reply to: