diff --git a/0001-Block-unsupported-functions-and-modify-the-coreos-to-nestos.patch b/0001-Block-unsupported-functions-and-modify-the-coreos-to-nestos.patch index 348a66a..e13851a 100644 --- a/0001-Block-unsupported-functions-and-modify-the-coreos-to-nestos.patch +++ b/0001-Block-unsupported-functions-and-modify-the-coreos-to-nestos.patch @@ -1,19 +1,20 @@ -From 8a820c2b4bcea248db3aff42cb48c85f15baf416 Mon Sep 17 00:00:00 2001 +From 0209dce6484c29d2ac8408192c14d5490074809c Mon Sep 17 00:00:00 2001 From: duyiwei -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 Signed-off-by: duyiwei --- - src/cmdline/install.rs | 6 +++--- + src/cmdline/install.rs | 8 ++++---- src/cmdline/mod.rs | 8 ++++---- + src/install.rs | 11 +++++++++-- src/main.rs | 16 ++++++++-------- src/s390x/zipl.rs | 2 +- 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 -index 459c7c5..e9132f9 100644 +index 459c7c5..1945590 100644 --- a/src/cmdline/install.rs +++ b/src/cmdline/install.rs @@ -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 /// ignored with --insecure. #[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")] +- #[arg(long, value_name = "URL", help_heading = ADVANCED)] ++ #[arg(long, hide = true, value_name = "URL", help_heading = ADVANCED)] + pub stream_base_url: Option, + /// Don't clear partition table on error + /// diff --git a/src/cmdline/mod.rs b/src/cmdline/mod.rs index b78b54b..88efdc8 100644 --- a/src/cmdline/mod.rs @@ -59,6 +69,42 @@ index b78b54b..88efdc8 100644 /// Commands to manage a NestOS live ISO image #[command(subcommand)] 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\n# CONSOLE-SETTINGS-START\n)(?P([^\n]*\n)*)(?P# 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 index 32e1040..9c1d5bc 100644 --- a/src/main.rs diff --git a/nestos-installer.spec b/nestos-installer.spec index 30e708b..f843b75 100644 --- a/nestos-installer.spec +++ b/nestos-installer.spec @@ -9,7 +9,7 @@ Name: rust-nestos-installer Version: 0.20.0 -Release: 2 +Release: 3 Summary: Installer for NestOS License: Apache-2.0 @@ -107,6 +107,9 @@ This subpackage contains boot-time infrastructure for NestOS. It is not needed %changelog +* Fri May 24 2024 duyiwei - 0.20.0-3 +- update patch 0001 to unsupport NestOS stream + * Fri May 10 2024 duyiwei - 0.20.0-2 - Block unsupported functions and modify the coreos to nestos