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: jobs:
linux: linux:
name: CentOS 7 name: Rocky Linux 8
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/${{ github.repository }}/centos_env image: ghcr.io/${{ github.repository }}/centos_env
@ -51,7 +51,7 @@ jobs:
defaults: defaults:
run: 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: strategy:
matrix: matrix:

View File

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

View File

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

View File

@ -13,30 +13,25 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM centos:7 AS builder-base FROM rockylinux:8 AS builder-base
ENV LANG en_US.UTF-8 ENV LANG C.UTF-8
ENV LIBRARY_PATH /usr/local/lib64:/usr/local/lib:/lib64:/lib:/usr/lib64:/usr/lib ENV LIBRARY_PATH /usr/local/lib64:/usr/local/lib:/lib64:/lib:/usr/lib64:/usr/lib
ENV LD_LIBRARY_PATH $LIBRARY_PATH ENV LD_LIBRARY_PATH $LIBRARY_PATH
ENV PKG_CONFIG_PATH /usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig 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 \ RUN dnf -y install epel-release \
&& yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \ && dnf config-manager --set-enabled powertools \
&& yum -y install centos-release-scl \ && dnf -y install autoconf automake libtool pkgconfig make patch git \
&& yum -y install git rh-python38-python-pip rh-python38-python-devel \ python3.11-pip python3.11-devel gperf flex bison clang lld yasm \
autoconf automake libtool patch gperf flex \ file which perl-open perl-XML-Parser xorg-x11-util-macros \
fontconfig-devel freetype-devel libX11-devel at-spi2-core-devel alsa-lib-devel \ gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils \
pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel mesa-libgbm-devel \ libffi-devel fontconfig-devel freetype-devel libX11-devel \
libdrm-devel vulkan-devel libva-devel libvdpau-devel boost169-devel fmt-devel \ alsa-lib-devel pulseaudio-libs-devel mesa-libGL-devel mesa-libEGL-devel \
gtk3-devel perl-XML-Parser pkgconfig bison yasm file which xorg-x11-util-macros \ mesa-libgbm-devel libdrm-devel vulkan-devel libva-devel libvdpau-devel \
devtoolset-10-make devtoolset-10-gcc devtoolset-10-gcc-c++ \ glib2-devel at-spi2-core-devel gtk3-devel boost1.78-devel fmt-devel \
devtoolset-10-binutils llvm-toolset-7.0 llvm-toolset-7.0-clang-devel \ && dnf clean all
llvm-toolset-7.0-llvm-devel \
&& yum clean all
# Fix a bug with argument naming in CentOS 7 glibc SHELL [ "bash", "-c", ". /opt/rh/gcc-toolset-12/enable; exec bash -c \"$@\"", "-s"]
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"]
WORKDIR {{ LibrariesPath }} WORKDIR {{ LibrariesPath }}
@ -52,14 +47,14 @@ FROM builder-base AS builder
ENV AR gcc-ar ENV AR gcc-ar
ENV RANLIB gcc-ranlib ENV RANLIB gcc-ranlib
ENV NM gcc-nm 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 ENV CXXFLAGS $CFLAGS
FROM builder AS patches FROM builder AS patches
RUN git init patches \ RUN git init patches \
&& cd patches \ && cd patches \
&& git remote add origin {{ GIT }}/desktop-app/patches.git \ && 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 \ && git reset --hard FETCH_HEAD \
&& rm -rf .git && rm -rf .git
@ -74,16 +69,6 @@ RUN git clone -b nasm-2.15.05 --depth=1 {{ GIT }}/netwide-assembler/nasm.git \
&& cd .. \ && cd .. \
&& rm -rf nasm && 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 FROM builder AS zlib
RUN git clone -b v1.2.11 --depth=1 {{ GIT }}/madler/zlib.git \ RUN git clone -b v1.2.11 --depth=1 {{ GIT }}/madler/zlib.git \
&& cd zlib \ && cd zlib \
@ -488,8 +473,6 @@ RUN git clone -b libXcomposite-0.4.5 --depth=1 {{ GIT_FREEDESKTOP }}/libxcomposi
&& rm -rf libxcomposite && rm -rf libxcomposite
FROM builder AS wayland FROM builder AS wayland
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
RUN git clone -b 1.19.0 --depth=1 {{ GIT_FREEDESKTOP }}/wayland.git \ RUN git clone -b 1.19.0 --depth=1 {{ GIT_FREEDESKTOP }}/wayland.git \
&& cd wayland \ && cd wayland \
&& sed -i "/subdir('tests')/d" meson.build \ && 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 && rm -rf libxkbcommon
FROM patches AS glibmm FROM patches AS glibmm
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
RUN git clone -b 2.77.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \ RUN git clone -b 2.77.0 --depth=1 {{ GIT }}/GNOME/glibmm.git \
&& cd glibmm \ && cd glibmm \
&& git apply ../patches/glibmm.patch \ && 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 && rm -rf glibmm
FROM builder AS gobject-introspection FROM builder AS gobject-introspection
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=glibmm {{ LibrariesPath }}/glibmm-cache / COPY --link --from=glibmm {{ LibrariesPath }}/glibmm-cache /
RUN git clone -b 1.76.1 --depth=1 {{ GIT }}/GNOME/gobject-introspection.git \ 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 && rm -rf gobject-introspection
FROM patches AS qt FROM patches AS qt
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache / COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
COPY --link --from=libproxy {{ LibrariesPath }}/libproxy-cache / COPY --link --from=libproxy {{ LibrariesPath }}/libproxy-cache /
COPY --link --from=lcms2 {{ LibrariesPath }}/lcms2-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 \ -qt-pcre \
-no-icu \ -no-icu \
-no-feature-xcb-sm \ -no-feature-xcb-sm \
-no-feature-egl-extension-platform-wayland \
-static \ -static \
-dbus-runtime \ -dbus-runtime \
-openssl-linked \ -openssl-linked \
@ -862,7 +840,6 @@ RUN cmake --build out --config Debug --parallel \
{%- endif %} {%- endif %}
FROM builder-base FROM builder-base
COPY --link --from=libffi {{ LibrariesPath }}/libffi-cache /
COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache / COPY --link --from=zlib {{ LibrariesPath }}/zlib-cache /
COPY --link --from=xz {{ LibrariesPath }}/xz-cache / COPY --link --from=xz {{ LibrariesPath }}/xz-cache /
COPY --link --from=protobuf {{ LibrariesPath }}/protobuf protobuf 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 WORKDIR ../tdesktop
ENV QT {{ QT }} ENV QT {{ QT }}
ENV OPENSSL_ROOT_DIR {{ OPENSSL_PREFIX }} ENV OPENSSL_ROOT_DIR {{ OPENSSL_PREFIX }}
ENV BOOST_INCLUDEDIR /usr/include/boost169 ENV BOOST_INCLUDEDIR /usr/include/boost1.78
ENV BOOST_LIBRARYDIR /usr/lib64/boost169 ENV BOOST_LIBRARYDIR /usr/lib64/boost1.78
VOLUME [ "/usr/src/tdesktop" ] 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" ] 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