upgrade to 2.0.4

This commit is contained in:
x30004928 2022-11-22 17:04:08 +08:00
parent 86cb027b39
commit c6f4927002
9 changed files with 30 additions and 257 deletions

View File

@ -1,6 +1,6 @@
From 5883a7f40fe7fc8cce44c7a709eaa890e1fe43d3 Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Mon, 27 Sep 2021 15:31:58 +0800
From 52641d22bc575c01a6fca0cafb5e9b5d0dec619d Mon Sep 17 00:00:00 2001
From: xyn-coder <xiangyuning@huawei.com>
Date: Tue, 22 Nov 2022 15:53:14 +0800
Subject: [PATCH] change for edge computing
---
@ -12,7 +12,7 @@ Subject: [PATCH] change for edge computing
5 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/isomaker/img_repo.sh b/isomaker/img_repo.sh
index 5403724..0865815 100755
index 668ee76..3335183 100755
--- a/isomaker/img_repo.sh
+++ b/isomaker/img_repo.sh
@@ -18,7 +18,18 @@
@ -32,9 +32,9 @@ index 5403724..0865815 100755
+ done
+
+ echo "${tmprep}" > yumrepo.file
set +e
lorax --isfinal -p "${PRODUCT}" -v "${VERSION}${RELEASE}" -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
diff --git a/isomaker/init.sh b/isomaker/init.sh
index 2603bfb..ca39d48 100755
--- a/isomaker/init.sh
@ -65,10 +65,10 @@ index 2603bfb..ca39d48 100755
[ ! -d "${BUILD}" ] && mkdir -p "${BUILD}"
diff --git a/isomaker/iso.sh b/isomaker/iso.sh
index b15b394..20a6245 100755
index 4152c57..38fa4ab 100755
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -47,6 +47,22 @@ function gen_standard_iso()
@@ -48,6 +48,22 @@ function gen_standard_iso()
return 0
}
@ -92,10 +92,10 @@ index b15b394..20a6245 100755
function gen_src_iso()
{
diff --git a/isomaker/oemaker.sh b/isomaker/oemaker.sh
index 74d923e..37196e5 100755
index 98b1faa..c3d949f 100755
--- a/isomaker/oemaker.sh
+++ b/isomaker/oemaker.sh
@@ -144,6 +144,13 @@ function mk_euleros_main()
@@ -145,6 +145,13 @@ function mk_oe_main()
return 1
fi
ls "${OUTPUT_DIR}/${EVE_SRC_ISO_NAME}"
@ -147,5 +147,5 @@ index e3feaab..85b1042 100755
{
yum list --installroot="${BUILD}"/tmp --available | awk '{print $1}' | grep -E "\.noarch|\.${ARCH}" | grep -v "debuginfo" | grep -v "debugsource" > ava_every_lst
--
2.30.0
2.33.0

View File

@ -1,6 +1,6 @@
From 50e167a8084b3130835cc18a6b67f448a1fe02f1 Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Thu, 14 Oct 2021 09:18:30 +0800
From f59ebdd0f2e8927dbb4662769ee99e3384e6e7ca Mon Sep 17 00:00:00 2001
From: xyn-coder <xiangyuning@huawei.com>
Date: Tue, 22 Nov 2022 16:01:13 +0800
Subject: [PATCH] bugfix I3OGUT
---
@ -8,13 +8,13 @@ Subject: [PATCH] bugfix I3OGUT
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/isomaker/img_repo.sh b/isomaker/img_repo.sh
index 0865815..cfb35f8 100755
index 3335183..eaf5c70 100755
--- a/isomaker/img_repo.sh
+++ b/isomaker/img_repo.sh
@@ -30,7 +30,12 @@ function create_install_img()
done
@@ -31,7 +31,12 @@ function create_install_img()
echo "${tmprep}" > yumrepo.file
set +e
- lorax --isfinal -p "${PRODUCT}" -v "${VERSION}${RELEASE}" -r "${RELEASE}" -t "${VARIANT}" --sharedir 80-openeuler --rootfs-size=4 --buildarch="$ARCH" $(cat yumrepo.file) --nomacboot --noupgrade "${BUILD}"/iso > lorax.logfile 2>&1
+ if [ -n "${RELEASE}" ];then
+ vertmp="${VERSION}-${RELEASE}"
@ -26,5 +26,5 @@ index 0865815..cfb35f8 100755
if [ $? != 0 ] ; then
cat lorax.logfile
--
2.30.0
2.33.0

View File

@ -1,40 +0,0 @@
From bb1688a8e8c8dc18ccd3c2ed778a0c5c0bd52633 Mon Sep 17 00:00:00 2001
From: wangchong1995924 <15229716099@163.com>
Date: Wed, 26 Jan 2022 14:13:00 +0800
Subject: [PATCH 1/1] support usb flash drive mode
---
isomaker/iso.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/isomaker/iso.sh b/isomaker/iso.sh
index b15b394..379c538 100755
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -39,6 +39,7 @@ function gen_standard_iso()
if [ "$ARCH" == "x86_64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
[ $? != 0 ] && return 1
+ isohybrid -u "${OUTPUT_DIR}/${STANDARD_ISO_NAME}"
elif [ "$ARCH" == "aarch64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o "${OUTPUT_DIR}/${STANDARD_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
[ $? != 0 ] && return 1
@@ -75,6 +76,7 @@ function gen_everything_iso()
if [ "$ARCH" == "x86_64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
[ $? != 0 ] && return 1
+ isohybrid -u /result/"${EVE_ISO_NAME}"
elif [ "$ARCH" == "aarch64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${EVE_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
[ $? != 0 ] && return 1
@@ -126,6 +128,7 @@ function gen_netinst_iso()
if [ "$ARCH" == "x86_64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${NETINST_ISO_NAME}" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
[ $? != 0 ] && return 1
+ isohybrid -u /result/"${NETINST_ISO_NAME}"
elif [ "$ARCH" == "aarch64" ]; then
mkisofs -R -J -T -r -l -d -joliet-long -allow-multidot -allow-leading-dots -no-bak -V "${RELEASE_NAME}" -o /result/"${NETINST_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
fi
--
2.27.0

View File

@ -1,157 +0,0 @@
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

@ -1,6 +1,6 @@
From efcc2fd150f9fe625a03b4b5d9c492f6691b1ba1 Mon Sep 17 00:00:00 2001
From: small_leek <xiasenlin1@huawei.com>
Date: Fri, 18 Mar 2022 11:19:07 +0800
From 6958c40cac406dc5636189b9cbd8635ebdbe72b3 Mon Sep 17 00:00:00 2001
From: xyn-coder <xiangyuning@huawei.com>
Date: Tue, 22 Nov 2022 16:16:38 +0800
Subject: [PATCH] add parse_everything_deb_exclude
---
@ -8,10 +8,10 @@ Subject: [PATCH] add parse_everything_deb_exclude
1 file changed, 8 insertions(+)
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index e5fad1f..fa6167b 100644
index 85b1042..0f77b34 100755
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -217,6 +217,14 @@ function everything_debug_rpms_download()
@@ -242,6 +242,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
@ -27,5 +27,5 @@ index e5fad1f..fa6167b 100644
if [ $? != 0 ] || [ $(ls ${EVERY_DEBUG_DIR} | wc -l) == 0 ]; then
echo "yumdownloader with --resolve failed, trying to yumdownloader without --resolve"
--
2.27.0
2.33.0

View File

@ -1,32 +0,0 @@
From 399955bd41020fc3de9528372c797714a4f7d6f5 Mon Sep 17 00:00:00 2001
From: xyn-coder <xiangyuninig@huawei.com>
Date: Wed, 20 Apr 2022 15:34:08 +0800
Subject: [PATCH] automated kickstart function
---
isocut/isocut.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/isocut/isocut.py b/isocut/isocut.py
index fb6ab4a..75dc45d 100755
--- a/isocut/isocut.py
+++ b/isocut/isocut.py
@@ -138,13 +138,14 @@ def check_input():
parser.add_argument("dest_iso", help="destination iso image")
parser.add_argument("-t", metavar="temporary_path", default="/tmp", help="temporary path")
parser.add_argument("-r", metavar="rpm_path", help="extern rpm packages path")
+ parser.add_argument("-k", metavar="file_path", help="kickstart file")
args = parser.parse_args()
ICONFIG.src_iso = args.source_iso
ICONFIG.dest_iso = args.dest_iso
ICONFIG.temp_path = args.t
ICONFIG.rpm_path = args.r
- ICONFIG.ks_file = None
+ ICONFIG.ks_file = args.k
if ICONFIG.src_iso is None or ICONFIG.dest_iso is None:
print("Must specify source iso image and destination iso image")
--
2.33.0

Binary file not shown.

BIN
oemaker-2.0.4.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.3
Release: 18
Version: 2.0.4
Release: 1
BuildRoot: %{_tmppath}/%{name}
Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -31,10 +31,7 @@ Patch0002: 0002-bugfix-I3QY98.patch
Patch0003: 0003-change-for-edge-computing.patch
Patch0004: 0004-bugfix-I3OGUT.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
Patch0009: 0009-automated-kickstart-function.patch
Patch0010: 0010-do-not-cleanup-pkg.patch
Patch0011: 0011-support-desktop-iso.patch
@ -144,6 +141,11 @@ rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{name}
%changelog
* Tue Nov 22 2022 xiangyuning <xiangyuning@huawei.com> - 2.0.4-1
- ID:NA
- SUG:NA
- DESC: upgrade to 2.0.4
* Mon Aug 15 2022 gaoruoshu <gaoruoshu@huawei.com> - 2.0.3-18
- ID:NA
- SUG:NA