Attempting hotfix bodhi 5.7.2 due to issues with db.

This commit is contained in:
Adam Saleh 2021-11-30 11:33:06 +01:00
parent bef4b72199
commit 0c3d1c3e6c
2 changed files with 44 additions and 2 deletions

View file

@ -11,12 +11,12 @@ items:
runPolicy: Serial
source:
dockerfile: |-
{{ load_file('dockerfile-base') | indent(8) }}
{{ load_file('dockerfile-base-hotfix') | indent(8) }}
type: Dockerfile
strategy:
type: Docker
dockerStrategy:
noCache: false
noCache: True
output:
to:
kind: ImageStreamTag

View file

@ -0,0 +1,42 @@
FROM fedora:34
MAINTAINER asaleh@redhat.com
ENV VERSION=5.7.2
ENV COMMIT=b758a4caeeeff639edb51e4e6ee8b634c4dce930
ENV SPECURL=https://gist.githubusercontent.com/AdamSaleh/1919b8ec41075e415613e033086a6054/raw/dafdc31d243530a3ee4ede0a15dfb394176600bc/bodhi.spec
RUN dnf -y install fedora-packager wget curl
RUN yum -y install rpm-build redhat-rpm-config make gcc git vi tar unzip rpmlint && yum clean all
RUN curl $SPECURL -o /tmp/bodhi.spec
RUN dnf -y builddep --spec /tmp/bodhi.spec
RUN useradd rpmbuild -u 5002 -g users -p rpmbuild
USER rpmbuild
ENV HOME /home/rpmbuild
WORKDIR /home/rpmbuild
RUN curl $SPECURL -o /home/rpmbuild/bodhi.spec
RUN mkdir -p /home/rpmbuild/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
RUN echo '%_topdir %{getenv:HOME}/rpmbuild' > /home/rpmbuild/.rpmmacros
RUN wget https://github.com/fedora-infra/bodhi/archive/${COMMIT}.tar.gz
RUN mv ${COMMIT}.tar.gz /home/rpmbuild/rpmbuild/SOURCES/bodhi-${COMMIT}.tar.gz
RUN sed -i "s/891564724f08124c3272e2f16717b41fd9a56e78/${COMMIT}/g" /home/rpmbuild/bodhi.spec
RUN sed -i "s/5\.7\.1/${VERSION}/g" /home/rpmbuild/bodhi.spec
RUN rpmbuild --define "commit ${COMMIT}" -ba /home/rpmbuild/bodhi.spec
FROM fedora:34
LABEL \
name="bodhi-base" \
vendor="Fedora Infrastructure" \
license="MIT"
RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags-stg.repo
# While dnf has a --nodocs, it doesen't have a --docs...
RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf
COPY --from=0 /home/rpmbuild/rpmbuild/RPMS /tmp/RPMS
RUN dnf install -y /tmp/RPMS/noarch/* python3-pyramid_sawing python3-gunicorn
# Set up krb5
RUN rm -f /etc/krb5.conf && \
ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \
ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi.stg.fedoraproject.org.keytab
ENV USER=openshift