No description
Find a file
Christian Kellner 5707c0a5b9 meta: proper error reporting for schema parsing
When parsing the module file, parse the JSON directly from the AST
node, because the AST node contains the line number of the schema
in the  module and thus we can resolve the correct line number for
errors  within the JSON. Convert the `JSONDecodeError` to a
`SyntaxError` which results in an overall better exception message:

Before:
Traceback (most recent call last):
  File "/workspaces/osbuild/osbuild/meta.py", line 331, in get_schema
    opts = self._make_options(version)
  [...]
  File "/usr/lib64/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in
                              double quotes: line 2 column 1 (char 14)

After:
Traceback (most recent call last):
  File "/usr/lib64/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  [...]
    raise SyntaxError(msg, detail) from None
  File "stages/org.osbuild.ostree.init-fs", line 31
    additionalProperties: False
    ^
SyntaxError: Invalid schema: Expecting property name enclosed in ...
2021-06-07 17:55:00 +02:00
.devcontainer devcontainer: specify the workdir 2021-04-08 12:56:06 +02:00
.github ci: update images to F33 2021-03-17 14:31:26 +00:00
assemblers assemblers/qemu: support for qcow2 compat version 2021-04-08 10:22:56 +02:00
docs Docs: Document --inspect option in the man page 2021-01-17 13:07:14 +01:00
inputs inputs/ostree: use ostree prefix for temp dir 2021-03-22 14:25:23 +01:00
osbuild meta: proper error reporting for schema parsing 2021-06-07 17:55:00 +02:00
runners runners: add Fedora 35 runner 2021-03-17 12:13:42 +01:00
samples stages/noop: fix the schema to allow any props 2020-07-16 19:02:25 +02:00
schemas schema: add version 2 manifest schema 2021-02-12 15:55:43 +01:00
schutzbot ci: remove Fedora 32 tests 2021-06-04 15:08:38 +02:00
selinux selinux: allow nnp and nosuid transitions 2020-08-10 14:05:24 +02:00
sources sources/curl: Implement new way of getting RHSM secrets 2021-06-04 18:23:05 +01:00
stages stages/dracut: disable hostonly mode and default to reproducible images 2021-06-07 12:15:26 +02:00
test test: update test manifests to use Fedora 34 2021-06-07 12:15:26 +02:00
tools tools: add inline-source.py 2021-05-12 14:26:16 +02:00
.editorconfig editorconfig: include markdown specifications 2020-10-23 16:29:50 +02:00
.gitignore test: add coverity targets to the Makefile 2020-06-24 10:01:24 +02:00
.travis.yml ci: move test_boot to github-actions 2020-05-13 22:00:27 +02:00
LICENSE Revert "Fill in the license template" 2019-11-18 12:23:10 +01:00
Makefile test: update test manifests to use Fedora 34 2021-06-07 12:15:26 +02:00
NEWS.md NEWS: update for osbuild version 28 2021-04-08 19:27:48 +02:00
osbuild.spec 28 2021-04-08 19:27:48 +02:00
README.md readme: add IRC 2021-06-04 15:10:12 +02:00
requirements.txt Makefile: use pytest for nicer output 2020-12-04 18:24:48 +01:00
setup.cfg setup.cfg: set max line length in pycodestyle 2021-05-12 14:26:16 +02:00
setup.py 28 2021-04-08 19:27:48 +02:00

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

Requirements

The requirements for this project are:

  • bubblewrap >= 0.4.0
  • python >= 3.7

Additionally, the built-in stages require:

  • bash >= 5.0
  • coreutils >= 8.31
  • curl >= 7.68
  • qemu-img >= 4.2.0
  • rpm >= 4.15
  • tar >= 1.32
  • util-linux >= 235

At build-time, the following software is required:

  • python-docutils >= 0.13
  • pkg-config >= 0.29

Testing requires additional software:

  • pytest

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:

License:

  • Apache-2.0
  • See LICENSE file for details.