A usual step in creating OS file system trees is to apply the correct SELinux labels for all files and directories. This is done by the org.osbuild.selinux stage, which internally uses the setfiles command in order to do so. The SELiunx policy to be used for this operation is the one of the newly created system, not the host one. It therefore can contain labels that are not known on the host. The kernel will prevent setting invalid, i.e. unknown, labels unless the caller has the CAP_MAC_ADMIN capability. By default, setfiles is executed in the setfiles_t domain, where it lacks that capability. Therefore a custom osbuild SELinux policy was created, with a special transition rule that will execute setfiles in the setfiles_mac_t domain. All stages, sources and assemblers as well as the main binary are label with the new osbuild_exec_t label. Additionally, allow a transition from osbuild_t to install_t by using `anaconda_domtrans_install`, so that ostree and rpm-ostree, which are labeled as install_exec_t, can transition to the install_t domain when called form osbuild. Update the spec file to build the policy and include it in a new osbuild-selinux sub-package. |
||
|---|---|---|
| .github/workflows | ||
| assemblers | ||
| docs | ||
| osbuild | ||
| runners | ||
| samples | ||
| schemas | ||
| schutzbot | ||
| selinux | ||
| sources | ||
| stages | ||
| test | ||
| tools | ||
| .editorconfig | ||
| .gitignore | ||
| .pylintrc | ||
| .travis.yml | ||
| LICENSE | ||
| Makefile | ||
| NEWS.md | ||
| osbuild.spec | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
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
Requirements
The requirements for this project are:
python >= 3.7systemd-nspawn >= 244
Additionally, the built-in stages require:
bash >= 5.0coreutils >= 8.31curl >= 7.68qemu-img >= 4.2.0rpm >= 4.15tar >= 1.32util-linux >= 235
At build-time, the following software is required:
python-docutils >= 0.13pkg-config >= 0.29
Build
The standard python package system is used. Consult upstream documentation for detailed help. In most situations the following commands are sufficient to build and install from source:
python setup.py build
python setup.py install --skip-build --root=/
The man-pages require python-docutils and can be built via:
rst2man docs/<input-file>.rst <output-file>
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.