Compare commits

...

7 Commits
c9s ... c10s

Author SHA1 Message Date
Sergei Petrosian
7463a01e80 Update to 1.7.4
Resolves: RHEL-153382 : Fix the role failing on steps that copy logs to
the controller EL10
2026-03-20 13:53:01 +01:00
Sergei Petrosian
d4dd948572 Upate to 1.7.1-2
Fix spec file to require rhel-system-roles package
Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to
RHEL10
2026-02-24 14:24:44 +01:00
Sergei Petrosian
3ff15ecc8e Update to 1.7.1 el10
Update to latest upstream version via commit hash
2026-02-23 14:27:23 +01:00
Sergei Petrosian
023445ac2c Replace upstream value of leapp_system_roles_collection downstream EL10
Update to version 1.7.0
2026-02-17 14:36:50 +01:00
Sergei Petrosian
4fe41117f4 Bump version to get automation to do builds and create an erratum 2026-02-06 08:54:16 +01:00
Sergei Petrosian
59d747db3f Initialize the package ansible-collection-redhat-leapp EL10
Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to
RHEL10
2026-02-02 19:19:11 +01:00
Johnny Hughes
6abbc01a6e remove dead.package and README.md and setup for use 2026-01-28 08:55:08 -06:00
7 changed files with 192 additions and 2 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/infra.leapp-1.7.0.tar.gz
/infra.leapp-7a4bab008a8045c54b3477ab64766dd39a3273cd.tar.gz
/infra.leapp-1.7.4.tar.gz

View File

@ -1,2 +0,0 @@
# Package Not Available
This package is not available on CentOS Stream 10.

View File

@ -0,0 +1,160 @@
%bcond_with collection_artifact
Name: ansible-collection-redhat-leapp
Version: 1.7.4
Release: 1%{?dist}
Summary: redhat.leapp Ansible collection that handles RHEL upgrades
License: MIT
URL: https://github.com/redhat-cop/infra.leapp
%global github_name infra.leapp
# Use either hash or tag for sourceid
%global sourceid %%{version}
# %%global sourceid 7e8e6170e458b875dc569b418b9982b8f11c8119
%global source_path %{github_name}-%{sourceid}
Source: %{url}/archive/%{sourceid}/%{source_path}.tar.gz
%global collection_namespace redhat
%global collection_name leapp
%global collection_version %{version}
%global collection_dest_path .collections
%global collection_build_path %{collection_dest_path}/ansible_collections/%{collection_namespace}/%{collection_name}
%global collection_build_path %{github_name}-%{sourceid}/%{collection_namespace}-%{leapp}-%{version}.tar.gz
# Helper macros because ansible-packaging is not available in RHEL buildroot
Source1001: ansible-packaging.inc
%include %{SOURCE1001}
BuildRequires: ansible-core
BuildArch: noarch
Requires: ansible-core
Requires: rhel-system-roles
%description
%{summary}.
%if %{with collection_artifact}
%package collection-artifact
Summary: Collection artifact to import to Automation Hub / Ansible Galaxy
%description collection-artifact
Collection artifact for %{name}. This package contains %{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif
%prep
%autosetup -n %{source_path} -p1
find -type f ! -executable -name '*.py' -exec \
sed -i -e '1{\@^#!.*@d}' '{}' +
find . -type f -exec \
sed -e "s/infra\.leapp/redhat.leapp/g" \
-e "s/leapp_system_roles_collection: fedora.linux_system_roles/leapp_system_roles_collection: redhat.rhel_system_roles/g" \
-e "s/default('fedora.linux_system_roles')/default('redhat.rhel_system_roles')/g" \
-e "s/| fedora.linux_system_roles |/| redhat.rhel_system_roles |/g" \
-i {} \;
sed -i -e 's/namespace\: infra/namespace: redhat/g' \
-e 's/version: .*/version: %{version}/g' \
galaxy.yml
%build
%ansible_collection_build
%install
%ansible_collection_install
%if %{with collection_artifact}
# Copy collection artifact to /usr/share/ansible/collections/
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
%{buildroot}%{_datadir}/ansible/collections/
%endif
# Generate the %%files section in files_section.txt
# Bulk files inclusion is not possible because roles store doc and licence
# files together with other files
format_item_for_files() {
# $1 is directory or file name in buildroot
# $2 - if true, and item is a directory, use %%dir
local item
local files_item
item="$1" # full path including buildroot
files_item=${item##"%{buildroot}"} # path with cut buildroot to be added to %%files
if [ -L "$item" ]; then
echo "$files_item"
elif [ -d "$item" ]; then
if [[ "$item" == */doc* ]]; then
echo "%doc $files_item"
elif [ "${2:-false}" = true ]; then
echo "%dir $files_item"
else
echo "$files_item"
fi
elif [[ "$item" == */README.md ]] || [[ "$item" == */README.html ]] || [[ "$item" == */CHANGELOG.md ]]; then
if [[ "$item" == */private_* ]]; then
# mark as regular file, not %%doc
echo "$files_item"
else
echo "%doc $files_item"
fi
elif [[ "$item" == */COPYING* ]] || [[ "$item" == */LICENSE* ]]; then
echo "%""%""license" "$files_item"
else
echo "$files_item"
fi
}
files_section=files_section.txt
rm -f $files_section
touch $files_section
# Dynamically generate files section entries for %%{ansible_collection_files}
find %{buildroot}%{ansible_collection_files}%{collection_name} -mindepth 1 -maxdepth 1 | \
while read item; do
if [[ "$item" == */roles ]]; then
format_item_for_files "$item" true >> $files_section
find "$item" -mindepth 1 -maxdepth 1 | while read roles_dir; do
format_item_for_files "$roles_dir" true >> $files_section
find "$roles_dir" -mindepth 1 -maxdepth 1 | while read roles_item; do
format_item_for_files "$roles_item" >> $files_section
done
done
else
format_item_for_files "$item" >> $files_section
fi
done
%files -f files_section.txt
%license LICENSE
%doc README.md CHANGELOG.rst
%if %{with collection_artifact}
%files collection-artifact
%{_datadir}/ansible/collections/%{collection_namespace}-%{collection_name}-%{version}.tar.gz
%endif
%changelog
* Mon Mar 09 2026 Sergei Petrosian <spetrosi@redhat.com> - 1.7.4-1
- Update to latest upstream version 1.7.4
- Resolves: RHEL-153382 : Fix the role failing on steps that copy logs to the controller EL10
* Tue Feb 24 2026 Sergei Petrosian <spetrosi@redhat.com> - 1.7.1-2
- Fix spec file to require rhel-system-roles package
- Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to RHEL10
* Mon Feb 23 2026 Sergei Petrosian <spetrosi@redhat.com> - 1.7.1-1
- Update to latest upstream version via commit hash
- Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to RHEL10
* Fri Feb 13 2026 Sergei Petrosian <spetrosi@redhat.com> - 1.7.0-1
- Replace upstream value of leapp_system_roles_collection with downstream redhat.rhel_system_roles.
- Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to RHEL10
* Fri Dec 5 2025 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-2
- Bump version to get automation to do builds and create an erratum
- Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to RHEL10
* Fri Dec 5 2025 Sergei Petrosian <spetrosi@redhat.com> - 0.0.1-1
- Initialize the package
- Resolves: RHEL-141757 : [RFE] Add ansible-collection-redhat-leapp to RHEL10

22
ansible-packaging.inc Normal file
View File

@ -0,0 +1,22 @@
# Helper macros originally from macros.ansible by Igor Raits <ignatenkobrain>
# This file is for maintaining the compatibility with macros and other
# functionality (generators) provided by ansible-packaging on Fedora.
# https://src.fedoraproject.org/rpms/ansible-packaging/blob/rawhide/f/macros.ansible
%define ansible_roles_dir %{_datadir}/ansible/roles
%define ansible_collections_dir %{_datadir}/ansible/collections/ansible_collections
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
# ansible-galaxy is available by ansible-core on RHEL 8.6 and newer at buildtime.
%define ansible_collection_build() ansible-galaxy collection build
%define ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
# TODO: Officially deprecate this macro and add the following line to the macro
# def after the new approach has gotten more testing and adoption:
# %%{warn: %%{ansible_collection_files} is deprecated. Use %%files -f %%{ansible_collection_filelist} instead.}
%define ansible_collection_files %{shrink:
%{ansible_collections_dir}/%{collection_namespace}/
}
%define ansible_collection_filelist %{__ansible_builddir}/ansible_collection_files

View File

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (infra.leapp-1.7.4.tar.gz) = 7e17197c10d1386095c9d2127b8445bbfaa63d75a1994767a40e7bbc6fcb95284558497100083cd3365ba5bf6b49b2051f08bcaba7078d84cbc84ff216d75a5d