diff --git a/.travis.yml b/.travis.yml index 7ee0a45..45c003b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,6 @@ env: - DOCKER_TAG=latest - DOCKER_TAG=sle12-sp3 - DOCKER_TAG=sle12-sp4 + - DOCKER_TAG=sle12-sp5 - DOCKER_TAG=sle15 diff --git a/Dockerfile.latest b/Dockerfile.latest index 07f4d79..9696b8f 100644 --- a/Dockerfile.latest +++ b/Dockerfile.latest @@ -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 \ diff --git a/Dockerfile.sle12-sp3 b/Dockerfile.sle12-sp3 index 8c1a45f..cab9f44 100644 --- a/Dockerfile.sle12-sp3 +++ b/Dockerfile.sle12-sp3 @@ -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 @@ -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 \ diff --git a/Dockerfile.sle12-sp4 b/Dockerfile.sle12-sp4 index 984804a..a23ffdf 100644 --- a/Dockerfile.sle12-sp4 +++ b/Dockerfile.sle12-sp4 @@ -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 @@ -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 \ diff --git a/Dockerfile.sle12-sp5 b/Dockerfile.sle12-sp5 new file mode 100644 index 0000000..1ef256f --- /dev/null +++ b/Dockerfile.sle12-sp5 @@ -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 diff --git a/Dockerfile.sle15 b/Dockerfile.sle15 index b921d60..ce82d81 100644 --- a/Dockerfile.sle15 +++ b/Dockerfile.sle15 @@ -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 \