Beispiel #1
0
 def __init__(self, suwrapper, rootconf, globalconf):
     super(ChrootRootManager, self).__init__()
     self.suwrapper = suwrapper
     self.topdir = rootconf.roots_path
     self.spooldir = rootconf.chroot_spool_dir
     self.donedir = rootconf.success_dir
     self.faildir = rootconf.failure_dir
     self.copyfiles = shlex.split(rootconf.root_copy_files)
     self.suforpostcmd = shlex.split(rootconf.su_for_post_command)
     self.postcmd = rootconf.root_post_command.strip()
     self.arch = rootconf.arch
     self.archmap = self._parse_arch_map(rootconf.arch_map)
     self.allowshell = parse_bool(rootconf.allow_interactive_shell)
     self.latestsuffix_build = rootconf.latest_build_suffix
     self.latestsuffix_interactive = rootconf.latest_interactive_suffix
     self.putcopycmd = shlex.split(rootconf.put_copy_command)
     self.destroycmd = shlex.split(rootconf.chroot_destroy_command)
     self.targetfile = rootconf.chroot_target_file.strip()
     self.interactivefile = rootconf.chroot_interactive_file.strip()
     self.keepfile = rootconf.chroot_keep_file.strip()
     self.mountpoints = self._parse_mount_points(rootconf.chroot_mountpoints)
     self.binds = self._parse_binds(rootconf.chroot_binds)
     self.devs = self._parse_devs(rootconf.chroot_devs)
     self.maxrootage = self._parse_max_root_age(rootconf.root_max_age)
     self.remountcmd = shlex.split(rootconf.chroot_remount_wrapper_command)
     self.chrootcmd = shlex.split(rootconf.chroot_command)
     self.sucmd = shlex.split(rootconf.su_command)
     self.sudointcmd = shlex.split(rootconf.sudo_interactive_shell_command)
     self.intshellcmd = rootconf.interactive_shell_command # template!
     self.targetname = rootconf.target_name
Beispiel #2
0
 def __init__(self, rootmanager, packagemanager, buildconf, globalconf):
     self.rootmanager = rootmanager
     self.packagemanager = packagemanager
     self.repos = packagemanager.repos_from_config(buildconf.repos)
     self.interactive = parse_bool(buildconf.interactive)
     self.deliverydir = os.path.expanduser(buildconf.delivery_dir)
     self.logcompresscmd = shlex.split(buildconf.log_compress_command)
     self.spooldir = buildconf.spool_dir
     self.donedir = buildconf.success_dir
     self.faildir = buildconf.failure_dir
     self.builtdirname = buildconf.built_dir_name
     self.logsdirname = buildconf.logs_dir_name
     self.builduser = buildconf.build_user
     self.builderhome = buildconf.builder_home
     self.useruid = buildconf.builder_uid
     self.idtimefmt = buildconf.buildid_timefmt
     self.deliverylogext = buildconf.delivery_log_file_ext
     self.packagesdirname = buildconf.packages_dir_name
     self.latestname = buildconf.latest_home_link_name
     self.statusfilename = buildconf.build_status_file
     self.logsdirname = "logs"
     self.builtdirname = "built"
     try:
         self.maxuid = int(buildconf.max_uid)
     except ValueError:
         logger.warn(("invalid value for max-uid configuration "
                     "option: %r"), buildconf.max_uid)
 def test_parsing_bool(self):
     self.assertEquals(True, configutil.parse_bool("yes"))
     self.assertEquals(False, configutil.parse_bool("no"))
     self.assertEquals(False, configutil.parse_bool(""))
     self.assertEquals(False, configutil.parse_bool("anythign else"))