]> xenbits.xensource.com Git - people/dariof/xen-tools.git/commitdiff
Overwork TLS disabling on Debian and Ubuntu
authorAxel Beckert <abe@deuxchevaux.org>
Fri, 18 Jan 2013 00:26:11 +0000 (01:26 +0100)
committerAxel Beckert <abe@deuxchevaux.org>
Fri, 18 Jan 2013 00:26:11 +0000 (01:26 +0100)
TODO.markdown
debian/changelog
hooks/common/20-setup-apt
hooks/debian/20-setup-apt

index e807f9792a8deda2add8e835c2d1da2c6cb0234e..b2f0ec0853d1eb012433e33599d888e4ff966b7b 100644 (file)
@@ -3,12 +3,6 @@ TODO
 
 See KNOWN_BUGS.markdown for real bugs.
 
-Bugs to fix and features to add for 4.3
----------------------------------------
-
-Refactor TLS disabling. Seems to be happen twice, once in 20-setup-apt
-and once in 10-disable-tls.
-
 Bugs to fix and features to add for 5.0
 ---------------------------------------
 
@@ -181,6 +175,13 @@ Bugs to fix and features to add for 5.0
 
 * Use `Perl::Critic`
 
+* Refactor the different Ubuntu hooks directories so that only one
+  ubuntu hooks directory is left.
+
+  Then also refactor TLS disabling so that it works on all
+  distributions the same. Currently Debian is a special case and
+  Ubuntu half a special case.
+
 Stuff from Steve's TODO list / Generic TODOs
 --------------------------------------------
 
index 3500bb00a8befaddbc89311765ed5652c6ae884f..446a5e9b5f947756f09ed541d81615127ef7167c 100644 (file)
@@ -10,6 +10,7 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low
     - Also recognize "M" and "G" instead of "MB" and "GB" as size unit for
       --memory. (Closes: #691320) Document the recognized units.
     - Default DomUs to use the noop scheduler (Closes: #693131)
+    - Overwork TLS disabling on Debian and Ubuntu
     - xen-list-images update:
       + now understands the --extension option.
       + also outputs the file name of the config file
index c300bb80ac8fd5771d78412a821570c423bd0fcc..2caa2ee16b4bab98598966ef95a4cd2fa769c6bc 100755 (executable)
@@ -70,18 +70,14 @@ chroot ${prefix} /usr/bin/apt-get update
 
 
 #
-#  Now fixup TLS on non-64bit systems after dapper.
+#  Now fixup TLS on non-64bit systems after dapper. For dapper this is
+#  already fixed in 10-disable-tls.
 #
-if [ "$dist" != 'dapper' ]; then
-    if [ "`uname -m`" = "x86_64" ]; then
+if [ "$arch" = 'i386' -a "$dist" != 'dapper' ]; then
 
-        logMessage "Ignoring TLS since we're a 64 bit host."
+    logMessage "Installing libc6-xen"
+    installDebianPackage ${prefix} libc6-xen
 
-    else
-
-        logMessage "Installing libc6-xen"
-        installDebianPackage ${prefix} libc6-xen
-    fi
 fi
 
 
index 3788133b899b0627ce720faba9550f1674f894a8..dd6bbed65aeeaf3f9edb1c4d36057c4923076dea 100755 (executable)
@@ -90,30 +90,20 @@ fi
 #
 chroot ${prefix} /usr/bin/apt-get update
 
-
 #
-# For sid or etch systems we install libc6-xen
+# For all systems after Sarge we install libc6-xen on i386
 #
-# For sarge we don't have that option, so we disable TLS.
+# For Sarge we don't have that option, so we disable TLS the hard way.
 #
-if [ "`uname -m`" = "x86_64" ]; then
-
-    logMessage "Ignoring TLS since we're a 64 bit host."
-
-else
-
-    case "${dist}" in
-        *)
-            logMessage "Installing xen-aware libc6"
-    
-            installDebianPackage ${prefix} libc6-xen
-            ;;
-        sarge)
-            logMessage "Disabling TLS"
-            mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
-            mkdir ${prefix}/lib/tls
-            ;;
-    esac
+if [ "${arch}" = "i386" ]; then
+    if [ "${dist}" = 'sarge' ]; then
+        logMessage "Disabling TLS"
+        mv ${prefix}/lib/tls ${prefix}/lib/tls.disabled
+        mkdir ${prefix}/lib/tls
+    else
+        logMessage "Installing xen-aware libc6"
+        installDebianPackage ${prefix} libc6-xen
+    fi
 fi