Compare commits

..

No commits in common. "5869837da468f042cac8c765327c4feeb3b4df7b" and "0f7d11266d108b9971dc059b943c04705868c2ef" have entirely different histories.

4 changed files with 9 additions and 19 deletions

View file

@ -1,5 +1,5 @@
---
msmtp_rpm_file: msmtp-1.8.20-1.el8.{{ ansible_architecture }}.rpm
msmtp_rpm_file: msmtp-1.8.19-1.el8.{{ ansible_architecture }}.rpm
msmtp_accounts:
# Account 1 - it was a real account for testing (but yandex now blocks it)

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
FROMFEDORA='36'
FROMFEDORA='34'
PACKAGE='msmtp'
ABSDIR="$( dirname "$(readlink -f -- "$0")" )"
@ -19,26 +19,18 @@ VERSION=$(echo "${JSONLINE}" | sed -e "s/^\s*\"stable\": \"${PACKAGE}-\(.*\)\.fc
ARCH=$(${DOCKER} run --rm docker.io/library/rockylinux:8 uname -i)
${DOCKER} build -t localhost/docker-${PACKAGE}-build -f- . <<EOF
${DOCKER} build -t docker-${PACKAGE}-build -f- . <<EOF
FROM docker.io/library/rockylinux:8
RUN dnf install -y epel-release dnf-plugins-core && \
dnf config-manager --set-enabled powertools && \
dnf install -y rpm-build gcc make gettext gnutls-devel libgsasl-devel libidn-devel libsecret-devel && \
useradd -m dontbuildasroot -s /bin/bash
USER dontbuildasroot
RUN rpmbuild --rebuild https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/${FROMFEDORA}/Everything/source/tree/Packages/m/${PACKAGE}-${VERSION}.fc${FROMFEDORA}.src.rpm
RUN curl https://download-ib01.fedoraproject.org/pub/fedora/linux/updates/${FROMFEDORA}/Everything/SRPMS/Packages/m/${PACKAGE}-${VERSION}.fc${FROMFEDORA}.src.rpm -o /tmp/package.src.rpm && \
rpmbuild --rebuild /tmp/package.src.rpm
EOF
[[ $? = 0 ]] && mkdir /tmp/dockerrpmbuild-$$
${DOCKER} build --no-cache -v /tmp/dockerrpmbuild-$$:/out:Z -t docker-${PACKAGE}-xfer -f- . <<EOF
FROM localhost/docker-${PACKAGE}-build
USER root
RUN mv /home/dontbuildasroot/rpmbuild/RPMS/*/*.rpm /out/
EOF
[[ $? == 0 ]] && mv -i /tmp/dockerrpmbuild-$$/*.rpm ${ABSDIR}/files/ &&
rm -rf /tmp/dockerrpmbuild-$$ &&
${DOCKER} rmi -f docker-${PACKAGE}-build &&
${DOCKER} rmi -f docker-${PACKAGE}-xfer
${DOCKER} create -ti --name docker-${PACKAGE}-xfer docker-${PACKAGE}-build bash
${DOCKER} cp docker-${PACKAGE}-xfer:/home/dontbuildasroot/rpmbuild/RPMS/${ARCH}/${PACKAGE}-${VERSION}.el8.${ARCH}.rpm ./files/
${DOCKER} rm -fv docker-${PACKAGE}-xfer
${DOCKER} rmi -f docker-${PACKAGE}-build

Binary file not shown.

View file

@ -1,7 +1,5 @@
---
galaxy_info:
role_name: ansible_msmtp_mailer
namespace: notongalaxy
author: Adham Helal, Christian Wagner, gitouche
description: "Deploy msmtp mailer on RHEL8"
min_ansible_version: 2.4