Run isort for imports. Pylint: wrong-import-order / C0411 Solves the following linter warnings: - standard import "pathlib" should be placed before third party import "yaml" - standard import "collections.OrderedDict" should be placed before third party imports "yaml", "jsonschema" - standard import "typing.Dict" should be placed before third party imports "yaml", "jsonschema" Fix default arg values. Pylint: dangerous-default-value / W0102 - Using mutable default values ([]) for function arguments is considered dangerous. Rename format variable. Pylint: redefined-builtin / W0622 - 'format' is a built-in function. Use f-strings instead of formatting where possible. Pylint: consider-using-f-string / C0209 Remove unnecessary else after returns. Pylint: no-else-return / R1705 Remove unnecessary else after continue. Pylint: no-else-continue / R1724 Set the encoding (utf-8) for all calls to open(). Pylint: unspecified-encoding / W1514 Disable the too-many-branches and too-many-statements warnings for append_partitions() and append_filesystem(). We can refactor the functions to make them smaller later, but for now we're addressing only the simpler issues. Initialise with dict literal instead of call to function. Pylint: use-dict-literal / R1735 Use implicit truthiness for glob instead of len(). Pylint: use-implicit-booleaness-not-len / C1802 Rename ambiguous variable 'l' to 'line'. pycodestyle: ambiguous-variable-name (E741) Merge comparisons with 'in'. Pylint: consider-using-in / R1714 |
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| assemblers | ||
| data | ||
| devices | ||
| docs | ||
| inputs | ||
| mounts | ||
| osbuild | ||
| runners | ||
| schemas | ||
| schutzbot | ||
| selinux | ||
| sources | ||
| stages | ||
| test | ||
| tools | ||
| .bandit | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mypy.ini | ||
| .packit.yaml | ||
| .ruff.toml | ||
| CODEOWNERS | ||
| LICENSE | ||
| Makefile | ||
| osbuild.spec | ||
| README.md | ||
| requirements.txt | ||
| samples | ||
| Schutzfile | ||
| setup.cfg | ||
| setup.py | ||
| tox.ini | ||
OSBuild
Build-Pipelines for Operating System Artifacts
OSBuild is a pipeline-based build system for operating system artifacts. It defines a universal pipeline description and a build system to execute them, producing artifacts like operating system images, working towards an image build pipeline that is more comprehensible, reproducible, and extendable.
See the osbuild(1) man-page for details on how to run osbuild, the definition
of the pipeline description, and more.
Project
- Website: https://www.osbuild.org
- Bug Tracker: https://github.com/osbuild/osbuild/issues
- Discussions: https://github.com/orgs/osbuild/discussions
- Matrix: #image-builder on fedoraproject.org
- Mailing List: image-builder@redhat.com
- Changelog: https://github.com/osbuild/osbuild/releases
Principles
- OSBuild stages are never broken, only deprecated. The same manifest should always produce the same output.
- OSBuild stages should be explicit whenever possible instead of e.g. relying on the state of the tree.
- Pipelines are independent, so the tree is expected to be empty at the beginning of each.
- Manifests are expected to be machine-generated, so OSBuild has no convenience functions to support manually created manifests.
- The build environment is confined against accidental misuse, but this should not be considered a security boundary.
- OSBuild may only use Python language features supported by the oldest target distribution.
Contributing
Please refer to the developer guide to learn about our workflow, code style and more.
Requirements
The requirements for this project are:
bubblewrap >= 0.4.0python >= 3.6
Additionally, the built-in stages require:
bash >= 5.0coreutils >= 8.31curl >= 7.68qemu-img >= 4.2.0rpm >= 4.15tar >= 1.32util-linux >= 235skopeo
At build-time, the following software is required:
python-docutils >= 0.13pkg-config >= 0.29
Testing requires additional software:
pytest
Build
Osbuild is a python script so it is not compiled. To verify changes made to the code use included makefile rules:
make lintto run linter on top of the codemake test-allto run base set of testssudo make test-runto run extended set of tests (takes long time)
Also keep in mind that some tests require those prerequisites, otherwise they are skipped
sudo dnf install -y systemd-boot-unsigned erofs-utils pykickstart podman xfsprogs
Installation
Installing osbuild requires to not only install the osbuild module, but also
additional artifacts such as tools (i.e: osbuild-mpp) sources, stages, schemas
and SELinux policies.
For this reason, doing an installation from source is not trivial and the easier way to install it is to create the set of RPMs that contain all these components.
This can be done with the rpm make target, i.e:
make rpm
A set of RPMs will be created in the ./rpmbuild/RPMS/noarch/ directory and can
be installed in the system using the distribution package manager, i.e:
sudo dnf install ./rpmbuild/RPMS/noarch/*.rpm
Repository
- web: https://github.com/osbuild/osbuild
- https:
https://github.com/osbuild/osbuild.git - ssh:
git@github.com:osbuild/osbuild.git
License
- Apache-2.0
- See LICENSE file for details.