diff --git a/0001-fix-kbimg-add-return-statement-for-non-existent-disk.patch b/0001-fix-kbimg-add-return-statement-for-non-existent-disk.patch new file mode 100644 index 0000000000000000000000000000000000000000..fefb92bff33bb3e45eacad9f2c2f89f96946d99e --- /dev/null +++ b/0001-fix-kbimg-add-return-statement-for-non-existent-disk.patch @@ -0,0 +1,26 @@ +From dce6ad3578e0fef7d60e52d926db6835f6c437c0 Mon Sep 17 00:00:00 2001 +From: Yuhang Wei +Date: Wed, 11 Dec 2024 10:57:09 +0800 +Subject: [PATCH 1/3] fix(kbimg): add return statement for non-existent disk + handling + +Signed-off-by: Yuhang Wei +--- + KubeOS-Rust/kbimg/src/values.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/KubeOS-Rust/kbimg/src/values.rs b/KubeOS-Rust/kbimg/src/values.rs +index 3986c13f..c36cacb9 100644 +--- a/KubeOS-Rust/kbimg/src/values.rs ++++ b/KubeOS-Rust/kbimg/src/values.rs +@@ -508,6 +508,7 @@ function GetDisk() { + echo "${disk} exists, start partition" | tee -a ${log} + else + echo "disk not exist, please choose correct disk" | tee -a ${log} ++ return 1 + fi + else + echo "no disk found" | tee -a ${log} +-- +2.39.5 (Apple Git-154) + diff --git a/0002-fix-kbimg-incorrect-remove-chroot-script-path.patch b/0002-fix-kbimg-incorrect-remove-chroot-script-path.patch new file mode 100644 index 0000000000000000000000000000000000000000..f8a7e45cadc062d007fdac7e4752c8453e5097da --- /dev/null +++ b/0002-fix-kbimg-incorrect-remove-chroot-script-path.patch @@ -0,0 +1,30 @@ +From 44a3d151910e89c8e7337f32091b3581c84d6b32 Mon Sep 17 00:00:00 2001 +From: Yuhang Wei +Date: Wed, 11 Dec 2024 11:28:00 +0800 +Subject: [PATCH 2/3] fix(kbimg): incorrect remove chroot script path + +Signed-off-by: Yuhang Wei +--- + KubeOS-Rust/kbimg/src/custom.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/KubeOS-Rust/kbimg/src/custom.rs b/KubeOS-Rust/kbimg/src/custom.rs +index 55071bfa..85d10023 100644 +--- a/KubeOS-Rust/kbimg/src/custom.rs ++++ b/KubeOS-Rust/kbimg/src/custom.rs +@@ -78,7 +78,11 @@ impl ChrootScript { + "#, + absolute_path.as_path().to_str().unwrap(), + script_name.to_str().unwrap(), +- if self.rm.unwrap_or(false) { format!("rm -f /{}", script_name.to_str().unwrap()) } else { "".to_string() } ++ if self.rm.unwrap_or(false) { ++ format!("rm -f \"${{RPM_ROOT}}\"/{}", script_name.to_str().unwrap()) ++ } else { ++ "".to_string() ++ } + )?; + Ok(()) + } +-- +2.39.5 (Apple Git-154) + diff --git a/0003-fix-admin-container-correct-path-for-copying-files-i.patch b/0003-fix-admin-container-correct-path-for-copying-files-i.patch new file mode 100644 index 0000000000000000000000000000000000000000..8012a48610f77d01076365f34fccabcb9603da04 --- /dev/null +++ b/0003-fix-admin-container-correct-path-for-copying-files-i.patch @@ -0,0 +1,27 @@ +From 0c7c2b286556dcdbfac902e44a12c5f6a486a78c Mon Sep 17 00:00:00 2001 +From: Yuhang Wei +Date: Wed, 11 Dec 2024 12:02:46 +0800 +Subject: [PATCH 3/3] fix(admin-container): correct path for copying files in + dockerfile + +Signed-off-by: Yuhang Wei +--- + KubeOS-Rust/kbimg/src/values.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/KubeOS-Rust/kbimg/src/values.rs b/KubeOS-Rust/kbimg/src/values.rs +index c36cacb9..7cf322e1 100644 +--- a/KubeOS-Rust/kbimg/src/values.rs ++++ b/KubeOS-Rust/kbimg/src/values.rs +@@ -845,7 +845,7 @@ CMD ["/bin/sh"]"#; + + pub const ADMIN_DOCKERFILE_CONTENT: &str = r#"FROM openeuler/openeuler:24.03-lts + RUN dnf upgrade -y && dnf -y install openssh-clients util-linux sysmaster +-COPY ./set-ssh-pub-key.sh ./hostshell /usr/local/bin ++COPY ./set-ssh-pub-key.sh ./hostshell /usr/local/bin/ + COPY ./set-ssh-pub-key.service /usr/lib/sysmaster/system + EXPOSE 22 + RUN ln -s /usr/lib/sysmaster/system/set-ssh-pub-key.service /etc/sysmaster/system/multi-user.target.wants/set-ssh-pub-key.service +-- +2.39.5 (Apple Git-154) + diff --git a/KubeOS.spec b/KubeOS.spec index 1c2caae56be4c5c49f3b1f21ca79f1455ccea3d3..a19869b365dfcf46c4c3aeeb5e9e52e3e1d439de 100644 --- a/KubeOS.spec +++ b/KubeOS.spec @@ -2,10 +2,13 @@ Name: KubeOS Version: 1.0.8 -Release: 1 +Release: 2 Summary: O&M platform used to update the whole OS as an entirety License: Mulan PSL v2 Source0: https://gitee.com/openeuler/KubeOS/repository/archive/v%{version}.tar.gz +Patch1: 0001-fix-kbimg-add-return-statement-for-non-existent-disk.patch +Patch2: 0002-fix-kbimg-incorrect-remove-chroot-script-path.patch +Patch3: 0003-fix-admin-container-correct-path-for-copying-files-i.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: make rust cargo openssl-devel @@ -70,6 +73,12 @@ install -p -m 0600 ./KubeOS-Rust/kbimg/kbimg.toml %{buildroot}/opt/kubeOS/script rm -rfv %{buildroot} %changelog +* Wed Dec 11 2024 Yuhang Wei - 1.0.8-2 +- Type:requirement +- CVE:NA +- SUG:restart +- DESC:bugs fix of pxe and admin-container + * Tue Dec 10 2024 Yuhang Wei - 1.0.8-1 - Type:requirement - CVE:NA