ostree.git
4 years agoMerge pull request #2406 from liujianqiang-niu/main
Luca Bruno [Wed, 28 Jul 2021 08:26:45 +0000 (08:26 +0000)]
Merge pull request #2406 from liujianqiang-niu/main

fix: Avoid wild pointers

4 years agofix: Avoid wild pointers
刘建强 [Mon, 26 Jul 2021 01:36:26 +0000 (09:36 +0800)]
fix: Avoid wild pointers

Pointer command is dangerous if there is no assignment.

Log: Avoid wild pointers

4 years agoMerge pull request #2407 from smcv/tests-source-date-epoch
Luca Bruno [Mon, 26 Jul 2021 11:52:06 +0000 (11:52 +0000)]
Merge pull request #2407 from smcv/tests-source-date-epoch

tests: Unset SOURCE_DATE_EPOCH

4 years agotests: Unset SOURCE_DATE_EPOCH
Simon McVittie [Mon, 26 Jul 2021 10:48:45 +0000 (11:48 +0100)]
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>
4 years agoMerge pull request #2398 from bgilbert/statoverride
Jonathan Lebon [Wed, 14 Jul 2021 21:11:02 +0000 (17:11 -0400)]
Merge pull request #2398 from bgilbert/statoverride

man: improve statoverride description

4 years agoman: improve statoverride description
Benjamin Gilbert [Wed, 14 Jul 2021 20:07:16 +0000 (16:07 -0400)]
man: improve statoverride description

A statoverride file written in the obvious way will produce incorrect
results for two independent reasons.  Document them.

4 years agoMerge pull request #2396 from ostreedev/release-2021.3
Colin Walters [Mon, 12 Jul 2021 17:08:48 +0000 (13:08 -0400)]
Merge pull request #2396 from ostreedev/release-2021.3

Release 2021.3

4 years agoconfigure: post-release version bump
Luca BRUNO [Mon, 12 Jul 2021 08:40:14 +0000 (08:40 +0000)]
configure: post-release version bump

4 years agoRelease 2021.3
Luca BRUNO [Mon, 12 Jul 2021 08:38:38 +0000 (08:38 +0000)]
Release 2021.3

4 years agoMerge pull request #2394 from lucab/ups/workflow-release
Colin Walters [Sat, 10 Jul 2021 02:53:43 +0000 (22:53 -0400)]
Merge pull request #2394 from lucab/ups/workflow-release

ci/release-build: evaluate package_version from m4 definition

4 years agoci/release-build: evaluate package_version from m4 definition
Luca BRUNO [Fri, 9 Jul 2021 16:17:31 +0000 (16:17 +0000)]
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.

4 years agoMerge pull request #2392 from bgilbert/no-owners
Colin Walters [Fri, 2 Jul 2021 21:51:33 +0000 (17:51 -0400)]
Merge pull request #2392 from bgilbert/no-owners

OWNERS: remove

4 years agoOWNERS: remove
Benjamin Gilbert [Fri, 2 Jul 2021 21:47:33 +0000 (17:47 -0400)]
OWNERS: remove

Prow is not managing merges on this repo.

4 years agoMerge pull request #2387 from jlebon/pr/ostree-remount-rfkill
Colin Walters [Tue, 22 Jun 2021 18:38:05 +0000 (14:38 -0400)]
Merge pull request #2387 from jlebon/pr/ostree-remount-rfkill

ostree-remount: Order before systemd-rfkill.*

4 years agoMerge pull request #2382 from dbnicholson/gh-tests-configs
Jonathan Lebon [Tue, 22 Jun 2021 18:37:15 +0000 (14:37 -0400)]
Merge pull request #2382 from dbnicholson/gh-tests-configs

4 years agoostree-remount: Order before systemd-rfkill.*
Jonathan Lebon [Tue, 22 Jun 2021 15:18:48 +0000 (11:18 -0400)]
ostree-remount: Order before systemd-rfkill.*

The `systemd-rfkill.*` service falls in the category of early things
that need write access to `/var`, so we need to make sure we run before
or it might hit the read-only sysroot.

The long-term fix for this is
https://github.com/ostreedev/ostree/issues/2115.

Closes: https://github.com/coreos/fedora-coreos-tracker/issues/746
4 years agoMerge pull request #2386 from lucab/ups/commit-timestamp-env
Colin Walters [Tue, 22 Jun 2021 14:32:34 +0000 (10:32 -0400)]
Merge pull request #2386 from lucab/ups/commit-timestamp-env

lib/commit: respect SOURCE_DATE_EPOCH for commit timestamp

4 years agolib/commit: respect SOURCE_DATE_EPOCH for commit timestamp
Luca BRUNO [Tue, 22 Jun 2021 10:42:36 +0000 (10:42 +0000)]
lib/commit: respect SOURCE_DATE_EPOCH for commit timestamp

This tweaks `ostree_repo_write_commit` so that it checks for the
envinroment variable `SOURCE_DATE_EPOCH` as a way to override
the current time, which is used as the commit timestamp.

Ref: https://reproducible-builds.org/docs/source-date-epoch/
Ref: https://reproducible-builds.org/specs/source-date-epoch/

4 years agoMerge pull request #2384 from smcv/dedup-report-err
Luca Bruno [Tue, 22 Jun 2021 11:36:51 +0000 (11:36 +0000)]
Merge pull request #2384 from smcv/dedup-report-err

libtest.sh: Remove duplicate ERR trap and report_err()

4 years agolibtest.sh: Remove duplicate ERR trap and report_err()
Simon McVittie [Tue, 22 Jun 2021 09:37:39 +0000 (10:37 +0100)]
libtest.sh: Remove duplicate ERR trap and report_err()

Since #2377 was merged, this is in libtest-core.sh, which is sourced by
libtest.sh.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoci: Use Debian and Ubuntu release stage tags
Dan Nicholson [Mon, 21 Jun 2021 16:56:53 +0000 (10:56 -0600)]
ci: Use Debian and Ubuntu release stage tags

Rather than use the release codename tags, use the release stage tags.
This way the configuration (theoretically) doesn't need to be updated
when new Debian and Ubuntu releases are made.

For Debian stable is used instead of buster and a testing (bullseye)
build is added. For Ubuntu, latest is used instead of focal for the
current LTS and rolling is used instead of groovy for the latest
release. This actually changes the Ubuntu build from groovy to hirsute.

4 years agoci: Update Debian and Ubuntu build dependencies
Dan Nicholson [Mon, 21 Jun 2021 17:40:07 +0000 (11:40 -0600)]
ci: Update Debian and Ubuntu build dependencies

This refreshes the build dependencies installed for the GitHub Tests
workflow based on the Build-Depends in the upstream packaging. The
handling is now more explicit about any deviations and any release
differences.

4 years agoci: Drop special handling of test-suite.log
Dan Nicholson [Mon, 21 Jun 2021 19:42:20 +0000 (13:42 -0600)]
ci: Drop special handling of test-suite.log

The automake test harness[1] already dumps the contents of
`test-suite.log` when `VERBOSE=1` is set, so we don't need to add
special handling for it.

1. https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html

4 years agoci: Disable fail-fast in GitHub Tests workflow
Dan Nicholson [Mon, 21 Jun 2021 17:55:59 +0000 (11:55 -0600)]
ci: Disable fail-fast in GitHub Tests workflow

Don't cancel all the jobs if one distro config fails. The jobs are
mostly independent, so we do want to let the others continue in case
the failure is isolated to that particular distro configuration.

4 years agoMerge pull request #2379 from dbnicholson/gh-actions-tests
Dan Nicholson [Mon, 21 Jun 2021 16:46:51 +0000 (10:46 -0600)]
Merge pull request #2379 from dbnicholson/gh-actions-tests

Replace Travis CI with GitHub Actions

4 years agoMerge pull request #2377 from smcv/libtest-core
Colin Walters [Mon, 21 Jun 2021 14:12:40 +0000 (10:12 -0400)]
Merge pull request #2377 from smcv/libtest-core

libtest-core: Add some improvements from bubblewrap

4 years agoMerge pull request #2380 from dbnicholson/no-systemd-units
Colin Walters [Sat, 19 Jun 2021 21:31:12 +0000 (17:31 -0400)]
Merge pull request #2380 from dbnicholson/no-systemd-units

Don't fail build when systemd unit path not defined

4 years agoci: So long, Travis CI
Dan Nicholson [Fri, 18 Jun 2021 21:22:39 +0000 (15:22 -0600)]
ci: So long, Travis CI

travis-ci.org stopped running builds on June 15, 2021. Since this
organization is very unlikely to switch to travis-ci.com, just drop the
setup. The new GitHub Actions tests completely replace it.

4 years agoci: Add GitHub Actions workflow for test suite
Dan Nicholson [Fri, 18 Jun 2021 17:33:56 +0000 (11:33 -0600)]
ci: Add GitHub Actions workflow for test suite

This runs the test suite in various distros. The intention is to use
this to replace the Travis CI setup since it often has rate limit
failures.

Each configuration in the matrix runs in a Docker container, installs
system dependencies and then builds and tests ostree. The scripts are
basically copy and paste of the travis ones with some of the lesser used
features pruned out.

Some differences from the travis setup:

* OS details are gathered from `/etc/os-release` instead of being passed
  in as environment variables.

* The scripts always assume the user is root and don't try to use
  `sudo`.

* The `installcheck` test has been removed since ostree doesn't actually
  use that. It could be added to run the installed tests or
  `gnome-desktop-testing-runner` could just be called directly.

There should be enough flexibility to run other distros like Fedora,
Arch or Alpine. Another option would be to use the other build scripts
in ci/.

4 years agoci: Rename GitHub Actions rust workflow metadata file
Dan Nicholson [Fri, 18 Jun 2021 17:00:16 +0000 (11:00 -0600)]
ci: Rename GitHub Actions rust workflow metadata file

This workflow is specific to using rust and not just the general test
suite.

4 years agoDon't fail build when systemd unit path not defined
Dan Nicholson [Fri, 18 Jun 2021 18:35:41 +0000 (12:35 -0600)]
Don't fail build when systemd unit path not defined

In configure the systemd unit path is optional, but in the code it's
assumed to be defined. Add an `#ifdef` that throws an error when it's
not defined like the handling of `HAVE_LIBMOUNT` below it.

4 years agoMerge pull request #2366 from pwithnall/freenode
Jonathan Lebon [Fri, 18 Jun 2021 14:27:45 +0000 (10:27 -0400)]
Merge pull request #2366 from pwithnall/freenode

docs: Change IRC channel to libera.chat from freenode

4 years agoMerge pull request #2375 from cgwalters/generator-remount
Jonathan Lebon [Fri, 18 Jun 2021 14:25:35 +0000 (10:25 -0400)]
Merge pull request #2375 from cgwalters/generator-remount

Use generator to enable ostree-remount.service and ostree-finalize-staged.path

4 years agolibtest-core: Mention bubblewrap as a user of this file
Simon McVittie [Fri, 18 Jun 2021 09:14:01 +0000 (10:14 +0100)]
libtest-core: Mention bubblewrap as a user of this file

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agolibtest-core: Update URL of rpm-ostree
Simon McVittie [Fri, 18 Jun 2021 09:13:36 +0000 (10:13 +0100)]
libtest-core: Update URL of rpm-ostree

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agolibtest-core: On failure, make it clearer what has happened
Simon McVittie [Sun, 18 Apr 2021 11:45:24 +0000 (12:45 +0100)]
libtest-core: On failure, make it clearer what has happened

If we fail as a result of `set -x`, It's often not completely obvious
which command failed or how. Use a trap on ERR to show the command that
failed, and its exit status.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agolibtest-core: Add assert_files_equal
Alexander Larsson [Tue, 26 Nov 2019 08:25:15 +0000 (09:25 +0100)]
libtest-core: Add assert_files_equal

[Originally from bubblewrap commits c5c999a7 "tests: test --userns"
and 3e5fe1bf "tests: Better error message if assert_files_equal fails";
separated into this commit by Simon McVittie.]

4 years agoUse generator to enable ostree-remount.service and ostree-finalize-staged.path
Colin Walters [Wed, 16 Jun 2021 13:26:24 +0000 (09:26 -0400)]
Use generator to enable ostree-remount.service and ostree-finalize-staged.path

We struggled for a long time with enablement of our "internal units",
trying to follow the philosophy that units should only be enabled
by explicit preset.

See https://bugzilla.redhat.com/show_bug.cgi?id=1451458
and https://github.com/coreos/rpm-ostree/pull/1482
etc.

And I just saw chat (RH internal on a proprietary system sadly) where
someone hit `ostree-remount.service` not being enabled in CentOS8.

Thinking about this more, I realized we've shipped a systemd generator
for a long time and while its only role until now was to generate `var.mount`,
but by using it to force on our internal units, we don't require
people to deal with presets anymore.

Basically we're inverting things so that "if ostree= is on the kernel
cmdline, then enable our units" and not "enable our units, but have
them use ConditionKernelCmdline=ostree to skip".

Drop the weird gyrations we were doing around `ostree-finalize-staged.path`
too; forking `systemctl start` is just asking for bugs.

So after this, hopefully we won't ever again have to think about
distribution presets and our units.

4 years agoMerge pull request #2374 from gicmo/small_typo
Dan Nicholson [Tue, 15 Jun 2021 22:16:19 +0000 (16:16 -0600)]
Merge pull request #2374 from gicmo/small_typo

Fix small typo in ostree-sysroot.c

4 years agoFix small typo in ostree-sysroot.c
Christian Kellner [Tue, 15 Jun 2021 21:02:10 +0000 (23:02 +0200)]
Fix small typo in ostree-sysroot.c

4 years agoMerge pull request #2373 from cgwalters/warn-nonempty-var
Jonathan Lebon [Thu, 10 Jun 2021 15:12:30 +0000 (11:12 -0400)]
Merge pull request #2373 from cgwalters/warn-nonempty-var

deploy: Warn if we find content in the deployment's /var

4 years agodeploy: Warn if we find content in the deployment's /var
Colin Walters [Wed, 9 Jun 2021 13:44:09 +0000 (09:44 -0400)]
deploy: Warn if we find content in the deployment's /var

This will be ignored, so let's make it very clear
people are doing something wrong.  Motivated by a bug
in a build pipeline that injected `/var/lib/rpm` into an ostree
commit which ended up crashing rpm-ostree because it was an empty db
which it wasn't expecting.

It *also* turns out rpm-ostree is incorrectly dumping content in the
deployment `/var` today, which is another bug.

4 years agoMerge pull request #2370 from dbnicholson/auto-lock-no-gslice
Dan Nicholson [Mon, 7 Jun 2021 21:04:17 +0000 (15:04 -0600)]
Merge pull request #2370 from dbnicholson/auto-lock-no-gslice

repo: Use g_new for OstreeRepoAutoLock

4 years agorepo: Use g_new for OstreeRepoAutoLock
Dan Nicholson [Mon, 7 Jun 2021 19:14:05 +0000 (13:14 -0600)]
repo: Use g_new for OstreeRepoAutoLock

GSlice is effectively deprecated and has little to no advantage over
using the system allocator on Linux.

4 years agoMerge pull request #2348 from dbnicholson/mt-locking
Colin Walters [Sat, 5 Jun 2021 15:34:09 +0000 (11:34 -0400)]
Merge pull request #2348 from dbnicholson/mt-locking

Improve multi-threaded locking

4 years agotests: Add single process repo locking tests
Dan Nicholson [Thu, 22 Apr 2021 15:10:15 +0000 (09:10 -0600)]
tests: Add single process repo locking tests

The semantics of multiple process locking are covered by
test-concurrency.py, but the semantics of the repository locking from a
single process aren't handled there.

This checks how the repository locking is handled from a single thread
with one OstreeRepo, a single thread with multiple OstreeRepos, and
multiple threads sharing an OstreeRepo.

4 years agotest-concurrency: Lower lock timeout
Dan Nicholson [Mon, 19 Apr 2021 16:03:57 +0000 (10:03 -0600)]
test-concurrency: Lower lock timeout

If there's a locking issue in this test, then it's likely not going to
resolve after a few seconds of serializing access. Lower the default 30
second lock timeout to 5 seconds to prevent the test from hanging
unnecessarily.

4 years agorepo: Make locking precondition failures fatal
Dan Nicholson [Thu, 6 May 2021 22:49:51 +0000 (16:49 -0600)]
repo: Make locking precondition failures fatal

Use `g_error` and `g_assert*` rather than `g_return*` when checking the
locking preconditions so that failures result in the program
terminating. Since this code is protecting filesystem data, we'd rather
crash than delete or corrupt data unexpectedly.

`g_error` is used when the error is due to the caller requesting an
invalid transition like attempting to pop a lock type that hasn't been
taken. It also provides a semi-useful message about what happened.

4 years agorepo: Make locking per-OstreeRepo
Dan Nicholson [Fri, 16 Apr 2021 15:55:40 +0000 (09:55 -0600)]
repo: Make locking per-OstreeRepo

Previously each thread maintained its own lock file descriptor
regardless of whether the thread was using the same `OstreeRepo` as
another thread. This was very safe but it made certain multithreaded
procedures difficult. For example, if a main thread took an exclusive
lock and then spawned worker threads, it would deadlock if one of the
worker threads tried to acquire the lock.

This moves the file descriptor from thread local storage to the
`OstreeRepo` structure so that threads using the same `OstreeRepo` can
share the lock. A mutex guards against threads altering the lock state
concurrently.

Fixes: #2344
4 years agobuild-sys: Bump required GLib to 2.44
Dan Nicholson [Wed, 28 Apr 2021 19:25:38 +0000 (13:25 -0600)]
build-sys: Bump required GLib to 2.44

This will allow usage of `GMutexLocker`. This should be available on
many older distros:

* RHEL 7 - 2.56.1
* RHEL 8 - 2.56.4
* Debian 9 stretch (oldstable) - 2.50.3
* Debian 10 buster (stable) - 2.58.3
* Ubuntu 16.04 xenial - 2.48.2
* Ubuntu 18.04 bionic - 2.56.4

4 years agorepo: Require lock type in ostree_repo_lock_pop
Dan Nicholson [Thu, 29 Apr 2021 03:13:15 +0000 (21:13 -0600)]
repo: Require lock type in ostree_repo_lock_pop

This simplifies the lock state management considerably since the
previously pushed type doesn't need to be tracked. Instead, 2 counters
are kept to track how many times each lock type has been pushed. When
the number of exclusive locks drops to 0, the lock transitions back to
shared.

4 years agorepo: Make locking APIs public
Colin Walters [Thu, 15 Apr 2021 00:43:53 +0000 (20:43 -0400)]
repo: Make locking APIs public

Doing anything even somewhat sophisticated requires this;
turns out our own `ostree prune` CLI wants this, e.g.
https://github.com/ostreedev/ostree/issues/2337

Closes: https://github.com/ostreedev/ostree/issues/2286
4 years agoMerge pull request #2367 from dbnicholson/gpg-2.3.0-expire-test-regression
Dan Nicholson [Thu, 3 Jun 2021 22:56:07 +0000 (16:56 -0600)]
Merge pull request #2367 from dbnicholson/gpg-2.3.0-expire-test-regression

tests/gpg: Don't assert subkey expiration when only primary expired

4 years agodocs: Change IRC channel to libera.chat from freenode
Philip Withnall [Wed, 26 May 2021 09:16:01 +0000 (10:16 +0100)]
docs: Change IRC channel to libera.chat from freenode

Freenode appears to be imploding.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
4 years agotests/gpg: Don't assert subkey expiration when only primary expired
Dan Nicholson [Fri, 28 May 2021 21:23:54 +0000 (15:23 -0600)]
tests/gpg: Don't assert subkey expiration when only primary expired

In gnupg 2.3.0[1], if a primary key is expired and a subkey does not
have an expiration or its expiration is older than the primary key, the
subkey's expiration will be reported as the primary's. Previously a
subkey without an expiration would not report one regardless of the
primary key's expiration.

This caused a regression in a test setting an expiration on a primary
key. The test was checking that the subkey was not expired by asserting
that there was no `Key expired` line in the signature verification
output. With gnupg 2.3.0+, it will show as expired, causing the test to
fail.

Remove the assertion since it's not consistent across gnupg versions. In
practice we don't care whether the subkey is considered expired or not
as long as the signature verification fails when the primary key is
expired.

1. https://dev.gnupg.org/T3343

Fixes: #2359
4 years agoMerge pull request #2364 from cgwalters/fix-ci-f34
Colin Walters [Wed, 26 May 2021 12:58:27 +0000 (08:58 -0400)]
Merge pull request #2364 from cgwalters/fix-ci-f34

ci: Fix staged-delay to work with newer systemd

4 years agoMerge pull request #2365 from dbnicholson/apidoc-permissions
Colin Walters [Tue, 25 May 2021 20:37:07 +0000 (16:37 -0400)]
Merge pull request #2365 from dbnicholson/apidoc-permissions

workflow/docs: Give token write permission to push gh-pages

4 years agoci: Fix staged-delay to work with newer systemd
Colin Walters [Tue, 25 May 2021 20:28:19 +0000 (16:28 -0400)]
ci: Fix staged-delay to work with newer systemd

Yeah, we should stop parsing the text; I need to dig at that
at some point.

4 years agoworkflow/docs: Give token write permission to push gh-pages
Dan Nicholson [Tue, 25 May 2021 20:25:28 +0000 (14:25 -0600)]
workflow/docs: Give token write permission to push gh-pages

The ostree repo has read permissions set for workflows, which prevents
the documentation job from pushing the built docs to the gh-pages
branch. Raise the job's permissions to write for repo contents to allow
that.

4 years agoMerge pull request #2363 from dbnicholson/publish-api-docs
Colin Walters [Tue, 25 May 2021 19:10:47 +0000 (15:10 -0400)]
Merge pull request #2363 from dbnicholson/publish-api-docs

Publish libostree API docs

4 years agodocs: Copy in API docs and add link
Dan Nicholson [Thu, 20 May 2021 22:03:56 +0000 (16:03 -0600)]
docs: Copy in API docs and add link

Make a copy of `apidoc/html` to `docs/reference` and then tell Jekyll to
include it verbatim. This will include the gtk-doc API docs on the
static site. A link is added to the main index.

A script is added to do the copy (a symlink won't do) and is setup to
run before Jekyll in the GitHub workflow. Ideally this would be a local
Jekyll plugin to make the process automatic, but the github-pages gem
doesn't allow that.

4 years agodocs: Add github workflow for building and publishing docs
Dan Nicholson [Thu, 20 May 2021 22:03:25 +0000 (16:03 -0600)]
docs: Add github workflow for building and publishing docs

This uses the Jekyll Actions GitHub action to push the rendered docs to
the gh-pages branch rather than GitHub's automated docs flow. That will
allow greater control over how the docs are generated. Pushing to the
gh-pages branch only happens on pushes to main. For pull requests, the
docs are only built.

4 years agodocs: Provide bundler setup for building site locally
Dan Nicholson [Thu, 20 May 2021 20:48:16 +0000 (14:48 -0600)]
docs: Provide bundler setup for building site locally

This mimics the GitHub Pages environment so that you can build and serve
the site locally for testing. It's will also be required later for using
Jekyll Actions[1] instead of the automated GitHub Pages flow.

1. https://github.com/marketplace/actions/jekyll-actions

4 years agodocs: Fix CONTRIBUTING link
Dan Nicholson [Thu, 20 May 2021 22:42:29 +0000 (16:42 -0600)]
docs: Fix CONTRIBUTING link

This returns a 404 since the site is already generated from the docs
directory. Furthermore, the `CONTRIBUTING.md` markdown file isn't in the
generated site, just the HTML.

Instead, use jekyll's `link` tag to create the link. Unfortunately,
before jekyll 4.0 (github-pages uses 3.9), you have to prepend the base
URL.

4 years agoMerge pull request #2358 from travier/rename
Colin Walters [Tue, 11 May 2021 15:45:38 +0000 (11:45 -0400)]
Merge pull request #2358 from travier/rename

*: rename master branch to main

4 years ago*: rename master branch to main (external repos)
Timothée Ravier [Fri, 7 May 2021 14:44:06 +0000 (16:44 +0200)]
*: rename master branch to main (external repos)

4 years ago*: rename master to main in tests & examples
Timothée Ravier [Fri, 7 May 2021 14:42:37 +0000 (16:42 +0200)]
*: rename master to main in tests & examples

4 years ago*: rename master branch to main
Timothée Ravier [Fri, 7 May 2021 14:38:16 +0000 (16:38 +0200)]
*: rename master branch to main

4 years agopackit: update for F34, rawhide branch & master rename
Timothée Ravier [Fri, 7 May 2021 14:37:56 +0000 (16:37 +0200)]
packit: update for F34, rawhide branch & master rename

4 years agoMerge pull request #2356 from miabbott/usretc
Colin Walters [Mon, 3 May 2021 17:10:09 +0000 (13:10 -0400)]
Merge pull request #2356 from miabbott/usretc

docs: typo fix for /usr/etc

4 years agodocs: typo fix for /usr/etc
Micah Abbott [Mon, 3 May 2021 14:34:01 +0000 (10:34 -0400)]
docs: typo fix for /usr/etc

4 years agoMerge pull request #2355 from jlebon/pr/etc-merge-moar-docs
Dan Nicholson [Fri, 30 Apr 2021 16:14:52 +0000 (10:14 -0600)]
Merge pull request #2355 from jlebon/pr/etc-merge-moar-docs

docs: Add more details about 3-way merge

4 years agodocs: Add more details about 3-way merge
Jonathan Lebon [Fri, 30 Apr 2021 14:50:15 +0000 (10:50 -0400)]
docs: Add more details about 3-way merge

This came up a few times so let's go into more details in the docs.

4 years agoMerge pull request #2354 from cgwalters/fix-gh-action
Jonathan Lebon [Tue, 27 Apr 2021 19:23:02 +0000 (15:23 -0400)]
Merge pull request #2354 from cgwalters/fix-gh-action

ci: Fix GH action for rustfmt

4 years agoMerge pull request #2353 from cgwalters/uri-scheme-hardening
Jonathan Lebon [Tue, 27 Apr 2021 18:09:10 +0000 (14:09 -0400)]
Merge pull request #2353 from cgwalters/uri-scheme-hardening

pull: Cleanly error out on unknown schemes

4 years agopull: Cleanly error out on unknown schemes
Colin Walters [Tue, 27 Apr 2021 15:35:13 +0000 (11:35 -0400)]
pull: Cleanly error out on unknown schemes

Previous to this we'd trip an assertion `abort()` deep in the curl code if e.g.
a user did `ostree remote add foo htttp://...` etc.

Motivated by considering supporting "external remotes" where code outside
ostree does a pull, but we want to reuse the signing verification infrastructure.

4 years agoci: Fix GH action for rustfmt
Colin Walters [Tue, 27 Apr 2021 17:08:57 +0000 (13:08 -0400)]
ci: Fix GH action for rustfmt

Since we now have a toplevel workspace, just use that.

4 years agoMerge pull request #2352 from dbnicholson/skip-summary-cache-envvar
Colin Walters [Tue, 20 Apr 2021 12:57:28 +0000 (08:57 -0400)]
Merge pull request #2352 from dbnicholson/skip-summary-cache-envvar

tests: Test without a cache directory by default

4 years agotests: Test without a cache directory by default
Dan Nicholson [Mon, 19 Apr 2021 17:00:20 +0000 (11:00 -0600)]
tests: Test without a cache directory by default

Several tests generate summaries and then expect to use the generated
summary immediately. However, this can cause intermittent test failures
when they inadvertantly get a cached summary file. This typically
happens when the test is run on a filesystem that doesn't support user
extended attributes. In that case, the caching code can only use the
last modified time, which only has 1 second granularity. If tests don't
carefully manage the summary modification times or the repo cache then
they are likely subject to races in some test environments.

This introduces an environment variable `OSTREE_SKIP_CACHE` that
prevents the repo from using a cache directory. This is enabled by
default in tests and disabled for tests that are a explicitly trying to
test the caching behavior.

Fixes: #2313
Fixes: #2351
4 years agoMerge pull request #2350 from smcv/trap-err
Colin Walters [Sun, 18 Apr 2021 12:54:49 +0000 (08:54 -0400)]
Merge pull request #2350 from smcv/trap-err

libtest: On failure, make it clearer what has happened

4 years agolibtest: On failure, make it clearer what has happened
Simon McVittie [Sun, 18 Apr 2021 11:16:45 +0000 (12:16 +0100)]
libtest: On failure, make it clearer what has happened

If we fail as a result of `set -x`, It's often not completely obvious
which command failed or how. Use a trap on ERR to show the command that
failed, and its exit status.

Signed-off-by: Simon McVittie <smcv@collabora.com>
4 years agoMerge pull request #2343 from cgwalters/cargo-workspace
Colin Walters [Thu, 15 Apr 2021 23:32:11 +0000 (19:32 -0400)]
Merge pull request #2343 from cgwalters/cargo-workspace

build-sys: Add toplevel workspace Cargo.toml

4 years agoMerge pull request #2346 from cgwalters/release-2021-2
Colin Walters [Thu, 15 Apr 2021 19:40:30 +0000 (15:40 -0400)]
Merge pull request #2346 from cgwalters/release-2021-2

Release 2021.2

4 years agoconfigure: post-release version bump
Colin Walters [Thu, 15 Apr 2021 17:02:19 +0000 (13:02 -0400)]
configure: post-release version bump

4 years agoRelease 2021.2
Colin Walters [Thu, 15 Apr 2021 16:58:31 +0000 (12:58 -0400)]
Release 2021.2

4 years agotests/inst: Make nondestructive tests runnable as unit tests
Colin Walters [Thu, 15 Apr 2021 14:43:33 +0000 (10:43 -0400)]
tests/inst: Make nondestructive tests runnable as unit tests

Ideally in the future we change more of our unit tests to
support running installed; we've tried this in the past with
https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests

I'd like to pick that back up again.  This takes a step
towards that by having our Rust tests.

To make this even easier, add a `tests/run-installed`
which runs the installed tests (uninstalled, confusingly
but conveniently for now).

4 years agobuild-sys: Add toplevel workspace Cargo.toml
Colin Walters [Thu, 15 Apr 2021 15:13:31 +0000 (11:13 -0400)]
build-sys: Add toplevel workspace Cargo.toml

rust-analyzer is happier with this because it understands
the project structure out of the box.

We aren't actually again adding a dependency on Rust/cargo in the core,
this is only used to make `cargo build` work out of the box to build
the Rust test code.

4 years agoMerge pull request #2336 from bgilbert/edit
Luca Bruno [Tue, 13 Apr 2021 12:14:52 +0000 (12:14 +0000)]
Merge pull request #2336 from bgilbert/edit

docs: fix "Edit this page on GitHub" links

4 years agoMerge pull request #2335 from cgwalters/write-regfile-api
Jonathan Lebon [Mon, 12 Apr 2021 20:48:27 +0000 (16:48 -0400)]
Merge pull request #2335 from cgwalters/write-regfile-api

4 years agodocs: fix "Edit this page on GitHub" links
Benjamin Gilbert [Sat, 10 Apr 2021 02:58:54 +0000 (22:58 -0400)]
docs: fix "Edit this page on GitHub" links

4 years agorepo: Ensure we set the size for regfile inline
Colin Walters [Fri, 9 Apr 2021 22:29:55 +0000 (22:29 +0000)]
repo: Ensure we set the size for regfile inline

Need to clean up the internal APIs for this.

4 years agotests: More tests for inline writing
Colin Walters [Fri, 9 Apr 2021 21:54:21 +0000 (21:54 +0000)]
tests: More tests for inline writing

I'm hitting a bug, add more tests.

4 years agorepo: Add ostree_repo_write_regfile
Colin Walters [Fri, 9 Apr 2021 00:35:54 +0000 (00:35 +0000)]
repo: Add ostree_repo_write_regfile

This API is push rather than pull, which makes it much more
suitable to use cases like parsing a tar file from external
code.

Now, we have a large mess in this area internally because
the original file writing code was pull based, but static
deltas hit the same problem of wanting a push API, so I added
this special `OstreeRepoBareContent` just for writing regular
files from a push API.

Eventually...I'd like to deprecate the pull based API,
and rework things so that for regular files the push API
is the default, and then `write_content_object()` would
be split up into archive/bare cases.

In this world the `ostree_repo_write_content()` API would
then need to hackily bridge pull to push and it'd be
less efficient.

Anyways for now due to this bifurcation, this API only
works on non-archive repositories, but that's fine for
now because that's what I want for the `ostree-ext-container`
bits.

4 years agoMerge pull request #2334 from cgwalters/write-symlink
Jonathan Lebon [Fri, 9 Apr 2021 17:35:06 +0000 (13:35 -0400)]
Merge pull request #2334 from cgwalters/write-symlink

repo: Add ostree_repo_write_symlink

4 years agorepo: Add ostree_repo_write_symlink
Colin Walters [Wed, 7 Apr 2021 21:03:15 +0000 (21:03 +0000)]
repo: Add ostree_repo_write_symlink

Continuation of the addition of `ostree_repo_write_regfile_inline()`.
This will be helpful for ostree-rs-ext and importing from tar, it's
quite inefficient and awkward for small files to end up creating
a whole `GInputStream` and `GFileInfo` and etc. for small files.

4 years agoMerge pull request #2327 from cgwalters/writing-apis
Colin Walters [Thu, 8 Apr 2021 21:09:11 +0000 (17:09 -0400)]
Merge pull request #2327 from cgwalters/writing-apis

repo: Add ostree_repo_write_regfile_inline

4 years agoMerge pull request #2333 from dbnicholson/travis-32bit
Colin Walters [Thu, 8 Apr 2021 18:23:22 +0000 (14:23 -0400)]
Merge pull request #2333 from dbnicholson/travis-32bit

Add back a travis 32 bit build

4 years agotravis: Add back a 32 bit i386 build
Dan Nicholson [Thu, 8 Apr 2021 17:49:19 +0000 (11:49 -0600)]
travis: Add back a 32 bit i386 build

Although people are likely not deploying on 32 bit x86 anymore,
deploying on 32 bit armv7 is still often used. Add back an i386 build on
debian to try to catch 32 bit bugs in CI.

4 years agotravis: Correct ci_suite settings for buster
Dan Nicholson [Thu, 8 Apr 2021 17:45:13 +0000 (11:45 -0600)]
travis: Correct ci_suite settings for buster

The install script no longer uses this anymore and maybe it should just
be removed, but in the meantime it should at least be correct.

4 years agoMerge pull request #2332 from dbnicholson/ubuntu-ci
Colin Walters [Thu, 8 Apr 2021 16:58:01 +0000 (12:58 -0400)]
Merge pull request #2332 from dbnicholson/ubuntu-ci

travis: Don't ask any debconf questions when installing packages