diff options
author | Matthieu Gallien <matthieu.gallien@nextcloud.com> | 2022-10-03 21:41:50 +0300 |
---|---|---|
committer | Matthieu Gallien <matthieu.gallien@nextcloud.com> | 2022-10-03 21:41:50 +0300 |
commit | 1d0518ab93bfba519781b2619ec25637278486b3 (patch) | |
tree | c43efa3b1c601a62d09d1b16d14275a379f6e54b | |
parent | b12b54b6716e61ed5953e3766f855cbe1fcf3af8 (diff) |
makes sure WebEngine will get builtfixWebEngineDesktopClientBuild
fix some discrepancies betzeen both image docker files
fix some mistakes from last PRs of client appimage
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
-rw-r--r-- | client-appimage/Dockerfile | 19 | ||||
-rw-r--r-- | client/Dockerfile | 18 | ||||
-rw-r--r-- | client/DockerfileBasic | 137 | ||||
m--------- | client/desktop/desktop | 0 |
4 files changed, 25 insertions, 149 deletions
diff --git a/client-appimage/Dockerfile b/client-appimage/Dockerfile index 774f83c..7a97d76 100644 --- a/client-appimage/Dockerfile +++ b/client-appimage/Dockerfile @@ -24,12 +24,11 @@ RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \ apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' && \ # Install packages - apt-key update && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ - wget \ libsqlite3-dev \ git \ + ninja-build \ curl \ jq \ perl \ @@ -67,6 +66,7 @@ RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && \ libxslt-dev \ ruby \ # Qt WebEngine + libssl-dev \ libxcursor-dev \ libxcomposite-dev \ libxdamage-dev \ @@ -133,7 +133,7 @@ RUN if [ "$BUILD_QT" = "1" ] ; then echo Build Qt from source. && \ git clone https://invent.kde.org/qt/qt/qt5.git && \ cd qt5 && \ git checkout kde/5.15 && \ - ./init-repository --module-subset=default,-qt3d \ + ./init-repository --module-subset=default,-qt3d,-qtlocation \ ; fi # Build Qt @@ -156,6 +156,19 @@ RUN if [ "$BUILD_QT" = "1" ] ; then \ tar cfJ /qt-bin-${VER_QT}-openssl-${VER_OPENSSL}-linux-x86_64-$(date +"%Y-%m-%d").tar.xz ${QT_ROOT} \ ; fi +# +# The following precompiled Qt package has been built with the commands above, using this Dockerfile. +# +# Since it takes a very long time to compile, the build on Docker Hub fails due to a timeout. +# +# This is why we're going to use our own precompiled version here. +# +# Run 'docker build' with '--build-arg BUILD_QT=1' to build Qt from source (default: not set) +# on a dedicated build machine: +# +# docker build . -t client-5.15 . --build-arg BUILD_QT=1 +# + # Download Qt precompiled ENV QT_TARBALL qt-bin-${VER_QT}-openssl-${VER_OPENSSL}-linux-x86_64-${VER_QT_DATE}.tar.xz diff --git a/client/Dockerfile b/client/Dockerfile index b5cb41c..097e45e 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -14,15 +14,14 @@ ENV QT_ROOT /opt/qt${VER_QT} # https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && \ - # Ubuntus version of inkscape is outdated apt-get update && \ - apt-get install -y apt-transport-https && \ + apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y software-properties-common && \ rm -rf /var/lib/apt/lists/* && \ + # Ubuntus version of inkscape is outdated add-apt-repository -y ppa:inkscape.dev/stable && \ apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ - wget \ libsqlite3-dev \ git \ ninja-build \ @@ -102,7 +101,8 @@ RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && \ # html documentation generation python3-sphinx \ # Qt Web Engine - nodejs && \ + nodejs \ + libxkbfile-dev && \ # https://wiki.qt.io/Building_Qt_5_from_Git apt-get build-dep -y libqt5core5a libqt5webengine5 && \ # Cleaning up @@ -155,7 +155,7 @@ RUN if [ "$BUILD_QT" = "1" ] ; then \ # Build Qt RUN if [ "$BUILD_QT" = "1" ] ; then \ # Do not require matching versions of Qt dependencies for WebEngine modules - sed -i "s/5.15.6 /5.15.5 /" ${QT_ROOT}/lib/cmake/*/*Config.cmake \ + sed -i "s/5.15.11 /5.15.6 /" ${QT_ROOT}/lib/cmake/*/*Config.cmake \ ; fi # Build Qt @@ -179,10 +179,10 @@ RUN if [ "$BUILD_QT" = "1" ] ; then \ # Download Qt precompiled ENV QT_TARBALL qt-bin-${VER_QT}-openssl-${VER_OPENSSL}-linux-x86_64-${VER_QT_DATE}.tar.xz -RUN if [ "$BUILD_QT" != "1" ] ; then echo Download precompiled Qt. && \ - wget https://download.nextcloud.com/desktop/development/qt/${QT_TARBALL} && \ - tar -xvf ${QT_TARBALL} && \ - rm ${QT_TARBALL} \ +RUN if [ "$BUILD_QT" != "1" ] ; then \ + wget https://download.nextcloud.com/desktop/development/qt/${QT_TARBALL} && \ + tar -xvf ${QT_TARBALL} && \ + rm ${QT_TARBALL} \ ; fi RUN if [ "$BUILD_QT" != "1" ] ; then \ diff --git a/client/DockerfileBasic b/client/DockerfileBasic deleted file mode 100644 index 5647aab..0000000 --- a/client/DockerfileBasic +++ /dev/null @@ -1,137 +0,0 @@ -FROM ubuntu:22.04 - -MAINTAINER Desktop Team <desktop@nextcloud.com> - -# Run 'docker build' with '--build-arg BUILD_QT=1' to build Qt from source (default: not set) -ARG BUILD_QT - -ENV VER_QT kde-5.15 -ENV VER_QT_DATE 2022-08-31 -ENV VER_OPENSSL 3.0.5 -ENV VER_KFRAMEWORKS 5.96.0 - -ENV QT_ROOT /opt/qt${VER_QT} - -# https://askubuntu.com/questions/158871/how-do-i-enable-the-source-code-repositories -RUN sed -i '/deb-src/s/^# //' /etc/apt/sources.list && \ - # Ubuntus version of inkscape is outdated - apt-get update && \ - apt-get install -y apt-transport-https && \ - DEBIAN_FRONTEND=noninteractive apt-get install -q -y software-properties-common && \ - rm -rf /var/lib/apt/lists/* && \ - add-apt-repository -y ppa:inkscape.dev/stable && \ - apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ - wget \ - libsqlite3-dev \ - git \ - ninja-build \ - curl \ - jq \ - perl \ - python3 \ - python3-pip \ - software-properties-common \ - build-essential \ - mesa-common-dev \ - pkg-config \ - ninja-build \ - gcc-11 \ - g++-11 \ - clang-14 \ - clang-format-14 \ - clang-tidy-14 \ - clazy \ - cmake \ - zlib1g-dev \ - xz-utils \ -# For cmocka based csync tests - libcmocka-dev \ -# Add libsecret for qtkeychain - libsecret-1-dev \ -# Add Qt build dependencies - libclang-dev \ - gperf \ - flex \ - bison \ -# Libxcb, libxcb-xinerama0-dev - '^libxcb.*-dev' \ - libx11-xcb-dev \ - libglu1-mesa-dev \ - libxrender-dev \ - libxi-dev \ -# OpenGL support - libicu-dev \ - libxslt-dev \ - ruby \ -# Qt WebEngine - libssl-dev \ - libxcursor-dev \ - libxcomposite-dev \ - libxdamage-dev \ - libxrandr-dev \ - libdbus-1-dev \ - libfontconfig1-dev \ - libcap-dev \ - libxtst-dev \ - libpulse-dev \ - libudev-dev \ - libpci-dev \ - libnss3-dev \ - libasound2-dev \ - libxss-dev \ - libegl1-mesa-dev \ - libbz2-dev \ - libgcrypt20-dev \ - libdrm-dev \ - libcups2-dev \ - libatkmm-1.6-dev \ -# Qt Multimedia - libasound2-dev \ - libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev \ -# QDoc Documentation Generator Tool - libclang-14-dev \ - llvm-14 \ -# generate png images from svg - inkscape \ -# SonarCloud - openjdk-11-jdk \ -# install xvfb to enable graphical tests - xvfb \ -# html documentation generation - python3-sphinx \ -# Qt Web Engine - nodejs && \ -# https://wiki.qt.io/Building_Qt_5_from_Git - apt-get build-dep -y libqt5core5a libqt5webengine5 && \ -# Cleaning up - DEBIAN_FRONTEND=noninteractive apt-get remove -q -y --purge libssl-dev && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -########################################################################### - -COPY openssl-deprecation.patch /tmp/openssl-deprecation.patch - -# Install openssl -RUN cd /tmp && \ - wget https://www.openssl.org/source/openssl-${VER_OPENSSL}.tar.gz && \ - tar -xvf openssl-${VER_OPENSSL}.tar.gz && \ - cd openssl-${VER_OPENSSL} && \ - patch -p 0 < ../openssl-deprecation.patch && \ - ./config && \ - make -j$(nproc) && \ - make -j$(nproc) install && \ - cd .. && \ - rm -rf openssl* - -########################################################################### - -# Download Qt sources -RUN if [ "$BUILD_QT" = "1" ] ; then echo Build Qt from source. && \ - git clone https://invent.kde.org/qt/qt/qt5.git && \ - cd qt5 && \ - git checkout kde/5.15 && \ - ./init-repository --module-subset=default,-qt3d,-qtlocation \ - ; fi diff --git a/client/desktop/desktop b/client/desktop/desktop deleted file mode 160000 -Subproject 70fac7a5fc8ecaf845b59f5c65c4e09f52e98b3 |