!24 fix the problem that the ARM architecture is not built by synchronizing code from 20.03-LTS-SP3
From: @li-yuanrong Reviewed-by: @duguhaotian Signed-off-by: @duguhaotian
This commit is contained in:
commit
c854c3184a
119
0002-change-generate-argument-from-isopath-to-repopath.patch
Normal file
119
0002-change-generate-argument-from-isopath-to-repopath.patch
Normal file
@ -0,0 +1,119 @@
|
||||
From c652bb6f46ce2e434bd098552abebbba8909a9c0 Mon Sep 17 00:00:00 2001
|
||||
From: linxiaoxu <linxiaoxu@huawei.com>
|
||||
Date: Wed, 8 Dec 2021 02:01:18 +0000
|
||||
Subject: [PATCH] change generate argument from isopath to repopath
|
||||
|
||||
---
|
||||
docs/quick-start.md | 4 ++--
|
||||
scripts/generate.sh | 30 ++++++------------------------
|
||||
2 files changed, 8 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/docs/quick-start.md b/docs/quick-start.md
|
||||
index 098c839..ceb81e5 100644
|
||||
--- a/docs/quick-start.md
|
||||
+++ b/docs/quick-start.md
|
||||
@@ -56,10 +56,10 @@
|
||||
进入scripts目录,执行脚本
|
||||
```
|
||||
cd scripts
|
||||
- bash generate.sh ISO_PATH VERSION AGENT_PATH ENCRYPTED_PASSWD
|
||||
+ bash generate.sh REPO_PATH VERSION AGENT_PATH ENCRYPTED_PASSWD
|
||||
```
|
||||
- 参数说明:
|
||||
- - ISO_PATH :全量iso的路径
|
||||
+ - REPO_PATH :全量repo的路径
|
||||
- VERSION :制作的容器OS镜像的版本
|
||||
- AGENT_PATH:构建出来的os-agent的路径
|
||||
- ENCRYPTED_PASSWD:镜像的root用户密码,加密后的带盐值的密码。可以用openssl、kiwi等命令生成
|
||||
diff --git a/scripts/generate.sh b/scripts/generate.sh
|
||||
index 1374894..d5111f1 100644
|
||||
--- a/scripts/generate.sh
|
||||
+++ b/scripts/generate.sh
|
||||
@@ -12,8 +12,7 @@
|
||||
set -e
|
||||
|
||||
NAME=KubeOS
|
||||
-ISO_PATH="/mnt"
|
||||
-ISO=""
|
||||
+REPO=""
|
||||
VERSION=""
|
||||
AGENT_PATH=""
|
||||
PASSWD=""
|
||||
@@ -27,7 +26,7 @@ CHECK_REGEX='\||;|&|&&|\|\||>|>>|<|,|#|!|\$'
|
||||
function show_options() {
|
||||
cat << EOF
|
||||
|
||||
-usage example: sh generate.sh isopath osversion agentpath passwd(encrypted)
|
||||
+usage example: sh generate.sh repopath osversion agentpath passwd(encrypted)
|
||||
|
||||
options:
|
||||
-h,--help show help information
|
||||
@@ -114,7 +113,6 @@ function delete_file() {
|
||||
function clean_space() {
|
||||
delete_dir "${RPM_ROOT}"
|
||||
delete_dir "${TMP_MOUNT_PATH}"
|
||||
- unmount_dir "${ISO_PATH}"
|
||||
delete_file os.tar
|
||||
rm -rf "${LOCK}"
|
||||
}
|
||||
@@ -135,8 +133,8 @@ function test_lock() {
|
||||
}
|
||||
|
||||
function check_path() {
|
||||
- if [ ! -f "${ISO}" ];then
|
||||
- echo "ISO path is invalid."
|
||||
+ if [ ! -f "${REPO}" ];then
|
||||
+ echo "REPO path is invalid."
|
||||
exit 3
|
||||
fi
|
||||
|
||||
@@ -144,11 +142,6 @@ function check_path() {
|
||||
echo "there is a rootfs folder. please confirm if rootfs is being used, if not, please remove ${RPM_ROOT} first."
|
||||
exit 5
|
||||
fi
|
||||
-
|
||||
- if mount 2>/dev/null | grep -w -q "${ISO_PATH}"; then
|
||||
- echo "$ISO_PATH has already been mounted."
|
||||
- exit 4
|
||||
- fi
|
||||
}
|
||||
|
||||
function check_disk_space() {
|
||||
@@ -168,24 +161,13 @@ function check_disk_space() {
|
||||
}
|
||||
|
||||
function prepare_yum() {
|
||||
- mount "${ISO}" "${ISO_PATH}"
|
||||
- if [ ! -d "/mnt/Packages" ]; then
|
||||
- echo "please use ISO file path as ${ISO}."
|
||||
- exit 2
|
||||
- fi
|
||||
-
|
||||
# init rpmdb
|
||||
rpm --root "${RPM_ROOT}" --initdb
|
||||
mkdir -p "${RPM_ROOT}"{/etc/yum.repos.d,/persist,/proc,/dev/pts,/sys}
|
||||
mount_proc_dev_sys "${RPM_ROOT}"
|
||||
# init yum repo
|
||||
local iso_repo="${RPM_ROOT}/etc/yum.repos.d/iso.repo"
|
||||
- echo "[base]" >"${iso_repo}"
|
||||
- {
|
||||
- echo "name=ISO base"
|
||||
- echo "baseurl=file://${ISO_PATH}"
|
||||
- echo "enabled=1"
|
||||
- } >>"${iso_repo}"
|
||||
+ cat ${REPO} > ${RPM_ROOT}/etc/yum.repos.d/iso.repo
|
||||
}
|
||||
|
||||
function install_packages() {
|
||||
@@ -304,7 +286,7 @@ do
|
||||
done
|
||||
set -eE
|
||||
|
||||
-ISO=$1
|
||||
+REPO=$1
|
||||
VERSION=$2
|
||||
AGENT_PATH=$3
|
||||
PASSWD=$4
|
||||
--
|
||||
2.30.0
|
||||
|
||||
298
0003-KubeOS-add-arm-architecture-support-to-the-OS-image.patch
Normal file
298
0003-KubeOS-add-arm-architecture-support-to-the-OS-image.patch
Normal file
@ -0,0 +1,298 @@
|
||||
From a19218ad25eac323ead61ec5ff1fbb04a6dc2539 Mon Sep 17 00:00:00 2001
|
||||
From: liyuanr <liyuanrong1@huawei.com>
|
||||
Date: Fri, 3 Dec 2021 11:16:22 +0800
|
||||
Subject: [PATCH] KubeOS:add arm architecture support to the OS image
|
||||
|
||||
Signed-off-by: liyuanr <liyuanrong1@huawei.com>
|
||||
---
|
||||
cmd/agent/server/server.go | 5 +-
|
||||
files/{boot-grub2.mount => boot.mount} | 6 +-
|
||||
scripts/bootloader.sh | 40 +++++++++++++
|
||||
scripts/generate.sh | 83 +++++++++++++++-----------
|
||||
scripts/grub.cfg | 16 ++---
|
||||
scripts/rpmlist | 3 +-
|
||||
scripts/set_in_chroot.sh | 2 +-
|
||||
7 files changed, 107 insertions(+), 48 deletions(-)
|
||||
rename files/{boot-grub2.mount => boot.mount} (92%)
|
||||
create mode 100644 scripts/bootloader.sh
|
||||
|
||||
diff --git a/cmd/agent/server/server.go b/cmd/agent/server/server.go
|
||||
index 711e0c8..e4db02e 100644
|
||||
--- a/cmd/agent/server/server.go
|
||||
+++ b/cmd/agent/server/server.go
|
||||
@@ -174,7 +174,10 @@ func install(imagePath string, mainPart string, partB string) error {
|
||||
if side != partB {
|
||||
next = "A"
|
||||
}
|
||||
- return runCommand("grub2-set-default", next)
|
||||
+ if err := runCommand("grub2-set-default", next); err != nil {
|
||||
+ return err
|
||||
+ }
|
||||
+ return runCommand("cp", "/boot/grub2/grubenv", "/boot/efi/EFI/openEuler")
|
||||
}
|
||||
|
||||
func (s *Server) reboot() error {
|
||||
diff --git a/files/boot-grub2.mount b/files/boot.mount
|
||||
similarity index 92%
|
||||
rename from files/boot-grub2.mount
|
||||
rename to files/boot.mount
|
||||
index a53fff7..a228aae 100644
|
||||
--- a/files/boot-grub2.mount
|
||||
+++ b/files/boot.mount
|
||||
@@ -15,9 +15,9 @@ Conflicts=umount.target
|
||||
Before=local-fs.target umount.target
|
||||
|
||||
[Mount]
|
||||
-What=/dev/disk/by-label/GRUB2
|
||||
-Where=/boot/grub2
|
||||
-Type=ext4
|
||||
+What=/dev/disk/by-label/BOOT
|
||||
+Where=/boot
|
||||
+Type=vfat
|
||||
Options=defaults
|
||||
|
||||
[Install]
|
||||
diff --git a/scripts/bootloader.sh b/scripts/bootloader.sh
|
||||
new file mode 100644
|
||||
index 0000000..b93c314
|
||||
--- /dev/null
|
||||
+++ b/scripts/bootloader.sh
|
||||
@@ -0,0 +1,40 @@
|
||||
+#!/bin/bash
|
||||
+set -eu
|
||||
+set -o pipefail
|
||||
+set -x
|
||||
+ARCH=`arch`
|
||||
+
|
||||
+function install_grub2_x86 ()
|
||||
+{
|
||||
+ # make boot.img/core.img and setup, to support legacy boot mode
|
||||
+ GRUBNAME=$(which grub2-install)
|
||||
+ echo "Installing GRUB2..."
|
||||
+ GRUB_OPTS=${GRUB_OPTS:-"--force"}
|
||||
+ GRUB_OPTS="$GRUB_OPTS --target=i386-pc"
|
||||
+
|
||||
+ $GRUBNAME --modules="biosdisk part_msdos" $GRUB_OPTS $DEVICE
|
||||
+
|
||||
+ # make efi file, and save in FAT16 partition, to support UEFI boot mode
|
||||
+ cp -r /usr/lib/grub/x86_64-efi boot/efi/EFI/openEuler
|
||||
+ eval "grub2-mkimage -d /usr/lib/grub/x86_64-efi -O x86_64-efi --output=/boot/efi/EFI/openEuler/grubx64.efi '--prefix=(,msdos1)/efi/EFI/openEuler' fat part_gpt part_msdos linux"
|
||||
+
|
||||
+ mkdir -p /boot/EFI/BOOT/
|
||||
+ cp -f /boot/efi/EFI/openEuler/grubx64.efi /boot/EFI/BOOT/BOOTX64.EFI
|
||||
+}
|
||||
+
|
||||
+function install_grub2_efi ()
|
||||
+{
|
||||
+ cp -r /usr/lib/grub/arm64-efi /boot/efi/EFI/openEuler/
|
||||
+ eval "grub2-mkimage -d /usr/lib/grub/arm64-efi -O arm64-efi --output=/boot/efi/EFI/openEuler/grubaa64.efi '--prefix=(,msdos1)/efi/EFI/openEuler' fat part_gpt part_msdos linux"
|
||||
+
|
||||
+ mkdir -p /boot/EFI/BOOT/
|
||||
+ cp -f /boot/efi/EFI/openEuler/grubaa64.efi /boot/EFI/BOOT/BOOTAA64.EFI
|
||||
+}
|
||||
+
|
||||
+if [ $ARCH == "x86_64" ]; then
|
||||
+ install_grub2_x86
|
||||
+fi
|
||||
+
|
||||
+if [ $ARCH == "aarch64" ]; then
|
||||
+ install_grub2_efi
|
||||
+fi
|
||||
diff --git a/scripts/generate.sh b/scripts/generate.sh
|
||||
index 73830ea..c481e30 100644
|
||||
--- a/scripts/generate.sh
|
||||
+++ b/scripts/generate.sh
|
||||
@@ -22,6 +22,7 @@ TMP_MOUNT_PATH="${PWD}/mnt"
|
||||
RPM_ROOT="${PWD}/rootfs"
|
||||
LOCK=./test.lock
|
||||
CHECK_REGEX='\||;|&|&&|\|\||>|>>|<|,|#|!|\$'
|
||||
+ARCH=$(arch)
|
||||
|
||||
function show_options() {
|
||||
cat << EOF
|
||||
@@ -76,9 +77,14 @@ function init_part() {
|
||||
offset=$(echo "${offset}*512" | bc)
|
||||
local loop=$(losetup -f)
|
||||
losetup -o "${offset}" --sizelimit "${sizelimit}" "${loop}" system.img
|
||||
- mkfs.ext4 -L "$2" "${loop}"
|
||||
- mount -t ext4 "${loop}" "$3"
|
||||
- rm -rf "$3/lost+found"
|
||||
+ if [ $2 == "BOOT" ];then
|
||||
+ mkfs.vfat -n "$2" "${loop}"
|
||||
+ mount -t vfat "${loop}" "$3"
|
||||
+ else
|
||||
+ mkfs.ext4 -L "$2" "${loop}"
|
||||
+ mount -t ext4 "${loop}" "$3"
|
||||
+ rm -rf "$3/lost+found"
|
||||
+ fi
|
||||
}
|
||||
|
||||
function delete_dir() {
|
||||
@@ -183,12 +189,15 @@ function install_packages() {
|
||||
fi
|
||||
|
||||
local rpms=$(cat ./rpmlist | tr "\n" " ")
|
||||
- yum -y --installroot="${RPM_ROOT}" install --nogpgcheck --setopt install_weak_deps=False ${rpms}
|
||||
- yum -y --installroot="${RPM_ROOT}" clean all
|
||||
+ if [ "${ARCH}" == "x86_64" ]; then
|
||||
+ yum -y --installroot="${RPM_ROOT}" install --nogpgcheck --setopt install_weak_deps=False ${rpms} grub2 grub2-efi-x64-modules grub2-pc-modules
|
||||
+ elif [ "${ARCH}" == "aarch64" ]; then
|
||||
+ yum -y --installroot="${RPM_ROOT}" install --nogpgcheck --setopt install_weak_deps=False ${rpms} grub2-efi-aa64-modules
|
||||
+ fi
|
||||
+ yum -y --installroot="${RPM_ROOT}" clean all
|
||||
}
|
||||
|
||||
function install_misc() {
|
||||
- cp grub.cfg "${RPM_ROOT}/boot/grub2/"
|
||||
cp ../files/*mount ../files/os-agent.service "${RPM_ROOT}/usr/lib/systemd/system/"
|
||||
cp ../files/os-release "${RPM_ROOT}/usr/lib/"
|
||||
cp "${AGENT_PATH}" "${RPM_ROOT}/usr/bin"
|
||||
@@ -204,38 +213,46 @@ EOF
|
||||
mv "${RPM_ROOT}"/boot/initramfs* "${RPM_ROOT}/boot/initramfs.img"
|
||||
|
||||
cp set_in_chroot.sh "${RPM_ROOT}"
|
||||
- ROOT_PWD="${PASSWD}" chroot "$RPM_ROOT" bash /set_in_chroot.sh
|
||||
+ ROOT_PWD="${PASSWD}" chroot "${RPM_ROOT}" bash /set_in_chroot.sh
|
||||
rm "${RPM_ROOT}/set_in_chroot.sh"
|
||||
}
|
||||
|
||||
function create_img() {
|
||||
rm -f system.img update.img
|
||||
qemu-img create system.img ${IMG_SIZE}G
|
||||
- parted system.img -- mklabel msdos
|
||||
- parted system.img -- mkpart primary ext4 1MiB 20MiB
|
||||
- parted system.img -- mkpart primary ext4 20MiB 2120MiB
|
||||
- parted system.img -- mkpart primary ext4 2120MiB 4220MiB
|
||||
- parted system.img -- mkpart primary ext4 4220MiB 100%
|
||||
-
|
||||
- local device=$(losetup -f)
|
||||
- losetup "${device}" system.img
|
||||
-
|
||||
- mkdir -p "${TMP_MOUNT_PATH}"
|
||||
-
|
||||
- init_part system.img2 ROOT-A "${TMP_MOUNT_PATH}"
|
||||
- local grub2_path="${TMP_MOUNT_PATH}/boot/grub2"
|
||||
- mkdir -p "${grub2_path}"
|
||||
- init_part system.img1 GRUB2 "${grub2_path}"
|
||||
-
|
||||
- tar -x -C "${TMP_MOUNT_PATH}" -f os.tar
|
||||
- sync
|
||||
-
|
||||
- dd if=/dev/disk/by-label/ROOT-A of=update.img bs=8M
|
||||
- mount_proc_dev_sys "${TMP_MOUNT_PATH}"
|
||||
- chroot "${TMP_MOUNT_PATH}" grub2-install --modules="biosdisk part_msdos" "${device}"
|
||||
- sync
|
||||
- unmount_dir "${TMP_MOUNT_PATH}"
|
||||
-
|
||||
+ parted system.img -- mklabel msdos
|
||||
+ parted system.img -- mkpart primary fat16 1MiB 60MiB
|
||||
+ parted system.img -- mkpart primary ext4 60MiB 2160MiB
|
||||
+ parted system.img -- mkpart primary ext4 2160MiB 4260MiB
|
||||
+ parted system.img -- mkpart primary ext4 4260MiB 100%
|
||||
+
|
||||
+ local device=$(losetup -f)
|
||||
+ losetup "${device}" system.img
|
||||
+
|
||||
+ mkdir -p "${TMP_MOUNT_PATH}"
|
||||
+
|
||||
+ init_part system.img2 ROOT-A "${TMP_MOUNT_PATH}"
|
||||
+ local BOOT_PATH=${TMP_MOUNT_PATH}/boot
|
||||
+ mkdir -p ${BOOT_PATH}
|
||||
+ chmod 755 ${BOOT_PATH}
|
||||
+ init_part system.img1 BOOT "${BOOT_PATH}"
|
||||
+
|
||||
+ mv -f ${RPM_ROOT}/boot/* ${BOOT_PATH} || true
|
||||
+ [ -d ${RPM_ROOT}/boot/ ] && rm -rf ${RPM_ROOT}/boot/
|
||||
+ sudo mv -t ${TMP_MOUNT_PATH} ${RPM_ROOT}/* || true
|
||||
+ cp bootloader.sh "${TMP_MOUNT_PATH}"
|
||||
+ mount_proc_dev_sys "${TMP_MOUNT_PATH}"
|
||||
+ DEVICE="${device}" chroot "${TMP_MOUNT_PATH}" bash bootloader.sh
|
||||
+ cp grub.cfg ${TMP_MOUNT_PATH}/boot/grub2
|
||||
+ cp grub.cfg ${TMP_MOUNT_PATH}/boot/efi/EFI/openEuler
|
||||
+ rm -rf "${TMP_MOUNT_PATH}/bootloader.sh"
|
||||
+ sync
|
||||
+
|
||||
+ dd if=/dev/disk/by-label/ROOT-A of=update.img bs=8M
|
||||
+ sync
|
||||
+ unmount_dir "${TMP_MOUNT_PATH}"
|
||||
+
|
||||
+
|
||||
init_part system.img3 ROOT-B "${TMP_MOUNT_PATH}"
|
||||
umount "${TMP_MOUNT_PATH}"
|
||||
|
||||
@@ -251,8 +268,6 @@ function create_os_tar() {
|
||||
install_packages
|
||||
install_misc
|
||||
unmount_dir "${RPM_ROOT}"
|
||||
-
|
||||
- tar -C "${RPM_ROOT}" -cf ./os.tar .
|
||||
}
|
||||
|
||||
test_lock
|
||||
diff --git a/scripts/grub.cfg b/scripts/grub.cfg
|
||||
index d10e4cf..90507c4 100644
|
||||
--- a/scripts/grub.cfg
|
||||
+++ b/scripts/grub.cfg
|
||||
@@ -92,12 +92,12 @@ menuentry 'A' --class KubeOS --class gnu-linux --class gnu --class os --unrestri
|
||||
insmod ext2
|
||||
set root='hd0,msdos2'
|
||||
if [ x$feature_platform_search_hint = xy ]; then
|
||||
- search --no-floppy --file --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 /boot/vmlinuz
|
||||
+ search --no-floppy --file --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 /vmlinuz
|
||||
else
|
||||
- search --no-floppy --file --set=root /boot/vmlinuz
|
||||
+ search --no-floppy --file --set=root /vmlinuz
|
||||
fi
|
||||
- linux /boot/vmlinuz root=/dev/sda2 ro rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3
|
||||
- initrd /boot/initramfs.img
|
||||
+ linux /vmlinuz root=/dev/sda2 ro rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3
|
||||
+ initrd /initramfs.img
|
||||
}
|
||||
|
||||
menuentry 'B' --class KubeOS --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'KubeOS-B' {
|
||||
@@ -108,12 +108,12 @@ menuentry 'B' --class KubeOS --class gnu-linux --class gnu --class os --unrestri
|
||||
insmod ext2
|
||||
set root='hd0,msdos3'
|
||||
if [ x$feature_platform_search_hint = xy ]; then
|
||||
- search --no-floppy --file --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 /boot/vmlinuz
|
||||
+ search --no-floppy --file --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 /vmlinuz
|
||||
else
|
||||
- search --no-floppy --file --set=root /boot/vmlinuz
|
||||
+ search --no-floppy --file --set=root /vmlinuz
|
||||
fi
|
||||
- linux /boot/vmlinuz root=/dev/sda3 ro rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3
|
||||
- initrd /boot/initramfs.img
|
||||
+ linux /vmlinuz root=/dev/sda3 ro rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3
|
||||
+ initrd /initramfs.img
|
||||
}
|
||||
|
||||
### END /etc/grub.d/10_linux ###
|
||||
diff --git a/scripts/rpmlist b/scripts/rpmlist
|
||||
index 93c277c..7a9adfa 100644
|
||||
--- a/scripts/rpmlist
|
||||
+++ b/scripts/rpmlist
|
||||
@@ -1,6 +1,7 @@
|
||||
kernel
|
||||
passwd
|
||||
-grub2
|
||||
+grub2-efi
|
||||
+grub2-tools
|
||||
dhcp
|
||||
NetworkManager
|
||||
openssh-server
|
||||
diff --git a/scripts/set_in_chroot.sh b/scripts/set_in_chroot.sh
|
||||
index 3b8313f..49e3894 100644
|
||||
--- a/scripts/set_in_chroot.sh
|
||||
+++ b/scripts/set_in_chroot.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
ln -s /usr/lib/systemd/system/os-agent.service /usr/lib/systemd/system/multi-user.target.wants/os-agent.service
|
||||
ln -s /usr/lib/systemd/system/kubelet.service /usr/lib/systemd/system/multi-user.target.wants/kubelet.service
|
||||
-ln -s /usr/lib/systemd/system/boot-grub2.mount /lib/systemd/system/local-fs.target.wants/boot-grub2.mount
|
||||
+ln -s /usr/lib/systemd/system/boot.mount /lib/systemd/system/local-fs.target.wants/boot.mount
|
||||
ln -s /usr/lib/systemd/system/etc.mount /lib/systemd/system/local-fs.target.wants/etc.mount
|
||||
|
||||
str=`sed -n '/^root:/p' /etc/shadow | awk -F "root:" '{print $2}'`
|
||||
--
|
||||
2.30.0
|
||||
|
||||
25
KubeOS.spec
25
KubeOS.spec
@ -2,12 +2,13 @@
|
||||
|
||||
Name: KubeOS
|
||||
Version: 1.0.1
|
||||
Release: 3
|
||||
Release: 5
|
||||
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-KubeOS-modify-checks-in-generate.sh-and-change-modul.patch
|
||||
ExclusiveArch: x86_64
|
||||
Patch2: 0002-change-generate-argument-from-isopath-to-repopath.patch
|
||||
Patch3: 0003-KubeOS-add-arm-architecture-support-to-the-OS-image.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: make
|
||||
BuildRequires: golang >= 1.13
|
||||
@ -20,7 +21,7 @@ it should be running in kubernetes environment.
|
||||
|
||||
%package scripts
|
||||
Summary: Scripts to build the os image and binaries of os-proxy and os-operator
|
||||
Requires: qemu-img, parted, bc, tar, docker
|
||||
Requires: qemu-img, parted, bc, tar, docker, dosfstools
|
||||
%description scripts
|
||||
The scripts package includes scripts which could build the os image and binaries of os-proxy and os-operator
|
||||
|
||||
@ -46,9 +47,10 @@ install -p -m 0600 ./scripts/rpmlist %{buildroot}/opt/kubeOS/scripts
|
||||
install -p -m 0500 ./scripts/generate.sh %{buildroot}/opt/kubeOS/scripts
|
||||
install -p -m 0500 ./scripts/set_in_chroot.sh %{buildroot}/opt/kubeOS/scripts
|
||||
install -p -m 0600 ./scripts/grub.cfg %{buildroot}/opt/kubeOS/scripts
|
||||
install -p -m 0500 ./scripts/bootloader.sh %{buildroot}/opt/kubeOS/scripts
|
||||
|
||||
install -d -m 0740 %{buildroot}/opt/kubeOS/files
|
||||
install -p -m 0600 ./files/boot-grub2.mount %{buildroot}/opt/kubeOS/files
|
||||
install -p -m 0600 ./files/boot.mount %{buildroot}/opt/kubeOS/files
|
||||
install -p -m 0600 ./files/etc.mount %{buildroot}/opt/kubeOS/files
|
||||
install -p -m 0600 ./files/persist.mount %{buildroot}/opt/kubeOS/files
|
||||
install -p -m 0600 ./files/var.mount %{buildroot}/opt/kubeOS/files
|
||||
@ -58,7 +60,7 @@ install -p -m 0600 ./files/os-release %{buildroot}/opt/kubeOS/files
|
||||
%files
|
||||
%attr(0500,root,root) /opt/kubeOS/bin/os-agent
|
||||
%defattr(-,root,root,0500)
|
||||
%attr(0600,root,root) /opt/kubeOS/files/boot-grub2.mount
|
||||
%attr(0600,root,root) /opt/kubeOS/files/boot.mount
|
||||
%attr(0600,root,root) /opt/kubeOS/files/etc.mount
|
||||
%attr(0600,root,root) /opt/kubeOS/files/persist.mount
|
||||
%attr(0600,root,root) /opt/kubeOS/files/var.mount
|
||||
@ -73,11 +75,24 @@ install -p -m 0600 ./files/os-release %{buildroot}/opt/kubeOS/files
|
||||
%attr(0500,root,root) /opt/kubeOS/scripts/generate.sh
|
||||
%attr(0500,root,root) /opt/kubeOS/scripts/set_in_chroot.sh
|
||||
%attr(0600,root,root) /opt/kubeOS/scripts/grub.cfg
|
||||
%attr(0500,root,root) /opt/kubeOS/scripts/bootloader.sh
|
||||
|
||||
%clean
|
||||
rm -rfv %{buildroot}
|
||||
|
||||
%changelog
|
||||
* Fri Dec 17 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-5
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
- SUG:restart
|
||||
- DESC:add arm architecture support to the OS image
|
||||
|
||||
* Wed Dec 08 2021 linxiaoxu<linxiaoxu@huawei.com> - 1.0.1-4
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
- SUG:restart
|
||||
- DESC:fix bugs of change generate argument from isopath to repopath
|
||||
|
||||
* Thu Nov 11 2021 liyuanrong<liyuanrong1@huawei.com> - 1.0.1-3
|
||||
- Type:requirement
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user