Compare commits

...

5 commits

Author SHA1 Message Date
Gitouche 5869837da4 Remove msmtp-1.8.19-1 files 2022-07-31 11:15:55 +02:00
Gitouche 23d2156c83 Bump to F36 build (no changes) 2022-07-31 11:14:07 +02:00
Gitouche 8e25f547f2 BUMP msmtp-1.8.20-1 2022-05-12 21:58:49 +02:00
Gitouche 189bff373c docker rebuild script : use volume mount instead of "docker cp" 2022-03-02 22:22:11 +01:00
Gitouche 83ae6cb970 Molecule fix 2022-02-20 13:49:00 +01:00
4 changed files with 19 additions and 9 deletions

View file

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

View file

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

Binary file not shown.

View file

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