From 40be77d9dbc24b201fad15ea4e65243bce954617 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sat, 4 Mar 2023 11:59:57 +0100 Subject: [PATCH] =?UTF-8?q?script=20de=20build=20rpm=20-=20passage=20de=20?= =?UTF-8?q?rpmbuild=20=C3=A0=20mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker_rebuild_msmtp_rpm.sh | 39 +++++++++++++++++++++++ docker_rpmbuild-rebuild_msmtp.sh | 54 -------------------------------- 2 files changed, 39 insertions(+), 54 deletions(-) create mode 100755 docker_rebuild_msmtp_rpm.sh delete mode 100755 docker_rpmbuild-rebuild_msmtp.sh diff --git a/docker_rebuild_msmtp_rpm.sh b/docker_rebuild_msmtp_rpm.sh new file mode 100755 index 0000000..25d0c06 --- /dev/null +++ b/docker_rebuild_msmtp_rpm.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +FROMFEDORA='36' +PACKAGE='msmtp' +GETTEXT_FC='36' +GETTEXT_VERSION='0.21-9' + +ABSDIR="$( dirname "$(readlink -f -- "$0")" )" +cd ${ABSDIR} + +type -P docker >/dev/null && DOCKER=$(which docker) +type -P podman >/dev/null && DOCKER=$(which podman) + +if ! JSONLINE=$(curl -s https://src.fedoraproject.org/_dg/bodhi_updates/rpms/${PACKAGE} | grep -e "fc${FROMFEDORA}\","); then + echo "ERROR : No ${PACKAGE} release available for Fedora ${FROMFEDORA}" + echo "Please check https://src.fedoraproject.org/rpms/${PACKAGE} to choose the right release." + exit 1 +fi + +VERSION=$(echo "${JSONLINE}" | sed -e "s/^\s*\"stable\": \"${PACKAGE}-\(.*\)\.fc${FROMFEDORA}\",\s*$/\1/") + +ARCH=$(${DOCKER} run --rm docker.io/library/rockylinux:8 uname -i) + +mkdir /tmp/dockerrpmbuild-$$ + +${DOCKER} run -i --rm -v /tmp/dockerrpmbuild-$$:/out:Z --privileged docker.io/library/rockylinux:8 </dev/null && DOCKER=$(which docker) -type -P podman >/dev/null && DOCKER=$(which podman) - -if ! JSONLINE=$(curl -s https://src.fedoraproject.org/_dg/bodhi_updates/rpms/${PACKAGE} | grep -e "fc${FROMFEDORA}\","); then - echo "ERROR : No ${PACKAGE} release available for Fedora ${FROMFEDORA}" - echo "Please check https://src.fedoraproject.org/rpms/${PACKAGE} to choose the right release." - exit 1 -fi - -VERSION=$(echo "${JSONLINE}" | sed -e "s/^\s*\"stable\": \"${PACKAGE}-\(.*\)\.fc${FROMFEDORA}\",\s*$/\1/") - -ARCH=$(${DOCKER} run --rm docker.io/library/rockylinux:8 uname -i) - -${DOCKER} build -t localhost/docker-${PACKAGE}-build -f- . <