Skip to content

Commit

Permalink
Fix rpm build (#987)
Browse files Browse the repository at this point in the history
Fix rpm build

Follow-up for #986. There were still multiple rpm build failures (centos 8 stream change, .spec being out-of-date, etc.).  I fixed for el8 only.
@kdelee please try this out

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: David Shrewsbury <None>
  • Loading branch information
simaishi committed Feb 8, 2022
1 parent cef4f5d commit c34bbd4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -9,7 +9,7 @@ GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
ANSIBLE_BRANCH ?=
ANSIBLE_VERSIONS ?= stable-2.9 stable-2.10 stable-2.11
PIP_NAME = ansible_runner
VERSION := $(shell python setup.py --version)
VERSION := $(shell $(PYTHON) setup.py --version)
ifeq ($(OFFICIAL),yes)
RELEASE ?= 1
else
Expand Down
2 changes: 2 additions & 0 deletions packaging/rpm/Dockerfile.epel-8-x86_64
Expand Up @@ -4,3 +4,5 @@ RUN dnf install -y epel-release
RUN yum install -y make mock python3-pip which git gcc python3-devel
RUN pip3 install -IU pip>=21.0.1
RUN pip3 install -IU ansible

RUN sed -i 's/release=8/release=8-stream/g' /etc/mock/templates/centos-8.tpl
2 changes: 2 additions & 0 deletions packaging/rpm/ansible-runner.spec.j2
Expand Up @@ -30,6 +30,7 @@ Requires: python2-%{pypi_name} = %{version}-%{release}

%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
Requires: python3-%{pypi_name} = %{version}-%{release}
%endif
Expand Down Expand Up @@ -125,6 +126,7 @@ ln -s %{_bindir}/ansible-runner-%{python2_version} %{buildroot}/%{_bindir}/ansib
%{_bindir}/ansible-runner
%{_bindir}/ansible-runner-3
%{_bindir}/ansible-runner-%{python3_version}
%{_datadir}/ansible-runner/*
%endif

%changelog
Expand Down
2 changes: 1 addition & 1 deletion packaging/rpm/docker-compose.yml
Expand Up @@ -7,7 +7,7 @@ services:
context: .
image: runner-rpm-builder:${MOCK_CONFIG}
environment:
MOCK_BIN: "mock --old-chroot"
MOCK_BIN: "mock --isolation=simple"
MOCK_CONFIG:
RELEASE:
OFFICIAL:
Expand Down

0 comments on commit c34bbd4

Please sign in to comment.