Hello community, here is the log from the commit of package cobbler for openSUSE:Factory checked in at Thu Aug 4 10:24:01 CEST 2011.
-------- --- cobbler/cobbler.changes 2011-02-28 18:25:30.000000000 +0100 +++ /mounts/work_src_done/STABLE/cobbler/cobbler.changes 2011-06-10 16:40:34.000000000 +0200 @@ -1,0 +2,86 @@ +Fri Jun 10 16:38:53 CEST 2011 - u...@suse.de + +- fixed the handling of cheetah template code in + AutoYaST XML files + (thanks to Jörgen Maas for pointing me to the bug) +- fixed parameter list in build-ISO code + (thanks to Jörgen Maas for the patch) + +------------------------------------------------------------------- +Thu Apr 7 17:46:03 CEST 2011 - u...@suse.de + +- added a backported upstream patch for tainted file error + message + +------------------------------------------------------------------- +Thu Apr 7 13:30:16 CEST 2011 - u...@suse.de + +- fix hostname in install=... + +------------------------------------------------------------------- +Thu Apr 7 12:11:35 CEST 2011 - u...@suse.de + +- fix init-script + +------------------------------------------------------------------- +Thu Apr 7 10:34:06 CEST 2011 - u...@suse.de + +- fixed apache config typo + +------------------------------------------------------------------- +Wed Apr 6 15:39:59 CEST 2011 - u...@suse.de + +- added SUSE breed to import-webui + +------------------------------------------------------------------- +Wed Apr 6 12:31:29 CEST 2011 - u...@suse.de + +- build ISO for SUSE fixed + +------------------------------------------------------------------- +Wed Apr 6 12:25:04 CEST 2011 - u...@suse.de + +- added patch for autoyast XML files and cobbler triggers + +------------------------------------------------------------------- +Wed Apr 6 10:52:03 CEST 2011 - u...@suse.de + +- added patch to fix koan with SUSE dists + +------------------------------------------------------------------- +Tue Apr 5 15:29:57 CEST 2011 - u...@suse.de + +- fixed tftp-root path on SUSE + +------------------------------------------------------------------- +Tue Apr 5 13:33:26 CEST 2011 - u...@suse.de + +- added support for importing a SUSE distribution + +------------------------------------------------------------------- +Mon Apr 4 14:11:29 CEST 2011 - u...@suse.de + +- fixed the start of cobblerd when [tftpd] section is missing + in the modules.conf + +------------------------------------------------------------------- +Mon Apr 4 10:46:50 CEST 2011 - u...@suse.de + +- version from 2.0.10 to 2.1.0 + +------------------------------------------------------------------- +Wed Mar 23 14:16:58 CET 2011 - u...@suse.de + +- changed logfiles to root:root (bnc#678433) + +------------------------------------------------------------------- +Tue Mar 22 13:47:40 CET 2011 - u...@suse.de + +- changed permissions in /var/log/ to root:www (bnc#678433) + +------------------------------------------------------------------- +Fri Mar 4 14:08:33 CET 2011 - u...@suse.de + +- patches cleaned up + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- autoyast1.diff bugfixes.dif build_iso.diff cheetah_class_fix.diff cobbler-2.0.10.tar.gz fhs.diff fhs_pathes_lazy_patch.diff koan-install_tree.diff lazy_suse_sync.diff users_lazy_patch.diff webui_vhost.diff New: ---- 0001-added-autoyast-.-parameter-to-the-ISO-building-code-.patch 0001-render-the-cheetah-template-before-passing-the-XML-t.patch 0002-calculate-meta-data-in-the-XML-file-without-cheetah-.patch added-SUSE-breed-to-import-webui.diff build_iso_for_suse.diff cobbler-2.1.0.tar.gz cobbler_web_config.diff handle-autoyast-XML-files.diff import_suse_support.diff koan_install_tree_fix_for_suse.diff suse_config.diff suse_tftp_root.diff upstream_patch_tainted_files.diff users_patch.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cobbler.spec ++++++ --- /var/tmp/diff_new_pack.MRqPtW/_old 2011-08-04 10:21:04.000000000 +0200 +++ /var/tmp/diff_new_pack.MRqPtW/_new 2011-08-04 10:21:04.000000000 +0200 @@ -26,22 +26,25 @@ Name: cobbler License: GPLv2+ AutoReq: no -Version: 2.0.10 -Release: 18 +Version: 2.1.0 +Release: 1 Source0: cobbler-%{version}.tar.gz Source1: vendor-files.tar.bz2 Patch0: fix-initscript.dif -Patch1: bugfixes.dif -Patch10: fhs.diff -Patch12: fhs_pathes_lazy_patch.diff -Patch13: users_lazy_patch.diff -Patch14: webui_vhost.diff -Patch15: autoyast1.diff -Patch16: build_iso.diff -Patch17: koan-install_tree.diff -Patch18: setup_py.diff -Patch19: cheetah_class_fix.diff -Patch20: lazy_suse_sync.diff +Patch1: suse_config.diff +Patch2: cobbler_web_config.diff +Patch13: users_patch.diff +Patch14: setup_py.diff +Patch15: import_suse_support.diff +Patch16: suse_tftp_root.diff +Patch17: koan_install_tree_fix_for_suse.diff +Patch18: handle-autoyast-XML-files.diff +Patch19: build_iso_for_suse.diff +Patch20: added-SUSE-breed-to-import-webui.diff +Patch21: upstream_patch_tainted_files.diff +Patch22: 0001-render-the-cheetah-template-before-passing-the-XML-t.patch +Patch23: 0002-calculate-meta-data-in-the-XML-file-without-cheetah-.patch +Patch24: 0001-added-autoyast-.-parameter-to-the-ISO-building-code-.patch #Patch100: importer.diff Group: Applications/System @@ -50,6 +53,7 @@ Requires: apache2 Requires: apache2-mod_python Requires: apache2-mod_wsgi +BuildRequires: distribution-release #Requires: tftp Requires: syslinux #BuildRequires: apache2 apache2-mod_python tftp distribution-release @@ -71,7 +75,6 @@ #%endif Requires: libyaml-0-2 Requires: python-cheetah -Requires: python-devel Requires: python-netaddr Requires: python-simplejson #%if 0%{?fedora} >= 8 @@ -127,18 +130,21 @@ %setup -a1 %if 0%{suse_version} %patch0 +%patch1 +%patch2 %endif -%patch1 -p0 -%patch10 -%patch12 %patch13 %patch14 -%patch15 +%patch15 -p1 %patch16 -%patch17 -%patch18 -%patch19 -%patch20 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 #%patch100 mv vendor-files/cobbler.1.gz docs @@ -253,9 +259,6 @@ %else %defattr(755,apache,apache) %endif -%dir /srv/www/cobbler/pub/ -%dir /srv/www/cobbler/web/ -/srv/www/cobbler/web/index.html %dir /srv/www/cobbler/svc/ /srv/www/cobbler/svc/* %{_sbindir}/rccobblerd @@ -264,30 +267,26 @@ %dir /usr/share/cobbler %dir /usr/share/cobbler/installer_templates %defattr(744,root,root) -/usr/share/cobbler/installer_templates/*.template %defattr(744,root,root) -/usr/share/cobbler/installer_templates/defaults #%defattr(755,apache,apache) (MOVED to cobbler-web) #%dir /usr/share/cobbler/webui_templates (MOVED to cobbler-web) #%defattr(444,apache,apache) (MOVED to cobbler-web) #/usr/share/cobbler/webui_templates/*.tmpl (MOVED to cobbler-web) -%if 0%{suse_version} %defattr(755,root,root) -/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/cobbler +%dir /var/log/cobbler +%dir /var/log/cobbler/tasks +%dir /var/log/cobbler/kicklog +%if 0%{suse_version} %defattr(755,wwwrun,www) %else %defattr(755,apache,apache) %endif -%dir /var/log/cobbler -%dir /var/log/cobbler/tasks -%dir /var/log/cobbler/kicklog %dir /srv/www/cobbler/ %dir /srv/www/cobbler/localmirror %dir /srv/www/cobbler/repo_mirror %dir /srv/www/cobbler/ks_mirror %dir /srv/www/cobbler/ks_mirror/config -%dir /srv/www/cobbler/images %dir /srv/www/cobbler/links #%dir /var/www/cobbler/webui (MOVED to cobbler-web) %dir /srv/www/cobbler/aux @@ -311,16 +310,32 @@ %dir /etc/cobbler/reporting %dir /etc/cobbler/power %config(noreplace) /var/lib/cobbler/kickstarts/*.ks +%config(noreplace) /var/lib/cobbler/kickstarts/*.xml %config(noreplace) /var/lib/cobbler/kickstarts/*.seed %config(noreplace) /etc/cobbler/*.template %config(noreplace) /etc/cobbler/pxe/*.template %config(noreplace) /etc/cobbler/reporting/*.template %config(noreplace) /etc/cobbler/power/*.template %config(noreplace) /etc/cobbler/rsync.exclude -%config(noreplace) /etc/logrotate.d/cobblerd_rotate +#%config(noreplace) /etc/logrotate.d/cobblerd_rotate %config(noreplace) /etc/cobbler/modules.conf %config(noreplace) /etc/cobbler/users.conf %config(noreplace) /etc/cobbler/cheetah_macros + +# new in 2.1.0 +%config(noreplace) /etc/cobbler/auth.conf +%config(noreplace) /etc/cobbler/cobbler.conf +%config(noreplace) /etc/cobbler/cobbler_bash +%config(noreplace) /etc/cobbler/cobbler_web.conf +%config(noreplace) /etc/cobbler/cobblerd +%config(noreplace) /etc/cobbler/cobblerd_rotate +%config(noreplace) /etc/cobbler/completions +%dir /etc/cobbler/ldap +%config(noreplace) /etc/cobbler/ldap/ldap_authconfig.template +%config(noreplace) /etc/cobbler/version + +%{_sbindir}/tftpd.py + %dir %{python_sitelib}/cobbler %dir %{python_sitelib}/cobbler/modules %{python_sitelib}/cobbler/*.py* @@ -349,7 +364,6 @@ %dir /var/lib/cobbler/config/repos.d/ %dir /var/lib/cobbler/config/images.d/ %dir /var/lib/cobbler/kickstarts/ -%dir /var/lib/cobbler/backup/ %dir /var/lib/cobbler/triggers %dir /var/lib/cobbler/triggers/change %dir /var/lib/cobbler/triggers/add @@ -388,27 +402,19 @@ %defattr(664,root,root) %config(noreplace) /etc/cobbler/settings -/var/lib/cobbler/version %config(noreplace) /var/lib/cobbler/snippets/* %dir %attr(764,root,root)/var/lib/cobbler/loaders -/var/lib/cobbler/loaders/zpxe.rexx %defattr(660,root,root) %config(noreplace) /etc/cobbler/users.digest %defattr(664,root,root) -%config(noreplace) /var/lib/cobbler/cobbler_hosts %defattr(-,root,root) -#%if 0%{?fedora} > 8 -#%{python_sitelib}/cobbler*.egg-info -#%else -#/usr/lib/python2.6/site-packages/cobbler-2.0.4-py2.6.egg-info -#%endif %{python_sitelib}/cobbler-%{version}-py%{py_ver}.egg-info %doc AUTHORS CHANGELOG README COPYING %package -n koan -License: GPLv2+ + Summary: Helper tool that performs cobbler orders on remote machines Group: Applications/System @@ -440,7 +446,6 @@ #%if 0%{?fedora} > 8 #%{python_sitelib}/koan*.egg-info #%endif -%dir /var/spool/koan %{_bindir}/koan %{_bindir}/cobbler-register %dir %{python_sitelib}/koan @@ -456,7 +461,7 @@ %doc AUTHORS COPYING CHANGELOG README %package -n cobbler-web -License: GPLv2+ + Summary: Web interface for Cobbler Group: Applications/System ++++++ 0001-added-autoyast-.-parameter-to-the-ISO-building-code-.patch ++++++ --- a/cobbler/action_buildiso.py +++ b/cobbler/action_buildiso.py @@ -169,7 +169,7 @@ class BuildIso: append_line = " append initrd=%s.img" % distname if dist.breed == "suse": append_line = append_line + " autoyast=%s " % data["kickstart"] - else: + if dist.breed == "redhat": append_line = append_line + " ks=%s " % data["kickstart"] append_line = append_line + " %s\n" % data["kernel_options"] @@ -218,7 +218,10 @@ class BuildIso: ) append_line = " append initrd=%s.img" % distname - append_line = append_line + " ks=%s" % data["kickstart"] + if dist.breed == "suse": + append_line = append_line + " autoyast=%s" % data["kickstart"] + if dist.breed == "redhat": + append_line = append_line + " ks=%s" % data["kickstart"] append_line = append_line + " %s" % data["kernel_options"] # add network info to avoid DHCP only if it is available @@ -249,7 +252,11 @@ class BuildIso: if data.has_key("ip_address_" + primary_interface) and data["ip_address_" + primary_interface] != "": - append_line = append_line + " ip=%s" % data["ip_address_" + primary_interface] + if dist.breed == "suse": + append_line = append_line + " hostip=%s" % data["ip_address_" + primary_interface] + else: + append_line = append_line + " ip=%s" % data["ip_address_" + primary_interface] + if data.has_key("subnet_" + primary_interface) and data["subnet_" + primary_interface] != "": append_line = append_line + " netmask=%s" % data["subnet_" + primary_interface] @@ -258,7 +265,10 @@ class BuildIso: append_line = append_line + " gateway=%s" % data["gateway"] if not exclude_dns and data.has_key("name_servers") and data["name_servers"]: - append_line = append_line + " dns=%s\n" % ",".join(data["name_servers"]) + if dist.breed == "suse": + append_line = append_line + " nameserver=%s\n" % data["name_servers"][0] + else: + append_line = append_line + " dns=%s\n" % ",".join(data["name_servers"]) length=len(append_line) if length > 254: ++++++ 0001-render-the-cheetah-template-before-passing-the-XML-t.patch ++++++ --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -269,11 +269,13 @@ class KickGen: distro = profile.get_conceptual_parent() if system is not None: distro = system.get_conceptual_parent().get_conceptual_parent() + + data = self.templar.render(raw_data, meta, None, obj) + if distro.breed == "suse": # AutoYaST profile - raw_data = self.generate_autoyast(profile,system,raw_data) + data = self.generate_autoyast(profile,system,data) - data = self.templar.render(raw_data, meta, None, obj) return data except FileNotFoundException: self.api.logger.warning("kickstart not found: %s" % meta["kickstart"]) ++++++ 0002-calculate-meta-data-in-the-XML-file-without-cheetah-.patch ++++++ --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -120,21 +120,23 @@ class KickGen: if addComment == 1: #startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n#raw\n") #endComment = document.createComment("\n#end raw\n") - startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n") - endComment = document.createComment("\n") - document.childNodes[1].insertBefore( startComment, document.childNodes[1].childNodes[1]) - document.childNodes[1].appendChild( endComment ) cobblerElement = document.createElement("cobbler") cobblerElementSystem = xml.dom.minidom.Element("system_name") - cobblerTextSystem = document.createTextNode("$system_name") - cobblerElementSystem.appendChild( cobblerTextSystem ) + cobblerElementProfile = xml.dom.minidom.Element("profile_name") + if( system is not None ): + cobblerTextSystem = document.createTextNode(system.name) + cobblerElementSystem.appendChild( cobblerTextSystem ) + if( profile is not None ): + cobblerTextProfile = document.createTextNode(profile.name) + cobblerElementProfile.appendChild( cobblerTextProfile ) cobblerElementServer = document.createElement("server") - cobblerTextServer = document.createTextNode("$server") + cobblerTextServer = document.createTextNode(blended["http_server"]) cobblerElementServer.appendChild( cobblerTextServer ) cobblerElement.appendChild( cobblerElementServer ) cobblerElement.appendChild( cobblerElementSystem ) + cobblerElement.appendChild( cobblerElementProfile ) document.childNodes[1].insertBefore( cobblerElement, document.childNodes[1].childNodes[1]) ++++++ added-SUSE-breed-to-import-webui.diff ++++++ diff --git a/web/cobbler_web/templates/import.tmpl b/web/cobbler_web/templates/import.tmpl index 07a79f3..81db2b7 100644 --- a/web/cobbler_web/templates/import.tmpl +++ b/web/cobbler_web/templates/import.tmpl @@ -30,6 +30,7 @@ <option value="redhat">Red Hat based (includes Fedora, CentOS, Scientific Linux)</option> <option value="debian">Debian</option> <option value="ubuntu">Ubuntu</option> + <option value="suse">SUSE</option> </select> <p class="context-tip">Type of OS you are importing. If yours is not listed here (ex: SUSE), you will have to add a distro manually. Other distro imports may be supported in the future. Non Red Hat based distros may require additional instructions, see the <a href="http://fedorahosted.org/cobbler">Wiki</a> for details.</p> <div style="clear: both;"></div> ++++++ build_iso_for_suse.diff ++++++ >From 53dea03bfb7dd8503ca32b38d17a8724f84ef752 Mon Sep 17 00:00:00 2001 From: Uwe Gansert <u...@suse.de> Date: Wed, 9 Mar 2011 15:04:40 +0100 Subject: [PATCH] fixed support for SUSE in build-iso process. Fixed a typo --- cobbler/action_buildiso.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py index 86aa67d..59057ca 100644 --- a/cobbler/action_buildiso.py +++ b/cobbler/action_buildiso.py @@ -167,7 +167,10 @@ class BuildIso: ) append_line = " append initrd=%s.img" % distname - append_line = append_line + " ks=%s " % data["kickstart"] + if dist.breed == "suse": + append_line = append_line + " autoyast=%s " % data["kickstart"] + else: + append_line = append_line + " ks=%s " % data["kickstart"] append_line = append_line + " %s\n" % data["kernel_options"] length=len(append_line) -- 1.7.3.4 ++++++ cobbler-2.0.10.tar.gz -> cobbler-2.1.0.tar.gz ++++++ ++++ 17871 lines of diff (skipped) ++++++ cobbler_web_config.diff ++++++ --- config/cobbler_web.conf +++ config/cobbler_web.conf 2011/04/07 09:51:48 @@ -8,6 +8,20 @@ # Log only what remains CustomLog logs/access_log combined env=!dontlog +<Directory "/usr/share/cobbler/web/"> + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all +</Directory> + +<Directory "/srv/www/cobbler_webui_content/"> + Options +Indexes +FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all +</Directory> + WSGIScriptAlias /cobbler_web /usr/share/cobbler/web/cobbler.wsgi </VirtualHost> ++++++ fix-initscript.dif ++++++ --- /var/tmp/diff_new_pack.MRqPtW/_old 2011-08-04 10:21:05.000000000 +0200 +++ /var/tmp/diff_new_pack.MRqPtW/_new 2011-08-04 10:21:05.000000000 +0200 @@ -1,60 +1,43 @@ --- config/cobblerd -+++ config/cobblerd 2011/01/11 11:40:56 -@@ -7,8 +7,10 @@ ++++ config/cobblerd 2011/04/07 10:10:55 +@@ -7,9 +7,9 @@ ### BEGIN INIT INFO # Provides: cobblerd --# Required-Start: network, xinetd, httpd +-# Required-Start: $network, xinetd, httpd +-# Required-Stop: $network +-# 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 4 5 -+# Default-Stop: 0 1 6 ++# 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 - # and status tracking -@@ -26,12 +28,14 @@ - [ -x /usr/bin/cobblerd ] || exit 0 - - DEBIAN_VERSION=/etc/debian_version --SUSE_RELEASE=/etc/SuSE-release -+SUSE_RELEASE=/etc/SuSEconfig -+IS_SUSE="no" - # Source function library. - if [ -f $DEBIAN_VERSION ]; then - break --elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then -+elif [ -d $SUSE_RELEASE -a -r /etc/rc.status ]; then - . /etc/rc.status -+ IS_SUSE="yes" - else - . /etc/rc.d/init.d/functions - fi -@@ -49,8 +53,8 @@ +@@ -51,8 +51,26 @@ start() { echo -n $"Starting cobbler daemon: " -- if [ -f $SUSE_RELEASE ]; then ++ 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 [ $IS_SUSE == "yes" ]; then ++ 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 -@@ -71,7 +75,7 @@ - - stop() { - echo -n $"Stopping cobbler daemon: " -- if [ -f $SUSE_RELEASE ]; then -+ if [ $IS_SUSE == "yes" ]; then - killproc -TERM /usr/bin/cobblerd - rc_status -v - elif [ -f $DEBIAN_VERSION ]; then -@@ -106,7 +110,7 @@ - $1 - ;; - status) -- if [ -f $SUSE_RELEASE ]; then -+ if [ $IS_SUSE == "yes" ]; then - echo -n "Checking for service cobblerd " - checkproc /usr/bin/cobblerd - rc_status -v ++++++ handle-autoyast-XML-files.diff ++++++ >From c698eeaef0e832c0caeea4ac8a8a085752ec1733 Mon Sep 17 00:00:00 2001 From: Uwe Gansert <u...@suse.de> Date: Wed, 9 Mar 2011 12:17:18 +0100 Subject: [PATCH] handle autoyast XML files --- cobbler/kickgen.py | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 100 insertions(+), 0 deletions(-) diff --git a/cobbler/kickgen.py b/cobbler/kickgen.py index 0b72690..aed48dc 100644 --- a/cobbler/kickgen.py +++ b/cobbler/kickgen.py @@ -41,6 +41,7 @@ import item_system from utils import _ +import xml.dom.minidom class KickGen: """ @@ -60,6 +61,98 @@ class KickGen: self.repos = config.repos() self.templar = templar.Templar(config) + def createAutoYaSTScript( self, document, script, name ): + newScript = document.createElement("script") + newScriptSource = document.createElement("source") + newScriptSourceText = document.createTextNode(script) + newScript.appendChild(newScriptSource) + + newScriptFile = document.createElement("filename") + newScriptFileText = document.createTextNode(name) + newScript.appendChild(newScriptFile) + + newScriptSource.appendChild(newScriptSourceText) + newScriptFile.appendChild(newScriptFileText) + return newScript + + def addAutoYaSTScript( self, document, type, source ): + scripts = document.getElementsByTagName("scripts") + if scripts.length == 0: + newScripts = document.createElement("scripts") + document.documentElement.appendChild( newScripts ) + scripts = document.getElementsByTagName("scripts") + added = 0 + for stype in scripts[0].childNodes: + if stype.nodeType == stype.ELEMENT_NODE and stype.tagName == type: + stype.appendChild( self.createAutoYaSTScript( document, source, type+"_cobbler" ) ) + added = 1 + if added == 0: + newChrootScripts = document.createElement( type ) + newChrootScripts.setAttribute( "config:type", "list" ) + newChrootScripts.appendChild( self.createAutoYaSTScript( document, source, type+"_cobbler" ) ) + scripts[0].appendChild( newChrootScripts ) + + def generate_autoyast(self, profile=None, system=None, raw_data=None): + self.api.logger.info("autoyast XML file found. Checkpoint: profile=%s system=%s" % (profile,system) ) + nopxe = "\nwget \"http://%s/cblr/svc/op/nopxe/system/%s\" -O /dev/null" + runpost = "\ncurl \"http://%s/cblr/svc/op/trig/mode/post/%s/%s\" > /dev/null" + runpre = "\nwget \"http://%s/cblr/svc/op/trig/mode/pre/%s/%s\" -O /dev/null" + + what = "profile" + blend_this = profile + if system: + what = "system" + blend_this = system + blended = utils.blender(self.api, False, blend_this) + srv = blended["http_server"] + + document = xml.dom.minidom.parseString(raw_data) + + # do we already have the #raw comment in the XML? (addComment = 0 means, don't add #raw comment) + addComment = 1 + for node in document.childNodes[1].childNodes: + if node.nodeType == node.ELEMENT_NODE and node.tagName == "cobbler": + addComment = 0 + break + + # add some cobbler information to the XML file + # maybe that should be configureable + if addComment == 1: + #startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n#raw\n") + #endComment = document.createComment("\n#end raw\n") + startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n") + endComment = document.createComment("\n") + document.childNodes[1].insertBefore( startComment, document.childNodes[1].childNodes[1]) + document.childNodes[1].appendChild( endComment ) + cobblerElement = document.createElement("cobbler") + cobblerElementSystem = xml.dom.minidom.Element("system_name") + cobblerTextSystem = document.createTextNode("$system_name") + cobblerElementSystem.appendChild( cobblerTextSystem ) + + cobblerElementServer = document.createElement("server") + cobblerTextServer = document.createTextNode("$server") + cobblerElementServer.appendChild( cobblerTextServer ) + + cobblerElement.appendChild( cobblerElementServer ) + cobblerElement.appendChild( cobblerElementSystem ) + + document.childNodes[1].insertBefore( cobblerElement, document.childNodes[1].childNodes[1]) + + name = profile.name + if system is not None: + name = system.name + + if str(self.settings.pxe_just_once).upper() in [ "1", "Y", "YES", "TRUE" ]: + self.addAutoYaSTScript( document, "chroot-scripts", nopxe % (srv, name) ) + if self.settings.run_install_triggers: + # notify cobblerd when we start/finished the installation + self.addAutoYaSTScript( document, "pre-scripts", runpre % ( srv, what, name ) ) + self.addAutoYaSTScript( document, "init-scripts", runpost % ( srv, what, name ) ) + + return document.toxml() + + + def generate_repo_stanza(self, obj, is_profile=True): """ @@ -173,6 +266,13 @@ class KickGen: self.settings.template_remote_kickstarts) if raw_data is None: return "# kickstart is sourced externally: %s" % meta["kickstart"] + distro = profile.get_conceptual_parent() + if system is not None: + distro = system.get_conceptual_parent().get_conceptual_parent() + if distro.breed == "suse": + # AutoYaST profile + raw_data = self.generate_autoyast(profile,system,raw_data) + data = self.templar.render(raw_data, meta, None, obj) return data except FileNotFoundException: -- 1.7.3.4 ++++++ import_suse_support.diff ++++++ ++++ 829 lines (skipped) ++++++ koan_install_tree_fix_for_suse.diff ++++++ diff --git a/koan/app.py b/koan/app.py index 1903342..5b4c7fc 100755 --- a/koan/app.py +++ b/koan/app.py @@ -617,43 +617,51 @@ class Koan: take the install_tree url from that """ - try: - raw = utils.urlread(profile_data["kickstart"]) - lines = raw.splitlines() - - method_re = re.compile('(?P<urlcmd>\s*url\s.*)|(?P<nfscmd>\s*nfs\s.*)') - - url_parser = OptionParser() - url_parser.add_option("--url", dest="url") - - nfs_parser = OptionParser() - nfs_parser.add_option("--dir", dest="dir") - nfs_parser.add_option("--server", dest="server") - - for line in lines: - match = method_re.match(line) - if match: - cmd = match.group("urlcmd") - if cmd: - (options,args) = url_parser.parse_args(shlex.split(cmd)[1:]) - profile_data["install_tree"] = options.url - break - cmd = match.group("nfscmd") - if cmd: - (options,args) = nfs_parser.parse_args(shlex.split(cmd)[1:]) - profile_data["install_tree"] = "nfs://%s:%s" % (options.server,options.dir) - break - - if self.safe_load(profile_data,"install_tree"): - print "install_tree:", profile_data["install_tree"] - else: - print "warning: kickstart found but no install_tree found" - - except: - # unstable to download the kickstart, however this might not - # be an error. For instance, xen FV installations of non - # kickstart OS's... - pass + if profile_data["breed"] == "suse": + kopts = profile_data["kernel_options"] + options = kopts.split(" ") + for opt in options: + if opt.startswith("install="): + profile_data["install_tree"] = opt.replace("install=","") + break + else: + try: + raw = utils.urlread(profile_data["kickstart"]) + lines = raw.splitlines() + + method_re = re.compile('(?P<urlcmd>\s*url\s.*)|(?P<nfscmd>\s*nfs\s.*)') + + url_parser = OptionParser() + url_parser.add_option("--url", dest="url") + + nfs_parser = OptionParser() + nfs_parser.add_option("--dir", dest="dir") + nfs_parser.add_option("--server", dest="server") + + for line in lines: + match = method_re.match(line) + if match: + cmd = match.group("urlcmd") + if cmd: + (options,args) = url_parser.parse_args(shlex.split(cmd)[1:]) + profile_data["install_tree"] = options.url + break + cmd = match.group("nfscmd") + if cmd: + (options,args) = nfs_parser.parse_args(shlex.split(cmd)[1:]) + profile_data["install_tree"] = "nfs://%s:%s" % (options.server,options.dir) + break + + if self.safe_load(profile_data,"install_tree"): + print "install_tree:", profile_data["install_tree"] + else: + print "warning: kickstart found but no install_tree found" + + except: + # unstable to download the kickstart, however this might not + # be an error. For instance, xen FV installations of non + # kickstart OS's... + pass #--------------------------------------------------- ++++++ setup_py.diff ++++++ --- /var/tmp/diff_new_pack.MRqPtW/_old 2011-08-04 10:21:05.000000000 +0200 +++ /var/tmp/diff_new_pack.MRqPtW/_new 2011-08-04 10:21:05.000000000 +0200 @@ -1,21 +1,27 @@ --- setup.py -+++ setup.py 2011/02/03 15:29:32 -@@ -166,7 +166,7 @@ - # miscellaneous config files - (rotpath, ['config/cobblerd_rotate']), - (wwwconf, ['config/cobbler.conf']), -- (wwwconf, ['config/cobbler_wsgi.conf']), -+# (wwwconf, ['config/cobbler_wsgi.conf']), - (libpath, ['config/cobbler_hosts']), - (etcpath, ['config/modules.conf']), - (etcpath, ['config/users.digest']), -@@ -266,6 +266,9 @@ - (pxepath, ['templates/pxelocal.template']), - (pxepath, ['templates/pxelocal_ia64.template']), - (pxepath, ['templates/pxelocal_s390x.template']), -+ (pxepath, ['templates/pxe/efidefault.template']), -+ (pxepath, ['templates/pxe/grubprofile.template']), -+ (pxepath, ['templates/pxe/grubsystem.template']), ++++ setup.py 2011/04/04 10:13:41 +@@ -124,12 +124,15 @@ - # templates for power management - (powerpath, ['templates/power_apc_snmp.template']), + 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 = "/usr/share/cobbler/webroot/" + else: + webconfig = "/etc/httpd/conf.d" ++ vhostconfig = "/etc/apache2/conf.d" + webroot = "/var/www/" + + webcontent = webroot + "cobbler_webui_content/" +@@ -169,7 +172,7 @@ + ("/usr/sbin", ["scripts/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 ++++++ --- config/cobbler.conf +++ config/cobbler.conf 2011/04/04 09:21:19 @@ -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 --- config/settings +++ config/settings 2011/04/04 09:23:18 @@ -311,7 +311,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 ++++++ suse_tftp_root.diff ++++++ --- cobbler/utils.py +++ cobbler/utils.py 2011/04/05 13:22:51 @@ -1039,6 +1039,8 @@ return "/var/lib/tftpboot" elif make == "debian" or make == "ubuntu": return "/var/lib/tftpboot" + elif make == "suse": + return "/srv/tftpboot" return "/tftpboot" def can_do_public_content(api): ++++++ upstream_patch_tainted_files.diff ++++++ diff --git a/web/cobbler_web/templates/ksfile_list.tmpl b/web/cobbler_web/templates/ksfile_list.tmpl index e91c1bf..ce3a0d2 100644 --- a/web/cobbler_web/templates/ksfile_list.tmpl +++ b/web/cobbler_web/templates/ksfile_list.tmpl @@ -20,7 +20,7 @@ <td>{{ shortname }}</td> {% if option %} <td> - {% ifequal option "editable" %}<span class="action" onClick="window.location='/cobbler_web/ksfile/edit/{{ ksfile }}'">Edit</a> {% endifequal %} + {% ifequal option "editable" %}<span class="action" onClick="window.location='/cobbler_web/ksfile/edit/file:{{ ksfile }}'">Edit</a> {% endifequal %} {% ifequal option "viewable" %}<span class="action" onClick="window.location='{{ ksfile }}'>View</a>{% endifequal %} </td> {% endif %} diff --git a/web/cobbler_web/templates/snippet_list.tmpl b/web/cobbler_web/templates/snippet_list.tmpl index ed72fbe..7792686 100644 --- a/web/cobbler_web/templates/snippet_list.tmpl +++ b/web/cobbler_web/templates/snippet_list.tmpl @@ -20,7 +20,7 @@ <td>{{ shortname }}</td> {% if option %} <td> - {% ifequal option "editable" %}<span class="action" onClick="window.location='/cobbler_web/snippet/edit/{{ snippet }}'">Edit</a> {% endifequal %} + {% ifequal option "editable" %}<span class="action" onClick="window.location='/cobbler_web/snippet/edit/file:{{ snippet }}'">Edit</a> {% endifequal %} </td> {% endif %} </tr> diff --git a/web/cobbler_web/urls.py b/web/cobbler_web/urls.py index 6cdd276..fbb0bf5 100644 --- a/web/cobbler_web/urls.py +++ b/web/cobbler_web/urls.py @@ -10,12 +10,12 @@ urlpatterns = patterns('', (r'^ksfile/list(/(?P<page>\d+))?$', ksfile_list), (r'^ksfile/edit$', ksfile_edit, {'editmode':'new'}), - (r'^ksfile/edit/(?P<ksfile_name>.+)$', ksfile_edit, {'editmode':'edit'}), + (r'^ksfile/edit/file:(?P<ksfile_name>.+)$', ksfile_edit, {'editmode':'edit'}), (r'^ksfile/save$', ksfile_save), (r'^snippet/list(/(?P<page>\d+))?$', snippet_list), (r'^snippet/edit$', snippet_edit, {'editmode':'new'}), - (r'^snippet/edit/(?P<snippet_name>.+)$', snippet_edit, {'editmode':'edit'}), + (r'^snippet/edit/file:(?P<snippet_name>.+)$', snippet_edit, {'editmode':'edit'}), (r'^snippet/save$', snippet_save), (r'^(?P<what>\w+)/list(/(?P<page>\d+))?', genlist), diff --git a/web/cobbler_web/views.py b/web/cobbler_web/views.py index 3e2a43d..b2c712e 100644 --- a/web/cobbler_web/views.py +++ b/web/cobbler_web/views.py @@ -647,7 +647,7 @@ def ksfile_save(request): return HttpResponseRedirect('/cobbler_web/ksfile/list') else: remote.read_or_write_kickstart_template(ksfile_name,False,ksdata,request.session['token']) - return HttpResponseRedirect('/cobbler_web/ksfile/edit/%s' % ksfile_name) + return HttpResponseRedirect('/cobbler_web/ksfile/edit/file:%s' % ksfile_name) # ====================================================================== @@ -728,7 +728,7 @@ def snippet_save(request): return HttpResponseRedirect('/cobbler_web/snippet/list') else: remote.read_or_write_snippet(snippet_name,False,snippetdata,request.session['token']) - return HttpResponseRedirect('/cobbler_web/snippet/edit/%s' % snippet_name) + return HttpResponseRedirect('/cobbler_web/snippet/edit/file:%s' % snippet_name) # ====================================================================== ++++++ users_patch.diff ++++++ --- cobbler/action_reposync.py +++ cobbler/action_reposync.py 2011/04/04 09:26:39 @@ -560,7 +560,12 @@ a safeguard. """ # all_path = os.path.join(repo_path, "*") - cmd1 = "chown -R root:apache %s" % repo_path + owner = "root:apache" + if os.path.exists("/etc/SuSE-release"): + owner = "root:wwwrun" + + cmd1 = "chown -R "+owner+" %s" % repo_path + utils.subprocess_call(self.logger, cmd1) cmd2 = "chmod -R 755 %s" % repo_path --- cobbler/cobblerd.py +++ cobbler/cobblerd.py 2011/04/04 09:28:26 @@ -67,6 +67,8 @@ http_user = "apache" if utils.check_dist() in [ "debian", "ubuntu" ]: http_user = "www-data" + elif utils.check_dist() == "suse": + http_user = "wwwrun" utils.os_system("chown %s /var/lib/cobbler/web.ss"%http_user ) else: fd = open(ssfile,"w+") ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org