Hello community,
here is the log from the commit of package cobbler for openSUSE:Factory
checked in at Mon Jan 24 16:14:14 CET 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/cobbler/cobbler.changes 2011-01-19 16:17:36.000000000 +0100
@@ -0,0 +1,25 @@
+-------------------------------------------------------------------
+Wed Jan 19 16:10:00 CET 2011 - ug@suse.de
+
+- added firewall config
+
+-------------------------------------------------------------------
+Thu Jan 13 14:26:05 CET 2011 - ug@suse.de
+
+- version update to 2.0.10
+
+-------------------------------------------------------------------
+Wed Jan 12 11:56:18 CET 2011 - ug@suse.de
+
+- some template files were not packaged
+
+-------------------------------------------------------------------
+Tue Jan 11 16:03:07 CET 2011 - ug@suse.de
+
+- removed xinetd from start script
+
+-------------------------------------------------------------------
+Tue Jan 11 14:34:18 CET 2011 - ug@suse.de
+
+- update to version 2.0.8
+
calling whatdependson for head-i586
New:
----
autoyast1.diff
bugfixes.dif
build_iso.diff
cobbler-2.0.10.tar.gz
cobbler.changes
cobbler.spec
fhs.diff
fhs_pathes_lazy_patch.diff
fix-initscript.dif
importer.diff
koan-install_tree.diff
setup_py.diff
users_lazy_patch.diff
vendor-files.tar.bz2
webui_vhost.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cobbler.spec ++++++
#
# spec file for package cobbler
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
#%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define _binaries_in_noarch_packages_terminate_build 0
%global debug_package %{nil}
Summary: Boot server configurator
Name: cobbler
License: GPLv2+
AutoReq: no
Version: 2.0.10
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
#Patch100: importer.diff
Group: Applications/System
Requires: python >= 2.3
%if 0%{?suse_version} >= 1000
Requires: apache2
Requires: apache2-mod_python
Requires: apache2-mod_wsgi
#Requires: tftp
Requires: syslinux
#BuildRequires: apache2 apache2-mod_python tftp distribution-release
BuildRequires: apache2 apache2-mod_python tftp
%else
Requires: httpd
Requires: tftp-server
Requires: mod_python
%endif
Requires: createrepo
#%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
#Requires: fence-agents
#%endif
#%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
#Requires: genisoimage
#%else
Requires: mkisofs
#%endif
Requires: libyaml-0-2
Requires: python-cheetah
Requires: python-devel
Requires: python-netaddr
Requires: python-simplejson
#%if 0%{?fedora} >= 8
#BuildRequires: python-setuptools-devel
#%else
BuildRequires: python-setuptools
#%endif
Requires: python-urlgrabber
Requires: python-yaml
%if 0%{?suse_version} < 0
BuildRequires: redhat-rpm-config
%endif
Requires: rsync
#%if 0%{?fedora} >= 6 || 0%{?rhel} >= 5
Requires: yum-utils
#%endif
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
%if 0%{?suse_version}
Requires(post): %fillup_prereq %insserv_prereq
Requires(preun): %fillup_prereq %insserv_prereq
Requires(preun): %fillup_prereq %insserv_prereq
%endif
#%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
#%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]" || echo 0)}
#Requires: python(abi) >= %{pyver}
#%endif
BuildRequires: python-yaml
BuildRequires: python-cheetah
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArch: noarch
Url: http://fedorahosted.org/cobbler
%description
Cobbler is a network install server. Cobbler
supports PXE, virtualized installs, and
reinstalling existing Linux machines. The last two
modes use a helper tool, 'koan', that
integrates with cobbler. There is also a web interface
'cobbler-web'. Cobbler's advanced features
include importing distributions from DVDs and rsync
mirrors, kickstart templating, integrated yum
mirroring, and built-in DHCP/DNS Management. Cobbler has
a XMLRPC API for integration with other applications.
%prep
%setup -q
%setup -a1
%if 0%{suse_version}
%patch0
%endif
%patch1 -p0
%patch10
%patch12
%patch13
%patch14
%patch15
%patch16
%patch17
%patch18
#%patch100
mv vendor-files/cobbler.1.gz docs
%build
%{__python} setup.py build
%install
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%if 0%{?suse_version} >= 1000
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/SuSEfirewall2.d
mv vendor-files/cobbler_firewall_settings $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/cobbler
PREFIX="--prefix=/usr"
mkdir -p $RPM_BUILD_ROOT/etc/apache2/vhosts.d
mkdir -p $RPM_BUILD_ROOT/srv/www/logs
%endif
%{__python} setup.py install --optimize=1 --root=$RPM_BUILD_ROOT $PREFIX
#%if 0%{?suse_version} >= 1000
#mv $RPM_BUILD_ROOT/etc/httpd/conf.d/* $RPM_BUILD_ROOT/etc/apache2/vhosts.d/
#%endif
%post
if [ "$1" = "1" ];
then
# This happens upon initial install. Upgrades will follow the next else
%if 0%{?suse_version}
%{fillup_and_insserv cobblerd}
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES proxy
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES python
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES proxy_http
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES proxy_connect
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES wsgi
%else
/sbin/chkconfig --add cobblerd
%endif
elif [ "$1" -ge "2" ];
then
# backup config
if [ -e /var/lib/cobbler/distros ]; then
cp /var/lib/cobbler/distros* /var/lib/cobbler/backup 2>/dev/null
cp /var/lib/cobbler/profiles* /var/lib/cobbler/backup 2>/dev/null
cp /var/lib/cobbler/systems* /var/lib/cobbler/backup 2>/dev/null
cp /var/lib/cobbler/repos* /var/lib/cobbler/backup 2>/dev/null
cp /var/lib/cobbler/networks* /var/lib/cobbler/backup 2>/dev/null
fi
if [ -e /var/lib/cobbler/config ]; then
cp -a /var/lib/cobbler/config /var/lib/cobbler/backup 2>/dev/null
fi
# upgrade older installs
# move power and pxe-templates from /etc/cobbler, backup new templates to *.rpmnew
for n in power pxe; do
rm -f /etc/cobbler/$n*.rpmnew
find /etc/cobbler -maxdepth 1 -name "$n*" -type f | while read f; do
newf=/etc/cobbler/$n/`basename $f`
[ -e $newf ] && mv $newf $newf.rpmnew
mv $f $newf
done
done
# upgrade older installs
# copy kickstarts from /etc/cobbler to /var/lib/cobbler/kickstarts
rm -f /etc/cobbler/*.ks.rpmnew
find /etc/cobbler -maxdepth 1 -name "*.ks" -type f | while read f; do
newf=/var/lib/cobbler/kickstarts/`basename $f`
[ -e $newf ] && mv $newf $newf.rpmnew
cp $f $newf
done
# reserialize and restart
# FIXIT: ?????
#/usr/bin/cobbler reserialize
/sbin/service cobblerd condrestart
fi
%if 0%{?suse_version}
%preun
%stop_on_removal cobblerd
%postun
%restart_on_update cobblerd
%else
%preun
if [ $1 = 0 ]; then
/sbin/service cobblerd stop >/dev/null 2>&1 || :
chkconfig --del cobblerd || :
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service cobblerd condrestart >/dev/null 2>&1 || :
/sbin/service apache2 condrestart >/dev/null 2>&1 || :
fi
%endif
%clean
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%files
%if 0%{suse_version}
%defattr(755,root,root)
%dir /%{_sysconfdir}/sysconfig/SuSEfirewall2.d
/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/cobbler
%defattr(755,wwwrun,www)
%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/*
%defattr(755,root,root)
%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,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
%if 0%{suse_version}
%defattr(444,wwwrun,www)
%else
%defattr(444,apache,apache)
%endif
#/var/www/cobbler/webui/* (MOVED TO cobbler-web)
/srv/www/cobbler/aux/anamon
/srv/www/cobbler/aux/anamon.init
%defattr(755,root,root)
%{_bindir}/cobbler
%{_bindir}/cobbler-ext-nodes
%{_bindir}/cobblerd
%defattr(-,root,root)
%dir /etc/cobbler
%dir /etc/cobbler/pxe
%dir /etc/cobbler/reporting
%dir /etc/cobbler/power
%config(noreplace) /var/lib/cobbler/kickstarts/*.ks
%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/cobbler/modules.conf
%config(noreplace) /etc/cobbler/users.conf
%config(noreplace) /etc/cobbler/cheetah_macros
%dir %{python_sitelib}/cobbler
%dir %{python_sitelib}/cobbler/modules
%{python_sitelib}/cobbler/*.py*
#%{python_sitelib}/cobbler/server/*.py*
%{python_sitelib}/cobbler/modules/*.py*
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 5
%exclude %{python_sitelib}/cobbler/sub_process.py*
%endif
%{_mandir}/man1/cobbler.1.gz
/etc/init.d/cobblerd
#%if 0%{?suse_version} >= 1000
%config(noreplace) /etc/apache2/conf.d/cobbler.conf
%config(noreplace) /etc/apache2/conf.d/cobbler_wsgi.conf
#%else
#%config(noreplace) /etc/httpd/conf.d/cobbler.conf
#%endif
%dir /var/log/cobbler/syslog
%dir /var/log/cobbler/anamon
%defattr(755,root,root)
%dir /var/lib/cobbler
%dir /var/lib/cobbler/config/
%dir /var/lib/cobbler/config/distros.d/
%dir /var/lib/cobbler/config/profiles.d/
%dir /var/lib/cobbler/config/systems.d/
%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
%dir /var/lib/cobbler/triggers/add/distro
%dir /var/lib/cobbler/triggers/add/distro/pre
%dir /var/lib/cobbler/triggers/add/distro/post
%dir /var/lib/cobbler/triggers/add/profile
%dir /var/lib/cobbler/triggers/add/profile/pre
%dir /var/lib/cobbler/triggers/add/profile/post
%dir /var/lib/cobbler/triggers/add/system
%dir /var/lib/cobbler/triggers/add/system/pre
%dir /var/lib/cobbler/triggers/add/system/post
%dir /var/lib/cobbler/triggers/add/repo
%dir /var/lib/cobbler/triggers/add/repo/pre
%dir /var/lib/cobbler/triggers/add/repo/post
%dir /var/lib/cobbler/triggers/delete
%dir /var/lib/cobbler/triggers/delete/distro
%dir /var/lib/cobbler/triggers/delete/distro/pre
%dir /var/lib/cobbler/triggers/delete/distro/post
%dir /var/lib/cobbler/triggers/delete/profile
%dir /var/lib/cobbler/triggers/delete/profile/pre
%dir /var/lib/cobbler/triggers/delete/profile/post
%dir /var/lib/cobbler/triggers/delete/system
%dir /var/lib/cobbler/triggers/delete/system/pre
%dir /var/lib/cobbler/triggers/delete/system/post
%dir /var/lib/cobbler/triggers/delete/repo
%dir /var/lib/cobbler/triggers/delete/repo/pre
%dir /var/lib/cobbler/triggers/delete/repo/post
%dir /var/lib/cobbler/triggers/sync
%dir /var/lib/cobbler/triggers/sync/pre
%dir /var/lib/cobbler/triggers/sync/post
%dir /var/lib/cobbler/triggers/install
%dir /var/lib/cobbler/triggers/install/pre
%dir /var/lib/cobbler/triggers/install/post
%dir /var/lib/cobbler/snippets/
%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
Requires: python >= 1.5
Requires: grubby
Requires: python-virtinst
BuildRequires: python-devel
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Requires: python(abi) >= %{pyver}
%endif
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%endif
%if 0%{?rhel} >= 4
BuildRequires: python-setuptools
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArch: noarch
Url: http://fedorahosted.org/cobbler/
%description -n koan
Koan stands for kickstart-over-a-network and allows for both
network installation of new virtualized guests and reinstallation
of an existing system. For use with a boot-server configured with Cobbler
%files -n koan
%defattr(-,root,root)
# FIXME: need to generate in setup.py
#%if 0%{?fedora} > 8
#%{python_sitelib}/koan*.egg-info
#%endif
%dir /var/spool/koan
%{_bindir}/koan
%{_bindir}/cobbler-register
%dir %{python_sitelib}/koan
%{python_sitelib}/koan/*.py*
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 5
%exclude %{python_sitelib}/koan/sub_process.py*
%exclude %{python_sitelib}/koan/opt_parse.py*
%exclude %{python_sitelib}/koan/text_wrap.py*
%endif
%{_mandir}/man1/koan.1.gz
%{_mandir}/man1/cobbler-register.1.gz
%dir /var/log/koan
%doc AUTHORS COPYING CHANGELOG README
%package -n cobbler-web
License: GPLv2+
Summary: Web interface for Cobbler
Group: Applications/System
Requires: cobbler
Requires: python-django
BuildRequires: python-devel
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
%{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
Requires: python(abi) >= %{pyver}
%endif
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%else
BuildRequires: python-setuptools
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArch: noarch
Url: http://fedorahosted.org/cobbler/
%description -n cobbler-web
Web interface for Cobbler that allows visiting http://server/cobbler_web to configure the install server.
%files -n cobbler-web
%if 0%{suse_version}
%defattr(-,wwwrun,www)
%else
%defattr(-,apache,apache)
%endif
%dir /usr/share/cobbler/web
/usr/share/cobbler/web/*
%if 0%{?suse_version} >= 1030
%config(noreplace) /etc/apache2/vhosts.d/cobbler_web.conf
%else
%config(noreplace) /etc/httpd/conf.d/cobbler_web.conf
%endif
%dir /var/lib/cobbler/webui_sessions
%dir /srv/www/cobbler_webui_content
%dir /srv/www/logs
/srv/www/cobbler_webui_content/*
%doc AUTHORS COPYING CHANGELOG README
%changelog
++++++ autoyast1.diff ++++++
--- cobbler/kickgen.py
+++ cobbler/kickgen.py 2010/09/02 08:32:59
@@ -41,6 +41,9 @@
from utils import _
+import xml.dom.minidom
+import xml.dom.ext
+from StringIO import StringIO
class KickGen:
"""
@@ -60,6 +63,96 @@
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 = 1
+ for node in document.childNodes[1].childNodes:
+ if node.nodeType == node.COMMENT_NODE and node.data.find("#end raw") != -1:
+ addComment = 0
+ break
+
+ # if not, add the "#raw" comment + some useful data for autoyast or scripts parsing
+ if addComment == 1:
+ startComment = document.createComment("\ncobbler_system_name=$system_name\ncobbler_server=$server\n#raw\n")
+ endComment = document.createComment("\n#end raw\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 ) )
+
+ raw_result = StringIO();
+ xml.dom.ext.PrettyPrint(document,raw_result)
+ return raw_result.getvalue()
+
+
def generate_kickstart_signal(self, is_pre=0, profile=None, system=None):
"""
Do things that we do at the start/end of kickstarts...
@@ -83,6 +176,7 @@
blended = utils.blender(self.api, False, blend_this)
kickstart = blended.get("kickstart",None)
+
buf = ""
srv = blended["http_server"]
if system is not None:
@@ -224,6 +318,13 @@
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:
++++++ bugfixes.dif ++++++
--- koan/xencreate.py
+++ koan/xencreate.py 2011/01/11 12:00:44
@@ -36,7 +36,7 @@
import app as koan
try:
- import virtinst.DistroManager as DistroManager
+ import virtinst.DistroInstaller as DistroManager
except:
# older virtinst, this is probably ok
# but we know we can't do Xen fullvirt installs
@@ -77,7 +77,7 @@
if fullvirt:
# FIXME: add error handling here to explain when it's not supported
- guest = virtinst.FullVirtGuest(installer=DistroManager.PXEInstaller())
+ guest = virtinst.FullVirtGuest(installer=virtinst.PXEInstaller())
else:
guest = virtinst.ParaVirtGuest()
++++++ build_iso.diff ++++++
--- cobbler/action_buildiso.py
+++ cobbler/action_buildiso.py 2010/08/11 15:19:53
@@ -166,7 +166,10 @@
)
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)
@@ -407,6 +410,8 @@
isolinuxbin = "/usr/lib/syslinux/isolinux.bin"
menu = "/var/lib/cobbler/loaders/menu.c32"
+ if not os.path.exists(menu):
+ menu = "/usr/share/syslinux/menu.c32"
chain = "/usr/share/syslinux/chain.c32"
if not os.path.exists(chain):
--- cobbler/remote.py
+++ cobbler/remote.py 2010/08/11 15:18:45
@@ -94,7 +94,7 @@
try:
rc = self._run(self)
self.remote._set_task_state(self,self.event_id,EVENT_COMPLETE)
- self.on_done()
+ self.on_done
return rc
except:
utils.log_exc(self.logger)
++++++ fhs.diff ++++++
--- setup.py
+++ setup.py 2011/01/11 12:06:55
@@ -97,15 +97,15 @@
spool_koan = "/var/spool/koan"
# www paths
- wwwpath = "/var/www/cobbler"
- if os.path.exists("/etc/SuSE-release"):
+ wwwpath = "/srv/www/cobbler"
+ if os.path.exists("/etc/apache2"):
wwwconf = "/etc/apache2/conf.d"
elif os.path.exists("/etc/debian_version"):
wwwconf = "/etc/apache2/conf.d"
else:
wwwconf = "/etc/httpd/conf.d"
- wwwcon = "/var/www/cobbler_webui_content"
+ wwwcon = "/srv/www/cobbler_webui_content"
vw_localmirror = wwwpath + "/localmirror"
vw_kickstarts = wwwpath + "/kickstarts"
vw_kickstarts_sys = wwwpath + "/kickstarts_sys"
@@ -132,13 +132,17 @@
logpath7 = logpath + "/tasks"
# django content
- dj_config = "/etc/httpd/conf.d/"
+ if os.path.exists("/etc/apache2"):
+ dj_config = "/etc/apache2/vhosts.d/"
+ else:
+ dj_config = "/etc/httpd/vhosts.d/"
+
dj_templates = "/usr/share/cobbler/web/cobbler_web/templates"
dj_webui = "/usr/share/cobbler/web/cobbler_web"
dj_webui2 = "/usr/share/cobbler/web/cobbler_web/templatetags"
dj_webui_proj= "/usr/share/cobbler/web"
dj_sessions = "/var/lib/cobbler/webui_sessions"
- dj_js = "/var/www/cobbler_webui_content/"
+ dj_js = "/srv/www/cobbler_webui_content/"
setup(
name="cobbler",
++++++ fhs_pathes_lazy_patch.diff ++++++
--- cobbler/action_reposync.py
+++ cobbler/action_reposync.py 2011/01/11 12:17:20
@@ -212,7 +212,7 @@
self.logger.warning("--rpm-list is not supported for rsync'd repositories")
# FIXME: don't hardcode
- dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
+ dest_path = os.path.join("/srv/www/cobbler/repo_mirror", repo.name)
spacer = ""
if not repo.mirror.startswith("rsync://") and not repo.mirror.startswith("/"):
@@ -255,7 +255,7 @@
# create yum config file for use by reposync
# FIXME: don't hardcode
- dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
+ dest_path = os.path.join("/srv/www/cobbler/repo_mirror", repo.name)
temp_path = os.path.join(dest_path, ".origin")
if not os.path.isdir(temp_path):
@@ -273,7 +273,7 @@
if has_rpm_list:
self.logger.warning("warning: --rpm-list is not supported for RHN content")
rest = repo.mirror[6:] # everything after rhn://
- cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (self.rflags, rest, "/var/www/cobbler/repo_mirror")
+ cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (self.rflags, rest, "/srv/www/cobbler/repo_mirror")
if repo.name != rest:
args = { "name" : repo.name, "rest" : rest }
utils.die(self.logger,"ERROR: repository %(name)s needs to be renamed %(rest)s as the name of the cobbler repository must match the name of the RHN channel" % args)
@@ -334,7 +334,7 @@
has_rpm_list = True
# create yum config file for use by reposync
- dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
+ dest_path = os.path.join("/srv/www/cobbler/repo_mirror", repo.name)
temp_path = os.path.join(dest_path, ".origin")
if not os.path.isdir(temp_path) and repo.mirror_locally:
@@ -348,7 +348,7 @@
if not has_rpm_list and repo.mirror_locally:
# if we have not requested only certain RPMs, use reposync
- cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (self.rflags, temp_file, repo.name, "/var/www/cobbler/repo_mirror")
+ cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (self.rflags, temp_file, repo.name, "/srv/www/cobbler/repo_mirror")
if repo.arch != "":
if repo.arch == "x86":
repo.arch = "i386" # FIX potential arch errors
--- cobbler/utils.py
+++ cobbler/utils.py 2011/01/11 12:17:20
@@ -983,6 +983,8 @@
(make,version) = os_release()
if make == "fedora" and version >= 9:
return "/var/lib/tftpboot"
+ if make == "suse":
+ return "/srv/tftpboot"
return "/tftpboot"
def can_do_public_content(api):
@@ -1960,10 +1962,13 @@
def dhcpconf_location(api):
version = api.os_version
+ (dist, ver) = api.get_os_details()
if version[0] in [ "redhat", "centos" ] and version[1] < 6:
return "/etc/dhcpd.conf"
elif version[0] in [ "fedora" ] and version[1] < 11:
return "/etc/dhcpd.conf"
+ elif dist == "suse":
+ return "/etc/dhcpd.conf"
else:
return "/etc/dhcp/dhcpd.conf"
--- cobbler/action_check.py
+++ cobbler/action_check.py 2010/07/30 13:02:08
@@ -188,7 +188,7 @@
rule1 = True
if line.startswith("/var/lib/tftpboot/.*"):
rule2 = True
- if line.startswith("/var/www/cobbler/images/.*"):
+ if line.startswith("/srv/www/cobbler/images/.*"):
rule3 = True
rules = []
@@ -198,7 +198,7 @@
if not rule2:
rules.append(selinux_msg % "/var/lib/tftpboot/.*")
if not rule3:
- rules.append(selinux_msg % "/var/www/cobbler/images/.*")
+ rules.append(selinux_msg % "/srv/www/cobbler/images/.*")
if len(rules) > 0:
status.append("you need to set some SELinux content rules to ensure cobbler serves content correctly in your SELinux environment, run the following: %s" % " && ".join(rules))
--- cobbler/action_hardlink.py
+++ cobbler/action_hardlink.py 2010/07/30 13:01:29
@@ -54,7 +54,7 @@
self.logger.info("now hardlinking to save space, this may take some time.")
- rc = utils.subprocess_call(self.logger,"/usr/sbin/hardlink -c -v /var/www/cobbler/ks_mirror /var/www/cobbler/repo_mirror",shell=True)
+ rc = utils.subprocess_call(self.logger,"/usr/sbin/hardlink -c -v /srv/www/cobbler/ks_mirror /srv/www/cobbler/repo_mirror",shell=True)
return rc
--- cobbler/collection_distros.py
+++ cobbler/collection_distros.py 2010/07/30 12:59:52
@@ -80,7 +80,7 @@
# look through all mirrored directories and find if any directory is holding
# this particular distribution's kernel and initrd
- possible_storage = glob.glob("/var/www/cobbler/ks_mirror/*")
+ possible_storage = glob.glob("/srv/www/cobbler/ks_mirror/*")
path = None
for storage in possible_storage:
if os.path.dirname(obj.kernel).find(storage) != -1:
@@ -89,7 +89,7 @@
# if we found a mirrored path above, we can delete the mirrored storage /if/
# no other object is using the same mirrored storage.
- if with_delete and path is not None and os.path.exists(path) and kernel.find("/var/www/cobbler") != -1:
+ if with_delete and path is not None and os.path.exists(path) and kernel.find("/srv/www/cobbler") != -1:
# this distro was originally imported so we know we can clean up the associated
# storage as long as nothing else is also using this storage.
found = False
--- cobbler/collection_repos.py
+++ cobbler/collection_repos.py 2010/07/30 12:55:44
@@ -67,7 +67,7 @@
utils.run_triggers(self.config.api, obj, "/var/lib/cobbler/triggers/change/*", [], logger)
- path = "/var/www/cobbler/repo_mirror/%s" % obj.name
+ path = "/srv/www/cobbler/repo_mirror/%s" % obj.name
if os.path.exists(path):
utils.rmtree(path)
--- cobbler/remote.py
+++ cobbler/remote.py 2010/07/30 13:00:45
@@ -139,12 +139,12 @@
def background_buildiso(self, options, token):
"""
- Generates an ISO in /var/www/cobbler/pub that can be used to install
+ Generates an ISO in /srv/www/cobbler/pub that can be used to install
profiles without using PXE.
"""
def runner(self):
return self.remote.api.build_iso(
- self.options.get("iso","/var/www/cobbler/pub/generated.iso"),
+ self.options.get("iso","/srv/www/cobbler/pub/generated.iso"),
self.options.get("profiles",None),
self.options.get("systems",None),
self.options.get("tempdir",None),
@@ -155,7 +155,7 @@
self.logger
)
def on_done(self):
- if self.options.get("iso","") == "/var/www/cobbler/pub/generated.iso":
+ if self.options.get("iso","") == "/srv/www/cobbler/pub/generated.iso":
msg = "ISO now available for download</A>"
self.remote._new_event(msg)
return self.__start_task(runner, token, "buildiso", "Build Iso", options, on_done)
--- cobbler/services.py
+++ cobbler/services.py 2010/07/30 12:59:11
@@ -320,7 +320,7 @@
api.add_image(image)
# perhaps an artifact of the test process?
- utils.os_system("rm -rf /var/www/cobbler/repo_mirror/repo0")
+ utils.os_system("rm -rf /srv/www/cobbler/repo_mirror/repo0")
api.reposync(name="repo0")
--- cobbler/settings.py
+++ cobbler/settings.py 2010/07/30 12:58:14
@@ -95,7 +95,7 @@
"snippetsdir" : "/var/lib/cobbler/snippets",
"template_remote_kickstarts" : 0,
"virt_auto_boot" : 0,
- "webdir" : "/var/www/cobbler",
+ "webdir" : "/srv/www/cobbler",
"xmlrpc_port" : 25151,
"yum_post_install_mirror" : 1,
"createrepo_flags" : "-c cache -s sha",
--- config/cobbler.conf
+++ config/cobbler.conf 2010/07/30 12:52:50
@@ -1,11 +1,11 @@
# This configuration file allows cobbler data
# to be accessed over HTTP.
-AliasMatch ^/cblr(.*)?$ "/var/www/cobbler$1"
-AliasMatch ^/cobbler_track(.*)?$ "/var/www/cobbler$1"
-AliasMatch ^/cobbler(.*)?$ "/var/www/cobbler$1"
+AliasMatch ^/cblr(.*)?$ "/srv/www/cobbler$1"
+AliasMatch ^/cobbler_track(.*)?$ "/srv/www/cobbler$1"
+AliasMatch ^/cobbler(.*)?$ "/srv/www/cobbler$1"
-