Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build: repo renamed, Ruby ABI macro #2

Merged
merged 2 commits into from
Feb 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,34 @@
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
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=`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 \
Expand Down
27 changes: 13 additions & 14 deletions Dockerfile.sle12-sp3
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down