Skip to content

Commit 669a2f7

Browse files
committed
Use almalinux 9 and Qt6 for appimage
Update various dependencies and disable optional features in KF6 libs
1 parent 42633d4 commit 669a2f7

3 files changed

Lines changed: 125 additions & 58 deletions

File tree

scripts/appimage/Dockerfile

Lines changed: 73 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,35 @@
44
#
55
# SPDX-License-Identifier: GPL-2.0-or-later
66
#
7-
FROM almalinux:8 AS intermediate
7+
FROM almalinux:9 AS intermediate
88

9-
ARG QT_VERSION=5.15.14
10-
ARG KF5_VERSION=v5.115.0
11-
ARG KDDockWidgets_VERSION=2.1
9+
ARG QT_VERSION=6.8.3
10+
ARG QT_VERSION_SHORT=6.8
11+
ARG KF6_VERSION=v6.16.0
12+
ARG KDDockWidgets_VERSION=v2.2.5
1213
ARG QCustomPlot_VERSION=2.1.1
13-
ARG rust_demangler_VERSION=0.1.23
14+
ARG rust_demangler_VERSION=0.1.24
1415
ARG d_demangler_VERSION=0.0.2
15-
ARG KGraphViewer_VERSION=v2.4.3a
16-
ARG KDiagram_VERSION=2.8
16+
ARG KGraphViewer_VERSION=v25.04.3
17+
ARG KDiagram_VERSION=v3.0.1
1718

1819
USER root
1920

2021
# install dependencies
21-
RUN dnf update -y && dnf install -y 'dnf-command(config-manager)' && dnf config-manager --set-enabled powertools && dnf update -y && \
22+
RUN dnf update -y && dnf install -y 'dnf-command(config-manager)' && dnf config-manager --set-enabled crb && dnf update -y && \
2223
dnf install -y \
23-
gcc-toolset-13 elfutils-devel elfutils-libelf-devel elfutils-debuginfod-client-devel flex bison file \
24+
glibc-langpack-en gcc-toolset-14 elfutils-devel elfutils-libelf-devel elfutils-debuginfod-client-devel flex bison file \
2425
perl perl-IO-Socket-SSL perl-YAML \
2526
gperf wget cmake3 which git python3 libzstd-devel \
2627
polkit-devel libxslt-devel docbook-style-xsl \
27-
# install Qt build dependencies, see: https://wiki.qt.io/Building_Qt_5_from_Git
28+
# install Qt build dependencies, see: https://wiki.qt.io/Building_Qt_6_from_Git
2829
# qtbase
2930
libxcb libxcb-devel xcb-util xcb-util-devel mesa-libGL-devel libxkbcommon-devel libudev-devel \
30-
xcb-util-keysyms-devel libxkbcommon-x11-devel libinput-devel xcb-util-image-devel \
31-
mesa-libgbm-devel xcb-util-wm-devel xcb-util-renderutil-devel libSM-devel \
31+
libinput-devel xcb-util-image-devel xcb-util-wm-devel xcb-util-keysyms-devel xcb-util-cursor-devel \
32+
mesa-libgbm-devel xcb-util-renderutil-devel libSM-devel libxkbcommon-x11-devel \
3233
postgresql-devel unixODBC-devel pcre2-devel openssl-devel openssl cups-devel \
3334
# gtk widget theme support
34-
gtk3-devel \
35-
# kshimgen
36-
glibc-static \
35+
gtk3-devel libcanberra-devel \
3736
# kfilemetadata
3837
libattr-devel \
3938
# kio
@@ -45,40 +44,56 @@ RUN dnf update -y && dnf install -y 'dnf-command(config-manager)' && dnf config-
4544
# appimages
4645
fuse fuse-libs bzip2 rsync \
4746
# elfutils
48-
libmicrohttpd-devel sqlite-devel libarchive-devel && \
47+
libmicrohttpd-devel sqlite-devel libarchive-devel \
48+
# wayland
49+
ninja-build meson expat-devel doxygen xmlto \
50+
# sonnet
51+
hunspell-devel \
52+
# kwallet
53+
gpgme-devel gpgmepp-devel libgcrypt-devel libsecret-devel && \
4954
rm -Rf /var/dnf/yum
5055

5156
FROM intermediate AS builder
5257

53-
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:/opt/rh/gcc-toolset-13/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib
54-
ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin${PATH:+:${PATH}}
55-
56-
RUN . /opt/rh/gcc-toolset-13/enable && wget https://download.qt.io/official_releases/qt/5.15/${QT_VERSION}/single/qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \
57-
tar -xvf qt-everywhere-opensource-src-${QT_VERSION}.tar.xz && \
58-
mkdir build && cd build && \
59-
../qt-everywhere-src-${QT_VERSION}/configure -opensource -confirm-license -force-debug-info -separate-debug-info \
60-
-xcb -xcb-xlib -bundled-xcb-xinput -skip qtwebengine -skip qtdatavis3d -skip qtmultimedia -skip qtquick3d \
61-
-skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qt3d -skip qtdeclarative \
62-
-skip qtscript -skip qtcharts -skip qtdoc -skip qtwebsockets -skip qtgamepad -skip qtgraphicaleffects \
63-
-skip qtpurchasing -skip qtserialbus -skip qtserialport -skip qtwebchannel -skip qtwebglplugin \
64-
-skip qtwebview -skip qtlocation -skip qtspeech -skip qtwinextras \
65-
-release -ssl -no-compile-examples -cups -I /usr/include/openssl11 -prefix /usr -linker gold && \
66-
make -j$(nproc) && make install
58+
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib
59+
ENV PATH=/opt/rh/gcc-toolset-14/root/usr/bin${PATH:+:${PATH}}
60+
61+
# Set environment variables for locale
62+
ENV LANG=en_US.UTF-8 \
63+
LANGUAGE=en_US:en \
64+
LC_ALL=en_US.UTF-8
65+
66+
RUN . /opt/rh/gcc-toolset-14/enable
67+
68+
# qt
69+
RUN cd /opt && mkdir qt && cd qt && wget https://download.qt.io/official_releases/qt/${QT_VERSION_SHORT}/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz && \
70+
tar -xvf qt-everywhere-src-${QT_VERSION}.tar.xz && \
71+
mkdir build && cd build && ../qt-everywhere-src-${QT_VERSION}/configure -opensource -confirm-license -force-debug-info -separate-debug-info \
72+
-xcb -xcb-xlib -bundled-xcb-xinput \
73+
-skip qtwebengine,qtwebsockets,qtwebchannel,qtquick3d,qtdatavis3d,qt3d,qtdeclarative \
74+
-skip qtmultimedia,qtquicktimeline,qtgraphs,qtlottie \
75+
-skip qtcharts,qtdoc,qtserialbus \
76+
-skip qtserialport,qtwebview,qtlocation,qtspeech,qtgraphs \
77+
-skip qtmqtt,qtopcua,qtquick3dphysics,qtquickeffectmaker,qtvirtualkeyboard,qtscxml \
78+
-skip qtremoteobjects,qtsensors,qtpositioning,qthttpserver,qtgrpc,qtconnectivity,qtcoap \
79+
-skip qtactiveqt,qtlanguageserver,qtshadertools,qtnetworkauth \
80+
-release -ssl -nomake examples -cups -I /usr/include/openssl11 -prefix /usr -linker gold && \
81+
ninja install && cd /opt && rm -Rf qt
6782

6883
# qcustomplot
6984
RUN cd /opt && mkdir qcustomplot && cd qcustomplot && \
7085
wget https://www.qcustomplot.com/release/${QCustomPlot_VERSION}/QCustomPlot.tar.gz && tar -xf QCustomPlot.tar.gz && \
7186
cd qcustomplot && cp qcustomplot.h /usr/include && \
7287
wget https://www.qcustomplot.com/release/${QCustomPlot_VERSION}/QCustomPlot-sharedlib.tar.gz && \
7388
tar -xf QCustomPlot-sharedlib.tar.gz && ls && cd qcustomplot-sharedlib/sharedlib-compilation \
74-
&& qmake . && make -j$(nproc) && mv libqcustomplot.so* /usr/lib
89+
&& qmake . && make -j$(nproc) && mv libqcustomplot.so* /usr/lib && cd /opt && rm -Rf qcustomplot
7590

7691
# rust demangle
7792
RUN cd /opt/ && mkdir rust && cd rust && wget https://sh.rustup.rs -O rustup.sh && \
7893
chmod +x rustup.sh && ./rustup.sh -y && \
7994
git clone -b ${rust_demangler_VERSION} https://github.com/rust-lang/rustc-demangle && \
8095
cd rustc-demangle && $HOME/.cargo/bin/cargo build -p rustc-demangle-capi --release && \
81-
cp target/release/librustc_demangle.so /usr/lib/
96+
cp target/release/librustc_demangle.so /usr/lib/ && cd /opt && rm -Rf rust
8297

8398
# dlang demangle
8499
RUN cd /opt && mkdir dlang && cd dlang && \
@@ -91,21 +106,20 @@ RUN cd /opt && mkdir dlang && cd dlang && \
91106
# link libphobos2 statically
92107
sed -i 's/defaultlib=libphobos2.so/defaultlib=:libphobos2.a/' Makefile && \
93108
make && mv libd_demangle.so /usr/lib/ && \
94-
deactivate && mv /usr/bin/gpg{~,} && mv /usr/bin/gpg2{~,}
109+
deactivate && mv /usr/bin/gpg{~,} && mv /usr/bin/gpg2{~,} && \
110+
cd /opt && rm -Rf dlang
95111

96112
# kdesrc-build dependencies
97-
RUN yum install -y libcanberra-devel gpgme-devel && \
98-
cpan YAML::Syck JSON::XS YAML::XS
113+
RUN cpan YAML::Syck JSON::XS YAML::XS
99114

100115
# kde frameworks
101116
RUN cd /opt && git clone https://invent.kde.org/sdk/kdesrc-build.git
102117
COPY kdesrc-buildrc /opt/kdesrc-build/
118+
103119
RUN ldconfig && \
104120
cd /opt/kdesrc-build && \
105121
sed -i -e "s/FULL_NPROC/$(nproc)/g" \
106-
-e "s/HALF_NPROC/$(($(nproc)/2))/g" -e "s/%VERSION%/${KF5_VERSION}/g" kdesrc-buildrc && \
107-
# workaround for https://bugs.kde.org/show_bug.cgi?id=490168
108-
sed -i "s/ignore-modules|!=/ignore-modules|=/" modules/ksb/Cmdline.pm && \
122+
-e "s/HALF_NPROC/$(($(nproc)/2))/g" -e "s/%VERSION%/${KF6_VERSION}/g" kdesrc-buildrc && \
109123
./kdesrc-build --metadata-only && \
110124
# fix compile error in kwallet
111125
./kdesrc-build --include-dependencies qca && \
@@ -114,12 +128,14 @@ RUN ldconfig && \
114128
kwindowsystem knotifications kiconthemes karchive syntax-highlighting kio kparts && \
115129
# without extra dependencies
116130
./kdesrc-build --revision ${KGraphViewer_VERSION} --no-include-dependencies kgraphviewer && \
117-
./kdesrc-build --revision ${KDiagram_VERSION} --no-include-dependencies kdiagram
131+
./kdesrc-build --revision ${KDiagram_VERSION} --no-include-dependencies kdiagram && \
132+
cd /opt && rm -Rf /opt/kdesrc-build/
118133

119134
# kddockwidgets
120-
RUN cd /opt && git clone --recursive https://github.com/KDAB/KDDockWidgets.git -b ${KDDockWidgets_VERSION} && \
121-
cd KDDockWidgets && mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_EXAMPLES=0 -DKDDockWidgets_FRONTENDS="qtwidgets" .. && \
122-
make -j$(nproc) && make install
135+
RUN cd /opt && mkdir kddw && cd kddw && git clone --recursive https://github.com/KDAB/KDDockWidgets.git -b ${KDDockWidgets_VERSION} && \
136+
cd KDDockWidgets && mkdir build && cd build && \
137+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DKDDockWidgets_EXAMPLES=0 -DKDDockWidgets_FRONTENDS="qtwidgets" -DKDDockWidgets_QT6=ON -G Ninja .. && \
138+
ninja install && cd /opt && rm -Rf kddw
123139

124140
FROM builder AS stripped
125141

@@ -138,13 +154,18 @@ RUN cd /opt && wget https://github.com/linuxdeploy/linuxdeploy/releases/download
138154

139155
FROM intermediate AS kdesrc-build
140156

141-
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:/opt/rh/gcc-toolset-13/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:/opt/rh/rh-perl530/root/usr/lib64:/usr/lib
142-
ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin:/opt/rh/rh-git227/root/usr/bin:/opt/rh/rh-perl530/root/usr/local/bin:/opt/rh/rh-perl530/root/usr/bin${PATH:+:${PATH}}
157+
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/rh-perl530/root/usr/lib64:/usr/lib
158+
ENV PATH=/opt/rh/gcc-toolset-14/root/usr/bin:/opt/rh/rh-git227/root/usr/bin:/opt/rh/rh-perl530/root/usr/local/bin:/opt/rh/rh-perl530/root/usr/bin${PATH:+:${PATH}}
159+
160+
# Set environment variables for locale
161+
ENV LANG=en_US.UTF-8 \
162+
LANGUAGE=en_US:en \
163+
LC_ALL=en_US.UTF-8
143164

144165
RUN git config --global --add safe.directory /github/workspace
145166

146167
COPY --from=stripped /usr /usr
147-
COPY --from=stripped /usr/local/lib64 /opt/rh/gcc-toolset-13/root/lib64
168+
COPY --from=stripped /usr/local/lib64 /opt/rh/gcc-toolset-14/root/lib64
148169

149170
# set the entrypoint to the build script so that the build script will be run by github actions
150171
CMD ["/github/workspace/scripts/appimage/build_appimage.sh", "/github/workspace", "/github/workspace/build"]
@@ -163,8 +184,13 @@ RUN cd / && wget https://github.com/cli/cli/releases/download/v2.49.2/gh_2.49.2
163184

164185
FROM intermediate AS debuginfo
165186

166-
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:/opt/rh/gcc-toolset-13/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib/dyninst:/opt/rh/gcc-toolset-13/root/usr/lib64:/opt/rh/gcc-toolset-13/root/usr/lib:/usr/lib
167-
ENV PATH=/opt/rh/gcc-toolset-13/root/usr/bin${PATH:+:${PATH}}
187+
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/opt/rh/gcc-toolset-14/root/usr/lib64/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib/dyninst:/opt/rh/gcc-toolset-14/root/usr/lib64:/opt/rh/gcc-toolset-14/root/usr/lib:/usr/lib
188+
ENV PATH=/opt/rh/gcc-toolset-14/root/usr/bin${PATH:+:${PATH}}
189+
190+
# Set environment variables for locale
191+
ENV LANG=en_US.UTF-8 \
192+
LANGUAGE=en_US:en \
193+
LC_ALL=en_US.UTF-8
168194

169195
COPY --from=debugcollector /qt-debuginfo-x86_64.tar.bz2 /
170196
COPY --from=debugcollector /gh_2.49.2_linux_amd64/bin/gh /usr/bin/

scripts/appimage/build_appimage.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ fi
1818

1919
gitversion=$(git -C "$srcdir" describe)
2020

21-
. /opt/rh/gcc-toolset-13/enable
21+
. /opt/rh/gcc-toolset-14/enable
2222

2323
mkdir -p "$buildir" && cd "$buildir"
2424
# KGraphViewer triggers strange crashes in the AppImage, disable it
2525
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
26-
-DCMAKE_PREFIX_PATH=/opt/rh/gcc-toolset-13/root/ \
26+
-DCMAKE_PREFIX_PATH=/opt/rh/gcc-toolset-14/root/ \
2727
-DCMAKE_DISABLE_FIND_PACKAGE_KGraphViewerPart=ON \
28-
-DAPPIMAGE_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr "$srcdir"
28+
-DAPPIMAGE_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr -DQT6_BUILD=ON "$srcdir"
2929

3030
make -j$(nproc)
3131
rm -Rf appdir
3232
DESTDIR=appdir make install
3333

3434
tar -cjvf "/github/workspace/hotspot-debuginfo-$gitversion-x86_64.tar.bz2" \
3535
--transform="s#appdir/#hotspot-debuginfo-$gitversion/#" \
36-
appdir/usr/bin/hotspot appdir/usr/lib64/libexec/hotspot-perfparser
36+
appdir/usr/bin/hotspot appdir/usr/libexec/hotspot-perfparser
3737

3838
# FIXME: Do in CMakeLists.txt
3939
mkdir -p "appdir/usr/share/applications/"
@@ -69,7 +69,7 @@ mkdir -p appdir/usr/plugins/wayland-shell-integration/
6969
cp /usr/plugins/wayland-shell-integration/libxdg-shell.so appdir/usr/plugins/wayland-shell-integration/
7070

7171
linuxdeploy --appdir appdir --plugin qt \
72-
-e "./appdir/usr/lib64/libexec/hotspot-perfparser" \
72+
-e "./appdir/usr/libexec/hotspot-perfparser" \
7373
-e "./appdir/usr/bin/hotspot" \
7474
-l "/usr/lib64/libz.so.1" \
7575
-l /usr/lib64/libharfbuzz.so.0 \

scripts/appimage/kdesrc-buildrc

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# This is a sample kdesrc-build configuration file appropriate for KDE
2-
# Frameworks 5-based build environments.
2+
# Frameworks 6-based build environments.
33
#
44
# See the kdesrc-buildrc-sample for explanations of what the options do, or
55
# view the manpage or kdesrc-build documentation at
66
# https://docs.kde.org/?application=kdesrc-build
77
#
88
# SPDX-FileCopyrightText: Milian Wolff <milian.wolff@kdab.com>
9-
# SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
9+
# SPDX-FileCopyrightText: 2025 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
1010
#
1111
# SPDX-License-Identifier: GPL-2.0-or-later
1212
#
1313
global
14-
branch-group kf5-qt5
14+
branch-group kf6-qt6
1515
install-dir /usr # Where to install KF5-based software
1616
# Uncomment this and edit value to choose a different Qt5
1717
qt-install-dir /usr # Where to find Qt5
@@ -33,12 +33,12 @@ global
3333
end global
3434

3535
# Instead of specifying modules here, the current best practice is to refer to
36-
# KF5 module lists maintained with kdesrc-build by the KF5 developers. As new
37-
# modules are added or modified, the kdesrc-build KF5 module list is altered to
36+
# KF module lists maintained with kdesrc-build by the KF developers. As new
37+
# modules are added or modified, the kdesrc-build KF module list is altered to
3838
# suit, and when you update kdesrc-build you will automatically pick up the
3939
# needed changes.
4040

41-
include ${module-definitions-dir}/kf5-qt5.ksb
41+
include ${module-definitions-dir}/kf6-qt6.ksb
4242

4343
# If you wish to maintain the module list yourself that is possible, simply
4444
# look at the files pointed to above and use the "module-set" declarations that
@@ -51,6 +51,39 @@ end options
5151
# It is possible to change the options for modules loaded from the file
5252
# included above (since it's not possible to add a module that's already been
5353
# included), e.g.
54+
55+
options kcoreaddons
56+
cmake-options -DKCOREADDONS_USE_QML=OFF -DBUILD_PYTHON_BINDINGS=OFF
57+
end options
58+
59+
options kwidgetsaddons
60+
cmake-options -DBUILD_PYTHON_BINDINGS=OFF
61+
end options
62+
63+
options kguiaddons
64+
cmake-options -DBUILD_PYTHON_BINDINGS=OFF
65+
end options
66+
67+
options knotifications
68+
cmake-options -DBUILD_PYTHON_BINDINGS=OFF
69+
end options
70+
71+
options kjobwidgets
72+
cmake-options -DBUILD_PYTHON_BINDINGS=OFF
73+
end options
74+
75+
options kxmlgui
76+
cmake-options -DBUILD_PYTHON_BINDINGS=OFF
77+
end options
78+
79+
options kiconthemes
80+
cmake-options -DKICONTHEMES_USE_QTQUICK=OFF
81+
end options
82+
83+
options kwindowsystem
84+
cmake-options -DKWINDOWSYSTEM_QML=OFF
85+
end options
86+
5487
options kconfig
5588
cmake-options -DKCONFIG_USE_QML=OFF
5689
end options
@@ -63,6 +96,14 @@ options sonnet
6396
cmake-options -DSONNET_USE_QML=OFF
6497
end options
6598

99+
options ktextwidgets
100+
cmake-options -DWITH_TEXT_TO_SPEECH=OFF
101+
end options
102+
66103
options extra-cmake-modules
67104
tag %VERSION%
68105
end options
106+
107+
options breeze-icons
108+
cmake-options -DBINARY_ICONS_RESOURCE=ON
109+
end options

0 commit comments

Comments
 (0)