Commit Graph

5128 Commits

Author SHA1 Message Date
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
Colin Walters f7be2a3e4a bin/checkout: Port some to new style
I was reading this code for unrelated reasons and noticed it
was still old style; port most (but not all) to new style.
2020-11-11 21:57:36 +00:00
OpenShift Merge Robot c48e7e1060
Merge pull request #2236 from lucab/ups/travis-xenial
ci/travis: move to newer base distro
2020-11-11 17:01:13 +01:00
Luca BRUNO 1c65498d77
ci/travis: move to newer base distro
This removes the old pinned distro (Ubuntu Trusty 14.04) from Travis,
moving to the newer default distro (Ubuntu Xenial 16.04).
2020-11-10 13:06:34 +00:00
OpenShift Merge Robot 34390a53b8
Merge pull request #2233 from cgwalters/repo-annotations
sysroot: Fix up some GI nullable annotations
2020-11-09 18:56:24 +00:00
Colin Walters bf8c4c7e32 sysroot: Fix up some GI nullable annotations
Hit `ostree_sysroot_repo()` shouldn't be nullable while using
the ostree Rust bindings.
2020-11-06 20:06:26 +00:00
OpenShift Merge Robot e43d445b5b
Merge pull request #2228 from jlebon/pr/drop-volatile
Drop use of `volatile`
2020-11-03 17:36:14 -05:00
OpenShift Merge Robot f62c7bae2e
Merge pull request #2230 from alexlarsson/pull-dont-save-passed-in-summary
pull: Don't save into cache passed in GByte summaries
2020-11-03 12:35:06 -05:00
OpenShift Merge Robot 932dcf72c4
Merge pull request #2229 from dbnicholson/static-delta-generate-annotations
lib/deltas: Annotate from checksum as nullable
2020-11-03 15:32:54 +01:00
Alexander Larsson 52463686af pull: Don't save into cache passed in GByte summaries
The cache shouldn't be affected by the user passing in some other
summary as it may not be the "official one".

I ran into this in flatpak where the passed summary was correct, but
the re-saving of the cache updated the mtime of the cached file which
led to later http If-Modified-Since calls failing to update.
2020-11-03 11:48:33 +01:00
Dan Nicholson 3e527d9447 lib/deltas: Annotate from checksum as nullable
Without this you can't create a scratch delta from GI. While here,
switch the deprecated allow-none annotations to nullable.
2020-11-02 16:42:30 -07:00
Jonathan Lebon f895cf4fd2 Drop use of `volatile`
As detailed in
gitlab.gnome.org/GNOME/glib/-/issues/600#note_877282, volatile
isn't actually needed in these contexts because the atomic operations
already give us strong enough guarantees. In GCC 11, this triggers a
diagnostic due to the volatile qualifier getting dropped anyway.

There is a WIP to do the same in glib:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719

This obsoletes this downstream patch:
https://src.fedoraproject.org/rpms/ostree/c/b8c5a6fb
2020-11-02 14:53:26 -05:00
OpenShift Merge Robot 64e09f46b8
Merge pull request #2226 from alexlarsson/fix-gir-arg
ostree_repo_gpg_sign_data: Fix API doc argument name
2020-10-28 13:31:50 -04:00
Alexander Larsson 2f78441bea ostree_repo_gpg_sign_data: Fix API doc argument name
I got:
src/libostree/ostree-repo.c:5232: Warning: OSTree: ostree_repo_gpg_sign_data: unknown parameter 'out_signature' in documentation comment, should be 'out_signatures'
2020-10-28 15:53:18 +01:00
OpenShift Merge Robot 7bc53f0063
Merge pull request #2224 from stb-tester/bootloader-refactorings
Bootloader probing and construction refactoring
2020-10-28 06:39:57 -04:00
OpenShift Merge Robot 83eca85ad4
Merge pull request #2225 from jlebon/pr/clear-timer
lib/fetch-curl: Unref timeout source
2020-10-27 15:10:58 -04:00
Jonathan Lebon 8717608c7e lib/fetch-curl: Unref timeout source
The timeout timer should always be one-shot, so let's just always
destroy it in the callback. The main context has its own ref on it, so
it won't be freed behind its back.

This *should* fix a leak that was brought up in
https://bugzilla.redhat.com/show_bug.cgi?id=1891761.

Reported-by: Milan Crha <mcrha@redhat.com>
2020-10-27 12:01:01 -04:00
Jonathan Lebon 40edc33ef3 lib/fetcher-curl: Use G_SOURCE_REMOVE instead of FALSE
They're equivalent, though I prefer the former because it's more
descriptive and it makes it really obvious that it's a `GSource`
callback.
2020-10-27 11:57:00 -04:00
William Manley 663c5b41a3 fixup! Refactor `ostree_sysroot_query_bootloader` 2020-10-27 13:24:46 +00:00
William Manley 631528c87b fixup! Refactor: Centralise choosing the appropriate bootloader 2020-10-27 12:35:29 +00:00