Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,19 @@ rpm-podman:
podman build \
--volume /etc/pki/entitlement/:/etc/pki/entitlement \
--build-arg TAG=$(RPM_BUILDER_IMAGE_TAG) \
--build-arg DNF=dnf.real \
--authfile $(PULLSECRET) \
--tag microshift-builder:$(RPM_BUILDER_IMAGE_TAG) - < ./packaging/images/Containerfile.rpm-builder ; \
--tag microshift-builder:$(RPM_BUILDER_IMAGE_TAG) \
--file ./packaging/images/Containerfile.rpm-builder \
&& \
podman run \
--rm -i \
--volume $$(pwd):/opt/microshift:z \
--env TARGET_ARCH=$(TARGET_ARCH) \
microshift-builder:$(RPM_BUILDER_IMAGE_TAG) \
bash -ilc 'cd /opt/microshift && make rpm & pid=$$! ; trap "pkill $${pid}" INT ; wait $${pid}'
bash -ilc 'cd /opt/microshift && make rpm & pid=$$! ; \
trap "echo Killing make PID $${pid}; kill $${pid}" INT ; \
wait $${pid}'
.PHONY: rpm-podman

###############################
Expand Down
13 changes: 10 additions & 3 deletions packaging/images/Containerfile.rpm-builder
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
ARG TAG
FROM registry.ci.openshift.org/ocp/builder:$TAG

RUN rm -rfv /etc/yum.repos.d/ci-rpm-mirrors.repo /etc/yum.repos.d/localdev* && \
dnf install \
# Allow for optional override of the dnf command. This is necessary when build
# images are configured to use a dnf shim and dnf.real executable name.
ARG DNF=dnf

# Delete the builder repos to allow usage of the host repository entitlement.
# This requires '--volume /etc/pki/entitlement/:/etc/pki/entitlement' option
# during the build.
RUN rm -fv /etc/yum.repos.d/ci-rpm-mirrors.repo /etc/yum.repos.d/localdev* && \
${DNF} install \
--setopt=tsflags=nodocs \
--setopt=install_weak_deps=False \
-y \
selinux-policy-devel rpmdevtools jq gettext \
&& \
dnf clean all && \
${DNF} clean all && \
rm -rf /var/cache/dnf/*