network role changes for release 1.21.0
network - [RFE] Support setting the metric of the default route for initscripts provider Resolves:rhbz#2134202 network - [RFE] Support the DNS priority Resolves:rhbz#2133858 network - Support looking up named route table in routing rule Resolves:rhbz#2131293 network - tests_bond_options_nm.yml failing, Cannot find device "nm-bond" Resolves:rhbz#2123311
This commit is contained in:
parent
ba4945ee89
commit
611d1d3a0b
3
.gitignore
vendored
3
.gitignore
vendored
@ -351,3 +351,6 @@
|
||||
/cockpit-1.3.0.tar.gz
|
||||
/community-general-5.4.0.tar.gz
|
||||
/network-1.9.1.tar.gz
|
||||
/community-general-5.8.0.tar.gz
|
||||
/auto-maintenance-638594eaa311325b74147e216718c1c0ec3b92fd.tar.gz
|
||||
/network-1.10.0.tar.gz
|
||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,5 +1,19 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
[1.21.0-0.1.network] - 2022-11-08
|
||||
----------------------------
|
||||
|
||||
### New Features
|
||||
|
||||
- [network - [RFE] Support setting the metric of the default route for initscripts provider](https://bugzilla.redhat.com/show_bug.cgi?id=2134202)
|
||||
- [network - [RFE] Support the DNS priority](https://bugzilla.redhat.com/show_bug.cgi?id=2133858)
|
||||
- [network - Support looking up named route table in routing rule](https://bugzilla.redhat.com/show_bug.cgi?id=2131293)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- none
|
||||
|
||||
[1.20.1] - 2022-09-27
|
||||
----------------------------
|
||||
|
||||
|
1
CHANGELOG.rst
Normal file
1
CHANGELOG.rst
Normal file
@ -0,0 +1 @@
|
||||
See docs/CHANGELOG.md
|
@ -3,14 +3,13 @@
|
||||
# ansible-core as a build_dep on RHEL8
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
%bcond_without ansible
|
||||
%global ansible_build_dep ansible-core >= 2.11.0
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: ansible-packaging
|
||||
%else
|
||||
%if 0%{?rhel} && ! 0%{?epel}
|
||||
%bcond_with ansible
|
||||
%else
|
||||
%bcond_without ansible
|
||||
%global ansible_build_dep ansible >= 2.9.10
|
||||
BuildRequires: ansible-core >= 2.11.0
|
||||
%endif
|
||||
%else
|
||||
%bcond_with ansible
|
||||
%endif
|
||||
|
||||
%bcond_with collection_artifact
|
||||
@ -30,23 +29,12 @@ Name: linux-system-roles
|
||||
%endif
|
||||
Url: https://github.com/linux-system-roles
|
||||
Summary: Set of interfaces for unified system management
|
||||
Version: 1.20.1
|
||||
Release: 1%{?dist}
|
||||
Version: 1.21.0
|
||||
Release: 0.1.network%{?dist}
|
||||
|
||||
#Group: Development/Libraries
|
||||
License: GPLv3+ and MIT and BSD and Python
|
||||
%global installbase %{_datadir}/linux-system-roles
|
||||
%global _pkglicensedir %{_licensedir}/%{name}
|
||||
%global rolealtprefix linux-system-roles.
|
||||
%global roleprefix %{name}.
|
||||
%global roleinstprefix %{nil}
|
||||
%global rolealtrelpath ../../linux-system-roles/
|
||||
%if 0%{?rhel}
|
||||
%global roleinstprefix %{roleprefix}
|
||||
%global installbase %{_datadir}/ansible/roles
|
||||
%global rolealtrelpath %{nil}
|
||||
%endif
|
||||
|
||||
%global roleinstprefix %{name}.
|
||||
%if 0%{?rhel}
|
||||
%global collection_namespace redhat
|
||||
%global collection_name rhel_system_roles
|
||||
@ -58,19 +46,25 @@ License: GPLv3+ and MIT and BSD and Python
|
||||
%global collection_version %{version}
|
||||
|
||||
# Helper macros originally from macros.ansible by Igor Raits <ignatenkobrain>
|
||||
# Not available on RHEL, so we must define those macros locally here without using ansible-galaxy
|
||||
|
||||
# On RHEL, not available, so we must define those macros locally
|
||||
# On Fedora, provided by ansible-packager
|
||||
# Not used (yet). Could be made to point to AH in RHEL - but what about CentOS Stream?
|
||||
#%%{!?ansible_collection_url:%%define ansible_collection_url() https://galaxy.ansible.com/%%{collection_namespace}/%%{collection_name}}
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%{!?ansible_collection_files:%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/}
|
||||
%if 0%{?rhel}
|
||||
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
|
||||
%global ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
||||
%define ansible_roles_dir %{_datadir}/ansible/roles
|
||||
%if %{without ansible}
|
||||
# Untar and copy everything instead of galaxy-installing the built artifact when ansible is not available
|
||||
%define ansible_collection_build() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .
|
||||
%define ansible_collection_install() mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
||||
%else
|
||||
# Define undefined macro using "!?ansible_collection_files:..." does not work for rhel-7
|
||||
%if %{?ansible_collection_files:0}%{!?ansible_collection_files:1}
|
||||
%define ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
||||
%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
|
||||
%endif
|
||||
%endif
|
||||
# be compatible with the usual Fedora Provides:
|
||||
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{collection_version}-%{release}
|
||||
|
||||
# ansible-core is in rhel 8.6 and later - default to ansible-core, but allow
|
||||
# the use of ansible if present - we may revisit this if the automatic dependency
|
||||
@ -83,18 +77,6 @@ License: GPLv3+ and MIT and BSD and Python
|
||||
Requires: (ansible-core >= 2.11.0 or ansible >= 2.9.0)
|
||||
%endif
|
||||
|
||||
%if %{with ansible}
|
||||
BuildRequires: %{ansible_build_dep}
|
||||
%endif
|
||||
|
||||
%if %{without ansible}
|
||||
# We don't have ansible-galaxy.
|
||||
# Simply copy everything instead of galaxy-installing the built artifact.
|
||||
%define ansible_collection_build_install() tar -cf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz .; mkdir -p %{buildroot}%{ansible_collection_files}%{collection_name}; (cd %{buildroot}%{ansible_collection_files}%{collection_name}; tar -xf %{_tmppath}/%{collection_namespace}-%{collection_name}-%{version}.tar.gz)
|
||||
%else
|
||||
%define ansible_collection_build_install() ansible-galaxy collection build; ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
||||
%endif
|
||||
|
||||
# For each role, call either defcommit() or deftag(). The other macros
|
||||
# (%%id and %%shortid) can be then used in the same way in both cases.
|
||||
# This way the rest of the spec file des not need to know whether we are
|
||||
@ -143,7 +125,7 @@ BuildRequires: %{ansible_build_dep}
|
||||
|
||||
#%%defcommit 5 a74092634adfe45f76cf761138abab1811692b4b
|
||||
%global rolename5 network
|
||||
%deftag 5 1.9.1
|
||||
%deftag 5 1.10.0
|
||||
|
||||
#%%defcommit 6 50d2b8ccc98a8f4cb9d1d550d21adc227181e9fa
|
||||
%global rolename6 storage
|
||||
@ -205,7 +187,7 @@ BuildRequires: %{ansible_build_dep}
|
||||
%global rolename20 cockpit
|
||||
%deftag 20 1.3.0
|
||||
|
||||
%global mainid c22eff88d40972158cd5c413b7468b4e904cc76c
|
||||
%global mainid 638594eaa311325b74147e216718c1c0ec3b92fd
|
||||
Source: %{url}/auto-maintenance/archive/%{mainid}/auto-maintenance-%{mainid}.tar.gz
|
||||
Source1: %{archiveurl1}
|
||||
Source2: %{archiveurl2}
|
||||
@ -228,27 +210,28 @@ Source18: %{archiveurl18}
|
||||
Source19: %{archiveurl19}
|
||||
Source20: %{archiveurl20}
|
||||
|
||||
# Collection tarballs from Automation Hub
|
||||
# Not used on Fedora.
|
||||
Source801: ansible-posix-1.4.0.tar.gz
|
||||
# Not conditionalizing sources per FPC:
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_do_not_conditionalize_sources
|
||||
# Collections to vendor on RHEL only, Fedora has these available from RPMs
|
||||
Source801: https://galaxy.ansible.com/download/ansible-posix-1.4.0.tar.gz
|
||||
Source901: https://galaxy.ansible.com/download/community-general-5.8.0.tar.gz
|
||||
#Source902: https://galaxy.ansible.com/download/containers-podman-1.9.4.tar.gz
|
||||
%if 0%{?rhel}
|
||||
Provides: bundled(ansible-collection(ansible.posix)) = 1.4.0
|
||||
Provides: bundled(ansible-collection(community.general)) = 5.8.0
|
||||
#Provides: bundled(ansible-collection(containers.podman)) = 1.9.4
|
||||
%endif
|
||||
|
||||
# Collection tarballs from Galaxy
|
||||
# Not used on Fedora.
|
||||
Source901: community-general-5.4.0.tar.gz
|
||||
# RHEL only, changelog is auto generated on Fedora
|
||||
Source995: CHANGELOG.md
|
||||
Source996: CHANGELOG.rst
|
||||
|
||||
# changelog is auto generated on Fedora
|
||||
Source996: CHANGELOG.md
|
||||
|
||||
# Script to convert spec %changelog into collection CHANGELOG.md
|
||||
# only used on Fedora
|
||||
# Fedora only, script to convert spec %%changelog into collection CHANGELOG.md
|
||||
Source997: spec-to-changelog-md.sh
|
||||
|
||||
# Script to convert the collection README to Automation Hub.
|
||||
# Not used on Fedora.
|
||||
# RHEL only, script to convert the collection README from Galaxy to Automation Hub
|
||||
Source998: collection_readme.sh
|
||||
|
||||
Patch51: network-disable-bondtests.diff
|
||||
|
||||
Patch1501: 0001-sshd-Add-final-version-of-RequiredRSASize.patch
|
||||
|
||||
Patch1601: 0001-ssh-Add-final-version-of-the-option-RequiredRSASize-53.patch
|
||||
@ -268,22 +251,9 @@ BuildRequires: highlight
|
||||
|
||||
# Requirements for galaxy_transform.py
|
||||
BuildRequires: python3
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
BuildRequires: %{py3_dist ruamel.yaml}
|
||||
%else
|
||||
BuildRequires: python3-ruamel-yaml
|
||||
%endif
|
||||
BuildRequires: python%{python3_pkgversion}-ruamel-yaml
|
||||
|
||||
Obsoletes: rhel-system-roles-techpreview < 1.0-3
|
||||
|
||||
%if %{undefined __ansible_provides}
|
||||
Provides: ansible-collection(%{collection_namespace}.%{collection_name}) = %{collection_version}
|
||||
%endif
|
||||
# be compatible with the usual Fedora Provides:
|
||||
Provides: ansible-collection-%{collection_namespace}-%{collection_name} = %{version}-%{release}
|
||||
|
||||
# We need to put %%description within the if block to avoid empty
|
||||
# lines showing up.
|
||||
# We must put %%description within the if block to avoid empty lines showing up.
|
||||
%if 0%{?rhel}
|
||||
%description
|
||||
Collection of Ansible roles and modules that provide a stable and
|
||||
@ -307,8 +277,10 @@ Collection artifact for %{name}. This package contains %{collection_namespace}-%
|
||||
%prep
|
||||
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15 -a16 -a17 -a18 -a19 -a20 -n %{getarchivedir 0}
|
||||
|
||||
for file in %_sourcedir/*.tar.gz; do
|
||||
if [[ "$file" =~ %_sourcedir/([^-]+)-([^-]+)-(.+).tar.gz ]]; then
|
||||
%if 0%{?rhel}
|
||||
# Untar vendored collection tarballs to corresponding directories
|
||||
for file in %{SOURCE801} %{SOURCE901}; do
|
||||
if [[ "$(basename $file)" =~ ([^-]+)-([^-]+)-(.+).tar.gz ]]; then
|
||||
ns=${BASH_REMATCH[1]}
|
||||
name=${BASH_REMATCH[2]}
|
||||
ver=${BASH_REMATCH[3]}
|
||||
@ -318,6 +290,7 @@ for file in %_sourcedir/*.tar.gz; do
|
||||
popd > /dev/null
|
||||
fi
|
||||
done
|
||||
%endif
|
||||
|
||||
declare -A ROLESTODIR=(%{rolestodir})
|
||||
for rolename in %{rolenames}; do
|
||||
@ -341,9 +314,6 @@ sed -r -i -e '/hosts: all/a\
|
||||
- tests::avc' tests_selinux_disabled.yml
|
||||
cd ../..
|
||||
|
||||
cd %{rolename5}
|
||||
%patch51 -p1
|
||||
cd ..
|
||||
cd %{rolename15}
|
||||
find -P tests examples -name \*.yml | while read file; do
|
||||
sed -r -i -e "s/ansible-sshd/linux-system-roles.sshd/" \
|
||||
@ -400,7 +370,6 @@ for module in "${!module_map[@]}"; do
|
||||
mkdir -p $role/module_utils/${role}_lsr
|
||||
fi
|
||||
cp -pL .external/ansible/posix/plugins/module_utils/$module $role/module_utils/${role}_lsr/$module
|
||||
sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/library/$module
|
||||
done
|
||||
|
||||
# community.general:
|
||||
@ -425,13 +394,21 @@ for module in "${!module_map[@]}"; do
|
||||
ls -alrtF $role/library/$module
|
||||
sed -i -e ':a;N;$!ba;s/description:\n\( *\)/description:\n\1- WARNING: Do not use this module directly! It is only for role internal use.\n\1/' $role/library/$module
|
||||
done
|
||||
%endif
|
||||
|
||||
# remove the temporary .external directory after vendoring
|
||||
rm -rf .external
|
||||
|
||||
# Replacing "linux-system-roles.rolename" with "rhel-system-roles.rolename" in each role
|
||||
%if "%{roleprefix}" != "linux-system-roles."
|
||||
# Replacing "fedora.linux_system_roles." with "redhat.rhel_system_roles" in each role
|
||||
# This is for the "roles calling other roles" case
|
||||
# for podman, change the FQCN - using a non-FQCN module name doesn't seem to work,
|
||||
# even for the legacy role format
|
||||
for rolename in %{rolenames}; do
|
||||
find $rolename -type f -exec \
|
||||
sed "s/linux-system-roles[.]${rolename}\\>/%{roleprefix}${rolename}/g" -i {} \;
|
||||
sed -e "s/linux-system-roles[.]${rolename}\\>/%{roleinstprefix}${rolename}/g" \
|
||||
-e "s/fedora[.]linux_system_roles[.]/%{collection_namespace}.%{collection_name}./g" \
|
||||
-e "s/containers[.]podman[.]/%{collection_namespace}.%{collection_name}./g" \
|
||||
-i {} \;
|
||||
done
|
||||
%endif
|
||||
|
||||
@ -498,9 +475,15 @@ for role in %{rolenames}; do
|
||||
%endif
|
||||
done
|
||||
|
||||
LANG=en_US.utf-8 LC_ALL=en_US.utf-8 python3 release_collection.py --galaxy-yml galaxy.yml \
|
||||
# do not process changelogs on RHEL
|
||||
%if 0%{?rhel}
|
||||
extra_mapping="--extra-mapping fedora.linux_system_roles:%{collection_namespace}.%{collection_name}"
|
||||
%else
|
||||
extra_mapping=""
|
||||
%endif
|
||||
LANG=C.utf-8 LC_ALL=C.utf-8 python3 release_collection.py --galaxy-yml galaxy.yml \
|
||||
--src-path $(pwd) --dest-path $(pwd)/.collections $includes --force --no-update \
|
||||
--src-owner %{name} --skip-git --skip-check --debug
|
||||
--src-owner %{name} --skip-git --skip-check --skip-changelog $extra_mapping --debug
|
||||
|
||||
# Remove table of contents from logging README.md
|
||||
# It is not needed for html and AH/Galaxy
|
||||
@ -517,50 +500,58 @@ for role in %{rolenames}; do
|
||||
done
|
||||
|
||||
%if 0%{?rhel}
|
||||
cp %{SOURCE996} \
|
||||
cp %{SOURCE995} \
|
||||
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/docs/CHANGELOG.md
|
||||
cp %{SOURCE996} \
|
||||
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/CHANGELOG.rst
|
||||
%else
|
||||
# Build the collection CHANGELOG.md
|
||||
%{SOURCE997} %{_specdir}/%{name}.spec \
|
||||
.collections/ansible_collections/%{collection_namespace}/%{collection_name}/docs/CHANGELOG.md
|
||||
%endif
|
||||
|
||||
# Build the collection
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_build
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{installbase}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/roles
|
||||
mkdir -p %{buildroot}%{ansible_roles_dir}
|
||||
|
||||
for role in %{rolenames}; do
|
||||
cp -pR "$role" "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role"
|
||||
cp -pR "$role" "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role"
|
||||
done
|
||||
|
||||
%if 0%{?rolealtprefix:1}
|
||||
%if 0%{?rhel}
|
||||
# Create symlinks for roles in /usr/share/ansible/roles/linux-system-roles.$rolename
|
||||
# That's required to make roles work with upstream naming too
|
||||
for role in %{rolenames}; do
|
||||
ln -s "%{rolealtrelpath}%{roleinstprefix}$role" "$RPM_BUILD_ROOT%{_datadir}/ansible/roles/%{rolealtprefix}$role"
|
||||
ln -s "%{name}.$role" "%{buildroot}%{ansible_roles_dir}/linux-system-roles.$role"
|
||||
done
|
||||
%endif
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkglicensedir}
|
||||
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}network/examples/roles
|
||||
mkdir -p %{buildroot}%{_pkglicensedir}
|
||||
rm %{buildroot}%{ansible_roles_dir}/%{roleinstprefix}network/examples/roles
|
||||
for role in %{rolenames}; do
|
||||
mkdir -p "$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
|
||||
cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/CHANGELOG.md" \
|
||||
"$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
|
||||
cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.md" \
|
||||
"$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
|
||||
mkdir -p "%{buildroot}%{_pkgdocdir}/$role"
|
||||
ln -sr "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/CHANGELOG.md" \
|
||||
"%{buildroot}%{_pkgdocdir}/$role"
|
||||
ln -sr "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/README.md" \
|
||||
"%{buildroot}%{_pkgdocdir}/$role"
|
||||
%if %{with html}
|
||||
cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/README.html" \
|
||||
"$RPM_BUILD_ROOT%{_pkgdocdir}/$role"
|
||||
ln -sr "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/README.html" \
|
||||
"%{buildroot}%{_pkgdocdir}/$role"
|
||||
%endif
|
||||
if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" ]; then
|
||||
cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/COPYING" \
|
||||
"$RPM_BUILD_ROOT%{_pkglicensedir}/$role.COPYING"
|
||||
if [ -f "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/COPYING" ]; then
|
||||
ln -sr "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/COPYING" \
|
||||
"%{buildroot}%{_pkglicensedir}/$role.COPYING"
|
||||
fi
|
||||
if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" ]; then
|
||||
cp -p "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/LICENSE" \
|
||||
"$RPM_BUILD_ROOT%{_pkglicensedir}/$role.LICENSE"
|
||||
if [ -f "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/LICENSE" ]; then
|
||||
ln -sr "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/LICENSE" \
|
||||
"%{buildroot}%{_pkglicensedir}/$role.LICENSE"
|
||||
fi
|
||||
if [ -d "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples" ]; then
|
||||
for file in "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/"*.yml ; do
|
||||
if [ -d "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples" ]; then
|
||||
for file in "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples/"*.yml ; do
|
||||
basename=$(basename "$file" .yml)
|
||||
newname="$basename"
|
||||
if [[ "$newname" != example-* ]]; then
|
||||
@ -569,57 +560,58 @@ for role in %{rolenames}; do
|
||||
if [[ "$newname" != *-playbook ]]; then
|
||||
newname="${newname}-playbook"
|
||||
fi
|
||||
cp "$file" "$RPM_BUILD_ROOT%{_pkgdocdir}/$role/${newname}.yml"
|
||||
cp "$file" "%{buildroot}%{_pkgdocdir}/$role/${newname}.yml"
|
||||
rm "$file"
|
||||
done
|
||||
if [ -f "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" ]; then
|
||||
cp "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory" \
|
||||
"$RPM_BUILD_ROOT%{_pkgdocdir}/$role/example-inventory"
|
||||
rm "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples/inventory"
|
||||
if [ -f "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples/inventory" ]; then
|
||||
cp "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples/inventory" \
|
||||
"%{buildroot}%{_pkgdocdir}/$role/example-inventory"
|
||||
rm "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples/inventory"
|
||||
fi
|
||||
# special case for network
|
||||
# this will error if the directory is unexpectedly empty
|
||||
rmdir "$RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}$role/examples"
|
||||
rmdir "%{buildroot}%{ansible_roles_dir}/%{roleinstprefix}$role/examples"
|
||||
fi
|
||||
done
|
||||
|
||||
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/semaphore
|
||||
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/molecule
|
||||
rm %{buildroot}%{ansible_roles_dir}/%{roleinstprefix}*/semaphore
|
||||
rm -r %{buildroot}%{ansible_roles_dir}/%{roleinstprefix}*/molecule
|
||||
|
||||
rm -r $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/.[A-Za-z]*
|
||||
rm $RPM_BUILD_ROOT%{installbase}/%{roleinstprefix}*/tests/.git*
|
||||
rm -r %{buildroot}%{ansible_roles_dir}/%{roleinstprefix}*/.[A-Za-z]*
|
||||
rm %{buildroot}%{ansible_roles_dir}/%{roleinstprefix}*/tests/.git*
|
||||
|
||||
# NOTE: sshd/examples/example-root-login.yml is
|
||||
# referenced in the configuring-openssh-servers-using-the-sshd-system-role documentation module
|
||||
# must be updated if changing the file path
|
||||
|
||||
# Install the collection
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
%ansible_collection_build_install
|
||||
%ansible_collection_install
|
||||
popd
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}/collection
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}/collection/roles
|
||||
|
||||
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/README.md \
|
||||
%{buildroot}%{_pkgdocdir}/collection
|
||||
|
||||
for rolename in %{rolenames}; do
|
||||
for file in CHANGELOG.md README.md; do
|
||||
if [ -f %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/$file ]; then
|
||||
if [ ! -d $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename} ]; then
|
||||
mkdir -p $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||
if [ ! -d %{buildroot}%{_pkgdocdir}/collection/roles/${rolename} ]; then
|
||||
mkdir -p %{buildroot}%{_pkgdocdir}/collection/roles/${rolename}
|
||||
fi
|
||||
cp -p %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/$file \
|
||||
$RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${rolename}
|
||||
ln -sr %{buildroot}%{ansible_collection_files}%{collection_name}/roles/${rolename}/$file \
|
||||
%{buildroot}%{_pkgdocdir}/collection/roles/${rolename}
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
%if %{with html}
|
||||
# converting README.md to README.html for collection in $RPM_BUILD_ROOT%{_pkgdocdir}/collection
|
||||
readmes="$RPM_BUILD_ROOT%{_pkgdocdir}/collection/README.md"
|
||||
# converting README.md to README.html for collection in %%{buildroot}%%{_pkgdocdir}/collection
|
||||
readmes="%{buildroot}%{_pkgdocdir}/collection/README.md"
|
||||
for role in %{rolenames}; do
|
||||
readmes="${readmes} $RPM_BUILD_ROOT%{_pkgdocdir}/collection/roles/${role}/README.md"
|
||||
readmes="${readmes} %{buildroot}%{_pkgdocdir}/collection/roles/${role}/README.md"
|
||||
done
|
||||
sh md2html.sh $readmes
|
||||
%endif
|
||||
@ -627,21 +619,21 @@ sh md2html.sh $readmes
|
||||
%if %{with collection_artifact}
|
||||
# Copy collection artifact to /usr/share/ansible/collections/ for collection-artifact
|
||||
pushd .collections/ansible_collections/%{collection_namespace}/%{collection_name}/
|
||||
if [ -f %{collection_namespace}-%{collection_name}-%{version}.tar.gz ]; then
|
||||
mv %{collection_namespace}-%{collection_name}-%{version}.tar.gz \
|
||||
$RPM_BUILD_ROOT%{_datadir}/ansible/collections/
|
||||
fi
|
||||
%{buildroot}%{_datadir}/ansible/collections/
|
||||
popd
|
||||
%endif
|
||||
|
||||
# generate the %files section in the file files_section.txt
|
||||
# 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
|
||||
# $2 - if true, and item is a directory, use %%dir
|
||||
local item
|
||||
local files_item
|
||||
item="$1"
|
||||
files_item=${item##"%{buildroot}"}
|
||||
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
|
||||
@ -654,14 +646,14 @@ format_item_for_files() {
|
||||
fi
|
||||
elif [[ "$item" == */README.md ]] || [[ "$item" == */README.html ]] || [[ "$item" == */CHANGELOG.md ]]; then
|
||||
if [[ "$item" == */private_* ]]; then
|
||||
# mark as regular file, not %doc
|
||||
# mark as regular file, not %%doc
|
||||
echo "$files_item"
|
||||
else
|
||||
echo "%doc $files_item"
|
||||
fi
|
||||
elif [[ "$item" != */COPYING* ]] && [[ "$item" != */LICENSE* ]]; then
|
||||
# Avoid dynamically using the license macro since the license macro
|
||||
# is replaced with the value of License directive in the older rpmbuild.
|
||||
elif [[ "$item" == */COPYING* ]] || [[ "$item" == */LICENSE* ]]; then
|
||||
echo "%""%""license" "$files_item"
|
||||
else
|
||||
echo "$files_item"
|
||||
fi
|
||||
}
|
||||
@ -669,15 +661,7 @@ format_item_for_files() {
|
||||
files_section=files_section.txt
|
||||
rm -f $files_section
|
||||
touch $files_section
|
||||
%if %{without ansible}
|
||||
echo '%dir %{_datadir}/ansible' >> $files_section
|
||||
echo '%dir %{_datadir}/ansible/roles' >> $files_section
|
||||
%endif
|
||||
%if "%{installbase}" != "%{_datadir}/ansible/roles"
|
||||
echo '%dir %{installbase}' >> $files_section
|
||||
%endif
|
||||
echo '%dir %{ansible_collection_files}' >> $files_section
|
||||
echo '%dir %{ansible_collection_files}%{collection_name}' >> $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
|
||||
@ -693,7 +677,8 @@ find %{buildroot}%{ansible_collection_files}%{collection_name} -mindepth 1 -maxd
|
||||
fi
|
||||
done
|
||||
|
||||
find %{buildroot}%{installbase} -mindepth 1 -maxdepth 1 | \
|
||||
# Dynamically generate files section entries for %%{ansible_roles_dir}
|
||||
find %{buildroot}%{ansible_roles_dir} -mindepth 1 -maxdepth 1 | \
|
||||
while read item; do
|
||||
if [ -d "$item" ]; then
|
||||
format_item_for_files "$item" true >> $files_section
|
||||
@ -704,48 +689,23 @@ find %{buildroot}%{installbase} -mindepth 1 -maxdepth 1 | \
|
||||
format_item_for_files "$item" >> $files_section
|
||||
fi
|
||||
done
|
||||
if [ "%{installbase}" != "%{_datadir}/ansible/roles" ]; then
|
||||
find %{buildroot}%{_datadir}/ansible/roles -mindepth 1 -maxdepth 1 | \
|
||||
while read item; do
|
||||
if [ -d "$item" ]; then
|
||||
format_item_for_files "$item" true >> $files_section
|
||||
find "$item" -mindepth 1 -maxdepth 1 | while read roles_item; do
|
||||
format_item_for_files "$roles_item" >> $files_section
|
||||
done
|
||||
else
|
||||
format_item_for_files "$item" >> $files_section
|
||||
fi
|
||||
done
|
||||
fi
|
||||
# cat files_section.txt
|
||||
# done with files_section.txt generation
|
||||
|
||||
|
||||
%files -f files_section.txt
|
||||
%{_pkgdocdir}/*/CHANGELOG.md
|
||||
%{_pkgdocdir}/*/README.md
|
||||
%if %{with html}
|
||||
%{_pkgdocdir}/*/README.html
|
||||
%endif
|
||||
%{_pkgdocdir}/*/example-*
|
||||
%{_pkgdocdir}/collection/roles/*/CHANGELOG.md
|
||||
%{_pkgdocdir}/collection/roles/*/README.md
|
||||
%if %{with html}
|
||||
%{_pkgdocdir}/collection/roles/*/README.html
|
||||
%endif
|
||||
%license %{_pkglicensedir}/*
|
||||
%license %{installbase}/*/COPYING*
|
||||
%license %{installbase}/*/LICENSE*
|
||||
%license %{ansible_collection_files}/%{collection_name}/COPYING*
|
||||
%license %{ansible_collection_files}/%{collection_name}/LICENSE*
|
||||
%if 0%{?rhel} < 8
|
||||
%dir %{_datadir}/ansible
|
||||
%dir %{ansible_roles_dir}
|
||||
%dir %{ansible_collection_files}
|
||||
%dir %{ansible_collection_files}%{collection_name}
|
||||
%doc %{_pkgdocdir}
|
||||
%license %{_pkglicensedir}
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||
# Needs to list excluded files in this hardcoded style since when
|
||||
# format_item_for_files is executed, brp-python-bytecompile is not
|
||||
# executed yet.
|
||||
%exclude %{installbase}/*/*.py?
|
||||
%exclude %{installbase}/*/*/*.py?
|
||||
%exclude %{installbase}/*/*/*/*.py?
|
||||
%exclude %{installbase}/*/*/*/*/*.py?
|
||||
%exclude %{ansible_roles_dir}/*/*.py?
|
||||
%exclude %{ansible_roles_dir}/*/*/*.py?
|
||||
%exclude %{ansible_roles_dir}/*/*/*/*.py?
|
||||
%exclude %{ansible_roles_dir}/*/*/*/*/*.py?
|
||||
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*.py?
|
||||
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*.py?
|
||||
%exclude %{ansible_collection_files}/%{collection_name}/*/*/*/*/*.py?
|
||||
@ -757,6 +717,12 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 08 2022 Rich Megginson <rmeggins@redhat.com> - 1.21.0-0.1.network
|
||||
- Resolves:rhbz#2134202 : network - [RFE] Support setting the metric of the default route for initscripts provider
|
||||
- Resolves:rhbz#2133858 : network - [RFE] Support the DNS priority
|
||||
- Resolves:rhbz#2131293 : network - Support looking up named route table in routing rule
|
||||
- Resolves:rhbz#2123311 : network - tests_bond_options_nm.yml failing, Cannot find device "nm-bond"
|
||||
|
||||
* Tue Sep 27 2022 Rich Megginson <rmeggins@redhat.com> - 1.20.1-1
|
||||
- Resolves:rhbz#2129873 : ssh,sshd - Sync on final OpenSSH option name RequiredRSASize in ssh and sshd roles
|
||||
|
||||
|
8
sources
8
sources
@ -1,9 +1,9 @@
|
||||
SHA512 (ansible-posix-1.4.0.tar.gz) = b4a54e08c14f918e718a8e4e249502808b7f8f6eea37e590e2a989bfedbfa78b77ca501c83755473049339fda01640e4764917801ef589902bd56e93389421c5
|
||||
SHA512 (ansible-posix-1.4.0.tar.gz) = 669261538e2b0e4598f148abb63138b18e92599a56cd48d523a259ac5253a9fc9abb7eb6bf5a792bfcdedcaeaa240acde916b19045317b3e7e8561e1190b6a2e
|
||||
SHA512 (ansible-sshd-9766d9097a87a130d4c8abde2247aaad5c925ecf.tar.gz) = 4169ed02f4ab8dba6004c0ace7c4132b4028db60f5a8daa73dc312653f78088d1324406239982ddb9525771de0f99b1d2594cc00bac314d6ec245fa8d2af17cb
|
||||
SHA512 (auto-maintenance-c22eff88d40972158cd5c413b7468b4e904cc76c.tar.gz) = 594b4ca9e1eaffe5f2fa1bde37adc99ce6522172b4ed69f9e3d780347032c6b368f88627ea6433525cac520375876da76ec0c0d524f1b3d60df8785bc228cb40
|
||||
SHA512 (auto-maintenance-638594eaa311325b74147e216718c1c0ec3b92fd.tar.gz) = 35f955b5783b840a2e6d0f8dc15b35de6f177d5fb358706e608307b9ff10b9bffdf24bb192fda9f8bea4c7e26c758d95ede403cc4a5d1d7644378234d3a8cda3
|
||||
SHA512 (certificate-1.1.6.tar.gz) = c37b00b1a0c3f6c01447ced8c66bc37b97f08d6994020ae855781535858fc1765d5bb44279e285787d71f5b804a3cb1d5e90eb037c780ce0741e2e8d29008793
|
||||
SHA512 (cockpit-1.3.0.tar.gz) = 74e80b742d4e78add88d64caf1a622849bcef1659a463cfd0456bb0c20105462e8131849fc2a15465db846de6d9a15b53490d2e323579d476809e47377e26694
|
||||
SHA512 (community-general-5.4.0.tar.gz) = 2f117b3788e68b163f031c4afe549f1755edfc0686ec905367c7c978335bb4718fd271d93467f067152d2c853147df3515bbb247e6d794bb5f7c358fecb0aee8
|
||||
SHA512 (community-general-5.8.0.tar.gz) = 280fee8cf8437a538fe75eda117eba2d07740e8f5ae15a3795e57eb286a667e598233638e6d0479b1f0e917fc01e266c44c40b5b17530bbf8cc9301c99a4b76b
|
||||
SHA512 (crypto_policies-1.2.6.tar.gz) = bf16a89dca4475b658b8bc8a1d84b2b900b23a5c5440180aa29d56d67e8bdc4f3f7bc0f1acc316e7f1aa3662b0a685532bc179b6aee6e92f5b64d553a942318b
|
||||
SHA512 (firewall-1.4.0.tar.gz) = 8159829a2ae5e9fd795165179b5fb8542727193dc489e78950d50c6554e926027ab340733f9ad8f83debaae9a8f55331d0016a6d023ce8e4e11534587ee41250
|
||||
SHA512 (ha_cluster-1.7.4.tar.gz) = df962d21fd219efd251ef0cd5c72195ecfd467f8901f0c65418574768532c39fd63bcb2d273af300039cd786775c9d620994b98a3e42eb0dc75633c0392ed8b2
|
||||
@ -13,7 +13,7 @@ SHA512 (logging-1.10.0.tar.gz) = 0042354cd2635a05f292763c2462b34e1d677681dee510c
|
||||
SHA512 (metrics-1.7.3.tar.gz) = 07df961ff1c42255f692e0ff5fa163167aef7ab5a99da030b6d522ee99dd21725e1dcc2d8ad7cd90b97bf228bbfcadba8925dd2e371ea7efc1c8c1331d170c72
|
||||
SHA512 (nbde_client-1.2.6.tar.gz) = 0e05735e4de708aa771079ccda75a13db96b565032d465cb9df7f31f8371091b7f297e257ca778e2fbcc6dfd76524f9b35acaae22b55d20dd96c696b84a6d08a
|
||||
SHA512 (nbde_server-1.1.5.tar.gz) = 25e7824368f02b41f08ba44318c56696e3edf11caed10e4416728c5e8fbc2e0e8c39a9d619031eba4293a139d6c0f4815a0534f3713f950a730212b3606677d8
|
||||
SHA512 (network-1.9.1.tar.gz) = 1922d9f9d03fa86b62f12e37b135aaa22591f7c20ff68c91365e5808a206637c5a924a1a7372db7add6b55d52f2c4664b84ed32354a5649468cf3e3796ee0519
|
||||
SHA512 (network-1.10.0.tar.gz) = df3328a9b331cd5aacbb092e31503fd146ae023c9aa3c41136a934d00cb3b53873ed830d1187721ca64686d13b8bb937019e2e2fd6954977f3ad91d7062b5e7f
|
||||
SHA512 (postfix-1.2.4.tar.gz) = 8b44036c2220de31e6fb94f5ec30e94cd73133d820df151fcd91e6932ec274c90ac7c91c8e40f13d0fd8a972baa5a0eb1f58340cf310a91ac9134c4ae8f559d1
|
||||
SHA512 (selinux-1.4.0.tar.gz) = 29be414a8cbb85ea8a650865bd4f1e6a3d0935f58c7a9139094b73ab6c736ef06318ea95f1877bb8868fd56aaa54f944193d9abeb833e6915f9fbe44af07b8f6
|
||||
SHA512 (ssh-1.1.9.tar.gz) = c08a5f43c0ee80b9eaeee365a9f2c648c080c53ee9d1714f7cb37d41822998fe31d442473cc9ed797ac4eb893b10e656c929b8eef94bcd9c7e39f47877e304e1
|
||||
|
Loading…
Reference in New Issue
Block a user