Accepting request 1087369 from home:ojkastl_buildservice:Branch_systemsmanagement_ansible
- disable color in checks - modify %if-condition to allow building for python3.10 or python3.11 on SLES15 - update to 3.0.0: - change python version on Leap15/SLES15 to python3.11 to use the new stack supported by SUSE OBS-URL: https://build.opensuse.org/request/show/1087369 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:ansible/ansible-builder?expand=0&rev=5
This commit is contained in:
parent
d1abdf314d
commit
8706ef6f04
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dabe4b65515ebe301bd40bd1c14da4d1739eae75accfd40aaa74c15b8f336c8c
|
||||
size 74859
|
3
ansible-builder-3.0.0.tar.gz
Normal file
3
ansible-builder-3.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:218d54ddc3ce9b84b0bacf27a9979b0436ca2ce0288a0002ed78c252a561da5d
|
||||
size 88930
|
@ -1,3 +1,68 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 15 20:12:30 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- disable color in checks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 15 19:32:13 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- modify %if-condition to allow building for python3.10 or
|
||||
python3.11 on SLES15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 15 18:31:28 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- update to 3.0.0:
|
||||
* A major evolution of Ansible Builder's Execution Environment
|
||||
definition format, with overall themes of increased flexibility
|
||||
and minimizing required manual alterations of generated build
|
||||
contexts. New features of the version 3 Execution Environment
|
||||
definition include:
|
||||
- Use of vanilla RHEL-ish container images instead of
|
||||
specially-crafted base and builder images (tested against
|
||||
Fedora, CentOS Stream 8/9, UBI9 and others).
|
||||
- Injection of custom build steps before and after every build
|
||||
stage.
|
||||
- Copying arbitrary files from the builder host into the
|
||||
generated container build context (which can then be copied
|
||||
into intermediate/final container images as needed with
|
||||
custom build steps).
|
||||
- Declarative bootstrapping of Python, Ansible Core, and
|
||||
Ansible Runner (in addition to roles/collections, of course).
|
||||
- Inline definition of Python/bindep/role/collection
|
||||
requirements in Execution Environment YAML (external files
|
||||
also still supported).
|
||||
- Customization of final container initialization ENTRYPOINT,
|
||||
USER, and CMD (with verified automatic defaults).
|
||||
- Dynamic builder image from user-specified base image-
|
||||
specifying a builder image is no longer required (or
|
||||
allowed).
|
||||
- Faster builds due to linear stage inheritance and removal of
|
||||
forced OS package upgrades.
|
||||
- Numerous bugfixes and minor enhancements... see documentation
|
||||
for examples.
|
||||
* Breaking Changes
|
||||
- The `--squash` argument to `build` now defaults to `off` for
|
||||
all container runtimes. This allows build caches to function
|
||||
by default for `podman` during development and testing, at
|
||||
the cost of more intermediate layers in the resultant image.
|
||||
Manually specifying `--squash new` is suggested for CI and
|
||||
production builds when using `podman` to minimize the size
|
||||
and number of intermediate layers.
|
||||
- Forced OS package manager upgrades are no longer performed in
|
||||
individual build stages by default. If a full OS package
|
||||
upgrade is desired, add a new build directive to
|
||||
`prepend_base` under `additional_build_steps` (e.g., `- RUN
|
||||
dnf upgrade -y`) to upgrade packages on the base image. The
|
||||
upgraded packages will be reflected in all subsequent build
|
||||
stages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 5 07:14:56 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
- change python version on Leap15/SLES15 to python3.11 to use the
|
||||
new stack supported by SUSE
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 16 14:06:46 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
|
||||
|
||||
|
@ -16,12 +16,19 @@
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
%if 0%{?suse_version} < 1550
|
||||
# Leap15, SLES15
|
||||
%define pythons python310
|
||||
%if %pythons == "python310"
|
||||
%define ansible_python python310
|
||||
%define ansible_python_executable python3.10
|
||||
%define ansible_python_sitelib %python310_sitelib
|
||||
%endif
|
||||
%if %pythons == "python311"
|
||||
%define ansible_python python311
|
||||
%define ansible_python_executable python3.11
|
||||
%define ansible_python_sitelib %python311_sitelib
|
||||
%endif
|
||||
%else
|
||||
# Tumbleweed
|
||||
%define pythons python3
|
||||
@ -31,26 +38,42 @@
|
||||
%endif
|
||||
|
||||
Name: ansible-builder
|
||||
Version: 1.2.0
|
||||
Version: 3.0.0
|
||||
Release: 0
|
||||
Summary: An Ansible execution environment builder
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/ansible/ansible-builder
|
||||
Source: https://files.pythonhosted.org/packages/source/a/ansible-builder/ansible-builder-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{ansible_python}-base >= 3.8
|
||||
BuildRequires: %{ansible_python}-pip
|
||||
BuildRequires: %{ansible_python}-setuptools
|
||||
BuildRequires: %{ansible_python}-wheel
|
||||
BuildRequires: ansible-core
|
||||
BuildRequires: python-rpm-macros
|
||||
# https://github.com/ansible/ansible-builder/blob/devel/requirements.txt
|
||||
BuildRequires: %{ansible_python}-pbr
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{ansible_python}-bindep
|
||||
BuildRequires: %{ansible_python}-PyYAML
|
||||
BuildRequires: %{ansible_python}-bindep
|
||||
BuildRequires: %{ansible_python}-jsonschema
|
||||
BuildRequires: %{ansible_python}-requirements-parser
|
||||
#
|
||||
# Tests require podman, but also require connectivity to pull container images
|
||||
# hence we do not enable this dependency
|
||||
# BuildRequires: podman
|
||||
#
|
||||
# SECTION test requirements
|
||||
# https://github.com/ansible/ansible-builder/blob/devel/test/requirements.txt
|
||||
BuildRequires: %{ansible_python}-pytest
|
||||
BuildRequires: %{ansible_python}-pytest-mock
|
||||
BuildRequires: %{ansible_python}-pytest-xdist
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
Requires: python3-bindep
|
||||
Requires: python3-PyYAML
|
||||
Requires: python3-requirements-parser
|
||||
Requires: %{ansible_python}-PyYAML
|
||||
Requires: %{ansible_python}-bindep
|
||||
Requires: %{ansible_python}-jsonschema
|
||||
Requires: %{ansible_python}-requirements-parser
|
||||
Requires: (podman or docker)
|
||||
|
||||
%description
|
||||
Ansible Builder is a tool that automates the process of
|
||||
@ -65,12 +88,30 @@ https://ansible-builder.readthedocs.io/en/latest/
|
||||
%setup -q -n ansible-builder-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand sed -i "1{s/env bash/bash/;}" %{buildroot}%{ansible_python_sitelib}/ansible_builder/_target_scripts/entrypoint
|
||||
%python_expand head -n 1 %{buildroot}%{ansible_python_sitelib}/ansible_builder/_target_scripts/entrypoint
|
||||
%fdupes %{buildroot}%{ansible_python_sitelib}
|
||||
|
||||
%check
|
||||
# disable coverage tests
|
||||
sed -i '/cov/d' pytest.ini
|
||||
# disable color output
|
||||
sed -i '/color/d' pytest.ini
|
||||
# add %{buildroot}%{_bindir} to PATH, so the executable is found
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
# checks ignored, as they require podman
|
||||
# https://github.com/ansible/ansible-builder/issues/534
|
||||
IGNORED_CHECKS="test_v3_pre_post_commands"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_v3_complete"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_ansible_check_is_skipped"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_missing_ansible"
|
||||
IGNORED_CHECKS="${IGNORED_CHECKS} or test_missing_runner"
|
||||
%pytest -k "not (${IGNORED_CHECKS})"
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE.md
|
||||
|
Loading…
Reference in New Issue
Block a user