Search
j0ke.net Open Build Service
>
Projects
>
SUSE
:
Manager
:
1.2
>
cobbler
> fhs_pathes_lazy_patch.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File fhs_pathes_lazy_patch.diff of Package cobbler
--- 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 <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 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" -<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