support env maker

This commit is contained in:
chen-huihan 2023-05-16 22:44:01 +08:00
parent 9ef4ee8fb0
commit b77a9f9393
17 changed files with 135 additions and 719 deletions

View File

@ -1,34 +0,0 @@
From e11a1ff002fdc7aab81f40b99fcea2fc86eba85b Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Fri, 2 Apr 2021 10:23:47 +0800
Subject: [PATCH] rename source iso
---
isomaker/init.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/isomaker/init.sh b/isomaker/init.sh
index f708555..2603bfb 100755
--- a/isomaker/init.sh
+++ b/isomaker/init.sh
@@ -112,7 +112,7 @@ function global_var_init()
DBG_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-debug-${ARCH}-dvd.iso"
EVE_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-everything-${ARCH}-dvd.iso"
EVE_DEBUG_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-everything-debug-${ARCH}-dvd.iso"
- EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-everything-source-dvd.iso"
+ EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-source-dvd.iso"
NETINST_ISO_NAME="${PRODUCT}-${VERSION}-${RELEASE}-netinst-${ARCH}-dvd.iso"
else
RELEASE_NAME="${PRODUCT}-${VERSION}-${ARCH}"
@@ -121,7 +121,7 @@ function global_var_init()
DBG_ISO_NAME="${PRODUCT}-${VERSION}-debug-${ARCH}-dvd.iso"
EVE_ISO_NAME="${PRODUCT}-${VERSION}-everything-${ARCH}-dvd.iso"
EVE_DEBUG_ISO_NAME="${PRODUCT}-${VERSION}-everything-debug-${ARCH}-dvd.iso"
- EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-everything-source-dvd.iso"
+ EVE_SRC_ISO_NAME="${PRODUCT}-${VERSION}-source-dvd.iso"
NETINST_ISO_NAME="${PRODUCT}-${VERSION}-netinst-${ARCH}-dvd.iso"
fi
--
2.30.0

View File

@ -1,44 +0,0 @@
From 1907bdefd7fc8c4e1ef2db78d3e38dc3d6b6a32c Mon Sep 17 00:00:00 2001
From: miao_kaibo <miaokaibo@outlook.com>
Date: Wed, 12 May 2021 03:34:44 +0000
Subject: [PATCH] bugfix I3QY98
---
isomaker/rpm.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index e5fad1f..e3feaab 100755
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -165,8 +165,11 @@ function get_everything_rpms()
if [ -s parsed_rpmlist_conflict ];then
for rpmname in $(cat parsed_rpmlist_conflict)
do
- sed -i "/^${rpmname}\./d" ava_every_lst
- echo "${rpmname}" >> conflict_list
+ cat ava_every_lst | grep "^${rpmname}\."
+ if [ $? -eq 0 ];then
+ sed -i "/^${rpmname}\./d" ava_every_lst
+ echo "${rpmname}" >> conflict_list
+ fi
done
fi
parse_rpmlist_xml "everything_conflict"
@@ -174,8 +177,11 @@ function get_everything_rpms()
if [ -s parsed_rpmlist_everything_conflict ];then
for rpmname in $(cat parsed_rpmlist_everything_conflict)
do
- sed -i "/^${rpmname}\./d" ava_every_lst
- echo "${rpmname}" >> conflict_list
+ cat ava_every_lst | grep "^${rpmname}\."
+ if [ $? -eq 0 ];then
+ sed -i "/^${rpmname}\./d" ava_every_lst
+ echo "${rpmname}" >> conflict_list
+ fi
done
fi
}
--
1.8.3.1

View File

@ -1,151 +0,0 @@
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
---
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 668ee76..3335183 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
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
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 4152c57..38fa4ab 100755
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -48,6 +48,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 98b1faa..c3d949f 100755
--- a/isomaker/oemaker.sh
+++ b/isomaker/oemaker.sh
@@ -145,6 +145,13 @@ function mk_oe_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.33.0

View File

@ -1,30 +0,0 @@
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
---
isomaker/img_repo.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/isomaker/img_repo.sh b/isomaker/img_repo.sh
index 3335183..eaf5c70 100755
--- a/isomaker/img_repo.sh
+++ b/isomaker/img_repo.sh
@@ -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}"
+ else
+ vertmp=${VERSION}
+ fi
+ 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
--
2.33.0

View File

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

@ -1,31 +0,0 @@
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
---
isomaker/rpm.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index 85b1042..0f77b34 100755
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -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
+ 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.33.0

View File

@ -1,34 +0,0 @@
From 90c2319b0fbde5e263f999288627cc67ec5fc9c0 Mon Sep 17 00:00:00 2001
From: wangchong1995924 <15229716099@163.com>
Date: Thu, 14 Jul 2022 17:44:21 +0800
Subject: Don't clean up libdiff and libcairo-script*
---
isomaker/80-openeuler/runtime-cleanup.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/isomaker/80-openeuler/runtime-cleanup.tmpl b/isomaker/80-openeuler/runtime-cleanup.tmpl
index 35b2c83..5bce798 100644
--- a/isomaker/80-openeuler/runtime-cleanup.tmpl
+++ b/isomaker/80-openeuler/runtime-cleanup.tmpl
@@ -67,7 +67,7 @@ removefrom iptables --allbut \
removepkg libXxf86misc
removepkg libasyncns libhbaapi libhbalinux
-removepkg libmcpp libtiff linux-atm-libs
+removepkg libmcpp linux-atm-libs
removepkg lvm2-libs m4 mailx makebootfat mcpp
removepkg mingetty mobile-broadband-provider-info pkgconfig ppp pth
removepkg rmt rpcbind squashfs-tools system-config-firewall-base
@@ -146,7 +146,7 @@ removefrom bind-utils /usr/bin/dig /usr/bin/host /usr/bin/nsupdate
removefrom bitmap-fangsongti-fonts /usr/share/fonts/*
removefrom ca-certificates /etc/pki/java/*
removefrom ca-certificates /etc/pki/tls/certs/ca-bundle.trust.crt /etc/ssl/*
-removefrom cairo /usr/${libdir}/libcairo-script* /usr/bin/cairo-sphinx
+removefrom cairo /usr/bin/cairo-sphinx
removefrom coreutils /etc/* /usr/bin/link /usr/bin/nice /usr/bin/stty /usr/bin/su /usr/bin/unlink
removefrom coreutils /usr/sbin/runuser /usr/bin/[ /usr/bin/base64 /usr/bin/chcon
removefrom coreutils /usr/bin/cksum /usr/bin/comm /usr/bin/csplit
--
2.27.0

View File

@ -1,120 +0,0 @@
From 6476093453615673dc20611bc7812def55294fb6 Mon Sep 17 00:00:00 2001
From: wangchong1995924 <15229716099@163.com>
Date: Thu, 28 Jul 2022 14:23:11 +0800
Subject: [PATCH] support Desktop iso
diff --git a/isomaker/init.sh b/isomaker/init.sh
index ca39d48..bb958b2 100644
--- 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 edge
+ for typename in standard source debug everything_debug everything everything_src netinst edge desktop
do
if [ "${typename}" == "${ISO_TYPE}" ];then
return 0
@@ -115,6 +115,7 @@ function global_var_init()
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"
+ DESKTOP_ISO_NAME="${PRODUCT}-Desktop-${VERSION}-${RELEASE}-${ARCH}-dvd.iso"
else
RELEASE_NAME="${PRODUCT}-${VERSION}-${ARCH}"
STANDARD_ISO_NAME="${PRODUCT}-${VERSION}-${ARCH}-dvd.iso"
@@ -125,6 +126,7 @@ function global_var_init()
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"
+ DESKTOP_ISO_NAME="${PRODUCT}-Desktop-${VERSION}-${ARCH}-dvd.iso"
fi
[ ! -d "${BUILD}" ] && mkdir -p "${BUILD}"
diff --git a/isomaker/iso.sh b/isomaker/iso.sh
index d728aaf..43b4dc0 100644
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -65,6 +65,23 @@ function gen_edge_iso()
return 0
}
+function gen_desktop_iso()
+{
+ set +e
+ mkdir -p "${BUILD}"/iso/repodata/
+ cp "config/${ARCH}/desktop_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}/${DESKTOP_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}/${DESKTOP_ISO_NAME}" -e images/efiboot.img -no-emul-boot "${BUILD}"/iso
+ [ $? != 0 ] && return 1
+ fi
+ implantisomd5 "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}"
+ return 0
+}
+
function gen_src_iso()
{
set +e
diff --git a/isomaker/oemaker.sh b/isomaker/oemaker.sh
index 9fa8e08..3d6b419 100644
--- a/isomaker/oemaker.sh
+++ b/isomaker/oemaker.sh
@@ -152,6 +152,13 @@ function mk_oe_main()
return 1
fi
ls "${OUTPUT_DIR}/${EDGE_ISO_NAME}"
+ elif [ "${ISO_TYPE}" == "desktop" ]; then
+ gen_desktop_iso
+ if [ $? -ne 0 ]; then
+ echo "create desktop iso failed"
+ return 1
+ fi
+ ls "${OUTPUT_DIR}/${DESKTOP_ISO_NAME}"
fi
mkclean
return 0
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index 0f77b34..287a2a6 100644
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -29,6 +29,9 @@ function download_rpms()
if [ "${ISO_TYPE}" == "edge" ]; then
get_edge_rpms
return 0
+ elif [ "${ISO_TYPE}" == "desktop" ]; then
+ get_desktop_rpms
+ return 0
fi
cat "${CONFIG}" | grep packagereq | cut -d ">" -f 2 | cut -d "<" -f 1 > _all_rpms.lst
parse_rpmlist_xml "${ARCH}"
@@ -165,6 +168,21 @@ function get_edge_rpms()
fi
}
+function get_desktop_rpms()
+{
+ parse_rpmlist_xml "desktop_${ARCH}"
+ cat parsed_rpmlist_desktop_${ARCH} > _desktop_rpms.lst
+ parse_rpmlist_xml "desktop_common"
+ cat parsed_rpmlist_desktop_common >> _desktop_rpms.lst
+ cat "config/${ARCH}/desktop_normal.xml" | grep packagereq | cut -d ">" -f 2 | cut -d "<" -f 1 >> _desktop_rpms.lst
+ sort -r -u _desktop_rpms.lst -o _desktop_rpms.lst
+ yumdownloader --resolve --installroot="${BUILD}"/tmp --destdir="${BUILD}"/iso/Packages/ $(cat _desktop_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.27.0

View File

@ -1,53 +0,0 @@
From 827754f12b73541273197eec7ba7a8a4b3eb2271 Mon Sep 17 00:00:00 2001
From: sun_hai_10 <sunha10@huawei.com>
Date: Thu, 8 Dec 2022 17:14:16 +0800
Subject: [PATCH] change rescue parameter with new anaconda
---
isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg | 2 +-
isomaker/80-openeuler/config_files/x86/grub2-efi.cfg | 2 +-
isomaker/80-openeuler/config_files/x86/isolinux.cfg | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg b/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
index 2d165e1..2cc19a8 100644
--- a/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
+++ b/isomaker/80-openeuler/config_files/aarch64/grub2-efi.cfg
@@ -40,7 +40,7 @@ submenu 'Troubleshooting -->' {
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 fpi_to_tail=off
+ linux @KERNELPATH@ @ROOT@ inst.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 fe2bc03..c7cb824 100644
--- a/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg
+++ b/isomaker/80-openeuler/config_files/x86/grub2-efi.cfg
@@ -34,7 +34,7 @@ submenu 'Troubleshooting -->' {
initrdefi @INITRDPATH@
}
menuentry 'Rescue a @PRODUCT@ system' --class openEuler --class gnu-linux --class gnu --class os {
- linuxefi @KERNELPATH@ @ROOT@ rescue fpi_to_tail=off
+ linuxefi @KERNELPATH@ @ROOT@ inst.rescue fpi_to_tail=off
initrdefi @INITRDPATH@
}
}
diff --git a/isomaker/80-openeuler/config_files/x86/isolinux.cfg b/isomaker/80-openeuler/config_files/x86/isolinux.cfg
index 0471f42..1b3fae2 100644
--- a/isomaker/80-openeuler/config_files/x86/isolinux.cfg
+++ b/isomaker/80-openeuler/config_files/x86/isolinux.cfg
@@ -93,7 +93,7 @@ label rescue
and edit config files to try to get it booting again.
endtext
kernel vmlinuz
- append initrd=initrd.img @ROOT@ rescue quiet
+ append initrd=initrd.img @ROOT@ inst.rescue quiet
label memtest
menu label Run a ^memory test
--
2.23.0

View File

@ -1,25 +0,0 @@
From 40e9deb6d6ba1d8ad07c9903ce326d2053afdeff Mon Sep 17 00:00:00 2001
From: sun_hai_10 <sunha10@huawei.com>
Date: Mon, 19 Dec 2022 21:32:23 +0800
Subject: [PATCH] enable eject in install.img
---
isomaker/80-openeuler/runtime-cleanup.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/isomaker/80-openeuler/runtime-cleanup.tmpl b/isomaker/80-openeuler/runtime-cleanup.tmpl
index 5bce798..256d013 100644
--- a/isomaker/80-openeuler/runtime-cleanup.tmpl
+++ b/isomaker/80-openeuler/runtime-cleanup.tmpl
@@ -305,7 +305,7 @@ removefrom sysvinit-tools /usr/bin/*
removefrom tar /usr/share/locale/*
removefrom usbutils /usr/bin/*
removefrom util-linux --allbut \
- /usr/bin/{dmesg,getopt,kill,login,lsblk,more,mount,umount,mountpoint,findmnt} \
+ /usr/bin/{dmesg,eject,getopt,kill,login,lsblk,more,mount,umount,mountpoint,findmnt} \
/etc/mtab /etc/pam.d/login /etc/pam.d/remote \
/usr/sbin/{agetty,blkid,blockdev,clock,fdisk,fsck,fstrim,hwclock,losetup} \
/usr/sbin/{mkswap,swaplabel,nologin,sfdisk,swapoff,swapon,wipefs,partx,fsfreeze} \
--
2.23.0

View File

@ -1,33 +0,0 @@
From 7d7a3d41bfadd5bd77402fb0900c7670661b012a Mon Sep 17 00:00:00 2001
From: htpeng <htpengc@isoftstone.com>
Date: Fri, 23 Dec 2022 16:01:16 +0800
Subject: [PATCH] Remove invalid memtest
Signed-off-by: htpeng <htpengc@isoftstone.com>
---
isomaker/80-openeuler/config_files/x86/isolinux.cfg | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/isomaker/80-openeuler/config_files/x86/isolinux.cfg b/isomaker/80-openeuler/config_files/x86/isolinux.cfg
index 1b3fae2..84ad7bf 100644
--- a/isomaker/80-openeuler/config_files/x86/isolinux.cfg
+++ b/isomaker/80-openeuler/config_files/x86/isolinux.cfg
@@ -95,15 +95,6 @@ label rescue
kernel vmlinuz
append initrd=initrd.img @ROOT@ inst.rescue quiet
-label memtest
- menu label Run a ^memory test
- text help
- If your system is having issues, a problem with your
- system's memory may be the cause. Use this utility to
- see if the memory is working correctly.
- endtext
- kernel memtest
-
menu separator # insert an empty line
label local
--
2.34.1

View File

@ -1,22 +0,0 @@
From 413d2d7c86861f3481a3021d409e743e21a42328 Mon Sep 17 00:00:00 2001
From: wangchong1995924 <15229716099@163.com>
Date: Tue, 21 Feb 2023 10:19:14 +0800
Subject: [PATCH] add raspberrypi-firmware in except
diff --git a/isomaker/80-openeuler/runtime-install.tmpl b/isomaker/80-openeuler/runtime-install.tmpl
index 1856aff..a6144bf 100644
--- a/isomaker/80-openeuler/runtime-install.tmpl
+++ b/isomaker/80-openeuler/runtime-install.tmpl
@@ -22,7 +22,7 @@ installpkg --optional *-firmware --except alsa* --except midisport-firmware \
--except crystalhd-firmware --except ivtv-firmware \
--except cx18-firmware --except iscan-firmware \
--except uhd-firmware --except lulzbot-marlin-firmware \
- --except arm-trusted-firmware
+ --except arm-trusted-firmware --except raspberrypi-firmware
installpkg b43-openfwwf
## install all of the glibc langpacks since otherwise we get no locales
--
2.27.0

View File

@ -2,29 +2,36 @@
#### Description
The source package `oemaker` has two functions: iso making and iso cutting. Correspondingly, two binary RPM packages are generated: `oemaker` and `isocut`.
The source package `oemaker` has three functions: ISO making and splitting and compile_env making. Accordingly, three software packages are generated: `oemaker` and `isocut` and `envmaker`.
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 `oemaker` is a build tool for making DVD ISOs, including the Standard ISO, Debug ISO, Source ISO, Everything ISO, Everything Source ISO, Everything Debug ISO, and Netinstall ISO.
The generated binary RPM package `isocut` is a building tool for iso cutting which supports only RPM package-level.
The generated binary RPM `isocut` is a build tool for ISO splitting, which supports only package-level RPM.
The generated binary RPM `envmaker` is a build tool for making compile_env.
#### Installation
To install `oemaker` and `isocut`, you can use `rpm` or `dnf` package manager command with openEuler repository.
To install `oemaker` and `isocut` and `envmaker`, you can use the `rpm` or `dnf` package manager command with the openEuler repository.
Install `oemaker` with dnf
Install `oemaker` with `dnf`
```sh
dnf install -y oemaker
```
Install `isocut` with dnf
Install `isocut` with `dnf`
```sh
dnf install -y isocut
```
#### Instructions
使用 `dnf` 安装 `envmaker`
```sh
dnf install -y envmaker
```
Generally, the disk space is more than 50g.
#### Instruction
Generally, the disk space must be more than 50 GB.
#### Usage
@ -32,37 +39,55 @@ Generally, the disk space is more than 50g.
oemaker <font color=#0000FF >_[-h] [-t Type] [-p Product] [-v Version] [-r RELEASE] [-s REPOSITORY]_</font>
optional arguments:
-t Type
ISO Type include standard debug source everything everything_debug everything_src and netinst
Optional arguments:
-p Product
Product Name, such as: openEuler
-t ISO type, including standard, debug, source, everything, everything_debug, everything_src, and netinst
-v Version
version identifier
-p Product name, for example, openEuler
-r RELEASE
release information
-v Version number
-s REPOSITORY
source dnf repository address link(may be listed multiple times)
-r Release information
-h
show the help message and exit
-s Source dnf repository address link (may be listed multiple times)
-h Show the help message and exit
##### isocut
isocut <font color=#0000FF >_[-h] [-t temporary path] [-r extern rpm path] [-k kickstart file path] origin-iso dest-iso_</font>
positional arguments:
Positional arguments:
origin-iso origin iso image
dest-iso destination iso image
origin-iso Origin ISO image
dest-iso Destination ISO image
optional arguments:
Optional arguments:
-t the temporary path which must be an absolute path and must be greater than 8g
-r extern rpm packages path
-k Kickstart file path
-h show the help message and exit
-t The temporary path, which must be an absolute path and must be greater than 8 GB
-r The external RPM package path
-k The kickstart file path
-i The isolinux cfg file path
-g The grub cfg file path
-p The anaconda pixmaps file path
-h Show the help message and exit
isocut 详细文档请查看《镜像裁剪定制工具使用指南》:
https://gitee.com/openeuler/docs/blob/9d89e4e41e7824f984ebc7a00b5f1241b84d1f85/docs/zh/docs/Isocut/%E9%95%9C%E5%83%8F%E8%A3%81%E5%89%AA%E5%AE%9A%E5%88%B6%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97.md
##### envmaker
envmaker <font color=#0000FF >_[-p Product] [-v Version]_</font>
Optional arguments:
-p Product name,for example, openEuler_compile_env
-v Version identifier

View File

@ -2,30 +2,36 @@
#### 介绍
源码包oemaker包括两部分功能iso制作和iso裁剪。相应的会构建生成两个二进制RPM包oemaker和isocut.
`oemaker`源码包拥有三部分功能iso 格式光盘映像的制作和裁剪和通用编译环境制作。相应地,`oemaker` 源码包会生成三个软件包:`oemaker``isocut``envmaker`
生成的二进制RPM包oemaker是一款用于构建DVD iso的工具包括标准isodebug iso, source iso, everything iso, everything debug iso, everything source, edge computing iso and netinst iso等
生成的二进制 RPM 包 `oemaker` 是用于制作 DVD 光盘映像的构建工具,可制作的映像包括 standard iso、debug iso、source iso、everything iso、everything source iso、everything debug iso 和 netinst iso。
生成的二进制RPM包isocut是一款用于iso裁剪的构建工具支持RPM包级别的裁剪。
生成的二进制 RPM 包 `isocut` 是用于裁剪光盘映像的构建工具,支持在 RPM 包级别进行裁剪。
生成的二进制 RPM 包 `envmaker` 是用于制作通用编译环境的构建工具。
#### 安装教程
可以`rpm``dnf`命令通过openEuler repository来安装`oemaker``isocut`
可以使用 `rpm``dnf` 软件包管理器命令通过 openEuler repository 来安装 `oemaker``isocut``envmaker`
用dnf命令安装`oemaker`方式:
使用 `dnf` 安装 `oemaker`
```sh
dnf install -y oemaker
```
用dnf命令安装`isocut`方式:
使用 `dnf` 安装 `isocut`
```sh
dnf install -y isocut
```
使用 `dnf` 安装 `envmaker`
```sh
dnf install -y envmaker
```
#### 使用说明
一般要求磁盘空间大于50G
一般要求磁盘空间大于 50G。
#### 使用方法
@ -33,37 +39,51 @@ dnf install -y isocut
oemaker <font color=#0000FF >_[-h] [-t Type] [-p Product] [-v Version] [-r RELEASE] [-s REPOSITORY]_</font>
optional arguments:
-t Type
ISO Type include standard debug source everything everything_debug everything_src and netinst
Optional arguments:
-p Product
Product Name, such as: openEuler
-t ISO type, including standard, debug, source, everything, everything_debug, everything_src, and netinst
-v Version
version identifier
-p Product name, for example, openEuler
-r RELEASE
release information
-v Version number
-s REPOSITORY
source dnf repository address link(may be listed multiple times)
-r Release information
-h
show the help message and exit
-s Source dnf repository address link (may be listed multiple times)
-h Show the help message and exit
##### isocut
isocut <font color=#0000FF >_[-h] [-t temporary path] [-r extern rpm path] [-k kickstart file path] origin-iso dest-iso_</font>
positional arguments:
Positional arguments:
origin-iso origin iso image
dest-iso destination iso image
optional arguments:
Optional arguments:
-t the temporary path which must be an absolute path and must be greater than 8g
-r extern rpm packages path
-k Kickstart file path
-h show the help message and exit
-t The temporary path, which must be an absolute path and must be greater than 8 GB
-r The external RPM package path
-k The kickstart file path
-i The isolinux cfg file path
-g The grub cfg file path
-p The anaconda pixmaps file path
-h Show the help message and exit
##### envmaker
envmaker <font color=#0000FF >_[-p Product] [-v Version]_</font>
Optional arguments:
-p Product name,for example, openEuler_compile_env
-v Version identifier

Binary file not shown.

BIN
oemaker-2.0.5.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.4
Release: 9
Version: 2.0.5
Release: 1
BuildRoot: %{_tmppath}/%{name}
Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -26,18 +26,6 @@ Source7: desktop_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
Patch0004: 0004-bugfix-I3OGUT.patch
Patch0005: 0005-add-fpi_tail-param-for-grub.patch
Patch0008: 0008-add-parse_everything_deb_exclude.patch
Patch0010: 0010-do-not-cleanup-pkg.patch
Patch0011: 0011-support-desktop-iso.patch
Patch0012: 0012-change-rescue-parameter-with-new-anaconda.patch
Patch0013: 0013-enable-eject-in-install.img.patch
Patch0014: 0014-remove-invalid-memtest.patch
Patch0015: 0015-bugfix-I6G246.patch
%description
a building tool for DVD ISO making and ISO cutting
@ -50,6 +38,14 @@ BuildRequires: bash
%description -n isocut
a building tool for ISO cutting
%package -n envmaker
Summary: a building tool for compile_env making
Requires: yum dnf-utils createrepo file util-linux genisoimage isomd5sum grep bash libselinux-utils libxml2 pigz
BuildRequires: bash
%description -n envmaker
a building tool for compile_env making
%prep
%setup -c
rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/aarch64/normal.xml
@ -67,7 +63,6 @@ cp %{SOURCE6} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/aarch64/de
rm -rf %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/desktop_normal.xml
cp %{SOURCE7} %{_builddir}/%{name}-%{version}/%{name}/isomaker/config/x86_64/desktop_normal.xml
cd %{_builddir}/%{name}-%{version}/%{name}
%autopatch -p1
%install
mkdir -p %{buildroot}/opt/
@ -109,6 +104,20 @@ install -m 600 %{name}/isocut/config/repodata.template %{buildroot}/%{_sysconfdi
install -m 600 %{name}/isocut/config/x86_64/anaconda-ks.cfg %{buildroot}/%{_sysconfdir}/isocut/
%endif
mkdir -p %{buildroot}/opt/envmaker
mkdir -p %{buildroot}/opt/envmaker/config
mkdir -p %{buildroot}/opt/envmaker/config/x86_64
mkdir -p %{buildroot}/opt/envmaker/config/aarch64
mkdir -p %{buildroot}/opt/envmaker/utils
install -m 700 %{name}/envmaker/envmaker.sh %{buildroot}/opt/envmaker/envmaker.sh
install -m 700 %{name}/envmaker/utils/chroot.sh %{buildroot}/opt/envmaker/utils/chroot.sh
install -m 700 %{name}/envmaker/utils/common_fun.sh %{buildroot}/opt/envmaker/utils/common_fun.sh
install -m 700 %{name}/envmaker/utils/parse_rpmlist_xml.sh %{buildroot}/opt/envmaker/utils/parse_rpmlist_xml.sh
install -m 400 %{name}/envmaker/config/aarch64/openEuler_repo.conf %{buildroot}/opt/envmaker/config/aarch64/openEuler_repo.conf
install -m 400 %{name}/envmaker/config/x86_64/openEuler_repo.conf %{buildroot}/opt/envmaker/config/x86_64/openEuler_repo.conf
install -m 400 %{name}/envmaker/config/compile_env_rpmlist.xml %{buildroot}/opt/envmaker/config/compile_env_rpmlist.xml
%pre
%post
@ -138,6 +147,11 @@ fi
%dir %{_sysconfdir}/isocut
%{_sysconfdir}/isocut/*
%files -n envmaker
%defattr(-,root,root)
%dir /opt
%dir /opt/envmaker
/opt/envmaker/*
%clean
rm -rf $RPM_BUILD_ROOT/*
@ -145,6 +159,11 @@ rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{name}
%changelog
* Wed May 17 2023 chenhuihan <chenhuihan@huawei.com> - 2.0.5-1
- ID:NA
- SUG:NA
- DESC: support envmaker
* Tue Feb 21 2023 wangchong <wangchong56@huawei.com> - 2.0.4-9
- ID:NA
- SUG:NA