Colin Walters 2020-03-13 23:22:33 +00:00
parent de087e65a9
commit d44379a80f
2 changed files with 94 additions and 1 deletions

View File

@ -0,0 +1,87 @@
From 9269c9a802138ec102a7061b8b29161c6fb382ea Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 13 Mar 2020 14:07:05 +0000
Subject: [PATCH] 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.
---
.cci.jenkinsfile | 3 +++
configure.ac | 8 +-------
src/daemon/rpmostreed-sysroot.c | 2 --
src/daemon/rpmostreed-transaction.c | 2 --
4 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index 407e2f1b..2967aa39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ LIBS="$save_LIBS"
# Remember to update AM_CPPFLAGS in Makefile.am when bumping GIO req.
PKG_CHECK_MODULES(PKGDEP_GIO_UNIX, [gio-unix-2.0])
PKG_CHECK_MODULES(PKGDEP_RPMOSTREE, [gio-unix-2.0 >= 2.50.0 json-glib-1.0
- ostree-1 >= 2018.9
+ ostree-1 >= 2020.1
libsystemd
polkit-gobject-1
rpm librepo libsolv
@@ -122,12 +122,6 @@ dnl bundled libdnf
PKGDEP_RPMOSTREE_CFLAGS="-I $(pwd)/libdnf -I $(pwd)/libdnf-build $PKGDEP_RPMOSTREE_CFLAGS"
PKGDEP_RPMOSTREE_LIBS="-L$(pwd)/libdnf-build/libdnf -ldnf $PKGDEP_RPMOSTREE_LIBS"
-dnl Version check this until it's stable
-save_LIBS=$LIBS
-LIBS=$PKGDEP_RPMOSTREE_LIBS
-AC_CHECK_FUNCS(ostree_sysroot_set_mount_namespace_in_use)
-LIBS=$save_LIBS
-
dnl RHEL8.1 has old libarchive
AS_IF([pkg-config --atleast-version=3.3.3 libarchive],
[AC_DEFINE([HAVE_LIBARCHIVE_ZSTD], 1, [Define if we have libarchive with zstd])])
diff --git a/src/daemon/rpmostreed-sysroot.c b/src/daemon/rpmostreed-sysroot.c
index 427d11ef..bc1587e8 100644
--- a/src/daemon/rpmostreed-sysroot.c
+++ b/src/daemon/rpmostreed-sysroot.c
@@ -762,11 +762,9 @@ rpmostreed_sysroot_populate (RpmostreedSysroot *self,
const char *sysroot_path = rpmostree_sysroot_get_path (RPMOSTREE_SYSROOT (self));
g_autoptr(GFile) sysroot_file = g_file_new_for_path (sysroot_path);
self->ot_sysroot = ostree_sysroot_new (sysroot_file);
-#ifdef HAVE_OSTREE_SYSROOT_SET_MOUNT_NAMESPACE_IN_USE
if (!ostree_sysroot_initialize (self->ot_sysroot, error))
return FALSE;
ostree_sysroot_set_mount_namespace_in_use (self->ot_sysroot);
-#endif
/* This creates and caches an OstreeRepo instance inside
* OstreeSysroot to ensure subsequent ostree_sysroot_get_repo()
diff --git a/src/daemon/rpmostreed-transaction.c b/src/daemon/rpmostreed-transaction.c
index e9726633..4f99bc8f 100644
--- a/src/daemon/rpmostreed-transaction.c
+++ b/src/daemon/rpmostreed-transaction.c
@@ -574,7 +574,6 @@ transaction_initable_init (GInitable *initable,
*/
priv->sysroot = ostree_sysroot_new (tmp_path);
/* See also related code in rpmostreed-sysroot.c */
-#ifdef HAVE_OSTREE_SYSROOT_SET_MOUNT_NAMESPACE_IN_USE
if (!ostree_sysroot_initialize (priv->sysroot, error))
return FALSE;
/* We use MountFlags=slave in the unit file, which combined
@@ -582,7 +581,6 @@ transaction_initable_init (GInitable *initable,
* https://github.com/ostreedev/ostree/issues/1265
**/
ostree_sysroot_set_mount_namespace_in_use (priv->sysroot);
-#endif
g_signal_connect (priv->sysroot, "journal-msg",
G_CALLBACK (on_sysroot_journal_msg), self);
--
2.24.1

View File

@ -4,7 +4,7 @@
Summary: Hybrid image/package system
Name: rpm-ostree
Version: 2020.1.21.ge9011530
Release: 1%{?dist}
Release: 2%{?dist}
#VCS: https://github.com/cgwalters/rpm-ostree
# This tarball is generated via "cd packaging && make -f Makefile.dist-packaging dist-snapshot"
# in the upstream git. If rust is enabled, it contains vendored sources.
@ -12,6 +12,8 @@ Source0: rpm-ostree-%{version}.tar.xz
License: LGPLv2+
URL: https://github.com/projectatomic/rpm-ostree
Patch0: 0001-build-sys-Hard-require-libostree-2020.1.patch
ExclusiveArch: %{rust_arches}
%if 0%{?fedora}
@ -190,6 +192,10 @@ $PYTHON autofiles.py > files.devel \
%files devel -f files.devel
%changelog
* Fri Mar 13 2020 Colin Walters <walters@verbum.org> - 2020.1.21.ge9011530-2
- Backport https://github.com/coreos/rpm-ostree/pull/2015
See https://github.com/coreos/fedora-coreos-tracker/issues/343
* Thu Feb 27 2020 Jonathan Lebon <jonathan@jlebon.com> - 2020.1.21.ge9011530-1
- git master snapshot for using base initramfs kargs in RHCOS:
https://github.com/coreos/rpm-ostree/pull/1998