From 2244b1d05cbdb9a16b4c57a7671df5e50d22f9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Tue, 19 Nov 2024 18:45:53 +0100 Subject: [PATCH] fix: avoid installing weak dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niccolò Fei --- UBI/Dockerfile-multiarch.template | 6 +++--- UBI/Dockerfile-multilang.template | 6 +++--- UBI/Dockerfile-plv8.template | 6 +++--- UBI/Dockerfile-postgis-multiarch.template | 9 +++++---- UBI/Dockerfile-postgis-multilang.template | 9 +++++---- UBI/Dockerfile-postgis.template | 9 +++++---- UBI/Dockerfile.template | 6 +++--- 7 files changed, 27 insertions(+), 24 deletions(-) diff --git a/UBI/Dockerfile-multiarch.template b/UBI/Dockerfile-multiarch.template index ca6d8626..91274529 100644 --- a/UBI/Dockerfile-multiarch.template +++ b/UBI/Dockerfile-multiarch.template @@ -53,8 +53,8 @@ RUN --mount=type=secret,id=cs_token \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ rm -fr /etc/rpm/macros.image-language-conf ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -71,7 +71,7 @@ RUN --mount=type=secret,id=cs_token \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-multilang.template b/UBI/Dockerfile-multilang.template index 4ffa2f5f..326c8e83 100644 --- a/UBI/Dockerfile-multilang.template +++ b/UBI/Dockerfile-multilang.template @@ -30,8 +30,8 @@ RUN set -xe ; \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ rm -fr /etc/rpm/macros.image-language-conf ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -47,7 +47,7 @@ RUN set -xe ; \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-plv8.template b/UBI/Dockerfile-plv8.template index 0e8a2e7d..34266882 100644 --- a/UBI/Dockerfile-plv8.template +++ b/UBI/Dockerfile-plv8.template @@ -31,8 +31,8 @@ RUN --mount=type=secret,id=cs_token \ esac ; \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -51,7 +51,7 @@ RUN --mount=type=secret,id=cs_token \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis-multiarch.template b/UBI/Dockerfile-postgis-multiarch.template index 55519f9c..c0736f56 100644 --- a/UBI/Dockerfile-postgis-multiarch.template +++ b/UBI/Dockerfile-postgis-multiarch.template @@ -54,8 +54,8 @@ RUN --mount=type=secret,id=cs_token \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ rm -fr /etc/rpm/macros.image-language-conf ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -72,7 +72,7 @@ RUN --mount=type=secret,id=cs_token \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' @@ -126,7 +126,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \ *) \ exit 1 ;; \ esac ; \ - yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ + yum -y install --setopt=install_weak_deps=0 \ + --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \ "$pgrouting_pkg" \ ; \ diff --git a/UBI/Dockerfile-postgis-multilang.template b/UBI/Dockerfile-postgis-multilang.template index 17beb283..e044860c 100644 --- a/UBI/Dockerfile-postgis-multilang.template +++ b/UBI/Dockerfile-postgis-multilang.template @@ -31,8 +31,8 @@ RUN set -xe ; \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ rm -fr /etc/rpm/macros.image-language-conf ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y --setopt=install_weak_deps=0 install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en glibc-all-langpacks ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -48,7 +48,7 @@ RUN set -xe ; \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' @@ -92,7 +92,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \ *) \ exit 1 ;; \ esac ; \ - yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ + yum -y install --setopt=install_weak_deps=0 \ + --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \ pgrouting_%%PG_MAJOR%% \ ; \ diff --git a/UBI/Dockerfile-postgis.template b/UBI/Dockerfile-postgis.template index 5f997670..110f5e0b 100644 --- a/UBI/Dockerfile-postgis.template +++ b/UBI/Dockerfile-postgis.template @@ -30,8 +30,8 @@ RUN set -xe ; \ esac ; \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -47,7 +47,7 @@ RUN set -xe ; \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*' @@ -91,7 +91,8 @@ RUN --mount=type=secret,id=subscription,target=/run/secrets/subscription.sh \ *) \ exit 1 ;; \ esac ; \ - yum -y install --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ + yum -y install --setopt=install_weak_deps=0 \ + --enablerepo=ubi-%%UBI_MAJOR_VERSION%%-codeready-builder,codeready-builder-for-rhel-%%UBI_MAJOR_VERSION%%-${BUILDARCH}-rpms \ postgis%%POSTGIS_MAJOR%%_%%PG_MAJOR%%-%%POSTGIS_VERSION%% \ pgrouting_%%PG_MAJOR%% \ ; \ diff --git a/UBI/Dockerfile.template b/UBI/Dockerfile.template index 9260045e..14874a3c 100644 --- a/UBI/Dockerfile.template +++ b/UBI/Dockerfile.template @@ -29,8 +29,8 @@ RUN set -xe ; \ esac ; \ yum -y upgrade glibc-common ; \ yum -y reinstall glibc-common ; \ - yum -y install hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ - yum -y --setopt=tsflags=nodocs install%%YUM_OPTIONS%% \ + yum -y install --setopt=install_weak_deps=0 hostname rsync tar gettext bind-utils nss_wrapper glibc-locale-source glibc-langpack-en ; \ + yum -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install%%YUM_OPTIONS%% \ postgresql%%PG_MAJOR%%-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ @@ -46,7 +46,7 @@ RUN set -xe ; \ # Install barman-cloud RUN set -xe ; \ - yum -y install python3.11-pip python3.11-psycopg2 ; \ + yum -y install --setopt=install_weak_deps=0 python3.11-pip python3.11-psycopg2 ; \ pip3.11 install --upgrade pip ; \ pip3.11 install -r requirements.txt ; \ yum -y clean all --enablerepo='*'