parent
afbd11e61d
commit
bcb7da0b27
73
0001-extensions-support-enabling-installing-modules.patch
Normal file
73
0001-extensions-support-enabling-installing-modules.patch
Normal file
@ -0,0 +1,73 @@
|
||||
From 25fcebfeb0e63ce395bdbbf710d4c79888e57130 Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Lebon <jonathan@jlebon.com>
|
||||
Date: Thu, 26 Aug 2021 21:42:21 -0400
|
||||
Subject: [PATCH] extensions: support enabling/installing modules
|
||||
|
||||
Fix that gap now since RHCOS does use modular packages in its
|
||||
extensions. This ended up being easier than I thought because we're just
|
||||
converting to a treefile underneath.
|
||||
---
|
||||
docs/extensions.md | 11 +++++++++++
|
||||
rust/src/extensions.rs | 3 +++
|
||||
rust/src/treefile.rs | 2 +-
|
||||
3 files changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/docs/extensions.md b/docs/extensions.md
|
||||
index a754b185..9dbc6230 100644
|
||||
--- a/docs/extensions.md
|
||||
+++ b/docs/extensions.md
|
||||
@@ -30,6 +30,17 @@ extension packages and places them in an output directory.
|
||||
The format of the `extensions.yaml` file is as follow:
|
||||
|
||||
```yaml
|
||||
+# Any additional repos to enable on top of treefile repos
|
||||
+repos:
|
||||
+ - myrepo
|
||||
+
|
||||
+# Any modules to enable/install
|
||||
+modules:
|
||||
+ enable:
|
||||
+ - foo:bar
|
||||
+ install:
|
||||
+ - baz:boo/default
|
||||
+
|
||||
# The top-level object is a dict. The only supported key
|
||||
# right now is `extensions`, which is a dict of extension
|
||||
# names to extension objects.
|
||||
diff --git a/rust/src/extensions.rs b/rust/src/extensions.rs
|
||||
index ad2fe19b..6cb1a3a6 100644
|
||||
--- a/rust/src/extensions.rs
|
||||
+++ b/rust/src/extensions.rs
|
||||
@@ -25,6 +25,8 @@ pub struct Extensions {
|
||||
extensions: HashMap<String, Extension>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
repos: Option<Vec<String>>,
|
||||
+ #[serde(skip_serializing_if = "Option::is_none")]
|
||||
+ modules: Option<crate::treefile::ModulesConfig>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
@@ -162,6 +164,7 @@ impl Extensions {
|
||||
repos: Some(repos),
|
||||
packages: Some(self.get_os_extension_packages()),
|
||||
releasever: src.parsed.releasever.clone(),
|
||||
+ modules: self.modules.clone(),
|
||||
..Default::default()
|
||||
};
|
||||
Ok(Box::new(Treefile::new_from_config(ret, None)?))
|
||||
diff --git a/rust/src/treefile.rs b/rust/src/treefile.rs
|
||||
index 421f2b6c..eeb21a50 100644
|
||||
--- a/rust/src/treefile.rs
|
||||
+++ b/rust/src/treefile.rs
|
||||
@@ -1290,7 +1290,7 @@ pub(crate) struct RepoPackage {
|
||||
pub(crate) packages: Vec<String>,
|
||||
}
|
||||
|
||||
-#[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq)]
|
||||
+#[derive(Serialize, Deserialize, Debug, Default, PartialEq, Eq, Clone)]
|
||||
pub(crate) struct ModulesConfig {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub(crate) enable: Option<Vec<String>>,
|
||||
--
|
||||
2.31.1
|
||||
|
@ -4,13 +4,15 @@
|
||||
Summary: Hybrid image/package system
|
||||
Name: rpm-ostree
|
||||
Version: 2021.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/coreos/rpm-ostree
|
||||
# This tarball is generated via "cd packaging && make -f Makefile.dist-packaging dist-snapshot"
|
||||
# in the upstream git. It also contains vendored Rust sources.
|
||||
Source0: https://github.com/coreos/rpm-ostree/releases/download/v%{version}/rpm-ostree-%{version}.tar.xz
|
||||
|
||||
Patch0: 0001-extensions-support-enabling-installing-modules.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: make
|
||||
@ -221,6 +223,10 @@ $PYTHON autofiles.py > files.devel \
|
||||
|
||||
%files devel -f files.devel
|
||||
%changelog
|
||||
* Fri Aug 27 2021 Colin Walters <walters@verbum.org> - 2021.10-2
|
||||
- Backport
|
||||
https://github.com/coreos/rpm-ostree/pull/3095/commits/1d445170b97e8eaad6979b68f1c3ce3481c801ea
|
||||
|
||||
* Thu Aug 26 2021 Jonathan Lebon <jonathan@jlebon.com> - 2021.10-1
|
||||
- New release v2021.10
|
||||
https://github.com/coreos/rpm-ostree/releases/tag/v2021.10
|
||||
|
Loading…
Reference in New Issue
Block a user