Commit Graph

5245 Commits

Author SHA1 Message Date
Colin Walters
57270db9a1 repo: Ensure load_variant_if_exists sets NULL value
Spotted by @jlebon - we usually expect callers to zero, but
let's be explicit.
2021-04-03 16:44:39 -04:00
Colin Walters
0c0e58e06c repo: Fix load_variant_if_exists to return a nullable value
Another introspection fix I hit when trying to use this in Rust.
2021-04-03 16:44:39 -04:00
Colin Walters
6d0bb10bf0 cci: Update for buildroot changes
See latest in https://github.com/coreos/fedora-coreos-tracker/blob/master/docs/ci-and-builds.md
2021-03-31 15:11:34 -04:00
Colin Walters
cb0fd2bf93 tests/pull-test: Use mv -f in a few cases
For some reason I'm hitting this locally because some files are mode `0`.
Which is clearly a different bug but anyways we don't want to prompt.
2021-03-31 15:11:34 -04:00
Colin Walters
7170cf9efd installdeps: Drop PyYAML
Doesn't exist anymore in f33 and we don't depend on python2 anymore.
2021-03-31 15:11:34 -04:00
Felix Krull
47bf29fed3 lib: fix some version tags 2021-03-26 15:59:07 -04:00
Jonathan Lebon
96875b37e5
Merge pull request #2315 from cgwalters/add-lgtm-dot-com
.lgtm.yml: Add package deps
2021-03-26 14:08:06 -04:00
Colin Walters
ca2ea1455f .lgtm.yml: Add package deps
I was recently looking at systemd's CI and came across this.
AFAICS it's a proprietary analysis but it looks useful.

We still have `clang-analyzer` for example for FOSS analysis.
2021-03-26 17:34:09 +00:00
Colin Walters
dafa404606 configure: post-release version bump 2021-03-23 15:23:55 -04:00
Colin Walters
e9e4b91120 Release 2021.1 2021-03-23 15:23:55 -04:00
Colin Walters
269ede1015
Merge pull request #2309 from jlebon/pr/prefix-pull
lib/pull: Add some error-prefixing in dirtree scanning
2021-03-22 18:58:39 -04:00
Jonathan Lebon
36a543ceb1 lib/pull: Add some error-prefixing in dirtree scanning
I think these are the paths involved in the error message at
https://github.com/coreos/rpm-ostree/issues/2250.
2021-03-22 16:32:11 -04:00
Jonathan Lebon
a16be7df6e
Merge pull request #2306 from cgwalters/drop-core-rust 2021-03-22 09:59:42 -04:00
Colin Walters
b69a4180b8 tests/inst: Patch to use my PR for openat
Fixes the build.
2021-03-19 21:45:54 +00:00
Colin Walters
61184163ea Drop minimal rust/ library
This was my first experiment with using Rust in this way; I gained
a lot of knowledge from it.  But, we don't really gain
anything from the code as it is today - while it is "bit fiddling"
code, the C code is well tested.

We have a lot of compile-time options, and trimming them will be
helpful.

We've also gotten pushback on hard requiring Rust client side.

Instead, what I'd like to do is hopefully soon create an `ostree-system`
crate that uses the existing `ostree` library and can contain
code drained from the rpm-ostree Rust and used by other projects perhaps.

So the goal here is really more Rust, but we need to focus our
efforts on where it's most valuable.
2021-03-18 21:54:52 +00:00
Colin Walters
9c29141c04
Merge pull request #2298 from KloudJack/remove-grub2-suffix
Add configure option for unsuffixed GRUB2 commands linux/initrd
2021-03-18 17:46:18 -04:00
Kenneth J. Miller
cfe313afae Add configure option for unsuffixed GRUB2 commands
GRUB starting with version 2.02 permits the use of the linux and
initrd commands for both EFI boot in *-efi installations, as
well as 32-bit BIOS boot in i386-pc installations.

This makes the use of the -16 and -efi suffixes for BIOS and EFI
boot obsolete on systems with a modern GRUB installation.

The --with-modern-grub configure flag makes ostree use the
unsuffixed linux/initrd commands when generating a GRUB
configuration, while defaulting to the previous behaviour for
users not wanted this option.
2021-03-18 14:31:28 +01:00
Colin Walters
407477f191
Merge pull request #2301 from cgwalters/api-require-booted
sysroot: Add _require_booted_deployment() API
2021-03-18 08:46:35 -04:00
Colin Walters
1b28e6041c sysroot: Add _require_booted_deployment() API
This is a common pattern that is replicated both in our code
and in rpm-ostree a lot.  Let's add a canonical API.
2021-03-17 19:55:56 +00:00
Colin Walters
236a5ca9bf
Merge pull request #2303 from cgwalters/gh-actions
ci: Add a Github Action for Rust for tests/inst
2021-03-17 15:49:05 -04:00
Colin Walters
26166bb8e3 ci: Add a Github Action for Rust for tests/inst
Let's dip our toes in GH Actions (specifically aiming to migrate
away from Travis).
2021-03-17 19:37:21 +00:00
Colin Walters
c52a2ff52e tests/inst: cargo fmt 2021-03-17 18:45:17 +00:00
Colin Walters
92e2bc397b
Merge pull request #2302 from cgwalters/tests-inst-clippy
tests/inst: Fix lots of `cargo clippy` warnings
2021-03-17 14:43:10 -04:00
Colin Walters
d11dd7a37b tests/inst: Fix lots of cargo clippy warnings
Prep for doing this in CI.
2021-03-17 17:13:52 +00:00
OpenShift Merge Robot
d522f261db
Merge pull request #2296 from cgwalters/commit-os
Add an API+CLI to inject metadata for bootable OSTree commits
2021-03-12 17:22:45 -05:00
Colin Walters
857587615d Add an API+CLI to inject metadata for bootable OSTree commits
I was doing some rpm-ostree work and I wanted to compare two
OSTree commits to see if the kernel has changed.  I think
this should be a lot more natural.

Add `ostree commit --bootable` which calls into a new generic
library API `ostree_commit_metadata_for_bootable()` that
discovers the kernel version and injects it as an `ostree.linux`
metadata key.  And for extra clarity, add an `ostree.bootable`
key.

It's interesting because the "core" OSTree layer is all about
generic files, but this is adding special APIs around bootable
OSTree commits (as opposed to e.g. flatpak as well as
things like rpm-ostree's pkgcache refs).

Eventually, I'd like to ensure everyone is using this and
hard require this metadata key for the `ostree admin deploy`
flow - mainly to prevent accidents.
2021-03-12 19:01:42 +00:00
OpenShift Merge Robot
31e19935b5
Merge pull request #2293 from ostreedev/fix-file-uri-decoding
Fix translation of file:// URIs into paths
2021-03-10 21:14:51 +01:00
Phaedrus Leeds
19577522f8 Fix translation of file:// URIs into paths
Currently if a file path contains a special character such as '\', and
that character is encoded into a file:// URI that is passed to
ostree_repo_pull_with_options(), the percent encoding will remain in the
path passed to g_file_new() (in the case of backslash %5C) and the pull
will then fail with a file not found error. This is an important edge
case to handle because by default on many Linux distributions a
filesystem with no label is mounted at a path based on its UUID, and
this is then passed to systemd-escape by Flatpak (when
--enable-auto-sideloading was used at compile time) to create a symbolic
link such as this which contains backslashes:

$ ls -l /run/flatpak/sideload-repos/
total 0
lrwxrwxrwx 1 mwleeds mwleeds 55 Mar  9 14:21
'automount-run-media-mwleeds-29419e8f\x2dc680\x2d4e95\x2d9a31\x2d2cc907d421cb'
-> /run/media/mwleeds/29419e8f-c680-4e95-9a31-2cc907d421cb

And Flatpak then passes libostree a file:// URI containing that path, to
implement sideloading (pulling content from the USB drive).

This results in an error like:

Error: While pulling app/org.videolan.VLC/x86_64/stable from remote
flathub:
/run/flatpak/sideload-repos/automount-run-media-mwleeds-29419e8f%5Cx2dc680%5Cx2d4e95%5Cx2d9a31%5Cx2d2cc907d421cb/.ostree/repo:
opendir(/run/flatpak/sideload-repos/automount-run-media-mwleeds-29419e8f%5Cx2dc680%5Cx2d4e95%5Cx2d9a31%5Cx2d2cc907d421cb/.ostree/repo):
No such file or directory

This patch avoids such errors by using g_file_new_for_uri() instead of
g_file_new_for_path(), so that GLib handles the %-decoding for us.

Bug report by user:
https://community.endlessos.com/t/can-not-install-vlc-from-usb-drive-3-9-3/16353
2021-03-10 10:11:06 -08:00
Phaedrus Leeds
2709da4360 pull: Fix some whitespace and a comment 2021-03-10 10:01:04 -08:00
OpenShift Merge Robot
8459d52fbc
Merge pull request #2292 from pwithnall/summary-leak
ostree-repo-pull: Fix a leak of the summary data if loading from cache
2021-03-09 14:27:50 +01:00
Philip Withnall
60881b75ec ostree-repo-pull: Fix a leak of the summary data if loading from cache
If the `summary_sig_not_modified` branch is taken above, both
`signatures` and `summary` are loaded from the cache. This makes the
`_ostree_repo_load_cache_summary_if_same_sig()` call below redundant (it
checks `signatures` matches the file it was just loaded from, and then
loads `summary` again) — but that call also currently overwrites
`summary` without clearing the old value.

Fix this by only making that call if `signatures` was retrieved, but the
server said the local `summary` cache was invalid.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-09 11:47:23 +00:00
OpenShift Merge Robot
f9a38436fa
Merge pull request #2290 from ostreedev/fix-repo-modes-docs
man: Add missing repo mode in config docs
2021-03-08 23:49:34 +01:00
Phaedrus Leeds
d3e40ca7f6 man: Add missing repo mode in config docs 2021-03-08 13:18:31 -08:00
OpenShift Merge Robot
fd7e96469f
Merge pull request #2288 from leograba/master
docs: Add Torizon to related projects and OS
2021-03-04 19:34:17 -05:00
Leonardo Graboski Veiga
3b935f0d22 docs: Add Torizon to related projects and OS
The Torizon platform, includin the TorizonCore OS, the TorizonCore
Builder Tool and the Torizon OTA, use OSTree as a base for update the
host OS, while the user focus on application development using Docker.

Add TorizonCore to the list of Operating systems and distributions using
OSTree.

Add Torizon and its components to the list of related projects.
2021-03-04 17:04:38 -03:00
OpenShift Merge Robot
ba407750b1
Merge pull request #2287 from jlebon/pr/deployment-parsing-comments
lib/sysroot: Add comments and debug statements around sysroot parsing
2021-03-03 14:36:52 -05:00
Jonathan Lebon
02b6197924 lib/sysroot: Add comments and debug statements around sysroot parsing
Was looking at this code more closely today to investigate issues
related to bootlink mismatches (#2283).
2021-03-02 15:36:27 -05:00
OpenShift Merge Robot
c97aafcda3
Merge pull request #2285 from cgwalters/log-bootloader-stuff
deploy: Add subbootversion to journal
2021-02-28 16:21:15 +01:00
Colin Walters
975496d241 deploy: Add subbootversion to journal
To help debug an issue we've seen where `/boot` isn't
in sync with the `/ostree/boot` dir, let's log to the journal
what we're doing.
2021-02-28 14:47:58 +00:00
OpenShift Merge Robot
ee490bf9ba
Merge pull request #2284 from cgwalters/use-rpmostree-client
tests/inst: Switch to rpmostree-client from git
2021-02-26 01:59:56 +01:00
Colin Walters
dc10bdfb0c tests/inst: Switch to rpmostree-client from git
See discussion in https://github.com/coreos/rpm-ostree/pull/2569#issuecomment-780569188
Currently pinned to a hash, but after the next stable release let's switch to tags
2021-02-23 15:20:54 +00:00
OpenShift Merge Robot
ea3a971f33
Merge pull request #2282 from cgwalters/resolve-nullable
refs: Make ostree_repo_resolve_rev{,_ext}() use (nullable)
2021-02-18 22:44:21 -05:00
Colin Walters
093c63cd46 refs: Make ostree_repo_resolve_rev{,_ext}() use (nullable)
We have an `allow_noent` boolean that controls this, but
were missing the `(nullable)` annotation, so the Rust bindings
panic when the ref doesn't exist instead of being `Option<GString>`.
2021-02-19 01:11:43 +00:00
OpenShift Merge Robot
172a845c2b
Merge pull request #2280 from cgwalters/readme-fix-contributing
README.md: Fix contributing link, add contact section
2021-02-17 17:06:34 -05:00
Colin Walters
bf4bbeca14 README.md: Fix contributing link, add contact section
Came up on #fedora-iot channel.
2021-02-16 15:48:33 +00:00
OpenShift Merge Robot
35292273fc
Merge pull request #2279 from cgwalters/doc-scratch-delta
docs: Describe using scratch/empty deltas for initial fetches
2021-02-12 12:26:03 -05:00
Colin Walters
2195a6099b docs: Describe using scratch/empty deltas for initial fetches
Came up with a user hitting ratelimiting from S3.
2021-02-11 21:19:59 +00:00
OpenShift Merge Robot
12d246301f
Merge pull request #2277 from cgwalters/ci-asan
Add --enable-sanitizers, fix `make check` with it
2021-02-05 11:43:37 -05:00
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