Commit Graph

2972 Commits

Author SHA1 Message Date
Jonathan Lebon
b91e6bc9a3 ci: Run C unit tests too
We lost this during the transition from PAPR to CoreOS CI. We don't have
a lot of new tests there since new unit tests tend to be in Rust, though
we should still run what we do have.

Repurpose the `rust` branch to more generically run all unit tests
and not just the Rust ones. It still also checks that compilation
against the MSRV works fine.
2020-10-01 06:08:37 -04:00
dependabot-preview[bot]
c365dd7d14 build(deps): bump structopt from 0.3.17 to 0.3.18 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.17 to 0.3.18.
- [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.17...v0.3.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-30 11:17:29 +00:00
dependabot-preview[bot]
1dd45bfaf0 build(deps): bump libdnf from df3921b to a061cbf
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `df3921b` to `a061cbf`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](df3921b3e9...a061cbf627)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 15:13:55 +00:00
dependabot-preview[bot]
f997618f2b build(deps): bump chrono from 0.4.15 to 0.4.18 in /rust
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.15 to 0.4.18.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.15...v0.4.18)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 14:40:14 +00:00
dependabot-preview[bot]
ac21add95d build(deps): bump openat-ext from 0.1.4 to 0.1.5 in /rust
Bumps [openat-ext](https://github.com/cgwalters/openat-ext) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/cgwalters/openat-ext/releases)
- [Commits](https://github.com/cgwalters/openat-ext/commits/v0.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 14:03:39 +00:00
Jonathan Lebon
da0f614666 rust: adapt to new systemd journal API
The next/previous functions were renamed, and the journal is no longer
seeked to the head on open, so we have to do it manually. We did that
already in most places, except one.

For more information, see:
https://github.com/jmesmon/rust-systemd/pull/121
2020-09-25 13:08:30 +00:00
dependabot-preview[bot]
9f706c09f3 build(deps): bump systemd from 0.5.0 to 0.6.0 in /rust
Bumps [systemd](https://github.com/jmesmon/rust-systemd) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/jmesmon/rust-systemd/releases)
- [Commits](https://github.com/jmesmon/rust-systemd/compare/v0.5.0...v0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-25 13:08:30 +00:00
dependabot-preview[bot]
edabae8c59 build(deps): bump glib-sys from 0.10.0 to 0.10.1 in /rust
Bumps [glib-sys](https://github.com/gtk-rs/sys) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/gtk-rs/sys/releases)
- [Commits](https://github.com/gtk-rs/sys/compare/glib-sys-0.10.0...glib-sys-0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 12:32:41 +00:00
dependabot-preview[bot]
0f1aedc767 build(deps): bump libdnf from c87ff63 to df3921b
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `c87ff63` to `df3921b`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](c87ff637b6...df3921b3e9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 12:06:50 +00:00
dependabot-preview[bot]
8552edf092 build(deps): bump serde_derive from 1.0.115 to 1.0.116 in /rust
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.115...v1.0.116)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 16:35:55 +02:00
dependabot-preview[bot]
d3ba96dd31 build(deps): bump serde from 1.0.115 to 1.0.116 in /rust
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.115...v1.0.116)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 01:53:12 +02:00
dependabot-preview[bot]
e82cdb59e5 build(deps): bump libc from 0.2.76 to 0.2.77 in /rust
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.76 to 0.2.77.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.76...0.2.77)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 00:24:11 +02:00
dependabot-preview[bot]
e977978731 build(deps): bump libc from 0.2.76 to 0.2.77 in /rust/libdnf-sys
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.76 to 0.2.77.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.76...0.2.77)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 23:35:05 +02:00
dependabot-preview[bot]
a2b9ada99f build(deps): bump glib from 0.10.1 to 0.10.2 in /rust
Bumps [glib](https://github.com/gtk-rs/glib) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/gtk-rs/glib/releases)
- [Commits](https://github.com/gtk-rs/glib/commits/0.10.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 22:36:47 +02:00
dependabot-preview[bot]
d7ff64105c build(deps): bump libglnx from 84b981a to 5ef78bb
Bumps libglnx from `84b981a` to `5ef78bb`.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 21:34:26 +02:00
Jonathan Lebon
ec940303c4 Release 2020.5
A few goodies, but mostly to get #2221 out.
2020-09-15 11:32:06 +02:00
dependabot-preview[bot]
d3ffbb118e build(deps): bump gio from 0.9.0 to 0.9.1 in /rust
Bumps [gio](https://github.com/gtk-rs/gio) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/gtk-rs/gio/releases)
- [Commits](https://github.com/gtk-rs/gio/compare/0.9.0...0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-14 10:23:29 -04:00
Colin Walters
456a3ec7c2 compose: Add rpmdb option, default to bdb
The design of https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb
is problematic for us for multiple reasons.  The first big reason
is that rpm-ostree is designed for "cross" builds and e.g. today
we use a Fedora-derived container to build RHEL CoreOS images.

However the default database lives inside the `rpm` package which
means that if we e.g. upgrade the coreos-assembler container to F33
it will suddenly try to use sqlite for RHCOS which is obviously broken.

Related to this, rebases from f32 to f33 w/layered packages
are broken: https://bugzilla.redhat.com/show_bug.cgi?id=1876194#c3

With this we can configure things to continue to use bdb for f33
for ostree-based systems, so that by enforcing an upgrade order
f32 → f33 [bdb] → f34 [sqlite] ... the intermediate f33 w/bdb
still understands sqlite and hence rebases will work.
2020-09-11 10:06:28 -04:00
Colin Walters
cdf2c47b46 Use ostree-rs, and oxidize more treefile checksumming
The main goal here is simply to start the ball rolling
in having rpm-ostree use the ostree-rs crate, so we can
use it for other code in the future.  We also bump the
glib crate to a new major, but no code changes were
required for that.

I spent a bit of time looking through our C code for
an example to oxidize, but almost all of our C code using
libostree also has calls back into other nontrivial rpm-ostree
C code.  To make a lot more oxidation progress I think we need
to invent an internal `librpmostree-sys` crate so we can have
Rust -> C calls.

I found this bit of treefile code computing the checksum that
we can oxidize - and as soon as we have more libdnf bindings
we can move all of the checksumming into Rust too.
2020-09-09 21:26:53 -04:00
Colin Walters
d38f5461d5 compose: Use user mode checkout for sepolicy
Otherwise we could fail to check out the policy on a host
where the SELinux module is loaded but inactive, which would
deny calling `setxattr(security.selinux)`.

And in general we don't want to do chown/xattr at all here.
2020-09-09 09:44:01 -04:00
dependabot-preview[bot]
529d42c03f build(deps): bump libdnf from 240fdd4 to c87ff63
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `240fdd4` to `c87ff63`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](240fdd4f14...c87ff637b6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 14:24:37 -04:00
dependabot-preview[bot]
bfed42a99f build(deps): bump rayon from 1.3.1 to 1.4.0 in /rust
Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/v1.3.1...rayon-core-v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 14:01:44 -04:00
Colin Walters
ce2f692bea ci: Use ostree from lockfile
In the scenario where ostree is in the fcos overrides but *not*
bodhi, *and* a new test requires it, our CI will fail.

We aren't hard requiring the latest ostree right now.
2020-09-08 12:56:58 -04:00
dependabot-preview[bot]
0c521f0513 build(deps): bump structopt from 0.3.16 to 0.3.17 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.16 to 0.3.17.
- [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.16...v0.3.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-03 18:41:38 -04:00
Colin Walters
b14ecaea86 Move the "cbindgen typedefs" to their own file
I'm going to add more and they would get unwieldly inlined in the TOML.
2020-08-29 18:41:38 -04:00
Colin Walters
dbf4315f08 db-list|version: Remove code to parse ..
Not clear it ever worked, it's definitely broken now and no
one can be using it.  If we want this functionality we can revisit
adding it later (preferably in Rust with tests).

Motivated by trying to oxidize a bit of this code and then
discovering it didn't work.
2020-08-28 18:30:51 -04:00
Jonathan Lebon
71992e3d11 core: Use SOLVER_LOCK for locking base packages
For the Fedora CoreOS extensions work, when layering packages, we need
to be able to tell libsolv to pick the packages which will go with the
base packages. IOW, it needs to know that the base packages shouldn't be
uninstalled.

While investigating
https://github.com/coreos/fedora-coreos-tracker/issues/525, I realized
that libsolv does have a flag which allows us to express this:
`SOLVER_LOCK`.

This then allows libsolv to choose the right package for us (if found).
And in the case where it can't find a matching package, libsolv itself
will print exactly what the conflict is, which is more informative than
the "forbidden replacements" error we currently print out.

Update submodule: libdnf
2020-08-28 12:44:46 -04:00
Colin Walters
5ff769f849 deploy: Don't leak file descriptor passed for local rebases
Came up in https://github.com/coreos/rpm-ostree/issues/2210
2020-08-28 11:15:22 -04:00
Colin Walters
122718c4af rust: Fix deprecation warnings
Came up in a recent CI run.
2020-08-27 05:22:57 -04:00
Colin Walters
6232144a25 util: Remove an (effectively) unused GCancellable
This will be fully obsoleted with https://github.com/coreos/rpm-ostree/pull/2206
2020-08-26 15:10:30 -04:00
Colin Walters
e041815b94 core: Clearly show when no rpm-md repos are enabled
This is the case in RHCOS, and it's confusing to see:
`Enabled rpm-md repositories:`
since one might think the text on the following lines are
the repositories.
2020-08-25 13:42:31 -04:00
Jonathan Lebon
31799978c1 ci: Bump MSRV to 1.45.2
This is in el8 now and it unblocks a bump to the latest systemd crate
version.
2020-08-24 16:45:35 -04:00
dependabot-preview[bot]
3a8ef107e5 build(deps): bump systemd from 0.4.0 to 0.5.0 in /rust
Bumps [systemd](https://github.com/jmesmon/rust-systemd) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/jmesmon/rust-systemd/releases)
- [Commits](https://github.com/jmesmon/rust-systemd/commits/v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 16:45:35 -04:00
dependabot-preview[bot]
f0b2bef480 build(deps): bump libdnf from c5c30c3 to 6043874
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `c5c30c3` to `6043874`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](c5c30c3c87...6043874b95)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 16:21:54 -04:00
dependabot-preview[bot]
35f4a1a883 build(deps): bump libc from 0.2.74 to 0.2.76 in /rust
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.74 to 0.2.76.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.74...0.2.76)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 11:38:59 -04:00
Jonathan Lebon
fdfad9561d ci: bump compose tests timeout to 60 minutes
We usually finish much faster than that, but when dependabot spams the
cluster it can be slower.
2020-08-24 10:29:15 -04:00
dependabot-preview[bot]
9b428c1ca0 build(deps): bump libc from 0.2.74 to 0.2.76 in /rust/libdnf-sys
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.74 to 0.2.76.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.74...0.2.76)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 10:29:15 -04:00
dependabot-preview[bot]
12e5625990 build(deps): bump curl from 0.4.31 to 0.4.33 in /rust
Bumps [curl](https://github.com/alexcrichton/curl-rust) from 0.4.31 to 0.4.33.
- [Release notes](https://github.com/alexcrichton/curl-rust/releases)
- [Commits](https://github.com/alexcrichton/curl-rust/compare/curl-sys-0.4.31...curl-sys-0.4.33)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-24 09:42:28 -04:00
dependabot-preview[bot]
618041902d build(deps): bump serde_derive from 1.0.114 to 1.0.115 in /rust
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.114...v1.0.115)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-21 18:08:33 -04:00
Colin Walters
e3978c924f Add testutils generate-synthetic-upgrade
We want to test upgrades that actually change files as a general
rule; in some cases we want to test "large" upgrades to validate
performance.

This code generates a "synthetic" upgrade that adds an ELF note
to a percentage of ELF files (randomly selected).  By doing
it this way we are only actually testing one version of the code.

Migrated from https://github.com/coreos/coreos-assembler/pull/1635/
using the Rust code from https://github.com/ostreedev/ostree/pull/2127
2020-08-18 17:23:15 +02:00
dependabot-preview[bot]
d2d3e04ee2 build(deps): bump clap from 2.33.2 to 2.33.3 in /rust
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.2 to 2.33.3.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.3/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.2...v2.33.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-18 16:17:29 +02:00
dependabot-preview[bot]
27e39801b1 build(deps): bump serde from 1.0.114 to 1.0.115 in /rust
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.114...v1.0.115)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-18 15:57:23 +02:00
dependabot-preview[bot]
8b0bcd7bf7 build(deps): bump libdnf from 03d2bac to c5c30c3
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `03d2bac` to `c5c30c3`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](03d2bac197...c5c30c3c87)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 16:15:01 +02:00
dependabot-preview[bot]
1394b0eb1b build(deps): bump chrono from 0.4.13 to 0.4.15 in /rust
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.13 to 0.4.15.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.13...v0.4.15)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 15:46:27 +02:00
dependabot-preview[bot]
20494a77b5 build(deps): bump structopt from 0.3.15 to 0.3.16 in /rust
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.15 to 0.3.16.
- [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.15...v0.3.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 15:19:46 +02:00
dependabot-preview[bot]
5975a59e92 build(deps): bump clap from 2.33.1 to 2.33.2 in /rust
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.1 to 2.33.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.2/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.1...v2.33.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 11:49:52 -04:00
dependabot-preview[bot]
5e8553eb88 build(deps): bump libdnf from f6a433f to 03d2bac
Bumps [libdnf](https://github.com/rpm-software-management/libdnf) from `f6a433f` to `03d2bac`.
- [Release notes](https://github.com/rpm-software-management/libdnf/releases)
- [Commits](f6a433f58e...03d2bac197)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-10 11:32:06 -04:00
Kelvin Fan
c9cb6005ff treefile: change remove-from-packages implementation
Fix https://github.com/coreos/rpm-ostree/issues/2068: `remove-from-packages`
deleting files that it shouldn't.
Filter out files that user wants removed at `checkout_package_into_root()`,
instead of at the `handle_remove_files_from_package()` function that does
not check whether files are used by other rpms before removing them.
2020-08-05 21:07:20 +02:00
dependabot-preview[bot]
c349a14600 build(deps): bump libc from 0.2.73 to 0.2.74 in /rust/libdnf-sys
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.73 to 0.2.74.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.73...0.2.74)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-04 23:36:26 +02:00
dependabot-preview[bot]
142d86dbeb build(deps): bump libc from 0.2.73 to 0.2.74 in /rust
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.73 to 0.2.74.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.73...0.2.74)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-04 22:42:38 +02:00