Skip to content

Commit 7f71a7f

Browse files
committed
Install rpm public GPG key(s) into distro specific path
Owerride the path for Kitten to be distro/almalinux/rpm-gpg/10 Bump the package version
1 parent 1a844a3 commit 7f71a7f

1 file changed

Lines changed: 18 additions & 26 deletions

File tree

leapp-data.spec

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
%if 0%{?rhel} == 7
99
%define supported_vendors epel imunify kernelcare mariadb nginx-stable nginx-mainline postgresql docker-ce imunify360-alt-php
1010
%define target_version 8
11+
%define dist_gpg_path distro/%{dist_name}/rpm-gpg/%{target_version}
1112
%if %{dist_name} == "almalinux"
1213
%define gpg_key RPM-GPG-KEY-AlmaLinux-8
1314
%endif
@@ -24,6 +25,7 @@
2425
%if 0%{?rhel} == 8
2526
%define supported_vendors epel kernelcare mariadb nginx-stable nginx-mainline postgresql docker-ce
2627
%define target_version 9
28+
%define dist_gpg_path distro/%{dist_name}/rpm-gpg/%{target_version}
2729
%if %{dist_name} == "almalinux"
2830
%define gpg_key RPM-GPG-KEY-AlmaLinux-9
2931
%endif
@@ -40,11 +42,13 @@
4042
%if 0%{?rhel} == 9
4143
%define supported_vendors epel docker-ce
4244
%define target_version 10
45+
%define dist_gpg_path distro/%{dist_name}/rpm-gpg/%{target_version}
4346
%if "%{dist_name}" == "almalinux"
4447
%define gpg_key RPM-GPG-KEY-AlmaLinux-10
4548
%endif
4649
%if "%{dist_name}" == "almalinux-kitten"
4750
%define gpg_key RPM-GPG-KEY-AlmaLinux-10
51+
%define dist_gpg_path distro/almalinux/rpm-gpg/%{target_version}
4852
%endif
4953
%if "%{dist_name}" == "centos"
5054
%define gpg_key RPM-GPG-KEY-centosofficial-SHA256 RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
@@ -54,8 +58,8 @@
5458
%bcond_without check
5559

5660
Name: leapp-data-%{dist_name}
57-
Version: 0.8
58-
Release: 4%{?dist}.%{pes_events_build_date}
61+
Version: 0.9
62+
Release: 1%{?dist}.%{pes_events_build_date}
5963
Summary: data for migrating tool
6064
Group: Applications/Databases
6165
License: ASL 2.0
@@ -123,10 +127,6 @@ mv -f %{buildroot}%{_sysconfdir}/leapp/files/repomap.json.el8 \
123127
%{buildroot}%{_sysconfdir}/leapp/files/repomap.json
124128
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el9
125129
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el10
126-
mkdir -p %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/8/
127-
for key in %{gpg_key}; do
128-
mv -f files/rpm-gpg/${key} %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/8/
129-
done
130130
%endif
131131
%if 0%{?rhel} == 8
132132
mv -f %{buildroot}%{_sysconfdir}/leapp/files/leapp_upgrade_repositories.repo.el9 \
@@ -135,10 +135,6 @@ mv -f %{buildroot}%{_sysconfdir}/leapp/files/repomap.json.el9 \
135135
%{buildroot}%{_sysconfdir}/leapp/files/repomap.json
136136
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el8
137137
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el10
138-
mkdir -p %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/9/
139-
for key in %{gpg_key}; do
140-
mv -f files/rpm-gpg/${key} %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/9/
141-
done
142138
%endif
143139
%if 0%{?rhel} == 9
144140
mv -f %{buildroot}%{_sysconfdir}/leapp/files/leapp_upgrade_repositories.repo.el10 \
@@ -147,11 +143,15 @@ mv -f %{buildroot}%{_sysconfdir}/leapp/files/repomap.json.el10 \
147143
%{buildroot}%{_sysconfdir}/leapp/files/repomap.json
148144
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el9
149145
rm -f %{buildroot}%{_sysconfdir}/leapp/files/*.el8
150-
mkdir -p %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/10/
146+
%endif
147+
151148
for key in %{gpg_key}; do
152-
mv -f files/rpm-gpg/${key} %{buildroot}%{repositorydir}/system_upgrade/common/files/rpm-gpg/10/
149+
for rpm_gpg_path in rpm-gpg/%{target_version} %{dist_gpg_path}; do
150+
mkdir -p %{buildroot}%{repositorydir}/system_upgrade/common/files/${rpm_gpg_path}
151+
cp -av files/rpm-gpg/${key} %{buildroot}%{repositorydir}/system_upgrade/common/files/${rpm_gpg_path}/
152+
done
153+
rm -f files/rpm-gpg/${key}
153154
done
154-
%endif
155155

156156
%check
157157
%if %{with check}
@@ -165,30 +165,22 @@ python3 tests/check_debranding.py %{buildroot}%{_sysconfdir}/leapp/files/pes-eve
165165

166166
%files
167167
%doc LICENSE NOTICE README.md
168-
%if 0%{?rhel} == 9
169-
%{repositorydir}/system_upgrade/common/files/rpm-gpg/10/*
170-
%endif
171-
172-
%if 0%{?rhel} == 8
173-
%{repositorydir}/system_upgrade/common/files/rpm-gpg/9/*
174-
%endif
175-
176-
%if 0%{?rhel} == 7
177-
%{repositorydir}/system_upgrade/common/files/rpm-gpg/8/*
178-
%endif
168+
%{repositorydir}/system_upgrade/common/files/rpm-gpg/%{target_version}/*
169+
%{repositorydir}/system_upgrade/common/files/%{dist_gpg_path}/*
179170
%{_sysconfdir}/leapp/files/*
180171

181172

182173
%changelog
183-
* Thu May 15 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.8-4.20250505
174+
* Mon May 19 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.9-1.20250505
184175
- Update data to the upstream most recent state:
185176
- Device driver deprecation data:
186177
- leapp-repository sha 9c621a91199c093f603ef30ba3daf59010c20e47
187-
188178
- PES data:
189179
- pes-events.json: upstream state ffd6d8e456484630f99d98d5bff955914af02aa5
190180
- epel_pes.json_template:
191181
- remove duplicated id and set_id
182+
- Install rpm public GPG key(s) into distro specific path
183+
- Bump the package version
192184

193185
* Fri Mar 28 2025 Yuriy Kohut <ykohut@almalinux.org> - 0.8-3.20250228
194186
- Exclude microsoft vendor from the package

0 commit comments

Comments
 (0)