Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1774852 Details for
Bug 1949456
Cannot install TAR images from osbuild using anaconda
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
python definition file for Image Builder to create TAR images.
org.osbuild.tar (text/plain), 2.66 KB, created by
Terry Bowling
on 2021-04-23 14:49:42 UTC
(
hide
)
Description:
python definition file for Image Builder to create TAR images.
Filename:
MIME Type:
Creator:
Terry Bowling
Created:
2021-04-23 14:49:42 UTC
Size:
2.66 KB
patch
obsolete
>#!/usr/libexec/platform-python >""" >Assemble a tar archive > >Assembles the tree into a tar archive named `filename`. > >Uses the buildhost's `tar` command, like: `tar -cf $FILENAME -C $TREE` > >If the `compression` option is given, the archive will be compressed by passing >the `--{compression}` option to `tar`. (This option is non-standard and might >not work for anything other than GNU tar.) > >Known options for `compression`: "bzip2", "xz", "lzip", "lzma", "lzop", "gzip". > >Note that using `compression` does not add an extension to `filename`, so the >caller is responsible for making sure that `compression` and `filename` match. > >Buildhost commands used: `tar` and any named `compression` program. >""" > > >import json >import subprocess >import sys > >SCHEMA = """ >"additionalProperties": false, >"required": ["filename"], >"properties": { > "filename": { > "description": "Filename for tar archive", > "type": "string" > }, > "compression": { > "description": "Name of compression program", > "type": "string", > "enum": ["bzip2", "xz", "lzip", "lzma", "lzop", "gzip"] > }, > "acls": { > "description": "Enable support for POSIX ACLs", > "type": "boolean", > "default": true > }, > "selinux": { > "description": "Enable support for SELinux contexts", > "type": "boolean", > "default": true > }, > "xattrs": { > "description": "Enable support for extended attributes", > "type": "boolean", > "default": true > } >} >""" > >def main(tree, output_dir, options): > filename = options["filename"] > compression = options.get("compression") > > extra_args = [] > if compression is not None: > if compression not in {"bzip2", "xz", "lzip", "lzma", "lzop", "gzip"}: > return 1 > extra_args.append(f"--{compression}") > > # Set environment variables for the tar operation. > tar_env = { > # Speed up xz by allowing it to use all CPU cores for compression. > "XZ_OPT": "--threads 0" > } > > # SELinux context, ACLs and extended attributes > if options.get("acls", True): > extra_args += ["--acls"] > > if options.get("selinux", True): > extra_args += ["--selinux"] > > if options.get("xattrs", True): > extra_args += ["--xattrs", "--xattrs-include", "*"] > > # Set up the tar command. > tar_cmd = [ > "tar", > *extra_args, > "-cf", f"{output_dir}/{filename}", > "-C", tree, > "." > ] > > # Make a tarball of the tree. > subprocess.run( > tar_cmd, > stdout=subprocess.DEVNULL, > check=True, > env=tar_env > ) > > return 0 > > >if __name__ == '__main__': > args = json.load(sys.stdin) > r = main(args["tree"], args["output_dir"], args["options"]) > sys.exit(r)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1949456
:
1771849
|
1771851
|
1771852
|
1774463
| 1774852