CentOS 7 -> Rocky Linux 8

This commit is contained in:
Ilya Fedin 2023-06-05 09:24:29 +04:00 committed by John Preston
parent 27b443b24d
commit df29af5aea
8 changed files with 32 additions and 65 deletions

View File

@ -41,7 +41,7 @@ on:
jobs:
linux:
name: CentOS 7
name: Rocky Linux 8
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}/centos_env
@ -51,7 +51,7 @@ jobs:
defaults:
run:
shell: scl enable rh-python38 -- scl enable llvm-toolset-7.0 -- scl enable devtoolset-10 -- bash --noprofile --norc -eo pipefail {0}
shell: scl enable gcc-toolset-12 -- bash --noprofile --norc -eo pipefail {0}
strategy:
matrix:

View File

@ -100,9 +100,9 @@ void PremultiplyLine(uchar *dst, const uchar *src, int intsCount) {
}
if ([&] {
const auto list = std::array{
"libva-drm.so.1",
"libva-x11.so.1",
"libva.so.1",
"libva-drm.so.2",
"libva-x11.so.2",
"libva.so.2",
"libdrm.so.2",
};
for (const auto lib : list) {

View File

@ -404,21 +404,11 @@ bool NotificationData::init(
_notification->set_icon(
Gio::ThemedIcon::create(base::IconName().toStdString()));
// glib 2.42+, we keep glib 2.40+ compatibility
static const auto set_priority = [] {
// reset dlerror after dlsym call
const auto guard = gsl::finally([] { dlerror(); });
return reinterpret_cast<decltype(&g_notification_set_priority)>(
dlsym(RTLD_DEFAULT, "g_notification_set_priority"));
}();
// for chat messages, according to
// https://docs.gtk.org/gio/enum.NotificationPriority.html
_notification->set_priority(Gio::Notification::Priority::HIGH);
if (set_priority) {
// for chat messages, according to
// https://docs.gtk.org/gio/enum.NotificationPriority.html
set_priority(_notification->gobj(), G_NOTIFICATION_PRIORITY_HIGH);
}
// glib 2.70+, we keep glib 2.40+ compatibility
// glib 2.70+, we keep glib 2.56+ compatibility
static const auto set_category = [] {
// reset dlerror after dlsym call
const auto guard = gsl::finally([] { dlerror(); });

View File

@ -13,30 +13,25 @@
# syntax=docker/dockerfile:1
FROM centos:7 AS builder-base
ENV LANG en_US.UTF-8
FROM rockylinux:8 AS builder-base
ENV LANG C.UTF-8
ENV LIBRARY_PATH /usr/local/lib64:/usr/local/lib:/lib64:/lib:/usr/lib64:/usr/lib
ENV LD_LIBRARY_PATH $LIBRARY_PATH
ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \
&& yum -y install centos-release-scl \
&& yum -y install git rh-python38-python-pip rh-python38-python-devel \
autoconf automake libtool patch gperf flex \
fontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \
pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel \
libdrm-devel vulkan-devel libva-devel libvdpau-devel boost169-devel fmt-devel \
gtk3-devel perl-XML-Parser pkgconfig bison yasm file which xorg-x11-util-macros \
devtoolset-10-make devtoolset-10-gcc devtoolset-10-gcc-c++ \
devtoolset-10-binutils llvm-toolset-7.0 llvm-toolset-7.0-clang-devel \
llvm-toolset-7.0-llvm-devel \
&& yum clean all
RUN dnf -y install epel-release \
&& dnf config-manager --set-enabled powertools \
&& dnf -y install autoconf automake libtool pkgconfig make patch git \
python3.11-pip python3.11-devel gperf flex bison clang lld yasm \
file which perl-open perl-XML-Parser xorg-x11-util-macros \
gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils \
libffi-devel fontconfig-devel freetype-devel libX11-devel \
alsa-lib-devel pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel \
mesa-libgbm-devel libdrm-devel vulkan-devel libva-devel libvdpau-devel \
glib2-devel at-spi2-core-devel gtk3-devel boost1.78-devel fmt-devel \
&& dnf clean all
# Fix a bug with argument naming in CentOS 7 glibc
RUN sed -i 's/char \*__block/char */' /usr/include/unistd.h
SHELL [ "bash", "-c", ". /opt/rh/rh-python38/enable; . /opt/rh/devtoolset-10/enable; exec bash -c \"$@\"", "-s"]
SHELL [ "bash", "-c", ". /opt/rh/gcc-toolset-12/enable; exec bash -c \"$@\"", "-s"]
WORKDIR {{ LibrariesPath }}
@ -52,14 +47,14 @@ FROM builder-base AS builder
ENV AR gcc-ar
ENV RANLIB gcc-ranlib
ENV NM gcc-nm
ENV CFLAGS {% if DEBUG %}-g{% endif %} -O3 {% if LTO %}{{ CFLAGS_LTO }}{% endif %} -pipe -fPIC -fstack-protector-all -fstack-clash-protection -fcf-protection -DNDEBUG -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS
ENV CFLAGS {% if DEBUG %}-g{% endif %} -O3 {% if LTO %}{{ CFLAGS_LTO }}{% endif %} -pipe -fPIC -fstack-protector-all -fstack-clash-protection -fcf-protection -DNDEBUG -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS
ENV CXXFLAGS $CFLAGS
FROM builder AS patches
RUN git init patches \
&& cd patches \
&& git remote add origin {{ GIT }}/desktop-app/patches.git \
&& git fetch --depth=1 origin 2cf975200b9baac520b9b298776e0a20b24e397a \
&& git fetch --depth=1 origin f10d5c38d59325a8bed55fa13bc9fa826f5d13cf \
&& git reset --hard FETCH_HEAD \
&& rm -rf .git
@ -74,16 +69,6 @@ RUN git clone -b nasm-2.15.05 --depth=1 {{ GIT }}/netwide-assembler/nasm.git \
&& cd .. \
&& rm -rf nasm
FROM builder AS libffi
RUN git clone -b v3.4.2 --depth=1 {{ GIT }}/libffi/libffi.git \
&& cd libffi \
&& ./autogen.sh \
&& ./configure --enable-static --disable-docs \
&& make -j$(nproc) \
&& make DESTDIR="{{ LibrariesPath }}/libffi-cache" install \
&& cd .. \
&& rm -rf libffi
FROM builder AS zlib
RUN git clone -b v1.2.11 --depth=1 {{ GIT }}/madler/zlib.git \
&& cd zlib \
@ -488,8 +473,6 @@ RUN git clone -b libXcomposite-0.4.5 --depth=1 {{ GIT_FREEDESKTOP }}/libxcomposi
&& rm -rf libxcomposite
FROM builder AS wayland
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
RUN git clone -b 1.19.0 --depth=1 {{ GIT_FREEDESKTOP }}/wayland.git \
&& cd wayland \
&& sed -i "/subdir('tests')/d" meson.build \
@ -720,8 +703,6 @@ RUN git clone -b xkbcommon-1.3.1 --depth=1 {{ GIT }}/xkbcommon/libxkbcommon.git
&& rm -rf libxkbcommon
FROM patches AS glibmm
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
RUN git clone -b 2.77.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
&& cd glibmm \
&& git apply ../patches/glibmm.patch \
@ -741,7 +722,6 @@ RUN git clone -b 2.77.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
&& rm -rf glibmm
FROM builder AS gobject-introspection
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=glibmm {{ LibrariesPath }}/glibmm-cache /
RUN git clone -b 1.76.1 --depth=1 {{ GIT }}/GNOME/gobject-introspection.git \
@ -753,7 +733,6 @@ RUN git clone -b 1.76.1 --depth=1 {{ GIT }}/GNOME/gobject-introspection.git \
&& rm -rf gobject-introspection
FROM patches AS qt
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
COPY --link --from=libproxy {{ LibrariesPath }}/libproxy-cache /
COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-cache /
@ -788,7 +767,6 @@ RUN git clone -b {{ QT_TAG }} --depth=1 https://code.qt.io/qt/qt5.git qt_{{ QT }
-qt-pcre \
-no-icu \
-no-feature-xcb-sm \
-no-feature-egl-extension-platform-wayland \
-static \
-dbus-runtime \
-openssl-linked \
@ -862,7 +840,6 @@ RUN cmake --build out --config Debug --parallel \
{%- endif %}
FROM builder-base
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
COPY --link --from=xz {{ LibrariesPath }}/xz-cache /
COPY --link --from=protobuf {{ LibrariesPath }}/protobuf protobuf
@ -914,9 +891,9 @@ COPY --link --from=webrtc_debug {{ LibrariesPath }}/tg_owt/out/Debug tg_owt/out/
WORKDIR ../tdesktop
ENV QT {{ QT }}
ENV OPENSSL_ROOT_DIR {{ OPENSSL_PREFIX }}
ENV BOOST_INCLUDEDIR /usr/include/boost169
ENV BOOST_LIBRARYDIR /usr/lib64/boost169
ENV BOOST_INCLUDEDIR /usr/include/boost1.78
ENV BOOST_LIBRARYDIR /usr/lib64/boost1.78
VOLUME [ "/usr/src/tdesktop" ]
ENTRYPOINT [ "scl", "enable", "rh-python38", "--", "scl", "enable", "llvm-toolset-7.0", "--", "scl", "enable", "devtoolset-10", "--" ]
ENTRYPOINT [ "scl", "enable", "gcc-toolset-12", "--" ]
CMD [ "/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh" ]

@ -1 +1 @@
Subproject commit fbd025a28bc25525f842a7a1934e112549e04b35
Subproject commit 28db382a7471854fea4d41133becdcc6c161d907

@ -1 +1 @@
Subproject commit 3d7e1e1f1321c3defd21c01882d674e485ecd8df
Subproject commit 078006d29af0002e6cd8c61a405cdeaf65b37142

@ -1 +1 @@
Subproject commit 135cb95b1606b9051b3a150a99b9db9c20bb1c11
Subproject commit ab2a9d1c19b948a05b216801f8ba4fea0759428a

2
cmake

@ -1 +1 @@
Subproject commit 491a7fdbae6629dd06a53fc17ac06e6827f4b295
Subproject commit 5735ef13c72bac000ab1b402cbc4ce7bdd2b353a