Commit Graph

211 Commits

Author SHA1 Message Date
Colin Walters
1cef69cf8a lib: Don't link to libdnf
Prep for "Rust-as-main", where I want to build libdnf statically.
And this really completes the "library thinout" story because
now we avoid dragging our *private* `libdnf.so` into the caller's
address space, which can cause potential conflicts if they're
also linking the system one. (Which could easily occur with
something like gnome-software)

All we were using libdnf for (indirectly via libsolv) is comparing
version strings but librpm can already do that for us.
2021-01-28 11:15:44 -05:00
Colin Walters
db76e56931 Update configure.ac
Co-authored-by: Jonathan Lebon <jonathan@jlebon.com>
2021-01-18 19:19:09 -05:00
Colin Walters
774923fce3 Release 2021.1 2021-01-18 19:19:09 -05:00
Colin Walters
2247e7af62 configure: Update contact email
atomic-devel@ is dead.
2021-01-11 15:10:07 -05:00
Colin Walters
08c414f897 Rework bindgen/cxx.rs usage and CI build
cxx.rs (aka cxxbridge) and cbindgen are
both generating source code.  Since the last release
we've introduced the former, and we need to ensure
that the generated cxx.rs source ends up in release tarballs
the same way as the cbindgen code.

Rationalize and clean up the binding infrastructure.
Drop support for the vendored cbindgen which we
weren't actually using:
Closes: https://github.com/coreos/rpm-ostree/issues/2392

Move the cxx-rs and cbindgen bits into the same place,
and update our CoreOS CI build to use a separate `Makefile.bindings`
that just generates the code, so our CI still "works like"
a main Koji RPM build.
2021-01-04 13:17:35 +01:00
Colin Walters
562acedbaa Move "ignored script list" to Rust, drop gperf
Rust has a nice crate for doing perfect hashing.  Move that
code into Rust and drop the dependency on `gperf`.  This also
helps move away from Autotools.
2020-12-24 16:37:04 +01:00
Colin Walters
9565c19ef0 Use cxx-rs for core.rs
This is much better than bindgen because it's fully safe.  It's
much more ergonomic too:

 - Invoke Rust methods-on-structs just like C++ methods-on-structs
 - Rust `Result<>` is translated automatically to exceptions

See https://cxx.rs/context.html for more.
2020-12-23 17:45:29 +01:00
Colin Walters
4c3d3fcb45 build-sys: Drop autoconf bits to find dbus service directory
We set it to the same value in both cases.  There's no reason
to require it at build time anyways.

Part of thinning out the Autotools side in prep for using Cargo.
2020-12-22 17:14:19 -05:00
Colin Walters
352d9f816f build-sys: Remove RHEL7 autotools backport
We aren't going to be shipping major new versions to RHEL7
ever again, so drop this compat definition.

Drop this as part of thinning out our Autotools build system
in preparation for moving to `build.rs`.
2020-12-22 17:14:19 -05:00
Colin Walters
70e7cd9bbb build-sys: Remove --with-bubblewrap
This was only needed for RHEL7; RHEL8 and above ships bwrap with
the OS.

Drop this as part of thinning out our Autotools build system
in preparation for moving to `build.rs`.
2020-12-22 17:14:19 -05:00
Colin Walters
de749fb2a5 build-sys: Remove --enable-installed-tests
This has never been used here; it was added
in f93cb5bcc5
and then we went in a different direction for testing.
2020-12-22 17:14:19 -05:00
Jonathan Lebon
db775f43ec Default to sqlite rpmdb backend on f34
There won't be any support for writing to the bdb backend in f34, so
e.g. pkglayering won't work (and obviously even composes wouldn't work
once the buildroot moves to f34).

Instead of requiring the whole world to add an `rpmdb` key in their
manifests, let's just add a compile flag for it, and tweak the spec file
to use this flag on f34.
2020-12-21 19:01:48 -05:00
Colin Walters
171e80fe41 Release 2020.10 2020-12-11 13:56:19 -05:00
Colin Walters
c718f34d43 Fix and improve support for rpmostree-rust.h being pre-generated
First, we now need the `vendor/` directory at the toplevel because
that's where `Cargo.toml` is.

Now this triggers another bug introduced in the build system
with how we're handling the `rpmostree-rust.h` header.
We ended up vendoring a pre-generated one in the tarball
mainly because RHEL doesn't include cbindgen.
Now probably in the future I'd like to fix that.

But let's clean this up - the tarball generation process copies
the file into `rpmostree-rust-prebuilt.h`, and build machinery
detects that and entirely skips looking for or trying to build
our internal cbindgen.
2020-12-11 11:54:34 -05:00
Colin Walters
4ce1cd2342 Release 2020.9
A lot of stuff here; new livefs is a big one.  Plus a lot
of internal cleanups, the introduction of C++ and
the 32 bit package script fix etc.
2020-12-10 22:12:39 -05:00
Colin Walters
887d362906 Convert some code to compile in C++ mode
This is part of investigating using https://cxx.rs/
In order to make this really work, we need to convert some of our C
code to C++ so we can include cxx.rs-generated code.

This starts by converting just two files as a starting point.
I did the minimal porting; I didn't try to actually rewrite them
to resemble modern C++, just "C in C++ mode".
2020-12-01 22:07:49 +01:00
Colin Walters
96dea82c50 Release 2020.8
This mainly has two build-side fixes for coreos-assembler.
2020-11-13 23:03:23 +01:00
Jonathan Lebon
a1b35d0d75 Release 2020.7
To get https://github.com/coreos/rpm-ostree/pull/2301 out.
2020-11-02 16:47:10 +01:00
Colin Walters
607a04ae12 Release 2020.6
We have the 32 bit fix, the new initramfs command, and various
other cleanups.  I also want to see if this fixes https://bugzilla.redhat.com/show_bug.cgi?id=1865839
so let's get a release out.
2020-10-30 15:21:45 +01:00
Jonathan Lebon
4da10dc11e Add new ex initramfs-etc command
This command allows users to cheaply inject configuration files in the
initramfs stage without having to regenerate the whole initramfs (or
even a new OSTree commit). This will be useful for configuring services
involved in bringing up the root block device.

```
$ echo 'hello world' > /etc/foobar
$ rpm-ostree ex initramfs-etc --track /etc/foobar
Staging deployment... done
Run "systemctl reboot" to start a reboot
$ rpm-ostree status
State: idle
Deployments:
  ostree://fedora:fedora/x86_64/coreos/testing-devel
                   Version: 32.20200716.dev.1 (2020-07-16T02:47:29Z)
                    Commit: 9a817d75bef81b955179be6e602d1e6ae350645b6323231a62ba2ee6e5b9644b
              GPGSignature: (unsigned)
              InitramfsEtc: /etc/foobar

● ostree://fedora:fedora/x86_64/coreos/testing-devel
                   Version: 32.20200716.dev.1 (2020-07-16T02:47:29Z)
                    Commit: 9a817d75bef81b955179be6e602d1e6ae350645b6323231a62ba2ee6e5b9644b
              GPGSignature: (unsigned)
$ reboot
(boot into rd.break)
sh-5.0# cat /etc/foobar
hello world
```

See the libostree side of this at:
https://github.com/ostreedev/ostree/pull/2155

Lots more discussions in:
https://github.com/coreos/fedora-coreos-tracker/issues/94

Closes: #1930
2020-10-30 00:48:54 +01:00
Colin Walters
a2bbc12812 rust: Enable lto by default
This avoids us leaking all of the Rust symbols as public
into our shared library.

Came up in team chat since one person tried to copy just `/usr/bin/rpm-ostree`
from the dev container into a target and got a linker crash; but
really we want to avoid all the duplicated symbols entirely.

(And we should investigate cross-language LTO because that's the
 only way to get full savings)
2020-10-29 19:00:14 +01:00
Colin Walters
5650f376fb Add --enable-rojig, disable by default
We're seeing some CI failures that I think are a bug in rojig.
In the bigger picture...we never actually started using this,
and I think longer term shipping os updates via containers
probably makes more sense.

I put a *lot* of effort into this code and it's pretty cool
so it's hard to just delete it.  And *maybe* someone out there
is using it (but I doubt it).  So rather than just deleting
it entirely let's make it a build-time option.

I verified that it builds at least.
2020-10-22 15:38:50 -04:00
Jonathan Lebon
ec940303c4 Release 2020.5
A few goodies, but mostly to get #2221 out.
2020-09-15 11:32:06 +02:00
Jonathan Lebon
bcf241d572 Release 2020.4
Thin release. Mostly for a bunch of RHCOS-relevant fixes and
enhancements: 752f4f09 (#2178), 4d836dd8 (#2151) and f608eb09 (#2158).
2020-07-29 10:41:43 -04:00
Jonathan Lebon
fc1e660454 Move release instructions to RELEASE.md
The instructions for doing a release were outdated. Take the opportunity
to just move it to a dedicated markdown file and breaking it out to make
it easier to follow.

This is one step short of using a release checklist like some of the
other CoreOS projects do. This is a good base to eventually do that if
we want.
2020-06-23 16:14:51 -04:00
Jonathan Lebon
f3ccd92cd7 Release 2020.3
Seems about time, but also to get the crypto-policies workaround out:
https://github.com/coreos/fedora-coreos-tracker/issues/540
2020-06-19 11:39:16 -04:00
Colin Walters
0bfd20c900 build-sys: Disable zchunk for libdnf if we don't have it
Going to update rpm-ostree for RHEL 8.3, we did a huge bump
in libdnf which now defaults to enabling zchunk in its build
system.  We added the infrastructure before to detect things,
so propagate that to libdnf.
2020-05-14 17:52:43 -07:00
Colin Walters
ac5489b065 Release 2020.2
Mostly motivated by keeping the release train going:
https://bugzilla.redhat.com/show_bug.cgi?id=1827712#c18
2020-05-14 13:40:26 -07:00
Colin Walters
0de332bd84 build-sys: Remove --enable-new-name
We didn't ship this for a long time and...well, naming is hard, I guess
it's not going to happen soon.
2020-05-14 13:18:00 -07: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
Jonathan Lebon
35818cefd5 Release 2020.1 2020-02-05 23:18:45 +01:00
Jonathan Lebon
82b27de843 Release 2019.7
Not the biggest release, but there are some decent targeted fixes and
enhancements and it's been a while.
2019-12-19 16:22:11 +01:00
Colin Walters
75c676715a daemon: Use MountFlags=slave and opt-in to OSTree read-only /sysroot
This is all we need to tell libostree that we support a read-only
`/sysroot` and `/boot`.

See https://github.com/ostreedev/ostree/issues/1265
PR in https://github.com/ostreedev/ostree/pull/1767
2019-12-13 01:44:56 +01:00
Colin Walters
8e5baf5ca7 Detect whether zchunk (zck) is available at build time
We don't *actually* use this ourself, but librepo does, and libdnf gets confused
if librepo doesn't support it.  This is the case in RHEL8 currently.

Basically what breaks is trying to use the Fedora EPEL repo (has zchunk metadata)
on RHEL CoreOS.  And we have a test in kola that does this today.
2019-10-18 17:13:55 +02:00
Colin Walters
11ee20c1cd unpacker: Build with older libarchive without zstd
It's not in RHEL8.1, and I'm trying to rebase rpm-ostree.
2019-10-15 18:17:46 +02:00
Jonathan Lebon
ccace4c56c Release 2019.6
Last release was almost two months ago. Not a lot of groundbreaking
features, though let's get the various fixes out.

Closes: #1907
Approved by: lucab
2019-09-24 16:23:27 +00:00
Jonathan Lebon
71108521f6 Release 2019.5
I think we're in a good position now for FCOS enablement, and there are
a bunch of fixes we should get out, such as the zstd one.

Closes: #1875
Approved by: cgwalters
2019-07-24 16:04:36 +00:00
Jonathan Lebon
1ac29f25b7 Release 2019.4
It's been almost two months!

Closes: #1841
Approved by: cgwalters
2019-05-22 01:17:08 +00:00
Jonathan Lebon
b40e87f628 Release 2019.3
Time to get a new release out; it's been more than a month!

Closes: #1801
Approved by: cgwalters
2019-03-26 19:01:55 +00:00
Colin Walters
468ac72d6f Always enable dfd-over-dbus
Don't care about RHEL7 anymore, newer distributions have the SELinux
policy fix.

Closes: #1794
Approved by: jlebon
2019-03-25 13:46:29 +00:00
Colin Walters
ccc244879c build-sys: Always enable compose tooling
There's no reason to separate it anymore.

Closes: #1794
Approved by: jlebon
2019-03-25 13:46:29 +00:00
Colin Walters
8331e8069a build-sys: Drop support for ancient librpm
Here's where we stop caring about RHEL7's librpm.

Closes: #1794
Approved by: jlebon
2019-03-25 13:46:29 +00:00
Jonathan Lebon
6cdcd474b6 Makefile-libs.am: Work around g-ir-scanner issues with clang
Right now there's an issue in Fedora with `g-ir-scanner` picking up
`-fstack-clash-protection` from the `sysconfig` Python module and
passing it to `clang`, which doesn't understand this flag yet.

Just work around this by (1) not even building GIR bindings for our
bundled libdnf since there's no need, and (2) overridding the compiler
used by `g-ir-scanner` so it's always `gcc`.

See: https://github.com/projectatomic/rpm-ostree/pull/1787#issuecomment-473971585

Closes: #1787
Approved by: cgwalters
2019-03-19 12:19:38 +00:00
Jonathan Lebon
e90d0ed98e build: Move completions to /usr/share
rdgo is choking on this right now because, even though we added
`/usr/share/bash-completion` to the list of dirs to check in the spec
file[1], we don't have `bash-completion` installed in the buildroot, so
the `completionsdir` pkgconfig var isn't defined and we end up
defaulting to `/etc/bash_completion.d`.

el7's bash (not that it matters much now after #1785) is indeed new
enough to know that location. See also
https://github.com/ostreedev/ostree/pull/1083.

[1] https://src.fedoraproject.org/rpms/rpm-ostree/pull-request/30

Closes: #1786
Approved by: rfairley
2019-03-14 21:24:30 +00:00
Jonathan Lebon
b851d9dad2 build: Hook up bash completions
Follow-up to #1499. This is mostly based on
https://github.com/ostreedev/ostree/pull/1077.

Closes: #1772
Approved by: rfairley
2019-03-07 00:47:39 +00:00
Jonathan Lebon
97a60f90bd Release 2019.2
Let's get the SELinux fix out (#1754).

Closes: #1757
Approved by: cgwalters
2019-02-14 18:23:37 +00:00
Jonathan Lebon
7cceb35219 app/rebase: Support local repo remotes
Teach rpm-ostree to interpret rebases where the remote component is a
path to a local repo, e.g.:

    rpm-ostree rebase /mnt/ostree/repo:my/target/ref

Essentially, the local remote in this case is considered "ephemeral".
It's kind of the equivalent of, on traditional systems:

    dnf install --repofrompath repo,/path/to/repodata ...

The use case for this is in OpenShift v4, in which upgrades are done
from containers containing the OSTree commit. There, we want to point
RPM-OSTree directly at the repo in the mounted container and rebase to
the checksum.

For now, the option is marked experimental. One major reason for this is
that the way we pass the repo differs on RHEL7 vs other platforms. (See
comment block in `rpmostree-dbus-helpers.c` for details).

Related: https://github.com/openshift/machine-config-operator/issues/314

Co-authored-by: Colin Walters <walters@verbum.org>

Closes: #1732
Approved by: cgwalters
2019-02-05 18:03:02 +00:00
Jonathan Lebon
d9577618a1 Release 2019.1
Not a lot of changes, but a couple of important bugfixes.

Closes: #1736
Approved by: dustymabe
2019-01-21 17:54:25 +00:00
Jonathan Lebon
b889a51056 Release 2018.10
It's been a while and we have lots of goodies. Likely the last one
before the new year. 🎉

Closes: #1713
Approved by: cgwalters
2018-12-13 16:34:56 +00:00
Jonathan Lebon
2cc06ce89a configure.ac: Add "GitHub release" step to release workflow
Let's make use of the GitHub release feature to make it more prominent
on the "Releases" tab, but more importantly so that we can attach
vendored tarballs for downstreams. E.g. this will allow us to have a
correct `Source0` field in the Fedora spec file.

Related: #1683

Closes: #1684
Approved by: rfairley
2018-11-26 22:59:50 +00:00