~racb/ubuntu/precise/cobbler/858860

« back to all changes in this revision

Viewing changes to .pc/42_fix_repomirror_create_sync.patch/cobbler/action_reposync.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Clint Byrum, Robie Basak
  • Date: 2011-11-15 12:35:40 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20111115123540-5g139uuhg7z0hv5d
Tags: 2.2.2-0ubuntu1
[Chuck Short]
* New upstream release:
  + Use dh_python2 everywhere.
  + Folded debian/patches/49_ubuntu_add_arm_arch_support.patch
    and debian/patches/56_ubuntu_arm_generate_pxe_files.patch
    into one patch for easier upstreaming.
  + Dropped debian/patches/50_fix_cobbler_timezone.patch:
    Fix upstream.
  + Dropped debian/patches/47_ubuntu_add_oneiric_codename.patch
    in favor of debian/patches/47_ubuntu_add_codenames.patch:
    It adds "precise" and drops unsupported releases as well.
  + Dropped debian/patches/41_update_tree_path_with_arch.patch:
    No longer needed.
  + Dropped debian/patches/55_ubuntu_branding.patch: Will be moved
    to orchestra

 [Clint Byrum]
 * debian/cobbler.postinst: create users.digest mode 0600 so it
   is not world readable. (LP: #858860)
 * debian/control: cobbler needs to depend on python-cobbler
   (LP: #863738)
 * debian/patches/58_fix_egg_cache.patch: Do not point dangerous
   PYTHON_EGG_CACHE at world writable directory. (LP: #858875)
 * debian/cobbler-common.install: remove users.digest as it is
   not required and contains a known password that would leave
   cobblerd vulnerable if started before configuration is done
 * debian/cobbler-web.postinst: fix perms on webui_sessions to
   be more secure (LP: #863755)

 [Robie Basak]
 * Backport safe YAML load from upstream. (LP: #858883)

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
            self.logger.warning("--rpm-list is not supported for rsync'd repositories")
213
213
 
214
214
        # FIXME: don't hardcode
215
 
        dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
 
215
        dest_path = os.path.join(self.settings.webdir+"/repo_mirror", repo.name)
216
216
 
217
217
        spacer = ""
218
218
        if not repo.mirror.startswith("rsync://") and not repo.mirror.startswith("/"):
255
255
 
256
256
        # create yum config file for use by reposync
257
257
        # FIXME: don't hardcode
258
 
        dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
 
258
        dest_path = os.path.join(self.settings.webdir+"/repo_mirror", repo.name)
259
259
        temp_path = os.path.join(dest_path, ".origin")
260
260
 
261
261
        if not os.path.isdir(temp_path):
273
273
        if has_rpm_list:
274
274
            self.logger.warning("warning: --rpm-list is not supported for RHN content")
275
275
        rest = repo.mirror[6:] # everything after rhn://
276
 
        cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (self.rflags, rest, "/var/www/cobbler/repo_mirror")
 
276
        cmd = "/usr/bin/reposync %s -r %s --download_path=%s" % (self.rflags, rest, self.settings.webdir+"/repo_mirror")
277
277
        if repo.name != rest:
278
278
            args = { "name" : repo.name, "rest" : rest }
279
279
            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
334
            has_rpm_list = True
335
335
 
336
336
        # create yum config file for use by reposync
337
 
        dest_path = os.path.join("/var/www/cobbler/repo_mirror", repo.name)
 
337
        dest_path = os.path.join(self.settings.webdir+"/repo_mirror", repo.name)
338
338
        temp_path = os.path.join(dest_path, ".origin")
339
339
 
340
340
        if not os.path.isdir(temp_path) and repo.mirror_locally:
348
348
 
349
349
        if not has_rpm_list and repo.mirror_locally:
350
350
            # if we have not requested only certain RPMs, use reposync
351
 
            cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (self.rflags, temp_file, repo.name, "/var/www/cobbler/repo_mirror")
 
351
            cmd = "/usr/bin/reposync %s --config=%s --repoid=%s --download_path=%s" % (self.rflags, temp_file, repo.name, self.settings.webdir+"/repo_mirror")
352
352
            if repo.arch != "":
353
353
                if repo.arch == "x86":
354
354
                   repo.arch = "i386" # FIX potential arch errors