Commit Graph

5800 Commits

Author SHA1 Message Date
Simon McVittie e7e5461197 Revert "d/test.sh, d/tests: Unset SOURCE_DATE_EPOCH"
This reverts commit d18bfcc689.
2021-08-20 12:28:31 +01:00
Simon McVittie 412e3b17a2 d/gbp.conf: Switch branch back to debian/master 2021-08-20 12:28:11 +01:00
Luca Bruno 3209acbdbe
Merge pull request #2415 from lucab/ups/checksum-canonical-perms
lib/checkout: use canonical permissions in bare-user-only mode
2021-08-19 17:00:14 +00:00
Luca BRUNO d41fcd17a7
lib/repo/checkout: use canonical perms in bare-user-only mode
This automatically enables canonical permissions for checkouts in
bare-user-only mode.
2021-08-19 16:09:54 +00:00
Luca BRUNO c6b72f527b
lib/core/checksum: add flag to use canonical permissions
This adds a new `OSTREE_CHECKSUM_FLAGS_CANONICAL_PERMISSIONS`
checksumming flag, which is needed in bare-user-only mode
to ignore local IDs.
2021-08-19 14:08:36 +00:00
Colin Walters cac4f2133b
Merge pull request #2414 from lucab/ups/cli-commit-modifier-autoptr
builtins/commit: move commit modifier to auto-cleanup
2021-08-18 09:10:17 -04:00
Colin Walters 6cd585774f
Merge pull request #2411 from lucab/ups/cli-commit-errors
builtins/commit: check for conflicting permissions options
2021-08-18 07:59:12 -04:00
Luca BRUNO b079c11381
builtins/commit: move commit modifier to auto-cleanup
This reduces the usage of goto cleanup logic by porting the commit
modifier pointer to autoptr.
2021-08-18 09:06:26 +00:00
Luca BRUNO 5a3d5fb86f
builtins/commit: check for conflicting permissions options
This explicitly checks for commit command options asking for both
non-zero UID/GID and canonical permissions at the same time,
which are incompatible.
2021-08-18 08:16:26 +00:00
Luca Bruno 87db562744
Merge pull request #2409 from jlebon/pr/cov-fixes
A couple of Coverity fixes
2021-08-04 06:13:37 +00:00
Jonathan Lebon 0f95e4e5ee ostree/dump: Fix free'ing a static string
Reported-by: Seth Arnold <seth.arnold@canonical.com>
2021-08-03 16:49:49 -04:00
Jonathan Lebon 738831c50b lib/sysroot: Fix error message about creating `/var/lib`
Reported-by: Seth Arnold <seth.arnold@canonical.com>
2021-08-03 16:49:49 -04:00
Jonathan Lebon 75b17937cf lib/sign-dummy: Handle incorrect signatures correctly
We need to check all signatures for one which passes, not just fail on
the first one.

Reported-by: Seth Arnold <seth.arnold@canonical.com>
2021-08-03 16:49:49 -04:00
Colin Walters a3ce5df22e
Merge pull request #2408 from bgilbert/workflow
workflows: bump lint toolchain; restrict repository access
2021-07-28 20:27:35 -04:00
Benjamin Gilbert d9483f89ad workflows: limit permissions to reading repo contents
Move the existing docs permissions stanza to the top of the workflow for
consistency.
2021-07-28 18:32:04 -04:00
Benjamin Gilbert 079528971c workflows: bump lint toolchain 2021-07-28 18:30:33 -04:00
Luca Bruno 5023278293
Merge pull request #2406 from liujianqiang-niu/main
fix: Avoid wild pointers
2021-07-28 08:26:45 +00:00
刘建强 28174970c7 fix: Avoid wild pointers
Pointer command is dangerous if there is no assignment.

Log: Avoid wild pointers
2021-07-28 09:40:37 +08:00
Luca Bruno 835b114192
Merge pull request #2407 from smcv/tests-source-date-epoch
tests: Unset SOURCE_DATE_EPOCH
2021-07-26 11:52:06 +00:00
Simon McVittie 2c5fa2cdb6 tests: Unset SOURCE_DATE_EPOCH
Some distributions set this during build in order to have reproducible
builds from the same source code: for example, Debian uses the date
from debian/changelog.

However, some of our tests assume that `ostree commit` will result in
a commit with the current date/time, and SOURCE_DATE_EPOCH breaks that
assumption. Unset it for our build-time tests.

Resolves: https://github.com/ostreedev/ostree/issues/2405
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-07-26 11:48:45 +01:00
Simon McVittie f3cc673e93 Release to experimental 2021-07-25 19:19:08 +01:00
Simon McVittie d18bfcc689 d/test.sh, d/tests: Unset SOURCE_DATE_EPOCH
Otherwise, some tests will think we're downgrading, and fail.
2021-07-25 19:18:46 +01:00
Simon McVittie 2da0bfe71e Drop patches that were applied upstream 2021-07-25 19:04:34 +01:00
Simon McVittie 0e295fe6b5 Update changelog 2021-07-25 19:03:31 +01:00
Simon McVittie 3cfbcac435 d/libostree-1-1.symbols: Remove a duplicate symbol 2021-07-25 19:02:24 +01:00
Simon McVittie c41ffe426c d/libostree-1-1.symbols: Update 2021-07-25 19:02:11 +01:00
Simon McVittie 6c735251f8 Increase build-dependency to GLib 2.44 2021-07-25 18:58:53 +01:00
Simon McVittie 9f49cbd7b7 New upstream release 2021-07-25 18:58:27 +01:00
Simon McVittie 8b657ccb14 Update upstream source from tag 'upstream/2021.3'
Update to upstream version '2021.3'
with Debian dir 8860039737
2021-07-25 18:38:19 +01:00
Simon McVittie 5e89318de3 New upstream version 2021.3 2021-07-25 18:38:13 +01:00
Simon McVittie 21615c2179 Update changelog 2021-07-25 16:53:41 +01:00
Dan Nicholson 81df5c8aba fixup! lib/repo: Add ostree_repo_remote_get_gpg_keys() 2021-07-15 17:03:45 -06:00
Dan Nicholson 814e481fff fixup! bin/remote: Add list-gpg-keys subcommand 2021-07-15 16:25:13 -06:00
Dan Nicholson 30c054b521 fixup! lib/repo: Add ostree_repo_remote_get_gpg_keys() 2021-07-15 16:24:36 -06:00
Dan Nicholson 90a3bda1f8 bin/remote: Include update URLs in list-gpg-keys 2021-07-15 15:50:04 -06:00
Dan Nicholson 27dc5d7d38 lib/repo: Include WKD update URLs in GPG key listing
If the key UID contains a valid email address, include the GPG WKD
update URLs in GVariant returned by ostree_repo_remote_get_gpg_keys().
2021-07-15 15:50:04 -06:00
Dan Nicholson 4fa403aee5 libotutil: Add helper for GPG WKD update URLs
Calculate the advanced and direct update URLs for the key discovery
portion[1] of the OpenPGP Web Key Directory specification, and include
the URLs in the key listing in ostree_repo_remote_get_gpg_keys(). These
URLs can be used to locate updated GPG keys for the remote.

1. https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service#section-3.1
2021-07-15 15:50:04 -06:00
Dan Nicholson fbff05e28d libotutil: Import implementation of zbase32 encoding
This will be used to implement the PGP Web Key Directory (WKD) URL
generation. This is a slightly cleaned up implementation[1] taken from
the zbase32 author's original implementation[2]. It provides a single
zbase32_encode API to convert a set of bytes to the zbase32 encoding.

I believe this should be acceptable for inclusion in ostree. The license
in the source files is BSD style while the original repo LICENSE file
claims the Creative Commons CC0 1.0 Universal license, which is public
domain.

1. https://github.com/dbnicholson/libbase32/tree/for-ostree
2. https://github.com/zooko/libbase32
2021-07-15 15:50:04 -06:00
Dan Nicholson 74fb0c5f78 bin/remote: Add list-gpg-keys subcommand
This provides a wrapper for the `ostree_repo_remote_get_gpg_keys`
function to show the GPG keys associated with a remote. This is
particularly useful for validating that GPG key updates have been
applied. Tests are added, which checks the
`ostree_repo_remote_get_gpg_keys` API by extension.
2021-07-15 15:50:04 -06:00
Dan Nicholson a50f6d0b9f lib/repo: Add ostree_repo_remote_get_gpg_keys()
This function enumerates the trusted GPG keys for a remote and returns
an array of `GVariant`s describing them. This is useful to see which
keys are collected by ostree for a particular remote. The same
information can be gathered with `gpg`. However, since ostree allows
multiple keyring locations, that's only really useful if you have
knowledge of how ostree collects GPG keyrings.

The format of the variants is documented in
`OSTREE_GPG_KEY_GVARIANT_FORMAT`. This format is primarily a copy of
selected fields within `gpgme_key_t` and its subtypes. The fields are
placed within vardicts rather than using a more efficient tuple of
concrete types. This will allow flexibility if more components of
`gpgme_key_t` are desired in the future.
2021-07-15 15:50:04 -06:00
Dan Nicholson fc073654dc lib/repo: Allow preparing GPG verifier without global keyrings
Currently the verifier decides whether to include the global keyrings
based on whether the specified remote has its own keyring or not. Allow
callers to exclude the global keyrings even when that's not the case.
This will be used in a subsequent commit in order to get the GPG keys
only associated with a remote.
2021-07-15 15:50:04 -06:00
Dan Nicholson c8715c123e lib/repo: Factor out GPG verifier preparation
In order to use the GPG verifier, it needs to be seeded with GPG keys
after instantation. Currently this is only used for verifying data, but
it will also be used for getting a list of trusted GPG keys in a
subsequent commit.
2021-07-15 15:50:04 -06:00
Dan Nicholson dba2cdcbac lib/repo: Factor out GPG verifier key imports
Currently the verifier only imports all the GPG keys when verifying
data, but it would also be useful for inspecting the trusted keys.
2021-07-15 15:50:04 -06:00
Jonathan Lebon 420952595b
Merge pull request #2398 from bgilbert/statoverride
man: improve statoverride description
2021-07-14 17:11:02 -04:00
Benjamin Gilbert 5b5d3b12fb man: improve statoverride description
A statoverride file written in the obvious way will produce incorrect
results for two independent reasons.  Document them.
2021-07-14 16:34:35 -04:00
Colin Walters f216a3c170
Merge pull request #2396 from ostreedev/release-2021.3
Release 2021.3
2021-07-12 13:08:48 -04:00
Luca BRUNO 3f852d9443
configure: post-release version bump 2021-07-12 08:40:14 +00:00
Luca BRUNO 38c14b3745
Release 2021.3 2021-07-12 08:38:38 +00:00
Colin Walters a8bf003a97
Merge pull request #2394 from lucab/ups/workflow-release
ci/release-build: evaluate package_version from m4 definition
2021-07-09 22:53:43 -04:00
Luca BRUNO d573b8dc2f
ci/release-build: evaluate package_version from m4 definition
This fixes the ci-release-build.sh script to directly source
and evaluate 'package_version' from its m4 definition, without
requiring a fully configured source tree.
2021-07-09 16:17:31 +00:00