Commit Graph

6781 Commits

Author SHA1 Message Date
Simon McVittie 5968aa5ff6 New upstream version 2022.4 2022-06-17 14:06:59 +01:00
Simon McVittie 1a119e7d9f Update changelog 2022-06-17 14:06:34 +01:00
Simon McVittie 028e80a603 d/copyright: Update 2022-06-17 14:06:17 +01:00
Colin Walters 9bdf3861ad cli/refs: Port to C99 style
General background cleanup.
2022-06-15 09:36:54 -04:00
Colin Walters 2f1c9a727e cli/remote-list: Port to C99 style
General background cleanup.
2022-06-15 09:35:03 -04:00
Colin Walters a0ae2f9156 cli/gpg-sign: Port to C99 style
General background cleanup.
2022-06-15 09:33:46 -04:00
Jonathan Lebon d9d085dc7b
Merge pull request #2650 from cgwalters/misc-declare-and-initialize-1 2022-06-14 16:20:44 -04:00
Joseph Marrero Corchado e997ddc078
Merge pull request #2649 from cgwalters/misc-declare-and-initialize
cli: a few "Port to C99 style"
2022-06-14 10:38:46 -04:00
Colin Walters 43b712951d cli/diff: Port to C99 style
General background cleanup.
2022-06-14 10:04:04 -04:00
Colin Walters f8403f46dc cli/config: Port to C99 style
General background cleanup.
2022-06-14 10:03:58 -04:00
Colin Walters 4e356d0e8f cli/unlock: Port to C99 style
General background cleanup.
2022-06-14 09:53:11 -04:00
Colin Walters 588b07e554 cli/undeploy: Port to C99 style
General background cleanup.
2022-06-14 09:51:41 -04:00
Colin Walters 46e1db392d cli/os-init: Port to C99 style
General background cleanup; motivated by a recent PR which
was using pre-C99 code as a base.
2022-06-14 09:50:07 -04:00
Colin Walters e65c8e72c8
Merge pull request #2643 from cgwalters/rust-2021
rust: Switch to 2021 edition, bump MSRV, a few `format!` updates
2022-06-13 09:10:36 -04:00
Luca Bruno 68d1f54c5a
Merge pull request #2646 from cgwalters/bindings-tests
rust-bindings: Wire up `tests/`
2022-06-13 07:46:14 +00:00
Luca Bruno ca1fbc59ce
Merge pull request #2645 from cgwalters/fsck-more-cleanups
fsck: A few more cleanups
2022-06-13 07:32:33 +00:00
Colin Walters eee0eea58b rust-bindings: Wire up `tests/`
Because the source is in a subdirectory, we lose out on cargo target
autodiscovery.

I noticed this when I edited one of the tests in a way that
should have failed, but didn't...
2022-06-12 14:34:02 -04:00
Colin Walters 436ff11a00 fsck: Use `load_variant_if_exists`
This cleans up error handling here.
2022-06-12 10:58:29 -04:00
Colin Walters bd030a96f2 fsck: Move most commit processing into helper function
The inner loop was way too long; split out most of the heavy
lifting around backrefs and tombstones into a helper function.
2022-06-12 10:57:27 -04:00
Colin Walters 2fe0ea7395 fsck: De-indent loop
Could have done this in the previous change, but wanted to avoid
excessive diff noise.
2022-06-12 10:48:39 -04:00
Colin Walters e6ad897850
Merge pull request #2644 from cgwalters/list-commit-objects
fsck: Don't load all object names into memory
2022-06-11 08:09:35 -04:00
Colin Walters 6981633f9c fsck: Don't load all object names into memory
We recently discovered `list_objects()` is inefficient with memory.
The more efficient `list_objects_set()` API isn't yet public, but
this fsck code actually just skips over non-commit objects, and
we already have an API to list just those.
2022-06-09 21:01:03 -04:00
Colin Walters a13d812368 repo: Document non-obvious way to list all commits
I was going to add an API for this and then realized the empty
string does it.
2022-06-09 18:34:51 -04:00
Colin Walters 93e3784b66 rust: Use inline `format!` variables in a few places
Since our MSRV now supports it.
2022-06-09 17:51:07 -04:00
Colin Walters 76071a2b11 ci: Bump MSRV
To match what's in ostree-rs-ext.
2022-06-09 17:49:18 -04:00
Joseph Marrero Corchado 10212626d2
Merge pull request #2641 from cgwalters/bump-ostree-rs-ext-0.7
tests/inst: Bump the version of ostree-ext
2022-06-09 16:53:52 -04:00
Joseph Marrero Corchado d52597e478
Merge pull request #2642 from cgwalters/rust-bindings-cargo-updates
Rust bindings cargo updates
2022-06-09 16:53:00 -04:00
Colin Walters 99c122d219 rust: Switch to 2021 edition
No real changes.

```
$ cargo fix --edition
note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo.
This may cause some dependencies to be built with fewer features enabled than previously.
More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html
When building the following dependencies, the given features will no longer be used:

  libc v0.2.126 removed features: extra_traits

The following differences only apply when building with dev-dependencies:

  getrandom v0.2.6 removed features: std
```

which looks OK to me.
2022-06-09 15:55:41 -04:00
Colin Walters d7802c27dd rust-bindings: Update cargo package list
When we did the merger, it turns out cargo by default is basically
going to include all of stuff in the git repository root directory
which is "libostree".  We just want the stuff in `rust-bindings/`.

I initially tried adding `include = "rust-bindings/"` but
according to
https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields
specifying `include` means that `exclude` is
ignored, which is kind of annoying.  Further, doing so *also*
turns off the cargo automatic rules for handling e.g. `gitignore`.

So for now I went with the approach of adding everything from the C
library stuff into `exclude/`.
2022-06-09 15:50:17 -04:00
Colin Walters 61dd54f940 rust-bindings: use correct README.md
I noticed at https://crates.io/crates/ostree/0.14.0
that the `README.md` was wrong...
2022-06-09 14:55:25 -04:00
Colin Walters dc13645299 rust-bindings: Fix repository reference
Since the repo merge.
2022-06-09 14:53:06 -04:00
Colin Walters 2688d7d261 tests/inst: Bump the version of ostree-ext
In the interest of cross-testing and keeping things up to date.

Hmm, I think we need to set up dependabot here.
2022-06-09 14:52:04 -04:00
Joseph Marrero Corchado a6ecd96cda
Merge pull request #2638 from cgwalters/fix-symbol-versioning
lib: Fix symbol versioning inheritance
2022-06-08 17:17:28 -04:00
Joseph Marrero Corchado b330f84172
Merge pull request #2637 from cgwalters/opt-prune-reachable-too
prune: Also use object set API in `ostree_repo_prune_from_reachable()`
2022-06-08 16:53:29 -04:00
Colin Walters 145d91d1c9 lib: Fix symbol versioning inheritance
I messed this up; the last release should inherit from the previous
release (N-1) and not the previous to that (N-2).

I think (hope) this isn't an ABI break...

Just noticed this when I was going to add a new symbol.
2022-06-08 16:44:51 -04:00
Colin Walters fffb111633 prune: Also use object set API in `ostree_repo_prune_from_reachable()`
I missed the second prune path when working on
https://github.com/ostreedev/ostree/pull/2635
2022-06-08 16:22:26 -04:00
Dan Nicholson cc85556b27 Add new ostree-boot-complete.service unit to ostree-boot 2022-06-08 18:11:17 +00:00
Dan Nicholson fbbba40ab8 d/control: Bump libglib2.0-dev dependency to 2.66.0 2022-06-08 18:10:57 +00:00
Dan Nicholson 4f21bea633 New upstream release
- Drop patches that were applied upstream
2022-06-08 17:22:44 +00:00
Colin Walters 616d0cf7c2
Merge pull request #2636 from cgwalters/update-git-libostree-git-rust
ci: Add a flow that does a git libostree + git rust-bindings
2022-06-08 13:16:11 -04:00
Dan Nicholson b2d33f1be5 Update upstream source from tag 'upstream/2022.3'
Update to upstream version '2022.3'
with Debian dir 06c9530539
2022-06-08 16:33:05 +00:00
Dan Nicholson 14fbcf3f31 New upstream version 2022.3 2022-06-08 16:32:57 +00:00
Jonathan Lebon 0f83196c2a
Merge pull request #2635 from cgwalters/list-objects-set 2022-06-08 11:38:36 -04:00
Colin Walters 5341a13b33 ci: Add a flow that does a git libostree + git rust-bindings
In https://github.com/ostreedev/ostree/pull/2633 I realized
that our CI only builds git of libostree or git of rust-bindings,
not git of both.  And we definitely want to test the latter too,
so e.g. the Rust tests *also* become tests for changes to the C code.
2022-06-08 10:33:46 -04:00
Colin Walters a71915e436 repo: Further optimize `ostree_repo_list_objects_set()`
In a prior change we discovered that for bad historical reasons
libostree was returning a mapping "object type+checksum" => "metadata"
but the "metadata" was redundant and pointless.

Optimize the prune API to use a (currently internal) object listing
API which returns a set, not a map.  This allows `GHashTable` to
avoid allocating a separate array for the values, neatly cutting
memory usage in half (from ~13MB to ~6MB) on my test case of a
dry-run prune of a FCOS build.
2022-06-08 10:18:55 -04:00
Joseph Marrero Corchado 1acb71fef7
Merge pull request #2633 from cgwalters/bump-rust-bindings
rust: Bump semver, add feature for current release
2022-06-08 10:15:02 -04:00
Colin Walters 4806d84f56 rust: Bump semver, add feature for current release
There were some changes to the sys API for introspection fixes.
And add a feature for the current release, which is something
I'll add to the checklist for releases.
2022-06-08 09:37:57 -04:00
Dan Nicholson ef114db341
Merge pull request #2634 from cgwalters/list-objects-malloc
repo: Optimize memory use of `ostree_repo_list_objects()`
2022-06-07 20:59:45 -06:00
Colin Walters c2baa6d10b repo: Optimize memory use of `ostree_repo_list_objects()`
I was looking at https://github.com/ostreedev/ostree/pull/2632
and confused at the usage of
`GVariant *value = g_variant_new ("(b@as)", TRUE, g_variant_new_strv (NULL, 0));`
which looked strange - why the empty strv?

It turns out that this is a historical legacy of the time when
ostree had pack files.  And nothing actually cares about the values
of these variants; we should have an API that returns a proper set,
and not a hash.

But...since all of these things have exactly the same value, instead
of allocating lots of redundant copies on the heap, just have
them all hold a refcount on a shared value.

This cuts the heap usage from 20MB to 13MB on a test FCOS repository
build.
2022-06-07 20:35:37 -04:00
Joseph Marrero Corchado 2b6f506f70
Merge pull request #2631 from cgwalters/release-2022-4
Release 2022.4
2022-06-06 12:49:42 -04:00