def manpage(args): from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains path = args.path if not args.policy and args.root != "/": sepolicy.policy(sepolicy.get_installed_policy(args.root)) if args.source_files and args.root == "/": raise ValueError(_("Alternative root needs to be setup")) if args.all: test_domains = gen_domains() else: test_domains = args.domain for domain in test_domains: m = ManPage(domain, path, args.root,args.source_files, args.web) print(m.get_man_page_path()) if args.web: HTMLManPages(manpage_roles, manpage_domains, path, args.os)
def manpage(args): from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains path = args.path if args.policy: for f in ( "policy.xml", "file_context", "file_context.homedirs"): if not os.path.exists(path + f): raise ValueError("manpage creation with alternate policy requires the %s file exist" % (path + f)) if args.all: test_domains = gen_domains() else: test_domains = args.domain for domain in test_domains: m = ManPage(domain, path, args.web) print m.get_man_page_path() if args.web: HTMLManPages(manpage_roles, manpage_domains, path, args.os)
def manpage(args): from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains path = args.path if not args.policy and args.root != "/": sepolicy.policy(sepolicy.get_installed_policy(args.root)) if args.source_files and args.root == "/": raise ValueError(_("Alternative root needs to be setup")) if args.all: test_domains = gen_domains() else: test_domains = args.domain for domain in test_domains: m = ManPage(domain, path, args.root, args.source_files, args.web) print m.get_man_page_path() if args.web: HTMLManPages(manpage_roles, manpage_domains, path, args.os)
def manpage(args): from sepolicy.manpage import HTMLManPages, manpage_domains, manpage_roles, gen_domains path = args.path if not args.policy and args.root != "/": sepolicy.policy(sepolicy.get_installed_policy(args.root)) if args.source_files and args.root == "/": raise ValueError(_("Alternative root needs to be setup")) if args.all: test_domains = gen_domains() else: test_domains = args.domain p = Pool() for domain in test_domains: p.apply_async(manpage_work, [domain, path, args.root, args.source_files, args.web]) p.close() p.join() if args.web: HTMLManPages(manpage_roles, manpage_domains, path, args.os)