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

Add SLE-12-SP5 image #10

Merged
merged 3 commits into from
Aug 13, 2019
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ env:
- DOCKER_TAG=latest
- DOCKER_TAG=sle12-sp3
- DOCKER_TAG=sle12-sp4
- DOCKER_TAG=sle12-sp5
- DOCKER_TAG=sle15

2 changes: 1 addition & 1 deletion Dockerfile.latest
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN zypper ar -f -p 50 http://download.opensuse.org/repositories/devel:/librarie
RUN rpm --import https://build.opensuse.org/projects/devel:libraries:libyui/public_key

RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
zypper --non-interactive in --no-recommends \
boost-devel \
brp-check-suse \
brp-extract-appdata \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.sle12-sp3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 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.
FROM opensuse:42.3
FROM opensuse/leap:42.3

# ensure the UTF-8 locales are set
ENV LC_ALL=en_US.UTF-8
Expand Down Expand Up @@ -33,7 +33,7 @@ RUN zypper ar -f -p 95 http://download.opensuse.org/repositories/YaST:/SLE-12:/S
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 \
zypper --non-interactive in --no-recommends \
boost-devel \
cmake \
doxygen \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.sle12-sp4
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# as there is no openSUSE-42.4 release which would be the equivalent to SLES12-SP4.
# It shares the same core packages and should be close enough to SLE12-SP4
# for running the libyui builds.
FROM opensuse:42.3
FROM opensuse/leap:42.3

# ensure the UTF-8 locales are set
ENV LC_ALL=en_US.UTF-8
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN zypper ar -f -p 95 https://download.opensuse.org/repositories/YaST:/SLE-12:/
RUN rpm --import https://build.opensuse.org/projects/YaST/public_key

RUN RUBY_VERSION=`rpm --eval '%{rb_default_ruby_abi}'` && \
zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
zypper --non-interactive in --no-recommends \
boost-devel \
cmake \
doxygen \
Expand Down
76 changes: 76 additions & 0 deletions Dockerfile.sle12-sp5
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SLE12-SP5 is officially not available at the Docker Hub
# because of some licensing issues, use openSUSE-42.3 as a replacement
# as there is no openSUSE-42.5 release which would be the equivalent to SLES12-SP5.
# It shares the same core packages and should be close enough to SLE12-SP5
# for running the libyui builds.
FROM opensuse/leap:42.3

# ensure the UTF-8 locales are set
ENV LC_ALL=en_US.UTF-8

# do not install the files marked as documentation (use "rpm --excludedocs")
RUN sed -i -e "s/^.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/" /etc/zypp/zypp.conf

# 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"

# 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 SP5 repository, we do not want to maintain extra devel:libraries:libyui:SLE-12:SP5
# subproject.
#
# Set a higher priority for the sle_12_sp5 repo to prefer the packages from
# this repo even if they have a lower version than the original 42.3 packages.
RUN zypper ar -f -p 95 https://download.opensuse.org/repositories/YaST:/SLE-12:/SP5/openSUSE_Leap_42.3/ \
sle12_sp5

# import the YaST OBS GPG key
RUN rpm --import https://build.opensuse.org/projects/YaST/public_key

RUN RUBY_VERSION=`rpm --eval '%{rb_default_ruby_abi}'` && \
zypper --non-interactive in --no-recommends \
boost-devel \
cmake \
doxygen \
fontconfig-devel \
gcc-c++ \
git \
gtk3-devel \
libyui-devel \
libyui-ncurses-devel \
libyui-qt-devel \
libzypp-devel \
obs-service-source_validator \
pkg-config \
'pkgconfig(Qt5Core)' \
'pkgconfig(Qt5Gui)' \
'pkgconfig(Qt5Svg)' \
'pkgconfig(Qt5Widgets)' \
'pkgconfig(Qt5X11Extras)' \
"rubygem($RUBY_VERSION:libyui-rake)" \
"rubygem($RUBY_VERSION:rubocop)" \
rpm-build \
yast2-devtools \
which \
&& zypper clean -a \
&& rm -rf /usr/lib*/ruby/gems/*/cache \
&& rm -rf /usr/share/doc/

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY libyui-travis /usr/local/bin

# run some smoke tests to make sure there is no serious issue with the image
RUN c++ --version

# this is a bit tricky as the libyui/rake loads some files at the initialization
RUN mkdir -p package && echo > package/test.spec && \
echo -e 'SET(VERSION_MAJOR "42")\nSET(VERSION_MINOR "42")\nSET(VERSION_PATCH "42")' \
> VERSION.cmake && rake -t -r libyui/rake -V && rm -rf package && rm VERSION.cmake
2 changes: 1 addition & 1 deletion Dockerfile.sle15
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN zypper ar -f -p 50 http://download.opensuse.org/repositories/devel:/librarie
RUN rpm --import https://build.opensuse.org/projects/devel:libraries:libyui/public_key

RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
zypper --non-interactive in --no-recommends \
boost-devel \
cmake \
doxygen \
Expand Down