Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f246aba775 |
||
|
|
612bccc58f |
||
|
|
1e4d5d13fd |
||
|
|
0fe27403fe |
5 changed files with 77 additions and 82 deletions
12
ansible-2.9.27-oracle.patch
Normal file
12
ansible-2.9.27-oracle.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff --color -Nur ansible-2.9.27.orig/lib/ansible/config/base.yml ansible-2.9.27/lib/ansible/config/b
|
||||||
|
ase.yml
|
||||||
|
--- ansible-2.9.27.orig/lib/ansible/config/base.yml 2021-10-11 08:18:55.681846900 -0700
|
||||||
|
+++ ansible-2.9.27/lib/ansible/config/base.yml 2021-11-01 10:40:38.928873116 -0700
|
||||||
|
@@ -1450,6 +1450,7 @@
|
||||||
|
'8': /usr/libexec/platform-python
|
||||||
|
fedora:
|
||||||
|
'23': /usr/bin/python3
|
||||||
|
+ oracle: *rhelish
|
||||||
|
redhat: *rhelish
|
||||||
|
rhel: *rhelish
|
||||||
|
ubuntu:
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import json
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
parser = argparse.ArgumentParser()
|
|
||||||
group = parser.add_mutually_exclusive_group(required=True)
|
|
||||||
group.add_argument(
|
|
||||||
"-P", "--provides", action="store_const", const="provides", dest="action"
|
|
||||||
)
|
|
||||||
group.add_argument(
|
|
||||||
"-R", "--requires", action="store_const", const="requires", dest="action"
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
files = sys.stdin.read().splitlines()
|
|
||||||
|
|
||||||
for f in files:
|
|
||||||
with open(f, "r") as fobj:
|
|
||||||
info = json.load(fobj)["collection_info"]
|
|
||||||
if args.action == "provides":
|
|
||||||
print(
|
|
||||||
f"ansible-collection({info['namespace']}.{info['name']}) = {info['version']}"
|
|
||||||
)
|
|
||||||
if args.action == "requires":
|
|
||||||
print("(ansible >= 2.9.0 or ansible-base > 2.10.0)")
|
|
||||||
for dep, req in info.get("dependencies", {}).items():
|
|
||||||
print(f"ansible-collection({dep})", end="")
|
|
||||||
if req == "*":
|
|
||||||
print()
|
|
||||||
continue
|
|
||||||
m = re.match(r"^>=(\d+\.\d+\.\d+)$", req)
|
|
||||||
if m:
|
|
||||||
print(f" >= {m.group(1)}")
|
|
||||||
continue
|
|
||||||
raise NotImplementedError(
|
|
||||||
"Generation of dependencies different than '*' or '>=' is not supported yet"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
%__ansible_provides %{_rpmconfigdir}/ansible-generator --provides
|
|
||||||
%__ansible_requires %{_rpmconfigdir}/ansible-generator --requires
|
|
||||||
%__ansible_path ^%{_datadir}/ansible/collections/ansible_collections/[^/]+/[^/]+/MANIFEST.json$
|
|
||||||
83
ansible.spec
83
ansible.spec
|
|
@ -16,14 +16,15 @@
|
||||||
Name: ansible
|
Name: ansible
|
||||||
Summary: SSH-based configuration management, deployment, and task execution system
|
Summary: SSH-based configuration management, deployment, and task execution system
|
||||||
Version: 2.9.27
|
Version: 2.9.27
|
||||||
Release: 1%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
License: GPLv3+
|
# The main license is GPLv3+. Many of the files in lib/ansible/module_utils
|
||||||
|
# are BSD licensed. There are various files scattered throughout the codebase
|
||||||
|
# containing code under different licenses.
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later and BSD-2-Clause and PSF-2.0 and MIT and Apache-2.0
|
||||||
|
License: GPLv3+ and BSD and Python and MIT and ASL 2.0
|
||||||
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
|
Source0: https://releases.ansible.com/ansible/%{name}-%{version}.tar.gz
|
||||||
Source1: ansible.attr
|
Url: https://ansible.com
|
||||||
Source2: ansible-generator
|
|
||||||
Source3: macros.ansible
|
|
||||||
Url: http://ansible.com
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
# add patch for Rocky linux: rhbz#1968728
|
# add patch for Rocky linux: rhbz#1968728
|
||||||
|
|
@ -44,6 +45,36 @@ Patch5: ansible-2.9.27-pyyaml-6-compat.patch
|
||||||
# compatibility with openssl v3
|
# compatibility with openssl v3
|
||||||
Patch6: ansible-2.9.27-openssl-3-compat.patch
|
Patch6: ansible-2.9.27-openssl-3-compat.patch
|
||||||
|
|
||||||
|
# add patch for Oracle linux: rhbz#2018369
|
||||||
|
Patch7: ansible-2.9.27-oracle.patch
|
||||||
|
# Virtual provides for bundled libraries
|
||||||
|
# Search for `_BUNDLED_METADATA` to find them
|
||||||
|
|
||||||
|
# lib/ansible/module_utils/urls.py
|
||||||
|
# SPDX-License-Identifier: BSD-2-Clause and PSF-2.0
|
||||||
|
# Fedora-License-Identifier: BSD and Python
|
||||||
|
Provides: bundled(python3dist(backports-ssl-match-hostname)) = 3.7.0.1
|
||||||
|
|
||||||
|
# lib/ansible/module_utils/distro/*
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
# Fedora-License-Identifier: ASL 2.0
|
||||||
|
Provides: bundled(python3dist(distro)) = 1.4.0
|
||||||
|
|
||||||
|
# lib/ansible/module_utils/six/*
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
# Fedora-License-Identifier: MIT
|
||||||
|
Provides: bundled(python3dist(six)) = 1.12.0
|
||||||
|
|
||||||
|
# lib/ansible/module_utils/compat/selectors.py
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
# Fedora-License-Identifier: GPLv3+
|
||||||
|
Provides: bundled(python3dist(selectors2)) = 1.1.1
|
||||||
|
|
||||||
|
# lib/ansible/module_utils/compat/ipaddress.py
|
||||||
|
# SPDX-License-Identifier: PSF-2.0
|
||||||
|
# Fedora-License-Identifier: Python
|
||||||
|
Provides: bundled(python3dist(ipaddress)) = 1.0.22
|
||||||
|
|
||||||
# We used to have a ansible-python3 package that a number of other things
|
# We used to have a ansible-python3 package that a number of other things
|
||||||
# started depending on, so we should now provide/obsolete it until they
|
# started depending on, so we should now provide/obsolete it until they
|
||||||
# can all adjust to just needing ansible.
|
# can all adjust to just needing ansible.
|
||||||
|
|
@ -162,7 +193,6 @@ developed for ansible.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
cp -a %{S:1} %{S:2} %{S:3} .
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
|
@ -218,27 +248,23 @@ if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/ansible/plugins/
|
mkdir -p %{buildroot}%{_datadir}/ansible/plugins/
|
||||||
for location in $DATADIR_LOCATIONS ; do
|
for location in $DATADIR_LOCATIONS ; do
|
||||||
mkdir $RPM_BUILD_ROOT"$location"
|
mkdir %{buildroot}"$location"
|
||||||
done
|
done
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ansible/
|
mkdir -p %{buildroot}%{_sysconfdir}/ansible/
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/ansible/roles/
|
mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/
|
||||||
|
|
||||||
cp examples/hosts $RPM_BUILD_ROOT/etc/ansible/
|
cp examples/hosts %{buildroot}%{_sysconfdir}/ansible/
|
||||||
cp examples/ansible.cfg $RPM_BUILD_ROOT/etc/ansible/
|
cp examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
|
mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
cp -v docs/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
|
cp -v docs/man/man1/*.1 %{buildroot}%{_mandir}/man1/
|
||||||
|
|
||||||
cp -pr docs/docsite/rst .
|
cp -pr docs/docsite/rst .
|
||||||
%if 0%{?with_docs}
|
%if 0%{?with_docs}
|
||||||
cp -pr docs/docsite/_build/html %{_builddir}/%{name}-%{version}/html
|
cp -pr docs/docsite/_build/html %{_builddir}/%{name}-%{version}/html
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -Dpm0644 -t %{buildroot}%{_fileattrsdir} ansible.attr
|
|
||||||
install -Dpm0644 -t %{buildroot}%{_rpmmacrodir} macros.ansible
|
|
||||||
install -Dpm0755 -t %{buildroot}%{_rpmconfigdir} ansible-generator
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
|
|
@ -256,6 +282,10 @@ make PYTHON=/usr/bin/python3 tests-py3
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
%license licenses/Apache-License.txt
|
||||||
|
%license licenses/MIT-license.txt
|
||||||
|
%license licenses/PSF-license.txt
|
||||||
|
%license licenses/simplified_bsd.txt
|
||||||
%doc README.rst PKG-INFO changelogs/CHANGELOG-v2.9.rst
|
%doc README.rst PKG-INFO changelogs/CHANGELOG-v2.9.rst
|
||||||
%doc %{_mandir}/man1/ansible*
|
%doc %{_mandir}/man1/ansible*
|
||||||
%config(noreplace) %{_sysconfdir}/ansible/
|
%config(noreplace) %{_sysconfdir}/ansible/
|
||||||
|
|
@ -264,9 +294,6 @@ make PYTHON=/usr/bin/python3 tests-py3
|
||||||
%{python3_sitelib}/ansible
|
%{python3_sitelib}/ansible
|
||||||
%{python3_sitelib}/ansible_test
|
%{python3_sitelib}/ansible_test
|
||||||
%{python3_sitelib}/*egg-info
|
%{python3_sitelib}/*egg-info
|
||||||
%{_fileattrsdir}/ansible.attr
|
|
||||||
%{_rpmmacrodir}/macros.ansible
|
|
||||||
%{_rpmconfigdir}/ansible-generator
|
|
||||||
%exclude %{_bindir}/ansible-test
|
%exclude %{_bindir}/ansible-test
|
||||||
%exclude %{python3_sitelib}/ansible_test
|
%exclude %{python3_sitelib}/ansible_test
|
||||||
|
|
||||||
|
|
@ -281,6 +308,18 @@ make PYTHON=/usr/bin/python3 tests-py3
|
||||||
%{python3_sitelib}/ansible_test
|
%{python3_sitelib}/ansible_test
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 25 2022 Maxwell G <gotmax@e.email> - 2.9.27-4
|
||||||
|
- Remove ansible-packaging dependency
|
||||||
|
- Related: #2121892 and #2126557.
|
||||||
|
|
||||||
|
* Sun Jan 16 2022 Maxwell G <gotmax@e.email> - 2.9.27-3
|
||||||
|
- Remove macros in favor of `ansible-packaging`
|
||||||
|
- Add virtual provides for bundled libraries and add missing licenses
|
||||||
|
- Minor cleanup
|
||||||
|
|
||||||
|
* Mon Nov 01 2021 Kevin Fenzi <kevin@scrye.com> - 2.9.27-2
|
||||||
|
- Add patch for oracle linux Fixes rhbz#2018369
|
||||||
|
|
||||||
* Mon Oct 11 2021 Kevin Fenzi <kevin@scrye.com> - 2.9.27-1
|
* Mon Oct 11 2021 Kevin Fenzi <kevin@scrye.com> - 2.9.27-1
|
||||||
- Update to 2.9.27. Fixes rhbz#2012918
|
- Update to 2.9.27. Fixes rhbz#2012918
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
%ansible_collection_url() https://galaxy.ansible.com/%{collection_namespace}/%{collection_name}
|
|
||||||
|
|
||||||
%ansible_collection_build() ansible-galaxy collection build
|
|
||||||
|
|
||||||
%ansible_collection_install() ansible-galaxy collection install -n -p %{buildroot}%{_datadir}/ansible/collections %{collection_namespace}-%{collection_name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
%ansible_collection_files %{_datadir}/ansible/collections/ansible_collections/%{collection_namespace}/
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue