!151 upgrade, keep up with openEuler-22.03-LTS

From: @wangchong1995924 
Reviewed-by: @zhuchunyi 
Signed-off-by: @zhuchunyi
This commit is contained in:
openeuler-ci-bot 2022-03-30 02:49:54 +00:00 committed by Gitee
commit 02696f3941
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 272 additions and 3 deletions

View File

@ -0,0 +1,71 @@
From 3b813b13637065c76184f6e57d0fa76d2571b1ca Mon Sep 17 00:00:00 2001
From: gitee-cmd <chemingdao@huawei.com>
Date: Fri, 31 Dec 2021 15:11:32 +0800
Subject: [PATCH] add fpi_tail param for grub
---
isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg | 8 ++++----
isomaker/80-openeuler/config_files/x86/grub2-efi.cfg | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg b/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
index 43b0e74..2d165e1 100644
--- a/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
+++ b/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
@@ -27,20 +27,20 @@ search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ ro inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me
+ linux @KERNELPATH@ @ROOT@ ro inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me fpi_to_tail=off
initrd @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rd.live.check inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me
+ linux @KERNELPATH@ @ROOT@ rd.live.check inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me fpi_to_tail=off
initrd @INITRDPATH@
}
submenu 'Troubleshooting -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ nomodeset inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me
+ linux @KERNELPATH@ @ROOT@ nomodeset inst.geoloc=0 console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me fpi_to_tail=off
initrd @INITRDPATH@
}
menuentry 'Rescue the @PRODUCT@ system' --class red --class gnu-linux --class gnu --class os {
- linux @KERNELPATH@ @ROOT@ rescue console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me
+ linux @KERNELPATH@ @ROOT@ rescue console=tty0 smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off video=VGA-1:640x480-32@60me fpi_to_tail=off
initrd @INITRDPATH@
}
}
diff --git a/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg b/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg
index 5001156..fe2bc03 100644
--- a/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg
+++ b/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg
@@ -21,20 +21,20 @@ search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install @PRODUCT@ @VERSION@' --class openEuler --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ quiet
+ linuxefi @KERNELPATH@ @ROOT@ fpi_to_tail=off
initrdefi @INITRDPATH@
}
menuentry 'Test this media & install @PRODUCT@ @VERSION@' --class openEuler --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ rd.live.check quiet
+ linuxefi @KERNELPATH@ @ROOT@ rd.live.check fpi_to_tail=off
initrdefi @INITRDPATH@
}
submenu 'Troubleshooting -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class openEuler --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet
+ linuxefi @KERNELPATH@ @ROOT@ nomodeset fpi_to_tail=off
initrdefi @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class openEuler --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ rescue quiet
+ linuxefi @KERNELPATH@ @ROOT@ rescue fpi_to_tail=off
initrdefi @INITRDPATH@
}
}
--
2.27.0

View File

@ -0,0 +1,157 @@
From f075bae9bb9f32c4559cb48f51dd83d42f581a79 Mon Sep 17 00:00:00 2001
From: xyn-coder <xiangyuning@huawei.com>
Date: Tue, 8 Mar 2022 20:19:42 +0800
Subject: [PATCH] restore env after selinux status changes
---
isomaker/env_record.sh | 49 +++++++++++++++++++++++++++++++++++++++++
isomaker/env_restore.sh | 30 +++++++++++++++++++++++++
isomaker/img_repo.sh | 3 +++
isomaker/oemaker.sh | 9 +++++++-
4 files changed, 90 insertions(+), 1 deletion(-)
create mode 100644 isomaker/env_record.sh
create mode 100644 isomaker/env_restore.sh
diff --git a/isomaker/env_record.sh b/isomaker/env_record.sh
new file mode 100644
index 0000000..f4ed024
--- /dev/null
+++ b/isomaker/env_record.sh
@@ -0,0 +1,49 @@
+:<<!
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ * oemaker licensed under the Mulan PSL v2.
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
+ * You may obtain a copy of Mulan PSL v2 at:
+ * http://license.coscl.org.cn/MulanPSL2
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
+ * PURPOSE.
+ * See the Mulan PSL v2 for more details.
+ * Author:
+ * Create: 2022-03-08
+ * Description: provide container buffer functions
+!
+
+#!/bin/bash
+
+set -e
+function env_record()
+{
+ # 记录环境
+ selinux_flag=-1
+ se_status=$(getenforce)
+ if [ "$se_status" == "Enforcing" ]; then
+ selinux_flag=1
+ elif [ "$se_status" == "Permissive" ]; then
+ selinux_flag=0
+ else
+ echo "Selinux status is $se_status, can't restore"
+ return 0
+ fi
+
+ env_value_name="SELINUX_FLAG"
+ if [ "$selinux_flag" -ne -1 ]; then
+ # 先删除(/d)环境变量,再添加环境变量
+ sed -i "/${env_value_name}=.*/d" /etc/profile
+ echo "export ${env_value_name}=${selinux_flag}" >> /etc/profile
+ fi
+
+ echo "the current env has been recorded. "
+ echo "If oemaker run failed, run the following cmd restore current env"
+ echo "sh ${CPATH}/env_restore.sh"
+}
+
+
+function env_restore()
+{
+ sh "${CPATH}"/env_restore.sh
+}
\ No newline at end of file
diff --git a/isomaker/env_restore.sh b/isomaker/env_restore.sh
new file mode 100644
index 0000000..15f6311
--- /dev/null
+++ b/isomaker/env_restore.sh
@@ -0,0 +1,30 @@
+:<<!
+ * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
+ * oemaker licensed under the Mulan PSL v2.
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
+ * You may obtain a copy of Mulan PSL v2 at:
+ * http://license.coscl.org.cn/MulanPSL2
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
+ * PURPOSE.
+ * See the Mulan PSL v2 for more details.
+ * Author:
+ * Create: 2022-03-08
+ * Description: provide container buffer functions
+!
+
+#!/bin/bash
+
+set -e
+function env_restore()
+{
+ # 使用环境变量执行恢复
+ source /etc/profile >> /dev/null
+ if [ "$SELINUX_FLAG" -eq 0 ] || [ "$SELINUX_FLAG" -eq 1 ]; then
+ setenforce "${SELINUX_FLAG}"
+ else
+ echo "/etc/profile have no value: SELINUX_FLAG"
+ fi
+}
+
+env_restore
diff --git a/isomaker/img_repo.sh b/isomaker/img_repo.sh
index 9135b39..5e956c7 100644
--- a/isomaker/img_repo.sh
+++ b/isomaker/img_repo.sh
@@ -35,12 +35,15 @@ function create_install_img()
else
vertmp=${VERSION}
fi
+
+ set +e
lorax --isfinal -p "${PRODUCT}" -v "${vertmp}" -r "${RELEASE}" -t "${VARIANT}" --sharedir 80-openeuler --rootfs-size=4 --buildarch="$ARCH" $(cat yumrepo.file) --nomacboot --noupgrade "${BUILD}"/iso > lorax.logfile 2>&1
if [ $? != 0 ] ; then
cat lorax.logfile
exit 1
fi
+ set -e
}
function create_repos()
diff --git a/isomaker/oemaker.sh b/isomaker/oemaker.sh
index c5d85fb..9fa8e08 100644
--- a/isomaker/oemaker.sh
+++ b/isomaker/oemaker.sh
@@ -29,6 +29,7 @@ source "${CPATH}"/iso.sh
source "${CPATH}"/rpm.sh
source "${CPATH}"/img_repo.sh
source "${CPATH}"/make_debug.sh
+source "${CPATH}"/env_record.sh
function mkclean()
{
@@ -156,8 +157,14 @@ function mk_oe_main()
return 0
}
+env_record
+
mk_oe_main "$@"
-if [ $? -ne 0 ]; then
+main_ret="$?"
+
+env_restore
+
+if [ "$main_ret" -ne 0 ]; then
echo "make iso failed"
exit 1
fi
--
2.33.0

View File

@ -0,0 +1,31 @@
From efcc2fd150f9fe625a03b4b5d9c492f6691b1ba1 Mon Sep 17 00:00:00 2001
From: small_leek <xiasenlin1@huawei.com>
Date: Fri, 18 Mar 2022 11:19:07 +0800
Subject: [PATCH] add parse_everything_deb_exclude
---
isomaker/rpm.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index e5fad1f..fa6167b 100644
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -217,6 +217,14 @@ function everything_debug_rpms_download()
{
mkdir ${EVERY_DEBUG_DIR}
yum list --installroot="${BUILD}"/tmp --available | awk '{print $1}' | grep -E "debuginfo|debugsource" > ava_debug_lst
+ parse_rpmlist_xml "everything_debug_exclude"
+ cat parsed_rpmlist_everything_debug_exclude
+ if [ -s parsed_rpmlist_everything_debug_exclude ];then
+ for rpmname in $(cat parsed_rpmlist_everything_debug_exclude)
+ do
+ sed -i "/^${rpmname}\./d" ava_debug_lst
+ done
+ fi
yumdownloader --resolve --installroot="${BUILD}"/tmp --destdir="${EVERY_DEBUG_DIR}" $(cat ava_debug_lst | tr '\n' ' ')
if [ $? != 0 ] || [ $(ls ${EVERY_DEBUG_DIR} | wc -l) == 0 ]; then
echo "yumdownloader with --resolve failed, trying to yumdownloader without --resolve"
--
2.27.0

Binary file not shown.

BIN
oemaker-2.0.3.tar.gz Normal file

Binary file not shown.

View File

@ -10,8 +10,8 @@ Name: oemaker
Summary: a duilding tool for DVD ISO making and ISO cutting
License: Mulan PSL v2
Group: System/Management
Version: 2.0.0
Release: 19
Version: 2.0.3
Release: 12
BuildRoot: %{_tmppath}/%{name}
Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -28,7 +28,10 @@ Patch0001: 0001-rename-source-iso.patch
Patch0002: 0002-bugfix-I3QY98.patch
Patch0003: 0003-change-for-edge-computing.patch
Patch0004: 0004-bugfix-I3OGUT.patch
Patch0005: 0005-support-usb-flash-drive-mode.patch
Patch0005: 0005-add-fpi_tail-param-for-grub.patch
Patch0006: 0006-support-usb-flash-drive-mode.patch
Patch0007: 0007-restore-env-after-selinux-status-changes.patch
Patch0008: 0008-add-parse_everything_deb_exclude.patch
%description
a building tool for DVD ISO making and ISO cutting
@ -74,6 +77,8 @@ install -m 700 %{name}/isomaker/img_repo.sh %{buildroot}/opt/oemaker/img_repo.sh
install -m 700 %{name}/isomaker/init.sh %{buildroot}/opt/oemaker/init.sh
install -m 700 %{name}/isomaker/iso.sh %{buildroot}/opt/oemaker/iso.sh
install -m 700 %{name}/isomaker/rpm.sh %{buildroot}/opt/oemaker/rpm.sh
install -m 700 %{name}/isomaker/env_record.sh %{buildroot}/opt/oemaker/env_record.sh
install -m 700 %{name}/isomaker/env_restore.sh %{buildroot}/opt/oemaker/env_restore.sh
install -m 400 %{name}/isomaker/config/rpmlist.xml %{buildroot}/opt/oemaker/config/rpmlist.xml
install -m 400 %{name}/isomaker/config/x86_64/* %{buildroot}/opt/oemaker/config/x86_64/
install -m 400 %{name}/isomaker/config/aarch64/* %{buildroot}/opt/oemaker/config/aarch64/
@ -130,6 +135,11 @@ rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{name}
%changelog
* Wed Mar 30 2022 wangchong <952173335@qq.com> - 2.0.3-12
- ID:NA
- SUG:NA
- DESC: upgrade, keep up with openEuler-22.03-LTS
* Wed Feb 23 2022 imxcc <xingchaochao@huawei.com> - 2.0.0-19
- ID:NA
- SUG:NA