Updated SPEC file to drop leapp repositories unrelated to IPU 8 -> 9
Also apply missing upstream fix for Alibaba cloud Resolves: RHEL-27847
This commit is contained in:
parent
1827cee327
commit
5901b3fe81
@ -0,0 +1,43 @@
|
||||
From fbc38d4ad1d828e0553579e3719c0e4ed4a2a6bd Mon Sep 17 00:00:00 2001
|
||||
From: jinkangkang <1547182170@qq.com>
|
||||
Date: Mon, 19 Aug 2024 18:46:08 +0800
|
||||
Subject: [PATCH] rhui(alibaba): add ARM RHEL8 and RHEL9 setup entries (#1277)
|
||||
|
||||
Since leapp's RHUI mechanism filters setups based on the architecture of the source system,
|
||||
it was not possible to upgrade of ARM-based RHEL systems on Alibaba cloud as there
|
||||
were no ARM entries in RHUI_SETUPS. This patch adds these entries, making it possible
|
||||
for EL 8 -> 9 upgrades of ARM systems on Alibaba cloud.
|
||||
---
|
||||
repos/system_upgrade/common/libraries/rhui.py | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/repos/system_upgrade/common/libraries/rhui.py b/repos/system_upgrade/common/libraries/rhui.py
|
||||
index 51694ac2..30de0275 100644
|
||||
--- a/repos/system_upgrade/common/libraries/rhui.py
|
||||
+++ b/repos/system_upgrade/common/libraries/rhui.py
|
||||
@@ -348,6 +348,22 @@ RHUI_SETUPS = {
|
||||
('content.crt', RHUI_PKI_PRODUCT_DIR)
|
||||
],
|
||||
os_version='9'),
|
||||
+ ],
|
||||
+ RHUIFamily(RHUIProvider.ALIBABA, arch=arch.ARCH_ARM64, client_files_folder='alibaba'): [
|
||||
+ mk_rhui_setup(clients={'aliyun_rhui_rhel8'}, leapp_pkg='leapp-rhui-alibaba',
|
||||
+ mandatory_files=[('leapp-alibaba.repo', YUM_REPOS_PATH)],
|
||||
+ optional_files=[
|
||||
+ ('key.pem', RHUI_PKI_DIR),
|
||||
+ ('content.crt', RHUI_PKI_PRODUCT_DIR)
|
||||
+ ],
|
||||
+ os_version='8'),
|
||||
+ mk_rhui_setup(clients={'aliyun_rhui_rhel9'}, leapp_pkg='leapp-rhui-alibaba',
|
||||
+ mandatory_files=[('leapp-alibaba.repo', YUM_REPOS_PATH)],
|
||||
+ optional_files=[
|
||||
+ ('key.pem', RHUI_PKI_DIR),
|
||||
+ ('content.crt', RHUI_PKI_PRODUCT_DIR)
|
||||
+ ],
|
||||
+ os_version='9'),
|
||||
]
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
@ -7,9 +7,19 @@
|
||||
%if 0%{?rhel} == 7
|
||||
%define leapp_python_sitelib %{python2_sitelib}
|
||||
%define lpr_name leapp-upgrade-el7toel8
|
||||
%define repo_shortname el7toel8
|
||||
%define next_major_ver 8
|
||||
%else
|
||||
%define leapp_python_sitelib %{python3_sitelib}
|
||||
%if 0%{?rhel} == 8
|
||||
%define lpr_name leapp-upgrade-el8toel9
|
||||
%define repo_shortname el8toel9
|
||||
%define next_major_ver 9
|
||||
%else
|
||||
%define lpr_name leapp-upgrade-el9toel10
|
||||
%define repo_shortname el9toel10
|
||||
%define next_major_ver 10
|
||||
%endif
|
||||
|
||||
# This drops autogenerated deps on
|
||||
# - /usr/libexec/platform-python (rhel-8 buildroot)
|
||||
@ -42,7 +52,7 @@ py2_byte_compile "%1" "%2"}
|
||||
|
||||
Name: leapp-repository
|
||||
Version: 0.21.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Repositories for leapp
|
||||
|
||||
License: ASL 2.0
|
||||
@ -55,6 +65,7 @@ BuildArch: noarch
|
||||
|
||||
### PATCHES HERE
|
||||
# Patch0001: filename.patch
|
||||
Patch0001: 0001-rhui-alibaba-add-ARM-RHEL8-and-RHEL9-setup-entries-1.patch
|
||||
|
||||
|
||||
%description
|
||||
@ -84,14 +95,24 @@ Obsoletes: leapp-repository-sos-plugin <= 0.10.0
|
||||
Conflicts: leapp-upgrade-el8toel9
|
||||
|
||||
%else
|
||||
######### RHEL 8 ############
|
||||
######### RHEL 8+ (and newer) ############
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-leapp
|
||||
|
||||
# NOTE(pstodulk): else if / elif has been implemented quite late. as we still
|
||||
# want to build on RHEL 7 too, go in the old way. Ref:
|
||||
# https://github.com/rpm-software-management/rpm/issues/311
|
||||
%if 0%{?rhel} == 8
|
||||
######### RHEL 8 ############
|
||||
|
||||
# Same as the conflict above - we want to be sure our packages are untouched
|
||||
# during the whole IPU process
|
||||
Conflicts: leapp-upgrade-el7toel8
|
||||
|
||||
Conflicts: leapp-upgrade-el9toel10
|
||||
%else
|
||||
######### RHEL 9 ############
|
||||
Conflicts: leapp-upgrade-el8toel9
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# IMPORTANT: every time the requirements are changed, increment number by one
|
||||
@ -207,14 +228,11 @@ Requires: python3-gobject-base
|
||||
|
||||
# APPLY PATCHES HERE
|
||||
# %%patch0001 -p1
|
||||
%patch0001 -p1
|
||||
|
||||
|
||||
%build
|
||||
%if 0%{?rhel} == 7
|
||||
cp -a leapp*deps*el8.noarch.rpm repos/system_upgrade/el7toel8/files/bundled-rpms/
|
||||
%else
|
||||
cp -a leapp*deps*el9.noarch.rpm repos/system_upgrade/el8toel9/files/bundled-rpms/
|
||||
%endif
|
||||
cp -a leapp*deps*el%{next_major_ver}.noarch.rpm repos/system_upgrade/%{repo_shortname}/files/bundled-rpms/
|
||||
|
||||
|
||||
%install
|
||||
@ -222,6 +240,7 @@ install -m 0755 -d %{buildroot}%{custom_repositorydir}
|
||||
install -m 0755 -d %{buildroot}%{repositorydir}
|
||||
cp -r repos/* %{buildroot}%{repositorydir}/
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/repos.d/
|
||||
# NOTE(pstodulk): drop transaction dir and its content if replaced by config files before RHEL 10
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/transaction/
|
||||
install -m 0755 -d %{buildroot}%{_sysconfdir}/leapp/files/
|
||||
install -m 0644 etc/leapp/transaction/* %{buildroot}%{_sysconfdir}/leapp/transaction
|
||||
@ -234,11 +253,10 @@ rm -rf %{buildroot}%{leapp_python_sitelib}/leapp/cli/commands/tests
|
||||
|
||||
# Remove irrelevant repositories - We don't want to ship them for the particular
|
||||
# RHEL version
|
||||
%if 0%{?rhel} == 7
|
||||
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el8toel9
|
||||
%else
|
||||
rm -rf %{buildroot}%{repositorydir}/system_upgrade/el7toel8
|
||||
%endif
|
||||
for i in el7toel8 el8toel9 el9toel10;
|
||||
do
|
||||
[ "$i" != "%{repo_shortname}" ] && rm -rf %{buildroot}%{repositorydir}/system_upgrade/$i
|
||||
done
|
||||
|
||||
# remove component/unit tests, Makefiles, ... stuff that related to testing only
|
||||
rm -rf %{buildroot}%{repositorydir}/common/actors/testactor
|
||||
@ -284,6 +302,10 @@ done;
|
||||
# no files here
|
||||
|
||||
%changelog
|
||||
* Mon Aug 19 2024 Petr Stodulka <pstodulk@redhat.com> - 0.21.0-2
|
||||
- Updated SPEC file to drop leapp repositories unrelated to IPU 8 -> 9
|
||||
- Resolves: RHEL-27847
|
||||
|
||||
* Fri Aug 16 2024 Toshio Kuratomi <toshio@fedoraproject.org> - 0.21.0-1
|
||||
- Rebase to new upstream 0.21.0
|
||||
- Updated leapp data files.
|
||||
|
Loading…
Reference in New Issue
Block a user