fix createrepo data error

This commit is contained in:
wangchong1995924 2024-05-21 11:14:23 +08:00
parent aef5d144f9
commit be1b4062d0
2 changed files with 69 additions and 1 deletions

View File

@ -0,0 +1,62 @@
From 04cc024539091f9207371333860a46f3ef5b4b1c Mon Sep 17 00:00:00 2001
From: wangchong1995924 <15229716099@163.com>
Date: Tue, 21 May 2024 11:08:09 +0800
Subject: [PATCH] fix createrepo data error
diff --git a/isomaker/iso.sh b/isomaker/iso.sh
index 7bf0bf9..3badcd7 100644
--- a/isomaker/iso.sh
+++ b/isomaker/iso.sh
@@ -53,7 +53,7 @@ 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
+ createrepo -d -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
@@ -105,7 +105,7 @@ function gen_everything_iso()
rm -rf "$BUILD"/iso/Packages
cp "$CONFIG" "${BUILD}"/iso/repodata/
mv "${EVERY_DIR}" "${BUILD}"/iso/Packages
- createrepo -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/iso
+ createrepo -d -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 /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
@@ -125,7 +125,7 @@ function gen_everything_debug_iso()
rm -rf "${BUILD}"/iso/Packages
cp "$CONFIG" "${BUILD}"/iso/repodata/
mv "${EVERY_DEBUG_DIR}" "${BUILD}"/iso/Packages
- createrepo -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/iso
+ createrepo -d -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 /result/"${EVE_DEBUG_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
@@ -144,7 +144,7 @@ function gen_everything_src_iso()
rm -rf "${BUILD}"/iso/Packages
cp "$CONFIG" "${BUILD}"/iso/repodata/
mv "${EVERY_SRC_DIR}" "${BUILD}"/iso/Packages
- createrepo -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/iso
+ createrepo -d -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 /result/"${EVE_SRC_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
diff --git a/isomaker/rpm.sh b/isomaker/rpm.sh
index a9efe4b..17a7eaf 100644
--- a/isomaker/rpm.sh
+++ b/isomaker/rpm.sh
@@ -138,7 +138,7 @@ function download_rpms()
mkdir -p "${BUILD}"/iso/repodata
cp "$CONFIG" "${BUILD}"/iso/repodata/
- createrepo -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/iso
+ createrepo -d -g "${BUILD}"/iso/repodata/*.xml "${BUILD}"/iso
return 0
}
--
2.27.0

View File

@ -11,7 +11,7 @@ Summary: a building tool for DVD ISO making and ISO cutting
License: Mulan PSL v2
Group: System/Management
Version: 3.1.0
Release: 7
Release: 8
BuildRoot: %{_tmppath}/%{name}
Source: https://gitee.com/openeuler/oemaker/repository/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
@ -27,6 +27,7 @@ Requires: createrepo dnf-plugins-core genisoimage isomd5sum grep bash libs
Requires: lorax >= 19.6.78-1
# Patch here
Patch0001: 0001-fix-createrepo-data-error.patch
%description
a building tool for DVD ISO making and ISO cutting
@ -172,6 +173,11 @@ rm -rf %{buildroot}
rm -rf $RPM_BUILD_DIR/%{name}
%changelog
* Tue May 21 2024 wangchong <wangchong56@huawei.com> - 3.1.0-8
- ID:NA
- SUG:NA
- DESC: fix createrepo data error
* Thu Mar 28 2024 mayunlong <mayunlong6@huawei.com> - 3.1.0-7
- ID:NA
- SUG:NA