From 43a04750c6f80aad1d9fdc88d93cd254e7e723f4 Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Tue, 6 Feb 2018 16:00:03 +0100 Subject: [PATCH 1/2] Fix build: repo renamed, Ruby ABI macro --- Dockerfile.latest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.latest b/Dockerfile.latest index 6c6fa1b..7d70d88 100644 --- a/Dockerfile.latest +++ b/Dockerfile.latest @@ -2,7 +2,7 @@ FROM opensuse:tumbleweed # the NON-OSS repo is not needed, save the network bandwidth and some time (~5 seconds) for each refresh -RUN zypper mr -d non-oss +RUN zypper mr -d "NON OSS" # "zypper dup" synchronizes with the current Tumbleweed (even downgrades if needed) # to avoid possible dependency issues as the TW Docker image is updated less frequently @@ -22,7 +22,7 @@ RUN zypper ar -f -p 50 http://download.opensuse.org/repositories/devel:/librarie RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ ruby && zypper clean -a -RUN RUBY_VERSION=`rpm --eval '%{rb_default_ruby_abi}'` && \ +RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \ zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ boost-devel \ cmake \ From 14aacc5b75655e78ad52d121e7ac3c7315822095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Slez=C3=A1k?= Date: Tue, 6 Feb 2018 16:47:08 +0100 Subject: [PATCH 2/2] Adapt also the SLE12-SP3 image Import the expected GPG keys, avoid using blank cheque "--gpg-auto-import-keys" option --- Dockerfile.latest | 15 +++++++++++---- Dockerfile.sle12-sp3 | 27 +++++++++++++-------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Dockerfile.latest b/Dockerfile.latest index 7d70d88..50e4b4e 100644 --- a/Dockerfile.latest +++ b/Dockerfile.latest @@ -5,21 +5,28 @@ FROM opensuse:tumbleweed RUN zypper mr -d "NON OSS" # "zypper dup" synchronizes with the current Tumbleweed (even downgrades if needed) -# to avoid possible dependency issues as the TW Docker image is updated less frequently -RUN zypper --gpg-auto-import-keys --non-interactive dup --no-recommends \ - && zypper clean -a +# to avoid possible dependency issues as the TW Docker image is updated less frequently, +# "curl" is needed for importing the GPG key by "rpm" command +RUN zypper --non-interactive dup --no-recommends \ + && zypper --non-interactive in --no-recommends curl && zypper clean -a # add the YaST repository - we need the Rubocop gem for libyui/libyui-rake RUN zypper ar -f http://download.opensuse.org/repositories/YaST:/Head/openSUSE_Tumbleweed/ yast +# import the YaST OBS GPG key +RUN rpm --import https://build.opensuse.org/projects/YaST/public_key + # prefer the packages from the libyui devel project RUN zypper ar -f -p 50 http://download.opensuse.org/repositories/devel:/libraries:/libyui/openSUSE_Tumbleweed/ libyui +# import the libyui OBS GPG key +RUN rpm --import https://build.opensuse.org/projects/devel:libraries:libyui/public_key + # we need to install Ruby first to define the %{rb_default_ruby_abi} RPM macro # see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run # https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache # why we need "zypper clean -a" at the end -RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ +RUN zypper --non-interactive in --no-recommends \ ruby && zypper clean -a RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \ diff --git a/Dockerfile.sle12-sp3 b/Dockerfile.sle12-sp3 index b6974d1..79b3eff 100644 --- a/Dockerfile.sle12-sp3 +++ b/Dockerfile.sle12-sp3 @@ -2,30 +2,29 @@ # because of some licensing issues, use openSUSE-42.3 as a replacement. # It shares the same core packages and should be close enough to SLE12-SP3 # for running the libyui builds. -# FIXME: for now use the TW base, 42.3 (beta) has not been published yet, -# after releasing 42.3 update this line to: -# FROM opensuse:42.3 -FROM opensuse:tumbleweed +FROM opensuse:42.3 # the NON-OSS repo is not needed, save the network bandwidth and some time (~5 seconds) for each refresh -RUN zypper mr -d non-oss +RUN zypper mr -d "NON OSS" + +# we need to install Ruby first to define the %{rb_default_ruby_abi} RPM macro +# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run +# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache +# why we need "zypper clean -a" at the end +# "curl" is needed for importing the GPG key by "rpm" command +RUN zypper --non-interactive in --no-recommends \ + curl ruby && zypper clean -a # Reuse the YaST SP3 repository, we do not want to maintain extra devel:libraries:libyui:SLE-12:SP3 # subproject. # # Set a higher priority for the sle_12_sp3 repo to prefer the packages from # this repo even if they have a lower version than the original 42.3 packages. -# FIXME: use the TW build target for now, later switch to: -# RUN zypper ar -f -p 95 http://download.opensuse.org/repositories/YaST:/SLE-12:/SP3/SLE_12_SP3/ \ -RUN zypper ar -f -p 95 http://download.opensuse.org/repositories/YaST:/SLE-12:/SP3/openSUSE_Tumbleweed/ \ +RUN zypper ar -f -p 95 http://download.opensuse.org/repositories/YaST:/SLE-12:/SP3/SLE_12_SP3/ \ sle12_sp3 -# we need to install Ruby first to define the %{rb_default_ruby_abi} RPM macro -# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run -# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache -# why we need "zypper clean -a" at the end -RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \ - ruby && zypper clean -a +# import the YaST OBS GPG key +RUN rpm --import https://build.opensuse.org/projects/YaST:SLE-12:SP3/public_key RUN RUBY_VERSION=`rpm --eval '%{rb_default_ruby_abi}'` && \ zypper --gpg-auto-import-keys --non-interactive in --no-recommends \