KubeOS: bugs fix of pxe and admin-container
Signed-off-by: Yuhang Wei <weiyuhang3@huawei.com>
This commit is contained in:
parent
2af2d363d2
commit
97842219df
@ -0,0 +1,26 @@
|
||||
From dce6ad3578e0fef7d60e52d926db6835f6c437c0 Mon Sep 17 00:00:00 2001
|
||||
From: Yuhang Wei <weiyuhang3@huawei.com>
|
||||
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 <weiyuhang3@huawei.com>
|
||||
---
|
||||
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)
|
||||
|
||||
30
0002-fix-kbimg-incorrect-remove-chroot-script-path.patch
Normal file
30
0002-fix-kbimg-incorrect-remove-chroot-script-path.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 44a3d151910e89c8e7337f32091b3581c84d6b32 Mon Sep 17 00:00:00 2001
|
||||
From: Yuhang Wei <weiyuhang3@huawei.com>
|
||||
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 <weiyuhang3@huawei.com>
|
||||
---
|
||||
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)
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 0c7c2b286556dcdbfac902e44a12c5f6a486a78c Mon Sep 17 00:00:00 2001
|
||||
From: Yuhang Wei <weiyuhang3@huawei.com>
|
||||
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 <weiyuhang3@huawei.com>
|
||||
---
|
||||
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)
|
||||
|
||||
11
KubeOS.spec
11
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<weiyuhang3@huawei.com> - 1.0.8-2
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
- SUG:restart
|
||||
- DESC:bugs fix of pxe and admin-container
|
||||
|
||||
* Tue Dec 10 2024 Yuhang Wei<weiyuhang3@huawei.com> - 1.0.8-1
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user