代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/oemaker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5883a7f40fe7fc8cce44c7a709eaa890e1fe43d3 Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Mon, 27 Sep 2021 15:31:58 +0800
Subject: [PATCH] change for edge computing
---
isomaker/img_repo.sh | 13 ++++++++++++-
isomaker/init.sh | 4 +++-
isomaker/iso.sh | 16 ++++++++++++++++
isomaker/oemaker.sh | 7 +++++++
isomaker/rpm.sh | 19 +++++++++++++++++++
5 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/isomaker/img_repo.sh b/isomaker/img_repo.sh
index 5403724..0865815 100755
--- a/isomaker/img_repo.sh
+++ b/isomaker/img_repo.sh
@@ -18,7 +18,18 @@
set -e
function create_install_img()
{
- echo "$YUMREPO" > yumrepo.file
+ tmprep=''
+ repos=($(echo "$YUMREPO" | sed 's/-s//g'))
+ for rep in ${repos[@]}
+ do
+ if [[ "${rep}" =~ "Epol" ]];then
+ continue
+ else
+ tmprep="-s ${rep} ${tmprep}"
+ fi
+ done
+
+ echo "${tmprep}" > yumrepo.file
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
+++ b/isomaker/init.sh
@@ -78,7 +78,7 @@ function parse_cmd_line()
esac
done
- for typename in standard source debug everything_debug everything everything_src netinst
+ for typename in standard source debug everything_debug everything everything_src netinst edge
do
if [ "${typename}" == "${ISO_TYPE}" ];then
return 0
@@ -114,6 +114,7 @@ function global_var_init()
EVE_DEBUG_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-everything-debug-${ARCH}-dvd.iso"
EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-source-dvd.iso"
NETINST_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-netinst-${ARCH}-dvd.iso"
+ EDGE_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-edge-${ARCH}-dvd.iso"
else
RELEASE_NAME="${PRODUCT}-${VERSION}-${ARCH}"
STANDARD_ISO_NAME="${PRODUCT}-${VERSION}-${ARCH}-dvd.iso"
@@ -123,6 +124,7 @@ function global_var_init()
EVE_DEBUG_ISO_NAME="${PRODUCT}-${VERSION}-everything-debug-${ARCH}-dvd.iso"
EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-source-dvd.iso"
NETINST_ISO_NAME="${PRODUCT}-${VERSION}-netinst-${ARCH}-dvd.iso"
+ EDGE_ISO_NAME="${PRODUCT}-${VERSION}-edge-${ARCH}-dvd.iso"
fi
[ ! -d "${BUILD}" ] && mkdir -p "${BUILD}"
diff --git a/isomaker/iso.sh b/isomaker/iso.sh
index b15b394..20a6245 100755
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -47,6 +47,22 @@ function gen_standard_iso()
return 0
}
+function gen_edge_iso()
+{
+ set +e
+ mkdir -p "${BUILD}"/iso/repodata/
+ cp "config/${ARCH}/edge_normal.xml" "${BUILD}"/iso/repodata/
+ createrepo -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/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}/${EDGE_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
+ 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}/${EDGE_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
+ [ $? != 0 ] && return 1
+ fi
+ implantisomd5 "${OUTPUT_DIR}/${EDGE_ISO_NAME}"
+ return 0
+}
function gen_src_iso()
{
diff --git a/isomaker/oemaker.sh b/isomaker/oemaker.sh
index 74d923e..37196e5 100755
--- a/isomaker/oemaker.sh
+++ b/isomaker/oemaker.sh
@@ -144,6 +144,13 @@ function mk_euleros_main()
return 1
fi
ls "${OUTPUT_DIR}/${EVE_SRC_ISO_NAME}"
+ elif [ "${ISO_TYPE}" == "edge" ]; then
+ gen_edge_iso
+ if [ $? -ne 0 ]; then
+ echo "create edge iso failed"
+ return 1
+ fi
+ ls "${OUTPUT_DIR}/${EDGE_ISO_NAME}"
fi
mkclean
return 0
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index e3feaab..85b1042 100755
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -26,6 +26,10 @@ function parse_rpmlist_xml()
function download_rpms()
{
+ if [ "${ISO_TYPE}" == "edge" ]; then
+ get_edge_rpms
+ return 0
+ fi
cat "${CONFIG}" | grep packagereq | cut -d ">" -f 2 | cut -d "<" -f 1 > _all_rpms.lst
parse_rpmlist_xml "${ARCH}"
cat parsed_rpmlist_${ARCH} >> _all_rpms.lst
@@ -146,6 +150,21 @@ function get_rpm_pub_key()
rm -rf "${BUILD}"/iso/GPG_tmp
}
+function get_edge_rpms()
+{
+ parse_rpmlist_xml "edge_${ARCH}"
+ cat parsed_rpmlist_edge_${ARCH} > _edge_rpms.lst
+ parse_rpmlist_xml "edge_common"
+ cat parsed_rpmlist_edge_common >> _edge_rpms.lst
+ cat "config/${ARCH}/edge_normal.xml" | grep packagereq | cut -d ">" -f 2 | cut -d "<" -f 1 >> _edge_rpms.lst
+ sort -r -u _edge_rpms.lst -o _edge_rpms.lst
+ yumdownloader --resolve --installroot="${BUILD}"/tmp --destdir="${BUILD}"/iso/Packages/ $(cat _edge_rpms.lst | tr '\n' ' ')
+ if [ $? != 0 ] || [ $(ls "${BUILD}"/iso/Packages/ | wc -l) == 0 ]; then
+ echo "Download rpms failed!"
+ exit 133
+ fi
+}
+
function get_everything_rpms()
{
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。