Commit Graph

2794 Commits

Author SHA1 Message Date
dependabot-preview[bot]
a97c8977aa build(deps): bump libdnf from 98ad20a to 141491e
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `98ad20a` to `141491e`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](98ad20ad33...141491eed6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 15:53:15 +02:00
Colin Walters
bf8f295122 rust: Fully remove failure crate
I previously ran out of steam in the switch and wanted to
get the PR out for feedback before continuing, but it turns
out I basically stopped 2 meters from the finish line.  Completing
the switch from `failure` → `anyhow` was quite easy.
2020-04-01 14:53:08 +02:00
Colin Walters
430f92c382 rust: Start porting from failure to anyhow
The failure crate isn't actively developed anymore.  The
main benefit of `anyhow` is it uses the standard error type.
More info:
https://docs.rs/crate/anyhow/1.0.28

Start the porting process.

Note that the `envsubst` crate has a public dependency on
`failure`, so we need to start mapping its errors.
2020-04-01 10:34:28 +02:00
dependabot-preview[bot]
2b0e08ac9c build(deps): bump serde_json from 1.0.48 to 1.0.50 in /rust
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.48 to 1.0.50.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.48...v1.0.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-31 17:17:44 +02:00
dependabot-preview[bot]
1124a982c8 build(deps): bump libdnf from 1796b8c to 98ad20a
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `1796b8c` to `98ad20a`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](1796b8cba4...98ad20ad33)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-30 15:36:55 +02:00
dependabot-preview[bot]
5cb92511ed build(deps): bump libdnf from f68a9d8 to 1796b8c
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `f68a9d8` to `1796b8c`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](f68a9d8d2e...1796b8cba4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 20:38:51 +01:00
dependabot-preview[bot]
469e6e963a build(deps): bump libdnf from c606657 to f68a9d8
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `c606657` to `f68a9d8`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](c606657d46...f68a9d8d2e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-23 20:15:33 +01:00
Colin Walters
659fb0b23a importer: Quote filenames with spaces for tmpfiles.d
This way we handle filenames with spaces in `/var` in general,
like `/var/app/foo bar`, but *also* the special `/opt/foo bar`
translation bits.

I saw this bug and thought "oh that'd be easy".  But hoo boy
did it take me down a rat's nest.  The first thing was verifying
that `systemd-tmpfiles` supports any kind of quotation/escaping; it does.
The next thing was figuring out *exactly* what the syntax for that
is and how it works, as it's obviously not widely used.

Writing tests for this ended up being a painful exercise because
of the multiple levels of shell script, e.g. our `build_rpm` shell
script ends up being inlined into RPM specs, which then interprets
again...and not to mention the usual annoying issues with `ssh`
eating quotes.

Anyways, all that and:
Closes: https://github.com/coreos/rpm-ostree/issues/2029
2020-03-23 19:16:36 +01:00
dependabot-preview[bot]
466f66fcd4 build(deps): bump serde from 1.0.104 to 1.0.105 in /rust
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.104 to 1.0.105.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.104...v1.0.105)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-21 22:37:42 +01:00
dependabot-preview[bot]
a4b480f4ec build(deps): bump serde_derive from 1.0.104 to 1.0.105 in /rust
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.104 to 1.0.105.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.104...v1.0.105)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-20 15:06:04 +01:00
Colin Walters
59a804467d core: Add error prefixing in import path
Seeing this in the FCOS pipeline:
```
Downloading from 'fedora-coreos-pool'... done
error: cannot open Packages database in /proc/self/fd/21/usr/share/rpm
Importing packages... done
error: Can't stat fd 38
```

The first error is librpm...which, is somehow not fatal?  It
also appears to be swallowing the underlying real error.

For the second had to Google search it but the main hit for `Can't stat fd` is
in libarchive which led me to this code, which is probably right.
But let's be sure by adding some error prefixing.
2020-03-20 14:28:34 +01:00
dependabot-preview[bot]
9827cc6569 build(deps): bump libglnx from 5f3d352 to bf851fb
Bumps libglnx from `5f3d352` to `bf851fb`.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 22:40:39 +01:00
dependabot-preview[bot]
5c5bda4bab build(deps): bump libc from 0.2.67 to 0.2.68 in /rust
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.67 to 0.2.68.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.67...0.2.68)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 21:33:58 +01:00
Colin Walters
cf4853e548 syscore: Add some error prefixing
I was getting a dreaded not-quite-specific `syscore cleanup: No such file or directory`
error when hacking on the ostree tests.  I am pretty sure it's the history
code, but let's just do the usual thing and spread the error-prefixing love
in the whole area.
2020-03-19 20:59:59 +01:00
Colin Walters
1b893c1c3a history: Avoid erroring if no history database to clean
The ostree test suite was creating deployments manually
(skipping the rpm-ostree upgrader layer which would write history)
and then calling `rpm-ostree cleanup` which tried to open the
history dir and failed.

Just return early if there's no history directory when we're
asked to clean up.
2020-03-19 20:59:51 +01:00
Jonathan Lebon
e2a8aea11b app/dbus: Suggest journalctl -xe if bus owner changes
In the large majority of cases, the `"Bus owner changed"` error is due
to something going wrong with the daemon rather than D-Bus itself. Let's
give a hint to check the journal so that users can investigate and e.g.
just paste the journal output as part of the initial issue report.
2020-03-19 20:59:41 +01:00
dependabot-preview[bot]
caccd1edfb build(deps): bump libdnf from 608490d to c606657
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `608490d` to `c606657`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](608490d775...c606657d46)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 19:25:28 +01:00
dependabot-preview[bot]
7957422d2b build(deps): bump structopt from 0.3.11 to 0.3.12 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.11...v0.3.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 18:31:29 +01:00
Jonathan Lebon
c6e5e80d94 vmcheck: Work around read-only /sysroot
We need to adapt some of our tests here which assume that `/sysroot` is
writable. However, in FCOS this is no longer the case now that we enable
`sysroot.readonly`.

We only remount rw for the couple of operations that need it so that we
still retain coverage for the ro path everywhere else.
2020-03-19 16:24:04 +01:00
Jonathan Lebon
7745728669 vmcheck: Run vm_kola_spawn separately from if-statement
Classic shell gotcha. We don't want to run `vm_kola_spawn` as part of
the if-statement or otherwise we lose the `set -e` behaviour.
2020-03-19 16:24:04 +01:00
Jonathan Lebon
e6907d209b ci: drop FAHC repo in favour of f31-coreos-continuous
FAHC is super out of date now. The way to have access to newer packages
is via the continuous tag, which is still manual for now, but at least
targets the right Fedora release.
2020-03-13 23:13:44 +01:00
Colin Walters
9269c9a802 build-sys: Hard require libostree 2020.1
The current `rpm-ostree-2020.1-1.fc31.x86_64` in Fedora
was [built with a truly ancient libostree](https://kojipkgs.fedoraproject.org//packages/rpm-ostree/2020.1/1.fc31/data/logs/x86_64/root.log)
because Fedora's build system is weird and only adds packages
released after "gold" into the buildroot via an override
that times out.

This actively breaks things because rpm-ostree isn't
detecting the read-only sysroot.

Let's bump our hard requirement.
2020-03-13 23:13:44 +01:00
dependabot-preview[bot]
2ee48c51fe build(deps): bump curl from 0.4.27 to 0.4.28 in /rust
Bumps [curl](https://github.com/alexcrichton/curl-rust) from 0.4.27 to 0.4.28.
- [Release notes](https://github.com/alexcrichton/curl-rust/releases)
- [Commits](https://github.com/alexcrichton/curl-rust/compare/curl-sys-0.4.27...curl-sys-0.4.28)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-12 10:04:41 -04:00
dependabot-preview[bot]
d2f95e87c3 build(deps): bump libdnf from 8157fa9 to 608490d
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `8157fa9` to `608490d`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](8157fa9b29...608490d775)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-11 13:23:06 -04:00
dependabot-preview[bot]
105d9df8c9 build(deps): bump curl from 0.4.26 to 0.4.27 in /rust
Bumps [curl](https://github.com/alexcrichton/curl-rust) from 0.4.26 to 0.4.27.
- [Release notes](https://github.com/alexcrichton/curl-rust/releases)
- [Commits](https://github.com/alexcrichton/curl-rust/compare/curl-sys-0.4.26...curl-sys-0.4.27)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-11 12:41:33 -04:00
dependabot-preview[bot]
40ece0ca63 build(deps): bump libdnf from c373c59 to 8157fa9
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `c373c59` to `8157fa9`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](c373c59f7e...8157fa9b29)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 15:35:18 +01:00
dependabot-preview[bot]
b424c92ac1 build(deps): bump glib from 0.8.2 to 0.9.3 in /rust
Bumps [glib](https://github.com/gtk-rs/glib) from 0.8.2 to 0.9.3.
- [Release notes](https://github.com/gtk-rs/glib/releases)
- [Commits](https://github.com/gtk-rs/glib/commits/0.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 15:23:56 +01:00
dependabot-preview[bot]
3930fc4a52 build(deps): bump chrono from 0.4.10 to 0.4.11 in /rust
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.10 to 0.4.11.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.10...v0.4.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 15:04:43 +01:00
dependabot-preview[bot]
9cfa6120d1 build(deps): bump libdnf from ddf5adf to c373c59
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `ddf5adf` to `c373c59`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](ddf5adfc31...c373c59f7e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 14:39:05 +01:00
Colin Walters
54faf595ae rust: Bump to glib 0.8
On general principle of keeping up with the latest, but
in particular this is prep for using the `ostree` crate.
2020-03-06 23:04:19 +01:00
dependabot-preview[bot]
200388cf8f build(deps): bump libdnf from b57a75c to ddf5adf
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `b57a75c` to `ddf5adf`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](b57a75c518...ddf5adfc31)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 16:40:00 +01:00
dependabot-preview[bot]
d487b4dc79 build(deps): bump structopt from 0.3.9 to 0.3.11 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.9 to 0.3.11.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 16:07:10 +01:00
dependabot-preview[bot]
b3095ed035 build(deps): bump failure from 0.1.6 to 0.1.7 in /rust
Bumps [failure](https://github.com/rust-lang-nursery/failure) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/rust-lang-nursery/failure/releases)
- [Changelog](https://github.com/rust-lang-nursery/failure/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-lang-nursery/failure/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 15:45:50 +01:00
Jonathan Lebon
ca40b1f747 ci: migrate to new coreos-ci project
Mostly minor tweaks to adapt to the new custom steps. We have a pretty
involved pipeline here so we don't actually use the higher-level steps
like `fcosBuild`.
2020-03-03 14:55:30 +01:00
dependabot-preview[bot]
e577910092 build(deps): bump curl from 0.4.25 to 0.4.26 in /rust
Bumps [curl](https://github.com/alexcrichton/curl-rust) from 0.4.25 to 0.4.26.
- [Release notes](https://github.com/alexcrichton/curl-rust/releases)
- [Commits](https://github.com/alexcrichton/curl-rust/compare/curl-sys-0.4.25...curl-sys-0.4.26)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 16:37:09 +01:00
dependabot-preview[bot]
15247a5bef build(deps): bump libdnf from 159a4bc to b57a75c
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `159a4bc` to `b57a75c`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](159a4bce12...b57a75c518)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 22:14:13 +01:00
Jonathan Lebon
e9011530e5 initramfs: Use dracut args from commitmeta if available
This is the second half of the previous commit. We check if the
canonical dracut args are available in the commit metadata, and prefer
those over using `--rebuild`. The latter is delegated as a backcompat
fallback.
2020-02-27 21:09:54 +01:00
Jonathan Lebon
0a96a181c0 compose: Include base dracut args in commitmeta
Keep the base initramfs arguments used in the commit metadata. The
reasoning for this is that when regenerating the initramfs locally with
`rpm-ostree initramfs --enable`, we want to match how it was built in
the treecompose. This is important because the rest of the treecompose
assumes that e.g. certain dracut modules are included or omitted.

Right now, the way we achieve this is with using `dracut --rebuild`.
However, we no longer have access to the base initramfs when replacing
the kernel. Another issue with `--rebuild` is that when we *do* use it,
dracut just dumbly appends the arguments to the base args. So we then
end up with e.g. two `--kver` args, two `--add ostree`, two `--tmpdir`,
etc...

Another way to look at at this patch is that it unifies client-side and
server-side paths when generating the initramfs. The only difference
then is that we use the local `/etc` in the case of
`rpm-ostree initramfs --enable`.
2020-02-27 21:09:54 +01:00
Colin Walters
21bdb54423 ci: Pull Fedora from api.ci
Currently we pull from quay.io and api.ci, and the Fedora registry
is being very flaky.  I set up a mirror on api.ci for now.
2020-02-27 19:24:31 +01:00
Jonathan Lebon
1cf0d557ae tests/libvm.sh: Bump container run to use f31
It's the latest, and matches the rest of the host we're running on. But
also, pulling f30 is hitting 503s from the Fedora registry:

https://pagure.io/releng/issue/9282
2020-02-27 04:50:59 +01:00
Jonathan Lebon
020752bfe8 tests/compose: Stop freezing on specific FCOS commit
We're hitting issues with packages getting tagged out of the pool:
https://pagure.io/releng/issue/9281

This in turn means we can't reliably recompose older builds right now,
which breaks our CI. For now at least, let's compose from the latest.
(Note we were already also composing the latest FCOS in the vmcheck
branch.)
2020-02-27 04:50:59 +01:00
Jonathan Lebon
1675058768 initramfs: Fix using local /etc when also replacing kernel
Instead of basing our decision to use the local `/etc` on whether we're
using `dracut --rebuild`, base it directly on a boolean parameter.

This is relevant in the client-side when initramfs regeneration is
requested as well as a kernel override. In such cases, we do want to use
the local `/etc`, but we'd skip that path because we didn't also use
`dracut --rebuild`.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1806588
2020-02-27 04:50:59 +01:00
Jonathan Lebon
14701be788 status: Quote initramfs args if necessary
E.g. if it contains spaces as is the case when one does
`rpm-ostree initramfs --arg=-I --arg='/file1 /file2'`.
2020-02-27 04:50:59 +01:00
Jonathan Lebon
2ae1c04ef8 libpriv/kernel: Fix minor comment typo 2020-02-27 04:50:59 +01:00
Jonathan Lebon
d69a6c82b9 core: Simplify check for kernel package name 2020-02-27 04:50:59 +01:00
Jonathan Lebon
21bf9ec96c app/main: Tell libdnf not to look for dnf.conf upfront
We don't support `/etc/dnf/dnf.conf`, so tell libdnf to not look for it.
This squashes warnings from libdnf (which turn into hard errors when
hacking locally with `G_DEBUG=fatal-warnings`).

As mentioned in the comment, the reason for putting this in `main.c` is
that it controls a global variable, which is used in a few places in
libdnf. So rather than duplicating this across callsites, just set it
upfront. And yeah... we should improve that API.
2020-02-27 04:50:59 +01:00
Jonathan Lebon
69e3af4331 ci/installdeps: Only builddep from spec file
Doing builddep once based on the baked config and then once more from
the spec file can cause issues sometimes. For example, right now the
latest rpm-ostree release uses libmodulemd1, but we want to rebase to
libmodulemd (2.0). And `dnf` will get confused trying to move from one
to the other.

Really, we don't need to builddep from the last release at all, so just
drop that and rely only on the spec file.

Adapt `pkg_install_builddeps` to allow no args to mean only installing
the basic buildroot stuff like `dnf builddep` and `@buildsys-build`.
2020-02-25 16:48:15 +01:00
Jonathan Lebon
4b15c59b77 ci: Move cargo test into ci/msrv.sh
We need `cargo` in our `PATH` and we already do the `PATH=...` dance in
`ci/msrv.sh`. This only worked before because we were inadvertedly
re-installing cargo when calling `ci/build.sh`, which was fixed in the
previous commit.
2020-02-25 16:48:15 +01:00
Jonathan Lebon
2290999251 ci/msrv.sh: Use SKIP_INSTALLDEPS=1 before building
We've already manually installed dependencies higher up. This saves us
some time, but also we don't want the script to e.g. re-install cargo.
(This also works as a short term hack we need to adapt to libdnf moving
to `libmodulemd-2.0` due to `ci/installdeps.sh` not being entirely
idempotent).
2020-02-25 16:48:15 +01:00
Jonathan Lebon
7501b39cbf spec: Bump libmodulemd version requirement
This matches the latest bump in libdnf:
763ccc3e33
2020-02-25 16:48:15 +01:00