diff --git a/0003-change-for-edge-computing.patch b/0003-change-for-edge-computing.patch new file mode 100644 index 0000000000000000000000000000000000000000..eaeec291d8c43c333b25d13036dd7a8c135ec1f4 --- /dev/null +++ b/0003-change-for-edge-computing.patch @@ -0,0 +1,151 @@ +From 5883a7f40fe7fc8cce44c7a709eaa890e1fe43d3 Mon Sep 17 00:00:00 2001 +From: miao_kaibo +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 + diff --git a/README.en.md b/README.en.md index 6d597a9666ae3b0c6f3eaf6ee53fcab9bccf2e4c..10de58021452b225554e171b89e57843d5609b36 100644 --- a/README.en.md +++ b/README.en.md @@ -4,7 +4,7 @@ The source package `oemaker` has two functions: iso making and iso cutting. Correspondingly, two binary RPM packages are generated: `oemaker` and `isocut`. -The generated binary RPM package `oemaker` is a building tool for making DVD iso, include standard iso, debug iso, source iso, everything iso, everything source iso,everything debug iso and netinst iso. +The generated binary RPM package `oemaker` is a building tool for making DVD iso, include standard iso, debug iso, source iso, everything iso, everything source iso,everything debug iso, edge computing iso and netinst iso. The generated binary RPM package `isocut` is a building tool for iso cutting which supports only RPM package-level. diff --git a/README.md b/README.md index e59b8cfe18e1a1aad2483439c3da6658be7c8f31..244876a11a9349b771a9a530f79fe23d34b6ff46 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 源码包oemaker保护两部分功能:iso制作和iso裁剪。相应的,会构建生成两个二进制RPM包:oemaker和isocut. -生成的二进制RPM包oemaker是一款用于构建DVD iso的工具,包括标准iso,debug iso, source iso, everything iso, everything debug iso, everything source and netinst iso等。 +生成的二进制RPM包oemaker是一款用于构建DVD iso的工具,包括标准iso,debug iso, source iso, everything iso, everything debug iso, everything source, edge computing iso and netinst iso等 生成的二进制RPM包isocut是一款用于iso裁剪的构建工具,支持RPM包级别的裁剪。 diff --git a/edge_normal_aarch64.xml b/edge_normal_aarch64.xml new file mode 100644 index 0000000000000000000000000000000000000000..8810540aae2a1d9121a08604a5854dc1c1f9cd86 --- /dev/null +++ b/edge_normal_aarch64.xml @@ -0,0 +1,119 @@ + + + + + core + Core + 核心 + Smallest possible installation + 最小安装 + true + false + + audit + kernel + basesystem + bash + coreutils + cronie + curl + dnf + e2fsprogs + filesystem + firewalld + glibc + grubby + hostname + initscripts + iproute + iprutils + iputils + irqbalance + kbd + kexec-tools + less + man-db + ncurses + openssh + openssh-server + openssh-clients + parted + passwd + policycoreutils + procps-ng + rng-tools + rootfiles + rpm + selinux-policy-targeted + setup + shadow + sssd + sudo + systemd + tuned + util-linux + vim-minimal + xfsprogs + yum + wget + openEuler-release + openEuler-performance + openEuler-latest-release + NetworkManager + NetworkManager-config-server + authselect + dnf-plugins-core + dracut-config-rescue + kernel-tools + sysfsutils + linux-firmware + lshw + lsscsi + rsyslog + security-tool + sg3_utils + dracut-config-generic + dracut-network + rdma-core + selinux-policy-mls + patch + patch-help + ntp + ntp-help + ntp-perl + iSulad + tar + socat + socat-help + conntrack-tools + conntrack-tools-help + vim-X11 + vim-common + vim-enhanced + vim-filesystem + vim-minimal + efibootmgr + efibootmgr-help + cjson + cjson-devel + mosquitto + chrony + + + + minimal-environment + Minimal Install + 最小安装 + Basic functionality. + 基本功能。 + 1 + + core + + + standard + + + diff --git a/edge_normal_x86_64.xml b/edge_normal_x86_64.xml new file mode 100644 index 0000000000000000000000000000000000000000..a16592036c46a7aa3f4a6b7314e6782428fcd4f2 --- /dev/null +++ b/edge_normal_x86_64.xml @@ -0,0 +1,119 @@ + + + + + core + Core + 核心 + Smallest possible installation + 最小安装 + true + false + + audit + kernel + basesystem + bash + coreutils + cronie + curl + dnf + e2fsprogs + filesystem + firewalld + glibc + grubby + hostname + initscripts + iproute + iprutils + iputils + irqbalance + kbd + kexec-tools + less + man-db + ncurses + openssh + openssh-server + openssh-clients + openEuler-release + openEuler-performance + openEuler-latest-release + parted + passwd + policycoreutils + procps-ng + rng-tools + rootfiles + rpm + selinux-policy-targeted + setup + shadow + sssd + sudo + systemd + tuned + util-linux + vim-minimal + xfsprogs + yum + wget + NetworkManager + NetworkManager-config-server + authselect + dnf-plugins-core + dracut-config-rescue + kernel-tools + sysfsutils + linux-firmware + lshw + lsscsi + rsyslog + security-tool + sg3_utils + dracut-config-generic + dracut-network + rdma-core + selinux-policy-mls + patch + patch-help + ntp + ntp-help + ntp-perl + iSulad + tar + socat + socat-help + conntrack-tools + conntrack-tools-help + vim-X11 + vim-common + vim-enhanced + vim-filesystem + vim-minimal + efibootmgr + efibootmgr-help + cjson + cjson-devel + mosquitto + chrony + + + + minimal-environment + Minimal Install + 最小安装 + Basic functionality. + 基本功能。 + 1 + + core + + + standard + + + diff --git a/oemaker.spec b/oemaker.spec index 01f62faa451bb3ed651e68ed9bdcd5f309b12874..2c8b414be1f1bdcde8c2c72c012c015669076668 100644 --- a/oemaker.spec +++ b/oemaker.spec @@ -11,19 +11,22 @@ Summary: a duilding tool for DVD ISO making and ISO cutting License: Mulan PSL v2 Group: System/Management Version: 2.0.0 -Release: 9 +Release: 10 BuildRoot: %{_tmppath}/%{name} Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: normal_aarch64.xml Source2: normal_x86_64.xml Source3: rpmlist.xml +Source4: edge_normal_aarch64.xml +Source5: edge_normal_x86_64.xml Requires: createrepo dnf-plugins-core genisoimage isomd5sum grep bash libselinux-utils libxml2 Requires: lorax >= 19.6.78-1 Patch0001: 0001-rename-source-iso.patch Patch0002: 0002-bugfix-I3QY98.patch +Patch0003: 0003-change-for-edge-computing.patch %description a building tool for DVD ISO making and ISO cutting @@ -44,6 +47,10 @@ rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/normal.xm cp %{SOURCE2} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/normal.xml rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/rpmlist.xml cp %{SOURCE3} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/rpmlist.xml +rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/aarch64/edge_normal.xml +cp %{SOURCE4} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/aarch64/edge_normal.xml +rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/edge_normal.xml +cp %{SOURCE5} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/edge_normal.xml cd %{_builddir}/%{name}-%{version}/%{name} %autopatch -p1 @@ -121,6 +128,11 @@ rm -rf %{buildroot} rm -rf $RPM_BUILD_DIR/%{name} %changelog +* Tue Sep 28 2021 miao_kaibo - 2.0.0-10 +- ID:NA +- SUG:NA +- DESC: change for edge computing iso + * Tue Aug 26 2021 miao_kaibo - 2.0.0-9 - ID:NA - SUG:NA diff --git a/rpmlist.xml b/rpmlist.xml index 2fac4b8704d657d20b1a32a3d407091f014a15e9..7a68ef3a382f4389a3c6fd896cf8e95dcf8ec517 100644 --- a/rpmlist.xml +++ b/rpmlist.xml @@ -1366,4 +1366,38 @@ zziplib-help zziplib-utils + + grub2-efi-aa64 + grub2-efi-aa64-cdboot + grub2-efi-aa64-modules + + + grub2-pc + grub2-pc-modules + + + kubernetes + kubernetes-client + kubernetes-help + kubernetes-kubeadm + kubernetes-kubelet + kubernetes-master + kubernetes-node + kubeedge-cloudcore + kubeedge-edgecore + kubeedge-edgesite + kubeedge-keadm + grub2-common + grub2-tools-minimal + grub2-tools-extra + grub2-tools + grub2-help + lvm2-help + lvm2 + shim + mdadm + mdadm-help + dosfstools-help + dosfstools +