Commit Graph

2812 Commits

Author SHA1 Message Date
Jonathan Lebon
af86fcd649 tests/compose: Go back to freezing FCOS commit
The garbage collection issue should be fixed now, and it's just nicer on
developers' cache to stay on the same commit. And again, it's a nice
sanity-check to know that we're always able to compose an older tree.
That said, we probably should still bump this from time to time.

While we're here, add some comments for making it easier to match `popd`
calls with the original `pushd`.
2020-04-15 15:18:16 +02:00
Jonathan Lebon
bca19d74e8 tests/compose: Don't use lockfiles by default
Otherwise, it muddles testing in `test-lockfile.sh` where we want to be
in full control of all the lockfiles fed to `rpm-ostree compose tree`.
2020-04-15 15:18:16 +02:00
Jonathan Lebon
e6986d85cd core: Factor out functions to enable/disable repos
Prep for future patch.
2020-04-15 15:18:16 +02:00
Jonathan Lebon
67662f10d0 app/compose: Rename lockfile variables
Minor cosmetic change; rename the variables so they match the name of
the options they represent.
2020-04-15 15:18:16 +02:00
dependabot-preview[bot]
d1a42777fe build(deps): bump structopt from 0.3.12 to 0.3.13 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.12 to 0.3.13.
- [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-04-14 17:41:08 +02:00
dependabot-preview[bot]
9c9458aed1 build(deps): bump libdnf from a5e5f5a to 5339635
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `a5e5f5a` to `5339635`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](a5e5f5aad5...533963525a)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 17:13:59 +02:00
Colin Walters
770856d018 tests: Start converting some bits into kola ext framework
Start the ball rolling on converting some of our tests into
the coreos-assembler/kola framework:
d940420b78/mantle/kola/README-kola-ext.md

The nondestructive ones are easy.
2020-04-09 23:07:45 +02:00
dependabot-preview[bot]
6a0570baa9 build(deps): bump libdnf from 466752c to a5e5f5a
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `466752c` to `a5e5f5a`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](466752c71b...a5e5f5aad5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-09 16:16:14 +02:00
Colin Walters
b54b50c6a4 core: Add error prefixing when we fail to fetch an rpm-md repo
Someone in Freenode #silverblue hit
https://discussion.fedoraproject.org/t/rpm-ostree-giving-error/772
again, the problem would have been slightly more obvious
with this I hope.

(`Read only repository` could also be an OSTree one e.g.)
2020-04-09 10:51:38 +02:00
Colin Walters
8a172a2e05 rust: rustfmt(*) and (re)add a CI check for it
We haven't been consistent about doing this; I personally
think rustfmt is a big aggressive with the line wrapping
but eh, consistency is more important.

And heh so I tried to `git push --set-upstream cgwalters` and
that failed because there was an already extant `rustfmt`
branch from a while ago...looking at that code it got lost
in the CI refactoring - we're not running `build-check.sh`
at the moment.

Move the rustfmt bits into `codestyle.sh` which is closer
to where it should be anyways.
2020-04-08 02:52:30 +02:00
dependabot-preview[bot]
ea17ec9df1 build(deps): bump serde_json from 1.0.50 to 1.0.51 in /rust
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.50 to 1.0.51.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.50...v1.0.51)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 19:45:12 +02:00
Jonathan Lebon
3a6044a44b rust: move libdnf-sys module to its own crate
This is just a cleaner arrangement to make the separation more explicit.
It also matches what most other wrapper crates do.

One advantage of this is that we can tell cbindgen directly that we
don't want it to ever export symbols from `libdnf-sys`.

Related discussions in:
https://github.com/coreos/rpm-ostree/pull/2047
2020-04-07 19:01:02 +02:00
Colin Walters
66816eeabe rust/libdnf_sys: Use uninstantiable type rather than wrapper struct
When we ran rustfmt, it converted our bare `extern` blocks to
`extern "C"` which has a different meaning apparently.

This caused cbindgen to try to interpret the structs, and it barfed
on the newtype void wrappers.

Looking at libgit2-rs, it seems to use these "uninstantiable types"
instead.

Prep for using `rustfmt`.
2020-04-07 17:32:36 +02:00
dependabot-preview[bot]
3e91d5a38e build(deps): bump libdnf from 8330eea to 466752c
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `8330eea` to `466752c`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](8330eea698...466752c71b)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 00:55:08 +02:00
dependabot-preview[bot]
86f808d49c build(deps): bump envsubst from 0.1.1 to 0.2.0 in /rust
Bumps [envsubst](https://github.com/lucab/envsubst-rs) from 0.1.1 to 0.2.0.
- [Release notes](https://github.com/lucab/envsubst-rs/releases)
- [Commits](https://github.com/lucab/envsubst-rs/compare/0.1.1...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 20:21:54 +02:00
dependabot-preview[bot]
3bc6f4496b build(deps): bump serde from 1.0.105 to 1.0.106 in /rust
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.105 to 1.0.106.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.105...v1.0.106)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 18:03:30 +02:00
dependabot-preview[bot]
9cfa01db97 build(deps): bump serde_derive from 1.0.105 to 1.0.106 in /rust
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.105 to 1.0.106.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.105...v1.0.106)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 16:52:15 +02:00
dependabot-preview[bot]
b6789026ed build(deps): bump libdnf from 141491e to 8330eea
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `141491e` to `8330eea`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](141491eed6...8330eea698)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-02 21:36:28 +02:00
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