update patch 0001 to unsupport NestOS stream
This commit is contained in:
parent
f5d8d61537
commit
97f769d1d0
@ -1,19 +1,20 @@
|
|||||||
From 8a820c2b4bcea248db3aff42cb48c85f15baf416 Mon Sep 17 00:00:00 2001
|
From 0209dce6484c29d2ac8408192c14d5490074809c Mon Sep 17 00:00:00 2001
|
||||||
From: duyiwei <duyiwei@kylinos.cn>
|
From: duyiwei <duyiwei@kylinos.cn>
|
||||||
Date: Fri, 10 May 2024 15:52:00 +0800
|
Date: Fri, 24 May 2024 10:40:49 +0800
|
||||||
Subject: [PATCH] Block unsupported functions and modify the coreos to nestos
|
Subject: [PATCH] Block unsupported functions and modify the coreos to nestos
|
||||||
|
|
||||||
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
|
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
|
||||||
---
|
---
|
||||||
src/cmdline/install.rs | 6 +++---
|
src/cmdline/install.rs | 8 ++++----
|
||||||
src/cmdline/mod.rs | 8 ++++----
|
src/cmdline/mod.rs | 8 ++++----
|
||||||
|
src/install.rs | 11 +++++++++--
|
||||||
src/main.rs | 16 ++++++++--------
|
src/main.rs | 16 ++++++++--------
|
||||||
src/s390x/zipl.rs | 2 +-
|
src/s390x/zipl.rs | 2 +-
|
||||||
src/source.rs | 4 ++--
|
src/source.rs | 4 ++--
|
||||||
5 files changed, 18 insertions(+), 18 deletions(-)
|
6 files changed, 28 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/cmdline/install.rs b/src/cmdline/install.rs
|
diff --git a/src/cmdline/install.rs b/src/cmdline/install.rs
|
||||||
index 459c7c5..e9132f9 100644
|
index 459c7c5..1945590 100644
|
||||||
--- a/src/cmdline/install.rs
|
--- a/src/cmdline/install.rs
|
||||||
+++ b/src/cmdline/install.rs
|
+++ b/src/cmdline/install.rs
|
||||||
@@ -78,12 +78,12 @@ pub struct InstallConfig {
|
@@ -78,12 +78,12 @@ pub struct InstallConfig {
|
||||||
@ -40,6 +41,15 @@ index 459c7c5..e9132f9 100644
|
|||||||
/// image, which must exist and be valid. A missing signature can be
|
/// image, which must exist and be valid. A missing signature can be
|
||||||
/// ignored with --insecure.
|
/// ignored with --insecure.
|
||||||
#[arg(short = 'f', long, value_name = "path")]
|
#[arg(short = 'f', long, value_name = "path")]
|
||||||
|
@@ -234,7 +234,7 @@ pub struct InstallConfig {
|
||||||
|
///
|
||||||
|
/// Temporarily closed before NestOS Stream is ready.
|
||||||
|
#[serde_as(as = "Option<DisplayFromStr>")]
|
||||||
|
- #[arg(long, value_name = "URL", help_heading = ADVANCED)]
|
||||||
|
+ #[arg(long, hide = true, value_name = "URL", help_heading = ADVANCED)]
|
||||||
|
pub stream_base_url: Option<Url>,
|
||||||
|
/// Don't clear partition table on error
|
||||||
|
///
|
||||||
diff --git a/src/cmdline/mod.rs b/src/cmdline/mod.rs
|
diff --git a/src/cmdline/mod.rs b/src/cmdline/mod.rs
|
||||||
index b78b54b..88efdc8 100644
|
index b78b54b..88efdc8 100644
|
||||||
--- a/src/cmdline/mod.rs
|
--- a/src/cmdline/mod.rs
|
||||||
@ -59,6 +69,42 @@ index b78b54b..88efdc8 100644
|
|||||||
/// Commands to manage a NestOS live ISO image
|
/// Commands to manage a NestOS live ISO image
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
Iso(IsoCmd),
|
Iso(IsoCmd),
|
||||||
|
diff --git a/src/install.rs b/src/install.rs
|
||||||
|
index 2182117..904ddd8 100644
|
||||||
|
--- a/src/install.rs
|
||||||
|
+++ b/src/install.rs
|
||||||
|
@@ -36,6 +36,13 @@ use crate::source::*;
|
||||||
|
const GRUB_CFG_CONSOLE_SETTINGS_RE: &str = r"(?P<prefix>\n# CONSOLE-SETTINGS-START\n)(?P<commands>([^\n]*\n)*)(?P<suffix># CONSOLE-SETTINGS-END\n)";
|
||||||
|
|
||||||
|
pub fn install(config: InstallConfig) -> Result<()> {
|
||||||
|
+ if config.stream.is_some() {
|
||||||
|
+ bail!("The --stream is not currently supported until NestOS release stream is ready.");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if config.stream_base_url.is_some() {
|
||||||
|
+ bail!("The --stream-base-url is not currently supported until NestOS release stream is ready.");
|
||||||
|
+ }
|
||||||
|
// evaluate config files
|
||||||
|
let config = config.expand_config_files()?;
|
||||||
|
|
||||||
|
@@ -149,8 +156,6 @@ pub fn install(config: InstallConfig) -> Result<()> {
|
||||||
|
None => bail!("cannot perform offline install; metadata missing"),
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
- //Temporarily closed before NestOS Stream is ready.
|
||||||
|
- bail!("The --stream is not currently supported until NestOS release stream is ready.");
|
||||||
|
// For now, using --stream automatically will cause a download. In the future, we could
|
||||||
|
// opportunistically use osmet if the version and stream match an osmet file/the live ISO.
|
||||||
|
|
||||||
|
@@ -162,6 +167,8 @@ pub fn install(config: InstallConfig) -> Result<()> {
|
||||||
|
if let Some(osmet) = maybe_osmet {
|
||||||
|
Box::new(osmet)
|
||||||
|
} else {
|
||||||
|
+ //Temporarily unsupported before NestOS Stream is ready.
|
||||||
|
+ bail!("Stream fetching of images is not supported. Ensure you are in a NestOS live environment or provide a valid image source.");
|
||||||
|
let format = match sector_size {
|
||||||
|
4096 => "4k.raw.xz",
|
||||||
|
512 => "raw.xz",
|
||||||
diff --git a/src/main.rs b/src/main.rs
|
diff --git a/src/main.rs b/src/main.rs
|
||||||
index 32e1040..9c1d5bc 100644
|
index 32e1040..9c1d5bc 100644
|
||||||
--- a/src/main.rs
|
--- a/src/main.rs
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
Name: rust-nestos-installer
|
Name: rust-nestos-installer
|
||||||
Version: 0.20.0
|
Version: 0.20.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: Installer for NestOS
|
Summary: Installer for NestOS
|
||||||
|
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
@ -107,6 +107,9 @@ This subpackage contains boot-time infrastructure for NestOS. It is not needed
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 24 2024 duyiwei <duyiwei@kylinos.cn> - 0.20.0-3
|
||||||
|
- update patch 0001 to unsupport NestOS stream
|
||||||
|
|
||||||
* Fri May 10 2024 duyiwei <duyiwei@kylinos.cn> - 0.20.0-2
|
* Fri May 10 2024 duyiwei <duyiwei@kylinos.cn> - 0.20.0-2
|
||||||
- Block unsupported functions and modify the coreos to nestos
|
- Block unsupported functions and modify the coreos to nestos
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user