ostree.git
3 years agoMerge pull request #2772 from lucab/ups/bump-msrv
Colin Walters [Mon, 21 Nov 2022 16:32:28 +0000 (11:32 -0500)]
Merge pull request #2772 from lucab/ups/bump-msrv

cargo: bump minimum Rust version to 1.63

3 years agocargo: bump minimum Rust version to 1.63
Luca BRUNO [Fri, 18 Nov 2022 09:13:12 +0000 (09:13 +0000)]
cargo: bump minimum Rust version to 1.63

This bumps MSRV to 1.63, in order to prepare for the next version
of gtk-rs stack.

Ref: https://gtk-rs.org/blog/2022/10/18/new-release.html

3 years agoMerge pull request #2774 from cgwalters/ci-fedora-fix
Colin Walters [Mon, 21 Nov 2022 14:15:23 +0000 (09:15 -0500)]
Merge pull request #2774 from cgwalters/ci-fedora-fix

ci: Fix case where cosa != buildroot

3 years agoMerge pull request #2777 from Razaloc/wip/rafaelgarrui/deletepresent
Dan Nicholson [Mon, 21 Nov 2022 13:38:23 +0000 (06:38 -0700)]
Merge pull request #2777 from Razaloc/wip/rafaelgarrui/deletepresent

Idempotent delete operation for  OstreeKernelArgs

3 years agoci: Fix case where cosa != buildroot
Colin Walters [Fri, 18 Nov 2022 15:42:58 +0000 (10:42 -0500)]
ci: Fix case where cosa != buildroot

We can't override host binaries in this case.  We'll need
to watch carefully and verify we're still testing things.

3 years agoIdempotent delete operation for OstreeKernelArgs
Rafael Garcia Ruiz [Fri, 18 Nov 2022 17:24:01 +0000 (18:24 +0100)]
Idempotent delete operation for  OstreeKernelArgs

ostree_kernel_args_delete_if_present checks if an argument is present
in OstreeKernelArgs and delete it.

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
3 years agoMerge pull request #2773 from pwithnall/typo-fix
Colin Walters [Fri, 18 Nov 2022 16:35:30 +0000 (11:35 -0500)]
Merge pull request #2773 from pwithnall/typo-fix

Improve a help string for ostree-commit

3 years agoot-builtin-commit: Don’t mention a C function name in a help string
Philip Withnall [Fri, 18 Nov 2022 15:41:59 +0000 (15:41 +0000)]
ot-builtin-commit: Don’t mention a C function name in a help string

Instead mention the formal name of the format accepted by
`g_variant_parse()`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agoot-builtin-commit: Fix a typo in a command line help string
Philip Withnall [Fri, 18 Nov 2022 15:40:42 +0000 (15:40 +0000)]
ot-builtin-commit: Fix a typo in a command line help string

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
3 years agoMerge pull request #2771 from Razaloc/wip/rafaelgarrui/contains
Dan Nicholson [Fri, 18 Nov 2022 13:13:27 +0000 (06:13 -0700)]
Merge pull request #2771 from Razaloc/wip/rafaelgarrui/contains

ostree_kernel_args_contains for OstreeKernelArgs

3 years agoostree_kernel_args_contains for OstreeKernelArgs
Rafael Garcia Ruiz [Thu, 17 Nov 2022 13:49:08 +0000 (14:49 +0100)]
ostree_kernel_args_contains for OstreeKernelArgs

Check if an argument is present in OstreeKernelArgs. This is a way to
make easier idempotent append and delete operations.
ostree_kernel_args_append_if_missing uses it to avoid inserting a
duplicate key.

Closes #2329

Signed-off-by: Rafael Garcia Ruiz <rafael.garcia@collabora.com>
3 years agoMerge pull request #2765 from cgwalters/drop-openat
Joseph Marrero Corchado [Sun, 13 Nov 2022 18:08:43 +0000 (13:08 -0500)]
Merge pull request #2765 from cgwalters/drop-openat

rust: Drop `openat` dependency

3 years agoMerge pull request #2751 from smcv/memdup2
Colin Walters [Sun, 13 Nov 2022 15:50:39 +0000 (10:50 -0500)]
Merge pull request #2751 from smcv/memdup2

Replace calls to g_memdup() with g_memdup2()

3 years agorust: Drop `openat` dependency
Colin Walters [Fri, 11 Nov 2022 20:11:55 +0000 (15:11 -0500)]
rust: Drop `openat` dependency

We can use cap-std in our tests.

3 years agoMerge pull request #2764 from cgwalters/bump-cap-std
Joseph Marrero Corchado [Sat, 12 Nov 2022 19:21:59 +0000 (14:21 -0500)]
Merge pull request #2764 from cgwalters/bump-cap-std

rust: Update to cap-std 1.0

3 years agoReplace calls to g_memdup() with g_memdup2()
Simon McVittie [Fri, 28 Oct 2022 11:19:29 +0000 (12:19 +0100)]
Replace calls to g_memdup() with g_memdup2()

g_memdup() is subject to an integer overflow on 64-bit machines if the
object being copied is larger than UINT_MAX bytes. I suspect none of
these objects can actually be that large in practice, but it's easier
to replace all the calls than it is to assess whether we need to
replace them.

A backport in libglnx is used on systems where GLib is older than 2.68.x.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agorust: Update to cap-std 1.0
Colin Walters [Fri, 11 Nov 2022 20:08:10 +0000 (15:08 -0500)]
rust: Update to cap-std 1.0

This was one source of our semver bumps; let's switch to 1.0.

3 years agoMerge pull request #2763 from cgwalters/testiso-more-memory
Colin Walters [Fri, 11 Nov 2022 21:11:26 +0000 (16:11 -0500)]
Merge pull request #2763 from cgwalters/testiso-more-memory

ci: Bump memory for ISO testing flow

3 years agoci: Bump memory for ISO testing flow
Colin Walters [Fri, 11 Nov 2022 20:03:30 +0000 (15:03 -0500)]
ci: Bump memory for ISO testing flow

It seems likely that we're allocating more RAM here.  What we really
need to do is for cosa to express the necessary RAM
requirements declaratively, then we compute pod requirements
from that.

3 years agoMerge pull request #2762 from lucab/ups/copr-tags
Colin Walters [Fri, 11 Nov 2022 19:08:36 +0000 (14:08 -0500)]
Merge pull request #2762 from lucab/ups/copr-tags

copr: only use libostree tags

3 years agocopr: only use libostree tags
Luca BRUNO [Fri, 11 Nov 2022 14:05:56 +0000 (14:05 +0000)]
copr: only use libostree tags

This adds a tag filter to the logic which emits version labels for
COPR build, so that it avoids mistakenly picking up tags belonging
to the Rust bindings.

3 years agoMerge pull request #2760 from cgwalters/offline-deploy-no-bwrap
Luca Bruno [Fri, 11 Nov 2022 10:16:17 +0000 (10:16 +0000)]
Merge pull request #2760 from cgwalters/offline-deploy-no-bwrap

deploy: Don't rebuild selinux policy on first deployment

3 years agoMerge pull request #2754 from cgwalters/remove-readdir-rand
Colin Walters [Thu, 10 Nov 2022 10:59:36 +0000 (05:59 -0500)]
Merge pull request #2754 from cgwalters/remove-readdir-rand

Remove readdir-rand

3 years agoMerge pull request #2759 from oglok/http_500
Colin Walters [Wed, 9 Nov 2022 20:34:08 +0000 (15:34 -0500)]
Merge pull request #2759 from oglok/http_500

Enabling retry for HTTP 500 internal server error

3 years agodeploy: Don't rebuild selinux policy on first deployment
Colin Walters [Wed, 9 Nov 2022 16:18:36 +0000 (11:18 -0500)]
deploy: Don't rebuild selinux policy on first deployment

Basically, it should not be necessary - the policy should be
up-to-date.  We don't want to force on continual policy rebuilds.

Even trying to run bwrap when we're *not* in a booted
root can cause failures in nested containerization scenarios.

Closes: https://github.com/ostreedev/ostree/issues/2758
3 years agoAdd tests for cases under random 500s
Ricardo Noriega [Wed, 9 Nov 2022 09:52:16 +0000 (10:52 +0100)]
Add tests for cases under random 500s

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
3 years agoEnabling retry for HTTP 500 internal server error
Ricardo Noriega [Fri, 28 Oct 2022 11:59:08 +0000 (13:59 +0200)]
Enabling retry for HTTP 500 internal server error

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Use G_IO_ERROR_BUSY to represent 500 error

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Make G_IO_ERROR_BUSY independent from glib version

Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
3 years agoMerge pull request #2756 from ostreedev/dependabot/submodules/libglnx-4e44fd9
Colin Walters [Fri, 4 Nov 2022 15:47:43 +0000 (11:47 -0400)]
Merge pull request #2756 from ostreedev/dependabot/submodules/libglnx-4e44fd9

build(deps): bump libglnx from `e701578` to `4e44fd9`

3 years agobuild(deps): bump libglnx from `e701578` to `4e44fd9`
dependabot[bot] [Wed, 2 Nov 2022 12:32:15 +0000 (12:32 +0000)]
build(deps): bump libglnx from `e701578` to `4e44fd9`

Bumps libglnx from `e701578` to `4e44fd9`.

---
updated-dependencies:
- dependency-name: libglnx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoRemove readdir-rand
Colin Walters [Mon, 31 Oct 2022 13:00:28 +0000 (09:00 -0400)]
Remove readdir-rand

This was only there to reproduce a bug we hit long ago
with bootloader file ordering.  We're extremely unlikely
to reintroduce such a bug, and it's not worth carrying around
this code.

3 years agoMerge pull request #2752 from smcv/copy-dirent
Colin Walters [Mon, 31 Oct 2022 12:58:21 +0000 (08:58 -0400)]
Merge pull request #2752 from smcv/copy-dirent

readdir-rand: Copy full size of struct dirent

3 years agoreaddir-rand: Copy full size of struct dirent
Simon McVittie [Fri, 28 Oct 2022 11:21:29 +0000 (12:21 +0100)]
readdir-rand: Copy full size of struct dirent

As noted in readdir(3), in the presence of long filenames it is
possible for a directory entry to be larger than `sizeof (struct dirent)`.
Copy the full length instead.

Signed-off-by: Simon McVittie <smcv@collabora.com>
3 years agoMerge pull request #2749 from lucab/ups/cargo-releases
Luca Bruno [Fri, 28 Oct 2022 07:26:08 +0000 (07:26 +0000)]
Merge pull request #2749 from lucab/ups/cargo-releases

cargo: prepare ostree 0.16.0 and ostree-sys 0.11.0

3 years agocargo: prepare ostree 0.16.0 and ostree-sys 0.11.0
Luca BRUNO [Thu, 27 Oct 2022 13:26:17 +0000 (13:26 +0000)]
cargo: prepare ostree 0.16.0 and ostree-sys 0.11.0

This prepares for a new release of both crates, now using the
gtk-rs 0.15 stack.

3 years agoMerge pull request #2748 from lucab/ups/ci-rust-bump-libostree-git
Luca Bruno [Thu, 27 Oct 2022 14:19:38 +0000 (14:19 +0000)]
Merge pull request #2748 from lucab/ups/ci-rust-bump-libostree-git

ci/rust: test from git using latest feature

3 years agoci/rust: test from git using latest feature
Luca BRUNO [Thu, 27 Oct 2022 12:58:43 +0000 (12:58 +0000)]
ci/rust: test from git using latest feature

3 years agoMerge pull request #2743 from lucab/ups/gtk-rs-0.15
Luca Bruno [Thu, 27 Oct 2022 12:24:05 +0000 (12:24 +0000)]
Merge pull request #2743 from lucab/ups/gtk-rs-0.15

rust-bindings: regenerate for gtk-rs 0.15

3 years agorust/ostree: regenerate for gtk-rs 0.15
Luca BRUNO [Tue, 25 Oct 2022 13:03:52 +0000 (13:03 +0000)]
rust/ostree: regenerate for gtk-rs 0.15

3 years agorust/ostree-sys: regenerate for gtk-rs 0.15
Luca BRUNO [Tue, 25 Oct 2022 09:19:51 +0000 (09:19 +0000)]
rust/ostree-sys: regenerate for gtk-rs 0.15

3 years agorust: update pinned gir tool to 0.15
Luca BRUNO [Tue, 25 Oct 2022 08:46:34 +0000 (08:46 +0000)]
rust: update pinned gir tool to 0.15

3 years agoMerge pull request #2742 from lucab/ups/rust-regenerate-2022.6
Colin Walters [Wed, 26 Oct 2022 13:15:14 +0000 (09:15 -0400)]
Merge pull request #2742 from lucab/ups/rust-regenerate-2022.6

rust: regenerate bindings after latest release (2022.6)

3 years agoMerge pull request #2745 from lucab/ups/ci-bump-rust-linting
Colin Walters [Wed, 26 Oct 2022 13:15:01 +0000 (09:15 -0400)]
Merge pull request #2745 from lucab/ups/ci-bump-rust-linting

ci/rust: bump linting toolchain to latest stable (1.64)

3 years agoMerge pull request #2746 from lucab/ups/lib-repo-refs-error
Colin Walters [Wed, 26 Oct 2022 13:14:48 +0000 (09:14 -0400)]
Merge pull request #2746 from lucab/ups/lib-repo-refs-error

lib/repo-refs: properly return an error value

3 years agolib/repo-refs: properly return an error value
Luca BRUNO [Wed, 26 Oct 2022 11:12:37 +0000 (11:12 +0000)]
lib/repo-refs: properly return an error value

This tweaks a logic check in order to return a proper error value
when the related condition is not satisfied.

3 years agoMerge pull request #2740 from lucab/ups/lib-sign-ed25519-assertions
Colin Walters [Wed, 26 Oct 2022 10:33:04 +0000 (06:33 -0400)]
Merge pull request #2740 from lucab/ups/lib-sign-ed25519-assertions

lib/sign-ed25519: convert invariant checks to assertions

3 years agoci/rust: bump linting toolchain to latest stable (1.64)
Luca BRUNO [Wed, 26 Oct 2022 06:46:09 +0000 (06:46 +0000)]
ci/rust: bump linting toolchain to latest stable (1.64)

This bumps the Rust toolchain for clippy/rustfmt to 1.64.

3 years agorust: update manual helpers
Luca BRUNO [Mon, 24 Oct 2022 16:01:57 +0000 (16:01 +0000)]
rust: update manual helpers

3 years agoostree: manually patch generated files
Luca BRUNO [Fri, 4 Mar 2022 14:28:35 +0000 (14:28 +0000)]
ostree: manually patch generated files

This manually adds a missing `ToGlibPtr` import, which seems to be result
of some bugs in `gir` code-generation.

3 years agorust: regenerate bindings after latest release (2022.6)
Luca BRUNO [Mon, 24 Oct 2022 15:23:47 +0000 (15:23 +0000)]
rust: regenerate bindings after latest release (2022.6)

3 years agolib/sign-ed25519: convert invariant checks to assertions
Luca BRUNO [Fri, 21 Oct 2022 08:43:22 +0000 (08:43 +0000)]
lib/sign-ed25519: convert invariant checks to assertions

This converts several invariant checks to asserts. Most of the
functions in this file were already using assertions, so this aligns
the remaining few outliers to the rest.

3 years agoMerge pull request #2744 from lucab/ups/ci-memory-bump
Luca Bruno [Wed, 26 Oct 2022 09:23:29 +0000 (09:23 +0000)]
Merge pull request #2744 from lucab/ups/ci-memory-bump

ci: bump cosaPod memory requirement to 5Gi

3 years agoci: bump cosaPod memory requirement to 5Gi
Jonathan Lebon [Tue, 25 Oct 2022 13:58:01 +0000 (09:58 -0400)]
ci: bump cosaPod memory requirement to 5Gi

We're hitting memory limits when running the reprovisioning tests. We
should investigate why we need 1Gi of overhead, but for now to get
unblocked let's just bump it.

3 years agoMerge pull request #2663 from mstuehn/test-static-delta-file
Colin Walters [Wed, 19 Oct 2022 21:04:40 +0000 (17:04 -0400)]
Merge pull request #2663 from mstuehn/test-static-delta-file

lib/static-delta: document and check parameters format

3 years agorust/tests: fix static delta generation testcase
Luca BRUNO [Tue, 11 Oct 2022 09:03:40 +0000 (09:03 +0000)]
rust/tests: fix static delta generation testcase

3 years agolib/static-delta: document and check parameters format
Luca BRUNO [Tue, 11 Oct 2022 08:50:10 +0000 (08:50 +0000)]
lib/static-delta: document and check parameters format

This enhances the logic handling GVariant parameters within
`ostree_repo_static_delta_generate()`.
Several of those entries are expected to be zero-terminated values,
and this implicit assumption has been observed to be an hidden trap
in languages where strings and arrays may not carry a terminator value
(e.g. Rust).
In order to improve the situation, this makes the documentation more
explicit and actively tries to catch invalid input parameters.

3 years agoAdd test for generating static delta to file
Manuel Stühn [Thu, 30 Jun 2022 07:06:30 +0000 (09:06 +0200)]
Add test for generating static delta to file

3 years agoMerge pull request #2733 from ostreedev/dependabot/submodules/libglnx-e701578
Luca Bruno [Thu, 13 Oct 2022 15:36:28 +0000 (15:36 +0000)]
Merge pull request #2733 from ostreedev/dependabot/submodules/libglnx-e701578

build(deps): bump libglnx from `26375b5` to `e701578`

3 years agoMerge pull request #2738 from lucab/ups/lib-zipl-check-open-errors
Jonathan Lebon [Thu, 13 Oct 2022 15:22:38 +0000 (11:22 -0400)]
Merge pull request #2738 from lucab/ups/lib-zipl-check-open-errors

3 years agoci: Use new names for custom kola steps
Jonathan Lebon [Thu, 13 Oct 2022 13:18:08 +0000 (09:18 -0400)]
ci: Use new names for custom kola steps

The old `fcos*` versions are deprecated now:
https://github.com/coreos/coreos-ci-lib/pull/111

3 years agoci: Drop unnecessary outer stage
Jonathan Lebon [Thu, 13 Oct 2022 13:16:19 +0000 (09:16 -0400)]
ci: Drop unnecessary outer stage

We define stages inside of this stage, so get rid of the outer `FCOS`
stage. This should help rendering the pipeline in BlueOcean more
clearly.

3 years agoci: Bump memory request, use fcosKolaTestIso
Jonathan Lebon [Thu, 13 Oct 2022 13:14:08 +0000 (09:14 -0400)]
ci: Bump memory request, use fcosKolaTestIso

More fallout from https://github.com/coreos/coreos-ci-lib/pull/116. We
need to be more honest about how much memory we need.

While we're here, switch the `kola testiso` invocation to use
`fcosKolaTestIso` instead. This will add coverage for UEFI and UEFI
SecureBoot testing.

3 years agoMerge pull request #2737 from lucab/ups/repo-checkout-fix-uid-typo
Dan Nicholson [Thu, 13 Oct 2022 12:41:55 +0000 (06:41 -0600)]
Merge pull request #2737 from lucab/ups/repo-checkout-fix-uid-typo

lib/repo-checkout: fix typo in error message

3 years agolib/bootloader-zipl: check for errors when opening initrd
Luca BRUNO [Thu, 13 Oct 2022 10:48:38 +0000 (10:48 +0000)]
lib/bootloader-zipl: check for errors when opening initrd

This adds a missing error check when opening an initrd in s390x
Secure Execution (SE) logic.
It was detected by RH internal static checks.

3 years agolib/repo-checkout: fix typo in error message
Luca BRUNO [Thu, 13 Oct 2022 10:38:11 +0000 (10:38 +0000)]
lib/repo-checkout: fix typo in error message

This fixes a typo in an error message, resulting in a GID vs UID
mixup. It was detected by RH internal static checks.

3 years agobuild(deps): bump libglnx from `26375b5` to `e701578`
dependabot[bot] [Tue, 11 Oct 2022 12:29:06 +0000 (12:29 +0000)]
build(deps): bump libglnx from `26375b5` to `e701578`

Bumps libglnx from `26375b5` to `e701578`.

---
updated-dependencies:
- dependency-name: libglnx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agoMerge pull request #2730 from ostreedev/release-2022.6
Luca Bruno [Fri, 7 Oct 2022 16:40:10 +0000 (16:40 +0000)]
Merge pull request #2730 from ostreedev/release-2022.6

Release 2022.6

3 years agoconfigure: post-release version bump
Luca BRUNO [Fri, 7 Oct 2022 07:56:24 +0000 (07:56 +0000)]
configure: post-release version bump

3 years agoRelease 2022.6
Luca BRUNO [Fri, 7 Oct 2022 07:54:09 +0000 (07:54 +0000)]
Release 2022.6

3 years agoMerge pull request #2721 from cgwalters/link-otto
Luca Bruno [Wed, 28 Sep 2022 21:54:53 +0000 (21:54 +0000)]
Merge pull request #2721 from cgwalters/link-otto

README.md: Link otto

3 years agoMerge pull request #2717 from mangelajo/support-whiteouts
Colin Walters [Wed, 28 Sep 2022 12:35:24 +0000 (08:35 -0400)]
Merge pull request #2717 from mangelajo/support-whiteouts

Support overlayfs whiteouts on checkout

3 years agoREADME.md: Link otto
Colin Walters [Wed, 28 Sep 2022 12:30:18 +0000 (08:30 -0400)]
README.md: Link otto

Another project in the ostree/container space.

3 years agoSupport overlayfs whiteouts on checkout
Miguel Angel Ajo [Mon, 19 Sep 2022 15:15:24 +0000 (17:15 +0200)]
Support overlayfs whiteouts on checkout

Introduces an intermediate format for overlayfs storage, where
.wh-ostree. prefixed files will be converted into char 0:0
whiteout devices used by overlayfs to mark deletions across layers.

The CI scripts now uses a volume for the scratch directories
previously in /var/tmp otherwise we cannot create whiteout
devices into an overlayfs mounted filesystem.

Related-Issue: #2712

3 years agoMerge pull request #2720 from lucab/ups/lib-deploy-ignore-result
Luca Bruno [Mon, 26 Sep 2022 12:40:04 +0000 (12:40 +0000)]
Merge pull request #2720 from lucab/ups/lib-deploy-ignore-result

lib/sysroot-deploy: explicitly handle `g_variant_lookup` results

3 years agolib/sysroot-deploy: explicitly handle `g_variant_lookup` results
Luca BRUNO [Mon, 26 Sep 2022 07:42:12 +0000 (07:42 +0000)]
lib/sysroot-deploy: explicitly handle `g_variant_lookup` results

This explicitly ignores the results of two optional variant lookups,
in order to pacify a RHT internal static analyzer.

3 years agoMerge pull request #2718 from lucab/ups/repo-initialize-valid-bootloader
Colin Walters [Fri, 23 Sep 2022 15:09:13 +0000 (11:09 -0400)]
Merge pull request #2718 from lucab/ups/repo-initialize-valid-bootloader

lib/repo: properly initialize boolean variable

3 years agolib/repo: properly initialize boolean variable
Luca BRUNO [Fri, 23 Sep 2022 13:02:00 +0000 (13:02 +0000)]
lib/repo: properly initialize boolean variable

This initializes a boolean variable that was previously left
uninitialized. It was detected by a RHT internal static analyzer.

3 years agoMerge pull request #2716 from dbnicholson/max-metadata-size-doc
Colin Walters [Sun, 18 Sep 2022 19:04:54 +0000 (15:04 -0400)]
Merge pull request #2716 from dbnicholson/max-metadata-size-doc

lib/pull: Fix max-metadata-size documentation

3 years agolib/pull: Fix max-metadata-size documentation
Dan Nicholson [Sun, 18 Sep 2022 18:13:31 +0000 (12:13 -0600)]
lib/pull: Fix max-metadata-size documentation

The documented option is incorrect and has been since it's introduction
in 2c55bc6997.

3 years agoMerge pull request #2714 from andreamtp/patch-1
Dan Nicholson [Sat, 17 Sep 2022 18:12:09 +0000 (12:12 -0600)]
Merge pull request #2714 from andreamtp/patch-1

Fix recursive git archive reference

3 years agoFix recursive git archive reference
Andrea Perotti [Sat, 17 Sep 2022 09:00:46 +0000 (11:00 +0200)]
Fix recursive git archive reference

Broken link for "recursive git archive" example

3 years agoMerge pull request #2711 from lucab/ups/sign-assertions
Colin Walters [Fri, 9 Sep 2022 14:05:27 +0000 (10:05 -0400)]
Merge pull request #2711 from lucab/ups/sign-assertions

lib/sign: convert invariant checks to assertions

3 years agolib/sign: convert invariant checks to assertions
Luca BRUNO [Fri, 9 Sep 2022 13:20:43 +0000 (13:20 +0000)]
lib/sign: convert invariant checks to assertions

This converts several invariant checks to asserts. Most of the
functions in this file were already using assertions, so this aligns
the remaining few outliers to the rest.

3 years agoMerge pull request #2709 from lucab/ups/otutils-variant-builder-error
Luca Bruno [Thu, 8 Sep 2022 14:41:53 +0000 (14:41 +0000)]
Merge pull request #2709 from lucab/ups/otutils-variant-builder-error

otutil: add error handling to variant builders

3 years agootutil: add error handling to variant builders
Luca BRUNO [Thu, 8 Sep 2022 13:53:05 +0000 (13:53 +0000)]
otutil: add error handling to variant builders

This enhances a bunch of helpers related to GVariant building, in
order to properly handle errors and avoid some potential cases of
unexpected NULL results.

3 years agoMerge pull request #2708 from nikita-dubrovskii/sh_to_c
Colin Walters [Thu, 8 Sep 2022 11:45:04 +0000 (07:45 -0400)]
Merge pull request #2708 from nikita-dubrovskii/sh_to_c

s390x: drop shell code for `initrd` modification in SE case

3 years agos390x: use 'libarchive' to modify initrd in SE case
Nikita Dubrovskii [Mon, 5 Sep 2022 12:54:03 +0000 (14:54 +0200)]
s390x: use 'libarchive' to modify initrd in SE case

3 years agoMerge pull request #2710 from lucab/ups/lib-mtree-redundant-validation
Luca Bruno [Wed, 7 Sep 2022 13:24:36 +0000 (13:24 +0000)]
Merge pull request #2710 from lucab/ups/lib-mtree-redundant-validation

lib/mtree: drop redundant name checks

3 years agolib/mtree: drop redundant name checks
Luca BRUNO [Wed, 7 Sep 2022 12:33:37 +0000 (12:33 +0000)]
lib/mtree: drop redundant name checks

This drops several NULL checks against filename input argument.
Those checks are both redundant (as filename validation already
checks for that) and dangerous (as they return early without
setting an error value).

3 years agoMerge pull request #2707 from lucab/ups/libostree-bootloader-asserts
Luca Bruno [Tue, 6 Sep 2022 00:36:11 +0000 (00:36 +0000)]
Merge pull request #2707 from lucab/ups/libostree-bootloader-asserts

lib/bootloader: assert invariants

3 years agos390x: simplify 's390x-se-luks-gencpio' script
Nikita Dubrovskii [Mon, 5 Sep 2022 10:08:35 +0000 (12:08 +0200)]
s390x: simplify 's390x-se-luks-gencpio' script

3 years agoMerge pull request #2706 from git-bruh/main
Luca Bruno [Mon, 5 Sep 2022 09:29:29 +0000 (09:29 +0000)]
Merge pull request #2706 from git-bruh/main

ostree-fetcher-curl: check for HTTP2 support before trying to use it

3 years agolib/bootloader: assert invariants
Luca BRUNO [Mon, 5 Sep 2022 09:22:26 +0000 (09:22 +0000)]
lib/bootloader: assert invariants

This tweaks some invariants checks into full assertions, in order
to avoid returning to the caller in case of known invalid states.

3 years agos390x: ensure both 'root' and 'boot' luks keys exist
Nikita Dubrovskii [Thu, 1 Sep 2022 14:34:48 +0000 (16:34 +0200)]
s390x: ensure both 'root' and 'boot' luks keys exist

3 years agoostree-fetcher-curl: check for HTTP2 support before trying to use it
git-bruh [Sat, 3 Sep 2022 07:20:00 +0000 (12:50 +0530)]
ostree-fetcher-curl: check for HTTP2 support before trying to use it

3 years agoMerge pull request #2704 from cgwalters/finalize-no-sigterm
Dan Nicholson [Tue, 30 Aug 2022 22:32:46 +0000 (16:32 -0600)]
Merge pull request #2704 from cgwalters/finalize-no-sigterm

finalize-staged: Don't listen to `SIGTERM`, just let kernel exit us

3 years agofinalize-staged: Don't listen to `SIGTERM`, just let kernel exit us
Colin Walters [Tue, 30 Aug 2022 20:23:38 +0000 (16:23 -0400)]
finalize-staged: Don't listen to `SIGTERM`, just let kernel exit us

Followup from discussion in
https://github.com/ostreedev/ostree/pull/2544#discussion_r958840936

This is more efficient; no need to have the kernel context switch
us in at shutdown time just so we can turn around and call
`exit()`.

3 years agoMerge pull request #2544 from dbnicholson/finalize-block
Colin Walters [Tue, 30 Aug 2022 19:12:32 +0000 (15:12 -0400)]
Merge pull request #2544 from dbnicholson/finalize-block

finalize-staged: Ensure /boot and /sysroot automounts don't expire

3 years agofinalize-staged: Ensure /boot automount doesn't expire
Dan Nicholson [Wed, 16 Feb 2022 22:58:58 +0000 (15:58 -0700)]
finalize-staged: Ensure /boot automount doesn't expire

If `/boot` is an automount, then the unit will be stopped as soon as the
automount expires. That's would defeat the purpose of using systemd to
delay finalizing the deployment until shutdown. This is not uncommon as
`systemd-gpt-auto-generator` will create an automount unit for `/boot`
when it's the EFI System Partition and there's no fstab entry.

To ensure that systemd doesn't stop the service early when the `/boot`
automount expires, introduce a new unit that holds `/boot` open until
it's sent `SIGTERM`. This uses a new `--hold` option for
`finalize-staged` that loads but doesn't lock the sysroot. A separate
unit is used since we want the process to remain active throughout the
finalization run in `ExecStop`. That wouldn't work if it was specified
in `ExecStart` in the same unit since it would be killed before the
`ExecStop` action was run.

Fixes: #2543
3 years agomain: Factor out sysroot loading
Dan Nicholson [Tue, 30 Aug 2022 14:38:36 +0000 (08:38 -0600)]
main: Factor out sysroot loading

It can be useful to parse the options and initialize the sysroot without
actually loading it until later. Factor out the sysroot loading to a new
`ostree_admin_sysroot_load` and add a new
`OSTREE_ADMIN_BUILTIN_FLAG_NO_LOAD` flag to accommodate this.

3 years agoMerge pull request #2695 from HuijingHei/kargs-stage
Colin Walters [Mon, 29 Aug 2022 12:23:15 +0000 (08:23 -0400)]
Merge pull request #2695 from HuijingHei/kargs-stage

Fix `ostree admin kargs edit-in-place` assertion when deployments are pending