Commit Graph

6 Commits

Author SHA1 Message Date
Colin Walters
f56131976e Add clang formatting infrastructure
Prep for reformatting the codebase.
2023-05-01 15:37:56 -04:00
Ondrej Mosnacek
edb4f38934 deploy: Try to rebuild policy in new deployment if needed
Whenever the user has SELinux enabled and has any local
modules/modifications installed, it is necessary to rebuild the policy
in the final deployment, otherwise ostree will leave the binary policy
files unchanged from last deployment as it detects difference against
the base content (in rpm-ostree case this is the RPM content).

To avoid the situation where the policy binaries go stale once any local
customization of the policy is made, try to rebuild the policy as part
of sysroot_finalize_deployment(). Use the special
--rebuild-if-modules-changed switch, which detects if the input module
files have changed relative to last time the policy was built and skips
the most time-consuming part of the rebuild process if modules are
unchanged (thus making this a relatively cheap operation if the user
hasn't made any modifications to the shipped policy).

As suggested by Jonathan Lebon, this uses bubblewrap (via
g_spawn_sync()) to perform the rebuild inside the deployment's
filesystem tree, which also means that ostree will have a runtime
dependency on bubblewrap.

Partially addresses: https://github.com/coreos/fedora-coreos-tracker/issues/701

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
2022-03-28 17:18:03 -04:00
Simon McVittie
43859b58f6
rofiles-fuse: Build using FUSE 3 if possible, falling back to FUSE 2
This adds build-time configuration logic to automatically detect
and switch between libfuse 2.x and 3.x.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Co-authored-by: Luca BRUNO <luca.bruno@coreos.com>
2022-01-04 09:41:38 +00:00
Colin Walters
3b338df956 ci: Require libcap2-bin for capsh
This was previously pulled in indirectly, but it looks like we need
to require it explicitly in newer Ubuntu.
2021-11-09 09:22:43 -05:00
Dan Nicholson
410b46f09d ci: Update Debian and Ubuntu build dependencies
This refreshes the build dependencies installed for the GitHub Tests
workflow based on the Build-Depends in the upstream packaging. The
handling is now more explicit about any deviations and any release
differences.
2021-06-21 13:47:00 -06:00
Dan Nicholson
a0012ae0ee ci: Add GitHub Actions workflow for test suite
This runs the test suite in various distros. The intention is to use
this to replace the Travis CI setup since it often has rate limit
failures.

Each configuration in the matrix runs in a Docker container, installs
system dependencies and then builds and tests ostree. The scripts are
basically copy and paste of the travis ones with some of the lesser used
features pruned out.

Some differences from the travis setup:

* OS details are gathered from `/etc/os-release` instead of being passed
  in as environment variables.

* The scripts always assume the user is root and don't try to use
  `sudo`.

* The `installcheck` test has been removed since ostree doesn't actually
  use that. It could be added to run the installed tests or
  `gnome-desktop-testing-runner` could just be called directly.

There should be enough flexibility to run other distros like Fedora,
Arch or Alpine. Another option would be to use the other build scripts
in ci/.
2021-06-18 15:30:06 -06:00