Commit Graph

4997 Commits

Author SHA1 Message Date
Colin Walters
d49f3291ad Add --enable-sanitizers, fix make check with it
It's cleaner if this is an build option rather than being
kludged into the CI layer.

Notably we can't use `LD_PRELOAD` anymore with ASAN, so update
our tests to check for `ASAN_OPTIONS`.
2021-02-03 20:33:19 +00:00
OpenShift Merge Robot
0485817978
Merge pull request #2274 from cgwalters/delta-leak
deltas: Fix leak of matches
2021-02-03 10:07:44 -05:00
OpenShift Merge Robot
f0b619dfb9
Merge pull request #2275 from cgwalters/ci-rework
CI: run as non-root and add sanitizer build+check
2021-02-03 09:58:42 -05:00
OpenShift Merge Robot
38ba9a66c8
Merge pull request #2276 from lucab/ups/tests-enhance-destructive
tests/ext/destructive: enhance test logic
2021-02-03 08:58:43 -05:00
Luca BRUNO
bf2c23ca06
tests/ext/destructive: enhance test logic
This enhances external-tests logic, ensuring that destructive tests
have retries and some context to pinpoint failures, and that failed-state
services are reset between iterations.
2021-02-03 12:25:02 +00:00
Colin Walters
5a5f54a459 deltas: Fix leak of matches
Found by ASAN.
2021-02-02 21:26:43 +00:00
OpenShift Merge Robot
9b8871cf97
Merge pull request #2273 from cgwalters/link-stb-apt2ostree
README.md: Also link apt2ostree
2021-02-02 16:21:24 -05:00
Colin Walters
6b5aef7612 ci: Add new build-check-sanitized.sh
All C/C++ projects should use the sanitizers (and static analysis)
in their CI.  We had this but lost it in one of our CI shuffles;
let's readd it.
2021-02-02 21:09:23 +00:00
Colin Walters
afb032e693 ci: Don't install deps if running as non-root
This way we run in Prow too.
2021-02-02 21:08:54 +00:00
Colin Walters
5d730472ae README.md: Also link apt2ostree
Since the topic of Debian+ostree-for-host comes up fairly often.
2021-01-31 16:07:05 +00:00
OpenShift Merge Robot
c216a438b8
Merge pull request #2267 from dbnicholson/pull-depth-fixes
Pull depth fixes
2021-01-12 17:34:03 -05:00
Dan Nicholson
d7f2955f37 pull: Fix local pull with depth and truncated source history
The local pull path was erroring on any missing commit, but that
prevents a depth pull where the source repo has truncated history. As in
the remote case, this also tries to pull in a tombstone commit if the
source repo supports it.

Fixes: #2266
2021-01-12 14:19:01 -07:00
Dan Nicholson
20047ff1fe pull: Error on depth pull with missing head commit
When pulling with depth, missing parent commits are ignored. However,
the check was applying to any commit, which means that it would succeed
even if the requested commit was missing. This might happen on a
corrupted remote repo or when using ref data from a stale summary.

To achieve this, the semantics of the `commit_to_depth` hash table is
changed slightly to only ever includes parent commits. This makes it
easy to detect when a parent commit is being referenced (although there
is a minor bug there when multiple refs are being pulled) while keeping
references to commits that need their `commitpartial` files cleaned up.
It also means that the table is only populated on depth pulls, which
saves some memory and processing in the common depth=0 case.

Fixes: #2265
2021-01-12 14:19:01 -07:00
OpenShift Merge Robot
bdca64340b
Merge pull request #2263 from cgwalters/createat-nullable
repo: Make ostree_repo_create_at take nullable options
2021-01-12 03:38:46 -05:00
OpenShift Merge Robot
1a36dc08b0
Merge pull request #2257 from cgwalters/fsverity
repo: Move fsverity bits to ostree-repo-verity.c
2021-01-11 20:27:51 -05:00
Colin Walters
125c83850a repo: Make ostree_repo_create_at take nullable options
Hit this when trying to use the Rust bindings.
2021-01-12 01:20:23 +00:00
Dan Nicholson
b4f06b47a3 tests: Ensure no dangling commit partials on remote depth pull
This was already being done on the local depth pull test, so this just
adds the matching logic to the remote depth pull test.
2021-01-11 16:07:29 -07:00
Colin Walters
441233b51c repo: Move fsverity bits to ostree-repo-verity.c
This file will get larger when we start doing more with fsverity.
2021-01-11 14:36:40 +00:00
OpenShift Merge Robot
0b90f1f9a8
Merge pull request #2261 from cgwalters/boot-ro-more
sysroot: Handle ro /boot but rw /sysroot
2021-01-11 09:20:30 -05:00
Colin Walters
9a526bbaa5 sysroot: Handle ro /boot but rw /sysroot
The recent change in https://github.com/coreos/fedora-coreos-config/pull/659
broke some of our tests that do `mount -o remount,rw /sysroot` but
leave `/boot` read-only.

We had code for having `/boot` read-only before `/sysroot` but
in practice we had a file descriptor for `/sysroot` that we opened
before the remount that would happen later on.

Clean things up here so that in the library, we also remount
`/boot` at the same time we remount `/sysroot` if either are readonly.

Delete the legacy code for remounting `/boot` rw if we're not in
a mount namespace.  I am fairly confident most users are either
using the `ostree` CLI, or they're using the mount namespace.
2021-01-10 13:49:44 +00:00
Colin Walters
a1c0cffeb3 sysroot: Also maintain canonical boot_fd
Just like we hold a fd for `/sysroot`, also do so for `/boot`
instead of opening and closing it in a few places.

This is a preparatory cleanup for further work.
2021-01-10 13:46:11 +00:00
Colin Walters
10556a95b4 main: Unconditionally set up mount namespace
I was being very conservative initially here, but I think it's
really safe to just unconditionally set up the mount namespace.

This avoids having to check twice for a read-only `/sysroot`
(once in the binary and once in the library).
2021-01-10 13:40:52 +00:00
OpenShift Merge Robot
fd9d422c51
Merge pull request #2254 from dbnicholson/coding-style
pull: Use GNU coding style
2020-12-18 18:54:08 +00:00
Dan Nicholson
92a484d278 pull: Use GNU coding style 2020-12-18 09:13:38 -07:00
OpenShift Merge Robot
39aa419dfa
Merge pull request #2253 from dbnicholson/pull-no-verify-bindings
pull: Allow disabling commit binding verification
2020-12-18 15:39:29 +00:00
Dan Nicholson
4db2ba0eb1 pull: Allow disabling commit binding verification
In some cases such as backups or mirroring you may want to pull commits
from one repo to another even if there commits that have incorrect
bindings. Fixing the commits in the source repository to have correct
bindings may not be feasible, so provide a pull option to disable
verification.

For Endless we have several repositories that predate collection IDs and
ref bindings. Later these repositories gained collection IDs to support
the features they provide and ref bindings as the ostree tooling was
upgraded. These repositories contain released commits that were valid to
the clients they were targeting at the time. Correcting the bindings is
not really an option as it would mean invalidating the repository
history.
2020-12-17 14:07:08 -07:00
OpenShift Merge Robot
5551c54c6e
Merge pull request #2249 from mwleeds/fix-readme-flatpak-typo
README: Fix typos of Flatpak
2020-12-02 05:55:25 +01:00
Phaedrus Leeds
bb1e9ac0fa README: Fix typos of Flatpak 2020-12-01 17:44:51 -08:00
OpenShift Merge Robot
7490864ce9
Merge pull request #2248 from jjardon/jjardon/more_distros
README.md: Add Apertis and GNOME OS
2020-12-02 01:14:11 +01:00
Javier Jardón
577b1d21c5 README.md: Add Apertis and GNOME OS 2020-12-01 20:25:20 +00:00
OpenShift Merge Robot
81321f2c6b
Merge pull request #2246 from smcv/pull-summary-sigs-mtime
test-pull-summary-sigs: Set timestamps to serve expected files
2020-11-30 23:20:18 +01:00
Simon McVittie
07c4249a3f test-pull-summary-sigs: Set timestamps to serve expected files
If this is not done, the test can fail when the temporary directory is
a tmpfs: for example this happens during build-time testing with /var/tmp
on tmpfs or TEST_TMPDIR pointing to a tmpfs, or installed-tests with
gnome-desktop-testing-runner allocating the test directory on a tmpfs.

In particular, many of Debian's official autobuilders now do the entire
build and test procedure in a chroot hosted on a tmpfs, to improve build
performance and prevent fsync overhead.

In this situation, it appears that overwriting summary.sig with a copy
of summary.sig.2 is not sufficient for the web server to tell the
libostree client that it needs to be re-downloaded. I'm not completely
sure why, because tmpfs does appear to have sub-second-resolution
timestamps, but forcing a distinct mtime is certainly enough to
resolve it.

Resolves: https://github.com/ostreedev/ostree/issues/2245
Bug-Debian: https://bugs.debian.org/975418
Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-11-22 13:17:45 +00:00
OpenShift Merge Robot
024b169aef
Merge pull request #2244 from lucab/ups/docs-release-guide
templates: add release-checklist
2020-11-19 15:40:33 +01:00
OpenShift Merge Robot
e33ada1c69
Merge pull request #2243 from lucab/ups/workflow-checkout
workflow/release: further refinements
2020-11-18 17:14:05 +01:00
Luca BRUNO
8ece70b207
templates: add release-checklist
This collects all release steps in a release-checklist template.
2020-11-18 13:05:07 +00:00
Luca BRUNO
9567a0e91c
workflow/release: further refinements
This tweaks the release GH workflow further so that it only triggers
when the `configure.ac` file (which owns the version) changes.
Plus it properly checkouts the PR branch to avoid wrongly looking
at a synthetic merge commit.
2020-11-18 10:24:32 +00:00
OpenShift Merge Robot
874f2ca625
Merge pull request #2242 from stb-tester/tarball-import-xattrs
ostree commit --tree=tar: Import xattrs from tarballs
2020-11-17 22:38:32 +01:00
William Manley
a88d2f5f7b ostree commit --tree=tar: Import xattrs from tarballs
If you specify an `xattr_callback` the xattrs will still be taken from
there for now.
2020-11-17 16:54:32 +00:00
OpenShift Merge Robot
51560422f2
Merge pull request #2241 from lucab/release-2020.8
Release 2020.8
2020-11-17 16:18:58 +01:00
Luca BRUNO
3c3651417c
configure: post-release version bump 2020-11-17 10:50:56 +00:00
Luca BRUNO
3e289b1934
Release 2020.8 2020-11-17 10:32:57 +00:00
OpenShift Merge Robot
abbe7ea4e7
Merge pull request #2240 from lucab/ups/ci-pr-title
workflows/release: pattern-match on PR title
2020-11-16 20:33:46 +01:00
Luca BRUNO
ee57fe2821
workflows/release: pattern-match on PR title
This adds an additional condition in order to run sanity check all
PRs starting with `Release` (case-insensitive).
2020-11-16 17:13:47 +00:00
OpenShift Merge Robot
1ac80fa782
Merge pull request #2239 from lucab/ups/gh-actions
ci: run ci-release-build.sh on GitHub
2020-11-16 17:00:01 +01:00
Luca BRUNO
0d0eb4715b
ci: run ci-release-build.sh on GitHub
This adds a GitHub action in order to run ci-release-build.sh on
release PRs (detected via the `kind/release` label).
2020-11-16 11:14:40 +00:00
OpenShift Merge Robot
fdd3f7fcdf
Merge pull request #2232 from cgwalters/deploy-docs
deployment: Add a bunch of docs and fix annotations
2020-11-12 19:40:28 +01:00
OpenShift Merge Robot
d046631a0f
Merge pull request #2235 from cgwalters/checkout-some-new-style
bin/checkout: Port some to new style
2020-11-12 09:34:44 +01:00
OpenShift Merge Robot
aa0b5b08cb
Merge pull request #2231 from cgwalters/some-nullable-annotations
deployment: Ensure query_deployments_for returns nullable values
2020-11-12 03:01:22 +01:00
Colin Walters
8fbf2c5b80 deployment: Ensure query_deployments_for returns nullable values
Since that's a common case; hit this while working on rpm-ostree
code using the ostree-rs bindings.
2020-11-11 22:01:39 +00:00
Colin Walters
43913178a7 deployment: Add a bunch of docs and fix annotations
We were missing docs for these, also add some nullability annotations.
Motivated by using these from the Rust bindings.
2020-11-11 22:01:11 +00:00