diff --git a/0025-support-migration-to-2503.patch b/0025-support-migration-to-2503.patch new file mode 100644 index 0000000000000000000000000000000000000000..bc68a63d39ed84d1917b0eed8d19144c13b4821d --- /dev/null +++ b/0025-support-migration-to-2503.patch @@ -0,0 +1,81 @@ +From 70139ab91a148090c1124595ec3a60d8118ab69f Mon Sep 17 00:00:00 2001 +From: yahaha +Date: Thu, 28 Aug 2025 02:37:37 -0400 +Subject: [PATCH] support migration to 2503 + +--- + .../centos7/openeuler/centos72openeuler.py | 40 +++++++++++++++++++++- + 1 file changed, 39 insertions(+), 1 deletion(-) + +diff --git a/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py b/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py +index e114d32..dd47376 100644 +--- a/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py ++++ b/ut-Migration-tools-0.1/centos7/openeuler/centos72openeuler.py +@@ -8,11 +8,21 @@ import sys, re + + openeuler_repo = '''[openeuler] + name = openeuler +-baseurl = https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-20.03-LTS-SP4/OS/$basearch ++baseurl = https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-25.03/everything/$basearch + enabled = 1 + gpgcheck = 0 + ''' + ++openeuler_2403_repo = """ ++[openEuler-2403] ++name=openEuler-2403 ++baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-24.03-LTS-SP2/everything/$basearch ++enabled=1 ++gpgcheck=0 ++""" ++ ++high_version_list = ["25.03", "25.09"] ++ + + def local_disabled_release_repo(): + path = '/etc/yum.repos.d' +@@ -284,6 +294,27 @@ def main(): + + dnf_path = '/usr/bin/dnf' + install_dir = os.path.join(os.path.dirname('/var/tmp'), 'DNF') ++ ++ ++ # 检查 /etc/os-release 的 VERSION_ID 是否为 "25.03" ++ version_id = None ++ os_release_file = '/etc/os-release' ++ if os.path.exists(os_release_file): ++ with open(os_release_file, 'r') as f: ++ for line in f: ++ if line.startswith('VERSION_ID'): ++ version_id = line.strip().split('=')[1].strip('"') ++ break ++ ++ # 如果是 25.03 系统,重新配置 2403 的软件源 ++ if version_id in high_version_list: ++ # 写入 2403 的 repo 文件 ++ if os.path.exists(repofile): ++ os.remove(repofile) ++ with open(repofile, 'w') as f: ++ f.write(openeuler_2403_repo) ++ ++ + if not os.path.exists(install_dir): + os.makedirs(install_dir) + else: +@@ -293,6 +324,13 @@ def main(): + install_dir) + os.system(install_cmd) + ++ if version_id in high_version_list: ++ # 写入 25.03 的 repo 文件 ++ if os.path.exists(repofile): ++ os.remove(repofile) ++ with open(repofile, 'w') as f: ++ f.write(openeuler_repo) ++ + # download dnf + download_dnf = ["dnf", "python3-dnf", "dnf-help", "dnf-data"] + [os.system('/usr/bin/yumdownloader {} --destdir={}'.format(i, os.path.join(install_dir, 'root'))) for i in download_dnf] +-- +1.8.3.1 + diff --git a/migration-tools.spec b/migration-tools.spec index 6c9c894327be1f791523c1c297357c035ea6a34f..e92fda3fac46ef585283444162a00a3be029608d 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.3 -Release: 25 +Release: 26 License: MulanPSL-2.0 Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system Source0: %{name}-%{version}.tar.gz @@ -31,6 +31,7 @@ Patch021: 0021-Solve-startup-issues.patch Patch022: 0022-modify-web-success-migration-page.patch Patch023: 0023-add-migrate-to-2403.patch Patch024: 0024-fix-2403-can-not-start-systemd-logind-service.patch +Patch025: 0025-support-migration-to-2503.patch BuildArch: noarch @@ -133,6 +134,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Fri Aug 29 2025 xuezhixin - 1.0.3-26 +- add 0025-support-migration-to-2503.patch + * Tue Jul 29 2025 lixin - 1.0.3-25 - rename patches diff --git a/requires.tar.gz b/requires.tar.gz index 753d195fab091c543bac0a8a1d8cc3a7cb9b8e39..9dbcea1d7a29a9d7c8353c737edd0264da996ab9 100644 Binary files a/requires.tar.gz and b/requires.tar.gz differ