Hello community,

here is the log from the commit of package cobbler for openSUSE:Factory checked 
in at 2014-08-03 15:36:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cobbler (Old)
 and      /work/SRC/openSUSE:Factory/.cobbler.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cobbler"

Changes:
--------
--- /work/SRC/openSUSE:Factory/cobbler/cobbler.changes  2013-08-14 
23:04:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.cobbler.new/cobbler.changes     2014-08-03 
15:37:00.000000000 +0200
@@ -1,0 +2,72 @@
+Fri Jul 25 15:51:39 UTC 2014 - fcaste...@suse.com
+
+- Added fix_sle_detection.patch: ensures SLE12 is properly detected.
+
+-------------------------------------------------------------------
+Fri Jul 25 13:28:15 UTC 2014 - fcaste...@suse.com
+
+- Did some cleanup of the spec file.
+
+-------------------------------------------------------------------
+Tue Jul 15 15:17:06 UTC 2014 - fcaste...@suse.com
+
+- Fix source of cobbler package inside of spec file (required by 
openSUSE:Factory)
+
+-------------------------------------------------------------------
+Tue Jul 15 13:02:42 UTC 2014 - fcaste...@suse.com
+
+- Added bnc_877009.patch, fixes CVE-2014-3225: cobbler: Local file inclusion 
(bnc#877009)
+
+-------------------------------------------------------------------
+Mon Jul 14 16:27:59 UTC 2014 - fcaste...@suse.com
+
+- Got rid of some of the rpmlint warnings.
+- Fixed error inside of koan tool introduced by the 'grubby-compat.diff' patch.
+
+-------------------------------------------------------------------
+Fri Jul 11 10:18:57 UTC 2014 - mse...@suse.de
+
+- Requires tfpt-server but atftp/tftpt packages provide tfpt(server)
+- Added conditional requires for s390x and syslinux-x86_64
+- Added patches:
+  + catch_cheetah_exception.patch 
+      - forward cheetah exception as 500 SERVER ERROR (bnc#787879)
+  + disable_not_relevant_checks_bnc_828453.patch
+  + fence_ipmitool.sh
+    - add fence_ipmitool script for power management
+  + fix-powermanagement-status.dif
+    - fix evaluation of power status calls
+  + fix-restart-paravirt-xen.dif
+    - fix XEN fullvirt installation
+  + grubby-compat.diff
+  + koan_old_cobbler_compat.diff
+    - add new grubby-compat tool
+  + looking_for_cobbler_order_changed.diff
+    - fix cobbler checks on SUSE (bnc#828453)
+  + setup_py.diff
+    - update paths for suse apache
+  
+- Modified fix-initscript.diff -Failed to patch due to new line in newer 
version
+
+- Removed patches:
+  - suse_newver.patch - Upstreamed
+  - users_patch.diff - Upstreamed
+  - cheetah_template_autoescape.patch - No longer needed 
+
+-------------------------------------------------------------------
+Fri Feb 14 11:47:04 CET 2014 - m...@suse.de
+
+- update to version 2.4.2
+  + Adding support for gPXE
+  + Adding support for ESXi5
+  + fix install=... kernel parameter when importing a SUSE distro
+  + koan: Port xen creation to virt-install
+  + koan: Port qcreate to virt-install
+  + Port koan from virtinst to virt-install command (v2)
+  + add qcow2 driver type
+  + Adding ability to use https for API calls (cobbler CLI)
+  + Use ip instead of ifconfig for network snippets
+  + minor modifications to templar to show template rendering errors
+  + bugfixes and refactoring
+
+-------------------------------------------------------------------

Old:
----
  cobbler-2.4.0-1.tar.bz2
  fix-initscript.dif
  suse_newver.patch
  users_patch.diff

New:
----
  bnc_877009.patch
  catch_cheetah_exception.patch
  cobbler-2.4.2.tar.gz
  disable_not_relevant_checks_bnc_828453.patch
  fence_ipmitool.sh
  fix-initscript.diff
  fix-powermanagement-status.dif
  fix-restart-paravirt-xen.dif
  fix_sle_detection.patch
  grubby-compat.diff
  koan_old_cobbler_compat.diff
  looking_for_cobbler_order_changed.diff
  setup_py.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cobbler.spec ++++++
++++ 799 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/cobbler/cobbler.spec
++++ and /work/SRC/openSUSE:Factory/.cobbler.new/cobbler.spec

++++++ bnc_877009.patch ++++++
++++ 611 lines (skipped)

++++++ catch_cheetah_exception.patch ++++++
Index: cobbler-2.4.0/bin/services.py
===================================================================
--- cobbler-2.4.0.orig/bin/services.py
+++ cobbler-2.4.0/bin/services.py
@@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fi
 import yaml
 import os
 import urllib
+import xmlrpclib
 import cgi
 
 from cobbler.services import CobblerSvc
@@ -76,21 +77,25 @@ def application(environ, start_response)
 
     # Execute corresponding operation on the CobblerSvc object:
     func = getattr( cw, mode )
-    content = func( **form )
+    try:
+        content = func( **form )
 
-    content = unicode(content).encode('utf-8')
-    status = '200 OK'
-    
-    if content.find("# *** ERROR ***") != -1:
-        status = '500 SERVER ERROR'
-        print("possible cheetah template error")
+        content = unicode(content).encode('utf-8')
+        status = '200 OK'
 
-    # TODO: Not sure these strings are the right ones to look for...
-    elif content.find("# profile not found") != -1 or \
-            content.find("# system not found") != -1 or \
-            content.find("# object not found") != -1:
-        print("content not found: %s" % my_uri)
-        status = "404 NOT FOUND"
+        if content.find("# *** ERROR ***") != -1:
+            status = '500 SERVER ERROR'
+            print("possible cheetah template error")
+
+        # TODO: Not sure these strings are the right ones to look for...
+        elif content.find("# profile not found") != -1 or \
+                content.find("# system not found") != -1 or \
+                content.find("# object not found") != -1:
+            print("content not found: %s" % my_uri)
+            status = "404 NOT FOUND"
+    except xmlrpclib.Fault, (err):
+        status = '500 SERVER ERROR'
+        content = err.faultString
 
  #   req.content_type = "text/plain;charset=utf-8"
     response_headers = [('Content-type', 'text/plain;charset=utf-8'),
++++++ cobbler_web_config.diff ++++++
--- /var/tmp/diff_new_pack.62J6EQ/_old  2014-08-03 15:37:01.000000000 +0200
+++ /var/tmp/diff_new_pack.62J6EQ/_new  2014-08-03 15:37:01.000000000 +0200
@@ -2,9 +2,9 @@
 ===================================================================
 --- config/cobbler_web.conf.orig
 +++ config/cobbler_web.conf
-@@ -7,4 +7,18 @@
- RewriteCond %{REQUEST_URI} ^/cobbler_web
- RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
+@@ -14,6 +14,20 @@ WSGIDaemonProcess cobbler_web display-na
+ WSGIProcessGroup cobbler_web
+ WSGIPassAuthorization On
  
 +<Directory "/usr/share/cobbler/web/">
 +        Options Indexes MultiViews
@@ -20,5 +20,6 @@
 +        Allow from all
 +</Directory>
 +
- WSGIScriptAlias /cobbler_web /usr/share/cobbler/web/cobbler.wsgi
-
+ <IfVersion >= 2.4>
+     <Location /cobbler_web>
+         Require all granted

++++++ disable_not_relevant_checks_bnc_828453.patch ++++++
Index: cobbler-2.4.0/cobbler/action_check.py
===================================================================
--- cobbler-2.4.0.orig/cobbler/action_check.py
+++ cobbler-2.4.0/cobbler/action_check.py
@@ -99,7 +99,7 @@ class BootCheck:
        return status
 
    def check_for_ksvalidator(self, status):
-       if self.checked_dist in ["debian", "ubuntu"]:
+       if self.checked_dist in ["debian", "ubuntu", "suse"]:
           return
 
        if not os.path.exists("/usr/bin/ksvalidator"):
@@ -108,6 +108,9 @@ class BootCheck:
        return True
 
    def check_for_cman(self, status):
+       if self.checked_dist == "suse":
+          return
+
        # not doing rpm -q here to be cross-distro friendly
        if not os.path.exists("/sbin/fence_ilo") and not 
os.path.exists("/usr/sbin/fence_ilo"):
            status.append("fencing tools were not found, and are required to 
use the (optional) power management features. install cman or fence-agents to 
use them")
@@ -163,6 +166,9 @@ class BootCheck:
                    status.append(_("yum-utils need to be at least version 
1.1.17 for reposync -l, current version is %s") % yum_utils_ver )
 
    def check_debmirror(self,status):
+       if self.checked_dist == "suse":
+          return
+
        if not os.path.exists("/usr/bin/debmirror"):
            status.append(_("debmirror package is not installed, it will be 
required to manage debian deployments and repositories"))
        if os.path.exists("/etc/debmirror.conf"):
@@ -201,6 +207,9 @@ class BootCheck:
            status.append(_("SELinux is enabled. Please review the following 
wiki page for details on ensuring cobbler works correctly in your SELinux 
environment:\n    https://github.com/cobbler/cobbler/wiki/Selinux";))
 
    def check_for_default_password(self,status):
+       if self.checked_dist == "suse":
+          return
+
        default_pass = self.settings.default_password_crypted
        if default_pass == "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac.":
            status.append(_("The default password used by the sample templates 
for newly installed machines (default_password_crypted in 
/etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: 
\"openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'\" to 
generate new one"))
++++++ fence_ipmitool.sh ++++++
#! /bin/bash
#
# This is a bash wrapper around ipmitool to provide the same interface
# like the fence_ipmilan tool from the fence-agents package how it is used
# by cobbler.
#
# It read options via STDIN. Commandline parameter are not supported.
#
# action=<on, off, reboot, status>
# login=<user>
# passwd=<password>
# ipaddr=<IP or hostname>
#
# It tries first to use "lanplus" interface. If this is not supported,
# it switches to "lan" interface

CMD=""
STATE_OFF=96
STATE_ON=92
POWER_WAIT=5
DEBUG="no"
PROTOCOL="lanplus"

function ipmi_op() {
    local action="$1"
    local ret=1
    local msg=""

    CMD="/usr/bin/ipmitool -I $PROTOCOL -H '$ipaddr'"
    if [ -n "$login" ]; then
        CMD="$CMD -U '$login'"
    fi
    if [ -n "$passwd" ]; then
        CMD="$CMD -E"
        export IPMI_PASSWORD="$passwd"
    else
        CMD="$CMD -P ''"
    fi

    case "$action" in
        on)
            CMD="$CMD chassis power on"
            ;;
        off)
            CMD="$CMD chassis power off"
            ;;
        status)
            CMD="$CMD chassis power status"
            ;;
    esac

    test "$DEBUG" = "yes" && echo "DBG: EXEC $CMD" >&2
    msg=`eval $CMD`
    ret=$?
    unset IPMI_PASSWORD

    test "$DEBUG" = "yes" && echo "DBG: $msg : $ret" >&2
    echo "$msg"
    return $ret
}

function ipmi_on() {
    local ret=1
    local retries=7
    local msg=""

    ipmi_status
    ret=$?
    case $ret in
        $STATE_ON)
            return 0
            ;;
        $STATE_OFF)
            ;;
        *)
            return $ret
    esac

    while [ $retries -gt 0 ]; do
        msg=$(ipmi_op "on")
        ret=$?
        if [ "$ret" != "0" ]; then
            return $ret
        fi

        sleep $POWER_WAIT
        ((retries--))
        ipmi_status
        ret=$?
        case $ret in
            $STATE_OFF)
                ;;
            $STATE_ON)
                return 0
                ;;
            *)
                $retries=0
                ;;
        esac
    done
    echo "ipmilan: Power still off" >&2
    return $ret
}

function ipmi_off() {
    local ret=1
    local retries=7
    local msg=""

    ipmi_status
    ret=$?
    case $ret in
        $STATE_ON)
            ;;
        $STATE_OFF)
            return 0
            ;;
        *)
            return $ret
    esac

    while [ $retries -gt 0 ]; do
        msg=$(ipmi_op "off")
        ret=$?
        if [ "$ret" != "0" ]; then
            return $ret
        fi

        sleep $POWER_WAIT
        ((retries--))
        ipmi_status
        ret=$?
        case $ret in
            $STATE_OFF)
                return 0
                ;;
            $STATE_ON)
                ;;
            *)
                $retries=0
                ;;
        esac
    done
    echo "ipmilan: Power still on" >&2
    return $ret
}

export -f ipmi_op

function ipmi_status() {
    local msg=""
    local ret=1

    msg=`ipmi_op "status"`
    ret=$?

    if [ "$ret" != "0" ]; then
        return 1
    fi
    if echo "$msg" | grep -i "Chassis Power is on" >/dev/null 2>&1; then
        return $STATE_ON
    fi
    if echo "$msg" | grep -i "Chassis Power is off" >/dev/null 2>&1; then
        return $STATE_OFF
    fi
    return 1
}


while read -t 2 -r line
do
    key="${line%%=*}"
    val=`echo "${line##*=}" | sed "s/'/'\\\\\''/g"`
    test "$DEBUG" = "yes" && echo "$key='$val'" >&2
    eval "$key='$val'"
done

test "$DEBUG" = "yes" && echo "action=$action" >&2
test "$DEBUG" = "yes" && echo "login=$login" >&2
test "$DEBUG" = "yes" && echo "passwd=$passwd" >&2
test "$DEBUG" = "yes" && echo "ipaddr=$ipaddr" >&2
test "$DEBUG" = "yes" && echo "port=$port" >&2

if [ -z "$ipaddr" ]; then
    echo "no IP address specified" >&2
    exit 1
fi

if [ "x$option" != "x" ]; then
    action="$option"
elif [ "x$operation" != "x" ]; then
    action="$operation"
elif [ "x$action" == "x" ]; then
    action="reboot"
fi

if [ "$action" != "on" -a "$action" != "off" -a \
     "$action" != "reboot" -a "$action" != "status" ]; then
     echo "operation must be 'on', 'off', 'status' or 'reboot'" >&2
     exit 1
fi

if [ ! -e "/usr/bin/ipmitool" ]; then
    echo "ipmitool not found!" >&2
    echo "Initialization failed" >&2
    exit 1
fi

code=1
# protocol test
ipmi_status
if [ "$?" == "1" ]; then
    # Error: lets switch to lan protocol
    PROTOCOL="lan"
fi

case "$action" in
    reboot)
        ipmi_off
        code=$?
        if [ "$code" != "0" ]; then
            exit 1
        fi
        ipmi_on
        code=$?
        ;;
    on)
        ipmi_on
        code=$?
        ;;
    off)
        ipmi_off
        code=$?
        ;;
    status)
        ipmi_status
        code=$?
        case $code in
            $STATE_ON)
                echo "Chassis power = On"
                exit 0
                ;;
            $STATE_OFF)
                echo "Chassis power = Off"
                exit 2
                ;;
            *)
                echo "Chassis power = Unknown"
                exit 1
                ;;
        esac
        ;;
esac

if [ "$code" == "0" ]; then
    echo "Done"
else
    echo "Failed"
fi

exit $ret

++++++ fix-initscript.diff ++++++
Index: cobbler-2.4.2/config/cobblerd
===================================================================
--- cobbler-2.4.2.orig/config/cobblerd
+++ cobbler-2.4.2/config/cobblerd
@@ -7,8 +7,9 @@
 
 ### BEGIN INIT INFO
 # Provides: cobblerd
-# Required-Start: $network $xinetd $httpd
-# Default-Start: 3 4 5
+# Required-Start: $syslog $local_fs $network $remote_fs apache2
+# Required-Stop: $syslog $local_fs $network $remote_fs apache2
+# Default-Start: 3 5
 # Default-Stop: 0 1 2 6
 # Short-Description: daemon for libvirt virtualization API
 # Description: This is a daemon that a provides remote cobbler API
@@ -51,8 +52,33 @@ RETVAL=0
 
 start() {
     echo -n "Starting cobbler daemon: "
+    # Change the SECRET_KEY option in the Django settings.py file
+    # required for security reasons, should be unique on all systems
+    # the default is empty -> SECRET_KEY = ''
+    # such a key will be changed now
+    # (moved from the post-section of the RPM to the init-script for 
appliances)
+    RAND_SECRET=$(openssl rand -base64 40 | sed 's/\//\\\//g')
+    sed -i -e "s/SECRET_KEY = ''/SECRET_KEY = \'$RAND_SECRET\'/" 
/usr/share/cobbler/web/settings.py
+    if ! grep '\[tftpd\]' /etc/cobbler/modules.conf > /dev/null 2>&1; then
+        echo
+        echo "no [tftpd] section found in /etc/cobbler/modules.conf"
+        echo "please update your configuration on base of 
/etc/cobbler/modules.conf.rpmnew"
+        RETVAL=1
+        return $RETVAL
+    fi
     if [ -f $SUSE_RELEASE ]; then
-        startproc -f -p /var/run/$SERVICE.pid /usr/bin/cobblerd $CONFIG_ARGS
+        if [ -e /etc/apache2/conf.d/cobbler.conf.rpmnew ]; then
+            echo
+            echo "there is a /etc/apache2/conf.d/cobbler.conf.rpmnew file."
+            echo "you should check that for changes against your 
/etc/apache2/conf.d/cobbler.conf"
+        fi
+        if [ -e /etc/apache2/vhosts.d/cobbler_web.conf.rpmnew ]; then
+            echo
+            echo "there is a /etc/apache2/vhosts.d/cobbler_web.conf.rpmnew 
file."
+            echo "you should check that for changes against your 
/etc/apache2/vhosts.d/cobbler_web.conf"
+        fi
+
+        startproc -p /var/run/$SERVICE.pid /usr/bin/cobblerd $CONFIG_ARGS
         rc_status -v
     elif [ -e $DEBIAN_VERSION ]; then
         if [ -f $LOCKFILE ]; then
@@ -67,7 +93,7 @@ start() {
     fi
     RETVAL=$?
     echo
-    [ $RETVAL -eq 0 ] && touch $LOCKFILE
+    [ $RETVAL -eq 0 ] && [ -f $DEBIAN_VERSION ] && touch $LOCKFILE
     [ -f $WSGI ] && touch $WSGI
     return $RETVAL
 }
++++++ fix-powermanagement-status.dif ++++++
Index: cobbler-2.2.2/cobbler/action_power.py
===================================================================
--- cobbler-2.2.2.orig/cobbler/action_power.py
+++ cobbler-2.2.2/cobbler/action_power.py
@@ -105,17 +105,15 @@ class PowerTool:
             if rc == 0:
                 # If the desired state is actually a query for the status
                 # return different information than command return code
+                # fence-agents have the following return codes on status
+                # 0 == on
+                # 2 == off
+                # else == Error / Unknown
                 if desired_state == 'status':
-                    match = re.match('(^Status:\s)(on|off)', output, 
re.IGNORECASE)
-                    if match:
-                        power_status = match.groups()[1]
-                        if power_status.lower() == 'on':
-                            return True
-                        else:
-                            return False
-                    utils.die(self.logger,"command succeeded (rc=%s), but 
output ('%s') was not understood" % (rc, output))
-                    return None
+                    return True
                 break
+            elif rc == 2 and desired_state == 'status':
+                return False
             else:
                 time.sleep(2)
 
++++++ fix-restart-paravirt-xen.dif ++++++
Index: cobbler-2.4.1/koan/app.py
===================================================================
--- cobbler-2.4.1.orig/koan/app.py
+++ cobbler-2.4.1/koan/app.py
@@ -62,6 +62,10 @@ import socket
 import utils
 import time
 import configurator
+try:
+    import xml.etree.ElementTree as etree
+except ImportError:
+    etree = None
 
 COBBLER_REQUIRED = 1.300
 
@@ -1522,7 +1526,9 @@ class Koan:
                    return "failed"
                elif state == "shutdown":
                    print "- shutdown VM detected, is the install done?  
Restarting!"
-                   utils.find_vm(conn, virtname).create()    
+                   dom = utils.find_vm(conn, virtname)
+                   self.fix_restart_config(conn, dom)
+                   dom.create()
                    return results
                else:
                    raise InfoException("internal error, bad virt state")
@@ -1542,6 +1548,48 @@ class Koan:
 
     #---------------------------------------------------
 
+    def fix_restart_config(self, conn, dom):
+        if self.virt_type not in [ "xenpv", "xenfv" ]:
+            return
+        if not etree:
+            return
+        # we need to fix XEN only
+        xml = dom.XMLDesc(0)
+        root = etree.fromstring(xml)
+        on = root.findall('on_poweroff')
+        if on and len(on) == 1:
+            #print "set on_oweroff to destroy"
+            on[0].text = "destroy"
+        on = root.findall('on_reboot')
+        if on and len(on) == 1:
+            #print "set on_reboot to restart"
+            on[0].text = "restart"
+        on = root.findall('on_crash')
+        if on and len(on) == 1:
+            #print "set on_crash to restart"
+            on[0].text = "restart"
+
+        if self.virt_type == "xenpv":
+            bootloader = root.findall('bootloader')
+            if bootloader and len(bootloader) == 1:
+                #print "set bootloader to pygrub"
+                bootloader[0].text = '/usr/bin/pygrub'
+            ose = root.findall('os')
+            if ose and len(ose) == 1:
+                #print "remove os"
+                root.remove(ose[0])
+        elif self.virt_type == "xenfv":
+            oses = root.findall("./os")
+            for os in oses:
+                for item in os:
+                    if item.tag == 'boot' and item.get('dev', '') == 'network':
+                        #print "remove network boot"
+                        os.remove(item)
+
+        conn.defineXML(etree.tostring(root))
+
+    #---------------------------------------------------
+
     def load_virt_modules(self):
         try:
             import xencreate
++++++ fix_sle_detection.patch ++++++
diff --git a/cobbler/utils.py b/cobbler/utils.py
index fcb5abe..6cf8a54 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -1004,7 +1004,10 @@ def check_dist():
     """
     import platform
     try:
-      return platform.linux_distribution()[0].lower().strip()
+      dist = platform.linux_distribution()[0].lower().strip()
+      if "suse" in dist:
+        dist = "suse"
+      return dist
     except AttributeError:
       return platform.dist()[0].lower().strip()
 
++++++ grubby-compat.diff ++++++
Index: scripts/grubby-compat
===================================================================
--- /dev/null
+++ scripts/grubby-compat
@@ -0,0 +1,53 @@
+#! /usr/bin/perl
+
+use POSIX;
+use Getopt::Long;
+use Pod::Usage;
+use Bootloader::Tools;
+use strict;
+
+my %oper;
+my ($opt_args, $opt_update, $opt_initrd, $opt_add_image, $opt_default, 
$opt_title)
+    = ("",0,'','',undef,'');
+
+GetOptions (\%oper,
+    'add-kernel=s' => \$opt_add_image,
+    'bootloader-probe' ,
+    'update-kernel' => \$opt_update,
+    'make-default',
+    'args=s'      => \$opt_args,
+    'initrd=s'      => \$opt_initrd,
+    'title=s' => \$opt_title)
+    or pod2usage(2);
+
+if (defined $oper{'bootloader-probe'}){
+  print Bootloader::Tools::GetBootloader();
+  exit 0;
+}
+
+my $lib = InitLibrary();
+
+if ($opt_add_image ne ''){
+  print "add kernel\n";
+  my @sections = @{$lib->GetSections ()};
+  my $section = { 'name' => $opt_title,
+                  'append' => $opt_args,
+                  'type' => "image",
+                  'initrd' => $opt_initrd,
+                  'image' => $opt_add_image,
+                  'original_name' => 'linux',
+                  '__modified' => '1',
+                  'root' => $lib->GetMountPoints()->{"/"}};
+  unshift @sections, $section;
+  $lib->SetSections (\@sections);
+  print "set sections\n";
+  if (defined $oper{'make-default'}){
+    my $glob_ref = $lib->GetGlobalSettings();
+    $glob_ref->{"default"} = $section->{"name"};
+    $lib->SetGlobalSettings ($glob_ref);
+  }
+  $lib->WriteSettings(1);
+  $lib->UpdateBootloader (1);
+  print "bootloader updated\n";
+  Bootloader::Tools::DumpLog($lib->{"loader"});
+}
Index: koan/app.py
===================================================================
--- koan/app.py.orig
+++ koan/app.py
@@ -1001,7 +1001,11 @@ class Koan:
                return (0, "grub")
             else:
                return (0, "lilo") 
-        cmd = [ "/sbin/grubby", "--bootloader-probe" ]
+        (make, version) = utils.os_release()
+        grubby_bin = "/sbin/grubby"
+        if (make == "suse"):
+            grubby_bin = "/usr/sbin/grubby-compat"
+        cmd = [ grubby_bin, "--bootloader-probe" ]
         probe_process = sub_process.Popen(cmd, stdout=sub_process.PIPE)
         which_loader = probe_process.communicate()[0]
         return probe_process.returncode, which_loader
@@ -1027,11 +1031,16 @@ class Koan:
         def after_download(self, profile_data):
             use_grubby = False
             use_grub2 = False
+            use_grubby_compat = False
             (make, version) = utils.os_release()
             if make in ['ubuntu', 'debian']:
                 if not os.path.exists("/usr/sbin/update-grub"):
                     raise InfoException, "grub2 is not installed"
                 use_grub2 = True
+            elif (make == "suse"):
+                if not os.path.exists("/usr/sbin/grubby-compat"):
+                    raise InfoException, "grub2 is not installed"
+                use_grubby_compat = True
             else:
                 if not os.path.exists("/sbin/grubby"):
                     raise InfoException, "grubby is not installed"
@@ -1130,6 +1139,25 @@ class Koan:
                         cmd = [ "/sbin/lilo" ]
                         utils.subprocess_call(cmd)
 
+            elif use_grubby_compat:
+                kargs_string = "%s" % k_args
+                cmd = [ "/usr/sbin/grubby-compat",
+                        "--add-kernel", 
self.safe_load(profile_data,'kernel_local'),
+                        "--initrd", 
self.safe_load(profile_data,'initrd_local'),
+                        "--args", kargs_string
+                ]
+
+                if self.add_reinstall_entry:
+                    cmd.append("--title=Reinstall")
+                else:
+                    cmd.append("--make-default")
+                    cmd.append("--title=kick%s" % int(time.time()))
+
+                if self.live_cd:
+                    raise InfoException, "Live CD not supported by 
grubby-compat"
+
+                utils.subprocess_call(cmd)
+
             elif use_grub2:
                 # Use grub2 for --replace-self
                 kernel_local = self.safe_load(profile_data,'kernel_local')
Index: setup.py
===================================================================
--- setup.py.orig
+++ setup.py
@@ -215,7 +215,7 @@ if __name__ == "__main__":
         ],
         data_files = proc_data_files([
             # tftpd, hide in /usr/sbin
-            ("/usr/sbin", ["bin/tftpd.py"]),
+            ("/usr/sbin", ["bin/tftpd.py", "scripts/grubby-compat"]),
 
             ("%s" % webconfig,              ["config/cobbler.conf"]),
             ("%s" % vhostconfig,            ["config/cobbler_web.conf"]),
++++++ koan_old_cobbler_compat.diff ++++++
Index: koan/virtinstall.py
===================================================================
--- koan/virtinstall.py.orig
+++ koan/virtinstall.py
@@ -110,7 +110,7 @@ def _sanitize_nics(nics, bridge, profile
         counter = counter + 1
         intf = nics[iname]
 
-        if (intf["interface_type"] in 
("master","bond","bridge","bonded_bridge_slave") or
+        if ((intf.has_key("interface_type") and intf["interface_type"] in 
("master","bond","bridge","bonded_bridge_slave")) or
             vlanpattern.match(iname) or iname.find(":") != -1):
             continue
 
++++++ looking_for_cobbler_order_changed.diff ++++++
Index: koan/utils.py
===================================================================
--- koan/utils.py.orig
+++ koan/utils.py
@@ -456,8 +456,8 @@ def connect_to_server(server=None,port=N
     connect_ok = 0
 
     try_urls = [
-        "http://%s:%s/cobbler_api"; % (server,port),
         "https://%s:%s/cobbler_api"; % (server,port),
+        "http://%s:%s/cobbler_api"; % (server,port),
     ]
     for url in try_urls:
         print "- looking for Cobbler at %s" % url
++++++ setup_py.diff ++++++
Index: setup.py
===================================================================
--- setup.py.orig
+++ setup.py
@@ -169,12 +169,15 @@ if __name__ == "__main__":
 
     if os.path.exists("/etc/SuSE-release"):
         webconfig  = "/etc/apache2/conf.d"
+        vhostconfig = "/etc/apache2/vhosts.d"
         webroot     = "/srv/www/"
     elif os.path.exists("/etc/debian_version"):
         webconfig  = "/etc/apache2/conf.d"
+        vhostconfig = "/etc/apache2/conf.d"
         webroot     = "/srv/www/"
     else:
         webconfig  = "/etc/httpd/conf.d"
+        vhostconfig = "/etc/httpd/conf.d"
         webroot     = "/var/www/"
 
     webcontent  = webroot + "cobbler_webui_content/"
@@ -215,7 +218,7 @@ if __name__ == "__main__":
             ("/usr/sbin", ["bin/tftpd.py"]),
 
             ("%s" % webconfig,              ["config/cobbler.conf"]),
-            ("%s" % webconfig,              ["config/cobbler_web.conf"]),
+            ("%s" % vhostconfig,            ["config/cobbler_web.conf"]),
             ("%s" % initpath,               ["config/cobblerd"]),
             ("%s" % docpath,                ["docs/*.gz"]),
             ("installer_templates",         ["installer_templates/*"]),
++++++ suse_config.diff ++++++
--- /var/tmp/diff_new_pack.62J6EQ/_old  2014-08-03 15:37:02.000000000 +0200
+++ /var/tmp/diff_new_pack.62J6EQ/_new  2014-08-03 15:37:02.000000000 +0200
@@ -1,47 +1,49 @@
-diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x 
autom4te.cache -x .deps -x .libs 
../orig-cobbler-cobbler-2.4.0-1/config/cobbler.conf ./config/cobbler.conf
---- ../orig-cobbler-cobbler-2.4.0-1/config/cobbler.conf        2013-06-20 
07:42:48.000000000 +0200
-+++ ./config/cobbler.conf      2013-08-13 13:48:05.288587476 +0200
-@@ -1,15 +1,15 @@
- # This configuration file allows cobbler data
- # to be accessed over HTTP.
- 
--AliasMatch ^/cblr(?!/svc/)(.*)?$ "/var/www/cobbler$1"
--AliasMatch ^/cobbler_track(.*)?$ "/var/www/cobbler$1"
--#AliasMatch ^/cobbler(.*)?$ "/var/www/cobbler$1"
--Alias /cobbler /var/www/cobbler
--Alias /cobbler_webui_content /var/www/cobbler_webui_content
-+AliasMatch ^/cblr(?!/svc/)(.*)?$ "/srv/www/cobbler$1"
-+AliasMatch ^/cobbler_track(.*)?$ "/srv/www/cobbler$1"
-+#AliasMatch ^/cobbler(.*)?$ "/srv/www/cobbler$1"
-+Alias /cobbler /srv/www/cobbler
-+Alias /cobbler_webui_content /srv/www/cobbler_webui_content
- 
--WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /var/www/cobbler/svc/services.py
-+WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /srv/www/cobbler/svc/services.py
- 
--<Directory "/var/www/cobbler">
-+<Directory "/srv/www/cobbler">
-     Options Indexes FollowSymLinks
-     Order allow,deny
-     Allow from all
-@@ -26,7 +26,7 @@
- # and is visited at http://.../cobbler_web not this URL.
- # this is only a pointer to the new page.
- 
--<Directory "/var/www/cobbler/web/">
-+<Directory "/srv/www/cobbler/web/">
-     Options Indexes FollowSymLinks
-     Order allow,deny
-     Allow from all
-diff -wruN -x '*~' -x '*.o' -x '*.a' -x '*.so' -x '*.so.[0-9]' -x 
autom4te.cache -x .deps -x .libs 
../orig-cobbler-cobbler-2.4.0-1/config/settings ./config/settings
---- ../orig-cobbler-cobbler-2.4.0-1/config/settings    2013-06-20 
07:42:48.000000000 +0200
-+++ ./config/settings  2013-08-13 13:48:05.288587476 +0200
-@@ -412,7 +412,7 @@
- # cobbler's web directory.  Don't change this setting -- see the
- # Wiki on "relocating your cobbler install" if your /var partition
- # is not large enough.
--webdir: /var/www/cobbler
-+webdir: /srv/www/cobbler
- 
- # cobbler's public XMLRPC listens on this port.  Change this only
- # if absolutely needed, as you'll have to start supplying a new
+Index: config/cobbler.conf
+===================================================================
+--- config/cobbler.conf.orig
++++ config/cobbler.conf
+@@ -1,15 +1,15 @@
+ # This configuration file allows cobbler data
+ # to be accessed over HTTP.
+ 
+-AliasMatch ^/cblr(?!/svc/)(.*)?$ "/var/www/cobbler$1"
+-AliasMatch ^/cobbler_track(.*)?$ "/var/www/cobbler$1"
+-#AliasMatch ^/cobbler(.*)?$ "/var/www/cobbler$1"
+-Alias /cobbler /var/www/cobbler
+-Alias /cobbler_webui_content /var/www/cobbler_webui_content
++AliasMatch ^/cblr(?!/svc/)(.*)?$ "/srv/www/cobbler$1"
++AliasMatch ^/cobbler_track(.*)?$ "/srv/www/cobbler$1"
++#AliasMatch ^/cobbler(.*)?$ "/srv/www/cobbler$1"
++Alias /cobbler /srv/www/cobbler
++Alias /cobbler_webui_content /srv/www/cobbler_webui_content
+ 
+-WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /var/www/cobbler/svc/services.py
++WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /srv/www/cobbler/svc/services.py
+ 
+-<Directory "/var/www/cobbler">
++<Directory "/srv/www/cobbler">
+     Options Indexes FollowSymLinks
+     Order allow,deny
+     Allow from all
+@@ -26,7 +26,7 @@ BrowserMatch "MSIE" AuthDigestEnableQuer
+ # and is visited at http://.../cobbler_web not this URL.
+ # this is only a pointer to the new page.
+ 
+-<Directory "/var/www/cobbler/web/">
++<Directory "/srv/www/cobbler/web/">
+     Options Indexes FollowSymLinks
+     Order allow,deny
+     Allow from all
+Index: config/settings
+===================================================================
+--- config/settings.orig
++++ config/settings
+@@ -413,7 +413,7 @@ virt_auto_boot: 1
+ # cobbler's web directory.  Don't change this setting -- see the
+ # Wiki on "relocating your cobbler install" if your /var partition
+ # is not large enough.
+-webdir: /var/www/cobbler
++webdir: /srv/www/cobbler
+ 
+ # cobbler's public XMLRPC listens on this port.  Change this only
+ # if absolutely needed, as you'll have to start supplying a new

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to