Hello community, here is the log from the commit of package cobbler for openSUSE:11.4 checked in at Fri Apr 1 10:52:12 CEST 2011.
-------- --- old-versions/11.4/all/cobbler/cobbler.changes 2011-02-28 18:25:30.000000000 +0100 +++ 11.4/cobbler/cobbler.changes 2011-03-23 14:17:37.000000000 +0100 @@ -1,0 +2,15 @@ +Wed Mar 23 14:16:58 CET 2011 - [email protected] + +- changed logfiles to root:root (bnc#678433) + +------------------------------------------------------------------- +Tue Mar 22 13:47:40 CET 2011 - [email protected] + +- changed permissions in /var/log/ to root:www (bnc#678433) + +------------------------------------------------------------------- +Fri Mar 4 14:08:33 CET 2011 - [email protected] + +- patches cleaned up + +------------------------------------------------------------------- Package does not exist at destination yet. Using Fallback old-versions/11.4/all/cobbler Destination is old-versions/11.4/UPDATES/all/cobbler calling whatdependson for 11.4-i586 Old: ---- fhs.diff fhs_pathes_lazy_patch.diff lazy_suse_sync.diff users_lazy_patch.diff New: ---- pathes_fix.diff suse_config.diff users_patch.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cobbler.spec ++++++ --- /var/tmp/diff_new_pack.jrQVs8/_old 2011-04-01 10:51:35.000000000 +0200 +++ /var/tmp/diff_new_pack.jrQVs8/_new 2011-04-01 10:51:35.000000000 +0200 @@ -27,21 +27,20 @@ License: GPLv2+ AutoReq: no Version: 2.0.10 -Release: 15.<RELEASE4> +Release: 15.<RELEASE22> 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 +Patch1: suse_config.diff +Patch5: bugfixes.dif +Patch12: pathes_fix.diff +Patch13: users_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 #Patch100: importer.diff Group: Applications/System @@ -71,7 +70,6 @@ #%endif Requires: libyaml-0-2 Requires: python-cheetah -Requires: python-devel Requires: python-netaddr Requires: python-simplejson #%if 0%{?fedora} >= 8 @@ -127,18 +125,19 @@ %setup -a1 %if 0%{suse_version} %patch0 +%patch1 %endif -%patch1 -p0 -%patch10 +%patch5 -p0 %patch12 %patch13 +%if 0%{suse_version} %patch14 +%endif %patch15 %patch16 %patch17 %patch18 %patch19 -%patch20 #%patch100 mv vendor-files/cobbler.1.gz docs @@ -272,6 +271,10 @@ #%defattr(444,apache,apache) (MOVED to cobbler-web) #/usr/share/cobbler/webui_templates/*.tmpl (MOVED to cobbler-web) +%defattr(755,root,root) +%dir /var/log/cobbler +%dir /var/log/cobbler/tasks +%dir /var/log/cobbler/kicklog %if 0%{suse_version} %defattr(755,root,root) /%{_sysconfdir}/sysconfig/SuSEfirewall2.d/cobbler @@ -279,9 +282,6 @@ %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 ++++++ autoyast1.diff ++++++ --- /var/tmp/diff_new_pack.jrQVs8/_old 2011-04-01 10:51:35.000000000 +0200 +++ /var/tmp/diff_new_pack.jrQVs8/_new 2011-04-01 10:51:35.000000000 +0200 @@ -1,16 +1,14 @@ --- cobbler/kickgen.py -+++ cobbler/kickgen.py 2010/09/02 08:32:59 -@@ -41,6 +41,9 @@ ++++ cobbler/kickgen.py 2011/03/03 16:15:08 +@@ -41,6 +41,7 @@ from utils import _ +import xml.dom.minidom -+#import xml.dom.ext -+from StringIO import StringIO class KickGen: """ -@@ -60,6 +63,96 @@ +@@ -60,6 +61,96 @@ self.repos = config.repos() self.templar = templar.Templar(config) @@ -69,6 +67,8 @@ + break + + # if not, add the "#raw" comment + some useful data for autoyast or scripts parsing ++ # if the cheetah parser can deal with autoyast XML, it's not needed to add a #raw comment ++ # maybe this 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") @@ -99,23 +99,13 @@ + self.addAutoYaSTScript( document, "pre-scripts", runpre % ( srv, what, name ) ) + self.addAutoYaSTScript( document, "init-scripts", runpost % ( srv, what, name ) ) + -+ #raw_result = StringIO(); -+ return document.toprettyxml() -+ #return raw_result.getvalue() ++ return document.toxml() + + 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 @@ +@@ -224,6 +316,13 @@ self.settings.template_remote_kickstarts) if raw_data is None: return "# kickstart is sourced externally: %s" % meta["kickstart"] ++++++ pathes_fix.diff ++++++ --- cobbler/action_check.py +++ cobbler/action_check.py 2011/03/03 16:43:42 @@ -188,7 +188,7 @@ rule1 = True if line.startswith("/var/lib/tftpboot/.*"): rule2 = True - if line.startswith("/var/www/cobbler/images/.*"): + if line.startswith(self.settings.webdir+"/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 % self.settings.webdir+"/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 2011/03/03 16:47:35 @@ -54,7 +54,12 @@ 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) + # FIXME: how about settings? (self.settings.webdir) + webdir = "/var/www/cobbler" + if os.path.isdir("/srv/www"): + webdir = "/srv/www/cobbler" + + rc = utils.subprocess_call(self.logger,"/usr/sbin/hardlink -c -v "+webdir+"/ks_mirror /var/www/cobbler/repo_mirror",shell=True) return rc --- cobbler/action_reposync.py +++ cobbler/action_reposync.py 2011/03/03 16:39:07 @@ -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(self.settings.webdir+"/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(self.settings.webdir+"/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, self.settings.webdir+"/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(self.settings.webdir+"/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, self.settings.webdir+"/repo_mirror") if repo.arch != "": if repo.arch == "x86": repo.arch = "i386" # FIX potential arch errors --- cobbler/collection_distros.py +++ cobbler/collection_distros.py 2011/03/03 16:57:24 @@ -80,7 +80,8 @@ # 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/*") + settings = self.config.settings() + possible_storage = glob.glob(settings.webdir+"/ks_mirror/*") path = None for storage in possible_storage: if os.path.dirname(obj.kernel).find(storage) != -1: @@ -89,7 +90,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(settings.webdir) != -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 2011/03/03 17:01:16 @@ -66,8 +66,10 @@ utils.run_triggers(self.config.api, obj, "/var/lib/cobbler/triggers/delete/repo/post/*", [], logger) utils.run_triggers(self.config.api, obj, "/var/lib/cobbler/triggers/change/*", [], logger) - + #FIXME: better use config.settings() webdir? path = "/var/www/cobbler/repo_mirror/%s" % obj.name + if os.path.exists("/srv/www/"): + path = "/srv/www/cobbler/repo_mirror/%s" % obj.name if os.path.exists(path): utils.rmtree(path) --- cobbler/remote.py +++ cobbler/remote.py 2011/03/03 17:18:40 @@ -143,8 +143,12 @@ profiles without using PXE. """ def runner(self): + # FIXME: better use webdir from the settings? + webdir = "/var/www/cobbler/" + if os.path.exists("/srv/www"): + webdir = "/srv/www/cobbler/" return self.remote.api.build_iso( - self.options.get("iso","/var/www/cobbler/pub/generated.iso"), + self.options.get("iso",webdir+"/pub/generated.iso"), self.options.get("profiles",None), self.options.get("systems",None), self.options.get("tempdir",None), @@ -155,7 +159,7 @@ self.logger ) def on_done(self): - if self.options.get("iso","") == "/var/www/cobbler/pub/generated.iso": + if self.options.get("iso","") == webdir+"/pub/generated.iso": msg = "ISO now available for <A HREF=\"/cobbler/pub/generated.iso\">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 2011/03/03 17:22:05 @@ -320,7 +320,11 @@ api.add_image(image) # perhaps an artifact of the test process? - utils.os_system("rm -rf /var/www/cobbler/repo_mirror/repo0") + # FIXME: get path (at least webdir) from settings? + if os.path.exists("/var/www/cobbler/repo_mirror/"): + utils.os_system("rm -rf /var/www/cobbler/repo_mirror/repo0") + elif os.path.exists("/srv/www/cobbler/repo_mirror/"): + utils.os_system("rm -rf /srv/www/cobbler/repo_mirror/repo0") api.reposync(name="repo0") --- cobbler/utils.py +++ cobbler/utils.py 2011/03/04 11:31:37 @@ -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): @@ -1962,10 +1964,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/modules/sync_post_restart_services.py +++ cobbler/modules/sync_post_restart_services.py 2011/03/04 12:47:06 @@ -34,6 +34,9 @@ has_restarted_dnsmasq = False rc = 0 + init_scripts_dir = "/etc/rc.d/" + if os.path.exists(init_scripts_dir+"init.d/"): + init_scripts_dir = init_scripts_dir + "init.d/" if manage_dhcp != "0": if which_dhcp_module == "manage_isc": if restart_dhcp != "0": @@ -41,10 +44,10 @@ if rc != 0: logger.error("dhcpd -t failed") return 1 - rc = utils.subprocess_call(logger,"/etc/rc.d/init.d/dhcpd restart", shell=True) + rc = utils.subprocess_call(logger,init_scripts_dir + "dhcpd restart", shell=True) elif which_dhcp_module == "manage_dnsmasq": if restart_dhcp != "0": - rc = utils.subprocess_call(logger, "/etc/rc.d/init.d/dnsmasq restart") + rc = utils.subprocess_call(logger, init_scripts_dir + "dnsmasq restart") has_restarted_dnsmasq = True else: logger.error("unknown DHCP engine: %s" % which_dhcp_module) @@ -52,9 +55,9 @@ if manage_dns != "0" and restart_dns != "0": if which_dns_module == "manage_bind": - rc = utils.subprocess_call(logger, "/etc/rc.d/init.d/named restart", shell=True) + rc = utils.subprocess_call(logger, init_scripts_dir + "named restart", shell=True) elif which_dns_module == "manage_dnsmasq" and not has_restarted_dnsmasq: - rc = utils.subprocess_call(logger, "/etc/rc.d/init.d/dnsmasq restart", shell=True) + rc = utils.subprocess_call(logger, init_scripts_dir + "dnsmasq restart", shell=True) elif which_dns_module == "manage_dnsmasq" and has_restarted_dnsmasq: rc = 0 else: --- cobbler/settings.py +++ cobbler/settings.py 2011/03/07 10:05:39 @@ -23,6 +23,8 @@ import utils from utils import _ +import os.path + TESTMODE = False # defaults is to be used if the config file doesn't contain the value @@ -104,6 +106,8 @@ "reposync_flags" : "-l -m -d" } +if os.path.exists("/srv/www/"): + DEFAULTS["webdir"] = "/srv/www/cobbler" class Settings: ++++++ setup_py.diff ++++++ --- /var/tmp/diff_new_pack.jrQVs8/_old 2011-04-01 10:51:35.000000000 +0200 +++ /var/tmp/diff_new_pack.jrQVs8/_new 2011-04-01 10:51:35.000000000 +0200 @@ -1,6 +1,52 @@ --- setup.py -+++ setup.py 2011/02/03 15:29:32 -@@ -166,7 +166,7 @@ ++++ setup.py 2011/03/03 16:06:19 +@@ -97,15 +97,23 @@ + spool_koan = "/var/spool/koan" + + # www paths +- wwwpath = "/var/www/cobbler" +- if os.path.exists("/etc/SuSE-release"): +- wwwconf = "/etc/apache2/conf.d" ++ www_prefix = "/var/www/" ++ if os.path.exists("/srv/www"): ++ www_prefix = "/srv/www/" ++ ++ wwwpath = www_prefix + "cobbler" ++ wwwcon = www_prefix + "cobbler_webui_content" ++ ++ if os.path.exists("/etc/apache2"): ++ wwwconf = "/etc/apache2/conf.d" ++ dj_config = "/etc/apache2/vhosts.d/" + elif os.path.exists("/etc/debian_version"): +- wwwconf = "/etc/apache2/conf.d" ++ wwwconf = "/etc/apache2/conf.d" ++ dj_config = "/etc/httpd/vhosts.d/" + else: +- wwwconf = "/etc/httpd/conf.d" ++ wwwconf = "/etc/httpd/conf.d" ++ dj_config = "/etc/httpd/vhosts.d/" + +- wwwcon = "/var/www/cobbler_webui_content" + vw_localmirror = wwwpath + "/localmirror" + vw_kickstarts = wwwpath + "/kickstarts" + vw_kickstarts_sys = wwwpath + "/kickstarts_sys" +@@ -131,14 +139,12 @@ + logpath6 = "/var/log/koan" + logpath7 = logpath + "/tasks" + +- # django content +- dj_config = "/etc/httpd/conf.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 = www_prefix + "/cobbler_webui_content/" + + setup( + name="cobbler", +@@ -166,7 +172,7 @@ # miscellaneous config files (rotpath, ['config/cobblerd_rotate']), (wwwconf, ['config/cobbler.conf']), @@ -9,7 +55,7 @@ (libpath, ['config/cobbler_hosts']), (etcpath, ['config/modules.conf']), (etcpath, ['config/users.digest']), -@@ -266,6 +266,9 @@ +@@ -266,6 +272,9 @@ (pxepath, ['templates/pxelocal.template']), (pxepath, ['templates/pxelocal_ia64.template']), (pxepath, ['templates/pxelocal_s390x.template']), ++++++ suse_config.diff ++++++ --- 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" -<Directory "/var/www/cobbler"> +<Directory "/srv/www/cobbler"> Options Indexes FollowSymLinks Order allow,deny Allow from all @@ -22,7 +22,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 @@ -30,11 +30,11 @@ # service handlers for internal functions (not humans) -<Directory "/var/www/cobbler/svc/"> +<Directory "/srv/www/cobbler/svc/"> SetHandler mod_python PythonHandler services PythonDebug on - PythonPath "sys.path + ['/var/www/cobbler/svc/']" + PythonPath "sys.path + ['/srv/www/cobbler/svc/']" </Directory> --- config/settings +++ config/settings 2010/07/30 12:53:12 @@ -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 --- installer_templates/settings.template +++ installer_templates/settings.template 2010/07/30 12:51:19 @@ -323,7 +323,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 --- config/cobbler_wsgi.conf +++ config/cobbler_wsgi.conf 2011/01/28 09:54:03 @@ -1,13 +1,13 @@ # 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" +AliasMatch ^/cblr(?!/svc/)(.*)?$ "/srv/www/cobbler$1" +AliasMatch ^/cobbler_track(.*)?$ "/srv/www/cobbler$1" +AliasMatch ^/cobbler(.*)?$ "/srv/www/cobbler$1" -WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /var/www/cobbler/svc/services.wsgi +WSGIScriptAliasMatch ^/cblr/svc/([^/]*) /srv/www/cobbler/svc/services.wsgi -<Directory "/var/www/cobbler"> +<Directory "/srv/www/cobbler"> Options Indexes FollowSymLinks Order allow,deny Allow from all @@ -24,7 +24,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 ++++++ users_patch.diff ++++++ --- cobbler/action_reposync.py +++ cobbler/action_reposync.py 2011/03/04 13:02:54 @@ -563,7 +563,11 @@ 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/03/04 13:03:32 @@ -60,8 +60,11 @@ fd = open("/var/lib/cobbler/web.ss","w+") fd.write(binascii.hexlify(data)) fd.close() + owner = "apache" + if os.path.exists("/etc/SuSE-release"): + owner = "wwwrun" utils.os_system("chmod 700 /var/lib/cobbler/web.ss") - utils.os_system("chown apache /var/lib/cobbler/web.ss") + utils.os_system("chown "+owner+" /var/lib/cobbler/web.ss") return 1 def do_xmlrpc_tasks(bootapi, settings, xmlrpc_port): ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
