Initial commit
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
ansible-runner (%VERSION%-%RELEASE%) unstable; urgency=low
|
||||
|
||||
* %VERSION% release
|
||||
|
||||
-- Ansible, Inc. <info@ansible.com> %DATE%
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
9
|
||||
@@ -0,0 +1,19 @@
|
||||
Source: ansible-runner
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Ansible <info@ansible.com>
|
||||
Build-Depends: debhelper (>= 9), dh-python, python-all, python-setuptools
|
||||
Standards-Version: 4.1.3
|
||||
Homepage: https://www.ansible.com
|
||||
Vcs-Git: https://github.com/ansible/ansible-runner.git
|
||||
|
||||
Package: ansible-runner
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, ${misc:Depends}, python-pexpect (>= 4.5)
|
||||
Recommends: ansible (>= 2.1)
|
||||
Description: interfaces with Ansible from other systems (Python 2)
|
||||
A tool and python library that helps when interfacing with Ansible
|
||||
directly or as part of another system whether that be through a
|
||||
container image interface, as a standalone tool, or as a Python
|
||||
module that can be imported. The goal is to provide a stable and
|
||||
consistent interface abstraction to Ansible.
|
||||
@@ -0,0 +1,172 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ansible-runner
|
||||
Source: https://github.com/ansible/ansible-runner
|
||||
|
||||
Files: *
|
||||
Copyright: 2016 Ansible by Red Hat <info@ansible.com>
|
||||
License: Apache
|
||||
_Version 2.0, January 2004_
|
||||
_<<http://www.apache.org/licenses/>>_
|
||||
.
|
||||
### Terms and Conditions for use, reproduction, and distribution
|
||||
.
|
||||
#### 1. Definitions
|
||||
.
|
||||
“License” shall mean the terms and conditions for use, reproduction, and
|
||||
distribution as defined by Sections 1 through 9 of this document.
|
||||
.
|
||||
“Licensor” shall mean the copyright owner or entity authorized by the copyright
|
||||
owner that is granting the License.
|
||||
.
|
||||
“Legal Entity” shall mean the union of the acting entity and all other entities
|
||||
that control, are controlled by, or are under common control with that entity.
|
||||
For the purposes of this definition, “control” means **(i)** the power, direct or
|
||||
indirect, to cause the direction or management of such entity, whether by
|
||||
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or **(iii)** beneficial ownership of such entity.
|
||||
.
|
||||
“You” (or “Your”) shall mean an individual or Legal Entity exercising
|
||||
permissions granted by this License.
|
||||
.
|
||||
“Source” form shall mean the preferred form for making modifications, including
|
||||
but not limited to software source code, documentation source, and configuration
|
||||
files.
|
||||
.
|
||||
“Object” form shall mean any form resulting from mechanical transformation or
|
||||
translation of a Source form, including but not limited to compiled object code,
|
||||
generated documentation, and conversions to other media types.
|
||||
.
|
||||
“Work” shall mean the work of authorship, whether in Source or Object form, made
|
||||
available under the License, as indicated by a copyright notice that is included
|
||||
in or attached to the work (an example is provided in the Appendix below).
|
||||
.
|
||||
“Derivative Works” shall mean any work, whether in Source or Object form, that
|
||||
is based on (or derived from) the Work and for which the editorial revisions,
|
||||
annotations, elaborations, or other modifications represent, as a whole, an
|
||||
original work of authorship. For the purposes of this License, Derivative Works
|
||||
shall not include works that remain separable from, or merely link (or bind by
|
||||
name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
.
|
||||
“Contribution” shall mean any work of authorship, including the original version
|
||||
of the Work and any modifications or additions to that Work or Derivative Works
|
||||
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
||||
by the copyright owner or by an individual or Legal Entity authorized to submit
|
||||
on behalf of the copyright owner. For the purposes of this definition,
|
||||
“submitted” means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems, and
|
||||
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
||||
the purpose of discussing and improving the Work, but excluding communication
|
||||
that is conspicuously marked or otherwise designated in writing by the copyright
|
||||
owner as “Not a Contribution.”
|
||||
.
|
||||
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
|
||||
of whom a Contribution has been received by Licensor and subsequently
|
||||
incorporated within the Work.
|
||||
.
|
||||
#### 2. Grant of Copyright License
|
||||
.
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the Work and such
|
||||
Derivative Works in Source or Object form.
|
||||
.
|
||||
#### 3. Grant of Patent License
|
||||
.
|
||||
Subject to the terms and conditions of this License, each Contributor hereby
|
||||
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
||||
irrevocable (except as stated in this section) patent license to make, have
|
||||
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
||||
such license applies only to those patent claims licensable by such Contributor
|
||||
that are necessarily infringed by their Contribution(s) alone or by combination
|
||||
of their Contribution(s) with the Work to which such Contribution(s) was
|
||||
submitted. If You institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
||||
Contribution incorporated within the Work constitutes direct or contributory
|
||||
patent infringement, then any patent licenses granted to You under this License
|
||||
for that Work shall terminate as of the date such litigation is filed.
|
||||
.
|
||||
#### 4. Redistribution
|
||||
.
|
||||
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
||||
in any medium, with or without modifications, and in Source or Object form,
|
||||
provided that You meet the following conditions:
|
||||
.
|
||||
* **(a)** You must give any other recipients of the Work or Derivative Works a copy of
|
||||
this License; and
|
||||
* **(b)** You must cause any modified files to carry prominent notices stating that You
|
||||
changed the files; and
|
||||
* **(c)** You must retain, in the Source form of any Derivative Works that You distribute,
|
||||
all copyright, patent, trademark, and attribution notices from the Source form
|
||||
of the Work, excluding those notices that do not pertain to any part of the
|
||||
Derivative Works; and
|
||||
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any
|
||||
Derivative Works that You distribute must include a readable copy of the
|
||||
attribution notices contained within such NOTICE file, excluding those notices
|
||||
that do not pertain to any part of the Derivative Works, in at least one of the
|
||||
following places: within a NOTICE text file distributed as part of the
|
||||
Derivative Works; within the Source form or documentation, if provided along
|
||||
with the Derivative Works; or, within a display generated by the Derivative
|
||||
Works, if and wherever such third-party notices normally appear. The contents of
|
||||
the NOTICE file are for informational purposes only and do not modify the
|
||||
License. You may add Your own attribution notices within Derivative Works that
|
||||
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
||||
provided that such additional attribution notices cannot be construed as
|
||||
modifying the License.
|
||||
.
|
||||
You may add Your own copyright statement to Your modifications and may provide
|
||||
additional or different license terms and conditions for use, reproduction, or
|
||||
distribution of Your modifications, or for any such Derivative Works as a whole,
|
||||
provided Your use, reproduction, and distribution of the Work otherwise complies
|
||||
with the conditions stated in this License.
|
||||
.
|
||||
#### 5. Submission of Contributions
|
||||
.
|
||||
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
||||
for inclusion in the Work by You to the Licensor shall be under the terms and
|
||||
conditions of this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
||||
any separate license agreement you may have executed with Licensor regarding
|
||||
such Contributions.
|
||||
.
|
||||
#### 6. Trademarks
|
||||
.
|
||||
This License does not grant permission to use the trade names, trademarks,
|
||||
service marks, or product names of the Licensor, except as required for
|
||||
reasonable and customary use in describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
.
|
||||
#### 7. Disclaimer of Warranty
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, Licensor provides the
|
||||
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
||||
including, without limitation, any warranties or conditions of TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
||||
solely responsible for determining the appropriateness of using or
|
||||
redistributing the Work and assume any risks associated with Your exercise of
|
||||
permissions under this License.
|
||||
.
|
||||
#### 8. Limitation of Liability
|
||||
.
|
||||
In no event and under no legal theory, whether in tort (including negligence),
|
||||
contract, or otherwise, unless required by applicable law (such as deliberate
|
||||
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special, incidental,
|
||||
or consequential damages of any character arising as a result of this License or
|
||||
out of the use or inability to use the Work (including but not limited to
|
||||
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
||||
any and all other commercial damages or losses), even if such Contributor has
|
||||
been advised of the possibility of such damages.
|
||||
.
|
||||
#### 9. Accepting Warranty or Additional Liability
|
||||
.
|
||||
While redistributing the Work or Derivative Works thereof, You may choose to
|
||||
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
||||
other liability obligations and/or rights consistent with this License. However,
|
||||
in accepting such obligations, You may act only on Your own behalf and on Your
|
||||
sole responsibility, not on behalf of any other Contributor, and only if You
|
||||
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason of your
|
||||
accepting any such warranty or additional liability.
|
||||
@@ -0,0 +1,10 @@
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y \
|
||||
make debhelper dh-python devscripts python-all python-setuptools python-pip \
|
||||
python-backports.functools-lru-cache pinentry-tty
|
||||
|
||||
RUN update-alternatives --config pinentry
|
||||
RUN pip install -IU pip setuptools
|
||||
RUN pip install -IU poetry ansible
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
deb-builder:
|
||||
build: .
|
||||
environment:
|
||||
RELEASE:
|
||||
OFFICIAL:
|
||||
volumes:
|
||||
- ../../../:/ansible-runner
|
||||
- ${GPG_SIGNING_KEY}:/signing_key.asc
|
||||
entrypoint: ["/bin/bash", "-c"]
|
||||
working_dir: /ansible-runner
|
||||
privileged: true
|
||||
@@ -0,0 +1 @@
|
||||
pexpect python-pexpect (>= 4.5)
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export PYBUILD_NAME=ansible-runner
|
||||
export DEB_BUILD_OPTIONS=nocheck
|
||||
|
||||
%:
|
||||
dh $@ --with python2 --buildsystem=pybuild
|
||||
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# @Author: José Sánchez-Gallego (gallegoj@uw.edu)
|
||||
# @Date: 2019-12-18
|
||||
# @Filename: create_setup.py
|
||||
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
|
||||
|
||||
# Original code here:
|
||||
# https://github.com/sdss/flicamera/blob/master/create_setup.py
|
||||
|
||||
# This is a temporary solution for the fact that pip install . fails with
|
||||
# poetry when there is no setup.py and an extension needs to be compiled.
|
||||
# See https://github.com/python-poetry/poetry/issues/1516. Running this
|
||||
# script creates a setup.py filled out with information generated by
|
||||
# poetry when parsing the pyproject.toml.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import q
|
||||
|
||||
# If there is a global installation of poetry, prefer that.
|
||||
poetry_python_lib = os.path.expanduser('~/.poetry/lib')
|
||||
sys.path.append(os.path.realpath(poetry_python_lib))
|
||||
|
||||
try:
|
||||
from poetry.core.masonry.builders.sdist import SdistBuilder
|
||||
from poetry.factory import Factory
|
||||
except (ImportError, ModuleNotFoundError) as ee:
|
||||
raise ImportError('install poetry by doing pip install poetry to use '
|
||||
f'this script: {ee}')
|
||||
|
||||
|
||||
# Generate a Poetry object that knows about the metadata in pyproject.toml
|
||||
factory = Factory()
|
||||
poetry = factory.create_poetry(os.path.dirname(__file__))
|
||||
|
||||
# Use the SdistBuilder to genrate a blob for setup.py
|
||||
sdist_builder = SdistBuilder(poetry, None, None)
|
||||
setuppy_blob = sdist_builder.build_setup()
|
||||
|
||||
q.q(setuppy_blob)
|
||||
|
||||
with open('setup.py', 'wb') as unit:
|
||||
unit.write(setuppy_blob)
|
||||
unit.write(b'\n# This setup.py was autogenerated using poetry.\n')
|
||||
@@ -0,0 +1,9 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum install -y epel-release
|
||||
RUN yum install -y make mock python3 which git gcc python3-devel
|
||||
|
||||
# Fix output of rpm --eval '%{?dist}'
|
||||
RUN sed -i "s/.el7.centos/.el7/g" /etc/rpm/macros.dist
|
||||
|
||||
RUN pip3 install -IU poetry ansible
|
||||
@@ -0,0 +1,6 @@
|
||||
FROM centos:8
|
||||
|
||||
RUN dnf install -y epel-release
|
||||
RUN yum install -y make mock python3-pip which git gcc python3-devel
|
||||
|
||||
RUN pip3 install -IU poetry ansible
|
||||
@@ -0,0 +1,155 @@
|
||||
%global pypi_name ansible-runner
|
||||
|
||||
%global python3_sitelib /usr/lib/python3.6/site-packages/
|
||||
|
||||
%define _python_bytecompile_errors_terminate_build 0
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%bcond_with python2
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_without python2
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
Name: %{pypi_name}
|
||||
Version: {{ version }}
|
||||
Release: {{ release }}%{?dist}
|
||||
Summary: A tool and python library to interface with Ansible
|
||||
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/ansible/ansible-runner
|
||||
Source0: https://github.com/ansible/%{name}/archive/%{version}.tar.gz?/%{name}-%{version}-{{ release }}.tar.gz
|
||||
BuildArch: noarch
|
||||
|
||||
%if %{with python2}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python2-setuptools
|
||||
Requires: python2-%{pypi_name} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
Requires: python3-%{pypi_name} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description
|
||||
Ansible Runner is a tool and python library that helps when interfacing with
|
||||
Ansible from other systems whether through a container image interface, as a
|
||||
standalone tool, or imported into a python project.
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
Requires: python-setuptools
|
||||
Requires: python-daemon
|
||||
Requires: pexpect >= 4.6
|
||||
Requires: PyYAML
|
||||
Requires: python-six
|
||||
Requires: python-lockfile
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
Ansible Runner is a tool and python library that helps when interfacing with
|
||||
Ansible from other systems whether through a container image interface, as a
|
||||
standalone tool, or imported into a python project.
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
Requires: python3-pyyaml
|
||||
Requires: python3-setuptools
|
||||
Requires: python3-daemon
|
||||
Requires: python3-six
|
||||
Requires: python3dist(pexpect) >= 4.6
|
||||
Requires: python3dist(lockfile)
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
Ansible Runner is a tool and python library that helps when interfacing with
|
||||
Ansible from other systems whether through a container image interface, as a
|
||||
standalone tool, or imported into a python project.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pypi_name}-%{version}
|
||||
# Remove bundled egg-info
|
||||
rm -rf %{pypi_name}.egg-info
|
||||
|
||||
%global py_setup setup.py
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
||||
python2 setup.py build
|
||||
%endif
|
||||
%if %{with python3}
|
||||
python3 setup.py build
|
||||
%endif
|
||||
|
||||
%install
|
||||
# Must do the subpackages' install first because the scripts in /usr/bin are
|
||||
# overwritten with every setup.py install.
|
||||
|
||||
%if %{with python3}
|
||||
python3 setup.py install -O1 --skip-build --root %{buildroot}
|
||||
cp %{buildroot}/%{_bindir}/ansible-runner %{buildroot}/%{_bindir}/ansible-runner-%{python3_version}
|
||||
ln -s %{_bindir}/ansible-runner-%{python3_version} %{buildroot}/%{_bindir}/ansible-runner-3
|
||||
%endif
|
||||
|
||||
%if %{with python2}
|
||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
||||
python2 setup.py install -O1 --skip-build --root %{buildroot}
|
||||
cp %{buildroot}/%{_bindir}/ansible-runner %{buildroot}/%{_bindir}/ansible-runner-%{python2_version}
|
||||
ln -s %{_bindir}/ansible-runner-%{python2_version} %{buildroot}/%{_bindir}/ansible-runner-2
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-%{pypi_name}
|
||||
%{_bindir}/ansible-runner
|
||||
%{_bindir}/ansible-runner-2
|
||||
%{_bindir}/ansible-runner-%{python2_version}
|
||||
%{python_sitelib}/*
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{pypi_name}
|
||||
%{python3_sitelib}/*
|
||||
%{_bindir}/ansible-runner
|
||||
%{_bindir}/ansible-runner-3
|
||||
%{_bindir}/ansible-runner-%{python3_version}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 19 2020 Ryan Petrello <rpetrell@redhat.com> - 1.4.6-1
|
||||
- Ansible Runner 1.4.6-1
|
||||
|
||||
* Thu Mar 19 2020 Matthew Jones <matburt@redhat.com> - 1.4.5-1
|
||||
- Ansible Runner 1.4.5-1
|
||||
|
||||
* Tue Feb 25 2020 Yanis Guenane <yguenane@redhat.com> - 1.4.4-3
|
||||
- Ansible Runner 1.4.4-3
|
||||
|
||||
* Fri Oct 25 2019 Matthew Jones <matburt@redhat.com> - 1.4.4-1
|
||||
- Ansible Runner 1.4.4-1
|
||||
|
||||
* Thu Oct 17 2019 Matthew Jones <matburt@redhat.com> - 1.4.2-1
|
||||
- Ansible Runner 1.4.2-1
|
||||
|
||||
* Thu Oct 03 2019 Matthew Jones <matburt@redhat.com> - 1.4.1-1
|
||||
- Ansible Runner 1.4.1-1
|
||||
|
||||
* Mon Sep 23 2019 Shane McDonald <shanemcd@redhat.com> - 1.4.0-1
|
||||
- Ansible Runner 1.4.0-1
|
||||
- Support for EL 7.7 (defaults to python2)
|
||||
|
||||
* Wed Apr 24 2019 Shane McDonald <shanemcd@redhat.com> - 1.3.4-1
|
||||
- Ansible Runner 1.3.4-1
|
||||
- Adopted modified upstream spec file for python3 support
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
rpm-builder:
|
||||
build:
|
||||
dockerfile: Dockerfile.${MOCK_CONFIG}
|
||||
context: .
|
||||
image: runner-rpm-builder:${MOCK_CONFIG}
|
||||
environment:
|
||||
MOCK_BIN: "mock --old-chroot"
|
||||
MOCK_CONFIG:
|
||||
RELEASE:
|
||||
OFFICIAL:
|
||||
volumes:
|
||||
- ../../:/ansible-runner
|
||||
- mock-cache:/var/cache/mock
|
||||
entrypoint: ["/bin/bash", "-c"]
|
||||
working_dir: /ansible-runner
|
||||
privileged: true
|
||||
volumes:
|
||||
mock-cache:
|
||||
Reference in New Issue
Block a user