[telegram-desktop/f30: 2/2] Switched to clang as temporary workaround until GCC regression will be resolved.
by Vitaly Zaitsev
commit 1eafaf3ef9dd6068e98589213291567458c324a1
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Sat May 18 21:58:12 2019 +0200
Switched to clang as temporary workaround until GCC regression will be
resolved.
telegram-desktop-build-fixes.patch | 47 +++++++++++++--------------
telegram-desktop-pr-6025.patch | 36 +++++++++++++++++++++
telegram-desktop-rr-ddb9c8.patch | 57 +++++++++++++++++++++++++++++++++
telegram-desktop-system-fonts.patch | 2 +-
telegram-desktop-unbundle-minizip.patch | 2 +-
telegram-desktop.spec | 41 ++++++++++++++++++++----
6 files changed, 152 insertions(+), 33 deletions(-)
---
diff --git a/telegram-desktop-build-fixes.patch b/telegram-desktop-build-fixes.patch
index ff04825..5fd721e 100644
--- a/telegram-desktop-build-fixes.patch
+++ b/telegram-desktop-build-fixes.patch
@@ -1,4 +1,4 @@
-From da1d8b4e977d9b9d834fe2392bfd260d3ce85f57 Mon Sep 17 00:00:00 2001
+From 6eebdb636516c5248ca2b3f2089d575c67a4c023 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri, 31 Mar 2017 14:29:58 +0200
Subject: [PATCH 1/3] Fixed build under Fedora using rpmbuild and mock.
@@ -6,7 +6,7 @@ Subject: [PATCH 1/3] Fixed build under Fedora using rpmbuild and mock.
---
Telegram/Resources/qrc/telegram.qrc | 3 -
Telegram/Resources/qrc/telegram_linux.qrc | 6 --
- Telegram/SourceFiles/core/launcher.cpp | 3 +-
+ Telegram/SourceFiles/core/launcher.cpp | 1 +
Telegram/SourceFiles/qt_functions.cpp | 94 +++++++++++++++++++++++
Telegram/gyp/CMakeLists.inj | 6 ++
Telegram/gyp/PrecompiledHeader.cmake | 4 +-
@@ -19,12 +19,12 @@ Subject: [PATCH 1/3] Fixed build under Fedora using rpmbuild and mock.
Telegram/gyp/qt.gypi | 87 ++++++---------------
Telegram/gyp/qt_moc.gypi | 5 +-
Telegram/gyp/qt_rcc.gypi | 2 +-
- Telegram/gyp/settings_linux.gypi | 13 ----
+ Telegram/gyp/settings_linux.gypi | 25 +-----
Telegram/gyp/telegram_linux.gypi | 73 +++++-------------
Telegram/gyp/telegram_sources.txt | 2 +-
lib/xdg/telegramdesktop.appdata.xml | 2 +-
lib/xdg/telegramdesktop.desktop | 5 +-
- 20 files changed, 172 insertions(+), 189 deletions(-)
+ 20 files changed, 172 insertions(+), 199 deletions(-)
create mode 100644 Telegram/SourceFiles/qt_functions.cpp
create mode 100644 Telegram/gyp/CMakeLists.inj
@@ -56,18 +56,9 @@ index 164e8d4f2..03585ec03 100644
- </qresource>
</RCC>
diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
-index 3efa53eba..098b1f4c0 100644
+index 3efa53eba..4427ceae6 100644
--- a/Telegram/SourceFiles/core/launcher.cpp
+++ b/Telegram/SourceFiles/core/launcher.cpp
-@@ -242,7 +242,7 @@ void Launcher::init() {
- QApplication::setApplicationName(qsl("TelegramDesktop"));
-
- #if defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
-- QApplication::setDesktopFileName(qsl("telegramdesktop.desktop"));
-+ QApplication::setDesktopFileName(qsl("telegram-desktop.desktop"));
- #endif
- #ifndef OS_MAC_OLD
- QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
@@ -264,6 +264,7 @@ int Launcher::exec() {
Logs::start(this); // must be started before Platform is started
Platform::start(); // must be started before Sandbox is created
@@ -618,7 +609,7 @@ index f5624a82b..b644ce29f 100644
'-no-compress',
'<(RULE_INPUT_PATH)',
diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi
-index 22160515c..2ee5cc7ab 100644
+index 22160515c..ca44eeb16 100644
--- a/Telegram/gyp/settings_linux.gypi
+++ b/Telegram/gyp/settings_linux.gypi
@@ -9,10 +9,6 @@
@@ -632,17 +623,25 @@ index 22160515c..2ee5cc7ab 100644
'-fPIC',
'-Wno-unused-variable',
'-Wno-unused-parameter',
-@@ -47,9 +43,6 @@
- }], [ '"<!(uname -p)" == "x86_64"', {
- # 32 bit version can't be linked with debug info or LTO,
- # virtual memory exhausted :(
+@@ -44,24 +40,10 @@
+ 'sources': [ '__Wrong_Official_Build_Target_<(official_build_target)_' ],
+ }],
+ ],
+- }], [ '"<!(uname -p)" == "x86_64"', {
+- # 32 bit version can't be linked with debug info or LTO,
+- # virtual memory exhausted :(
- 'cflags_c': [ '-g' ],
- 'cflags_cc': [ '-g' ],
- 'ldflags': [ '-g' ],
- 'configurations': {
- 'Release': {
- 'cflags_c': [ '-flto' ],
-@@ -61,7 +54,6 @@
+- 'configurations': {
+- 'Release': {
+- 'cflags_c': [ '-flto' ],
+- 'cflags_cc': [ '-flto' ],
+- 'ldflags': [ '-flto', '-fuse-linker-plugin' ],
+- },
+- },
+- }]
++ }],
],
'defines': [
'_REENTRANT',
@@ -650,7 +649,7 @@ index 22160515c..2ee5cc7ab 100644
'QT_PLUGIN',
],
'cflags_c': [
-@@ -73,11 +65,6 @@
+@@ -73,11 +55,6 @@
'-std=c++1z',
'-Wno-register',
],
diff --git a/telegram-desktop-pr-6025.patch b/telegram-desktop-pr-6025.patch
new file mode 100644
index 0000000..5c13ba5
--- /dev/null
+++ b/telegram-desktop-pr-6025.patch
@@ -0,0 +1,36 @@
+From 59deda0ff8ede93f7e22ad2fc000c3f4f155a4ed Mon Sep 17 00:00:00 2001
+From: Vitaly Zaitsev <vitaly(a)easycoding.org>
+Date: Sat, 18 May 2019 20:47:23 +0200
+Subject: [PATCH] Fixed building of PCH using Clang compiler.
+
+Signed-off-by: Vitaly Zaitsev <vitaly(a)easycoding.org>
+---
+ Telegram/gyp/PrecompiledHeader.cmake | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake
+index a0e1e0489..dfe1193be 100644
+--- a/Telegram/gyp/PrecompiledHeader.cmake
++++ b/Telegram/gyp/PrecompiledHeader.cmake
+@@ -81,7 +81,7 @@ function(export_all_flags _filename _source_name_for_flags)
+ endfunction()
+
+ function(add_precompiled_header _target _input)
+- if(CMAKE_COMPILER_IS_GNUCXX)
++ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
+ get_filename_component(_name ${_input} NAME)
+ set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
+ set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch")
+@@ -163,5 +163,11 @@ function(add_precompiled_header _target _input)
+ OBJECT_DEPENDS "${_object_depends}")
+ endif()
+ endforeach()
+- endif(CMAKE_COMPILER_IS_GNUCXX)
++
++ if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
++ if(NOT _PCH_FORCEINCLUDE)
++ set(_PCH_FORCEINCLUDE ON)
++ endif()
++ endif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
++ endif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
+ endfunction()
diff --git a/telegram-desktop-rr-ddb9c8.patch b/telegram-desktop-rr-ddb9c8.patch
new file mode 100644
index 0000000..c57530d
--- /dev/null
+++ b/telegram-desktop-rr-ddb9c8.patch
@@ -0,0 +1,57 @@
+From 69960a47da0756be34e539975edad8f0a738d2ad Mon Sep 17 00:00:00 2001
+From: John Preston <johnprestonmail(a)gmail.com>
+Date: Fri, 10 May 2019 09:22:21 +0300
+Subject: [PATCH 3/4] Apply telegram-wayland-icon.patch from Flatpak version.
+
+---
+ Telegram/SourceFiles/core/launcher.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
+index 3efa53eba..f0273bfdd 100644
+--- a/Telegram/SourceFiles/core/launcher.cpp
++++ b/Telegram/SourceFiles/core/launcher.cpp
+@@ -241,7 +241,9 @@ void Launcher::init() {
+
+ QApplication::setApplicationName(qsl("TelegramDesktop"));
+
+-#if defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
++#ifdef TDESKTOP_FLATPAK_BUILD
++ QApplication::setDesktopFileName(qsl("org.telegram.desktop.desktop"));
++#elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
+ QApplication::setDesktopFileName(qsl("telegramdesktop.desktop"));
+ #endif
+ #ifndef OS_MAC_OLD
+
+From ddb9c84a1d4994e8c7a9ae04aacd4e890826a871 Mon Sep 17 00:00:00 2001
+From: Vitaly Zaitsev <vitaly(a)easycoding.org>
+Date: Fri, 10 May 2019 08:54:07 +0200
+Subject: [PATCH 4/4] Allow GNU/Linux maintainers to forward launcher name.
+
+Use optional compiler directive -DTDESKTOP_LAUNCHER_FILENAME to forward
+required XDG desktop file name.
+
+If not specified, fallback to default value will be used.
+
+Signed-off-by: Vitaly Zaitsev <vitaly(a)easycoding.org>
+---
+ Telegram/SourceFiles/core/launcher.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
+index f0273bfdd..b1246588a 100644
+--- a/Telegram/SourceFiles/core/launcher.cpp
++++ b/Telegram/SourceFiles/core/launcher.cpp
+@@ -241,8 +241,10 @@ void Launcher::init() {
+
+ QApplication::setApplicationName(qsl("TelegramDesktop"));
+
+-#ifdef TDESKTOP_FLATPAK_BUILD
+- QApplication::setDesktopFileName(qsl("org.telegram.desktop.desktop"));
++#ifdef TDESKTOP_LAUNCHER_FILENAME
++#define TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V) #V
++#define TDESKTOP_LAUNCHER_FILENAME_TO_STRING(V) TDESKTOP_LAUNCHER_FILENAME_TO_STRING_HELPER(V)
++ QApplication::setDesktopFileName(qsl(TDESKTOP_LAUNCHER_FILENAME_TO_STRING(TDESKTOP_LAUNCHER_FILENAME)));
+ #elif defined(Q_OS_LINUX) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
+ QApplication::setDesktopFileName(qsl("telegramdesktop.desktop"));
+ #endif
diff --git a/telegram-desktop-system-fonts.patch b/telegram-desktop-system-fonts.patch
index a9d411c..192f1d1 100644
--- a/telegram-desktop-system-fonts.patch
+++ b/telegram-desktop-system-fonts.patch
@@ -1,4 +1,4 @@
-From bc70c8fce71b80f2cefcc537298a2529506ce2a0 Mon Sep 17 00:00:00 2001
+From 3f9ccbabc7b6d8074786c953f95f08c1356d4edb Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Sun, 24 Jun 2018 22:59:34 +0200
Subject: [PATCH 2/3] Backported and rebased patch from Debian maintainer
diff --git a/telegram-desktop-unbundle-minizip.patch b/telegram-desktop-unbundle-minizip.patch
index 5a132bf..5f0f201 100644
--- a/telegram-desktop-unbundle-minizip.patch
+++ b/telegram-desktop-unbundle-minizip.patch
@@ -1,4 +1,4 @@
-From 3e81539f998510cde8376db4e5da3dc59cfaaf9a Mon Sep 17 00:00:00 2001
+From b455e4b41ef600fc9d274aa6d76c2db9e39d29d6 Mon Sep 17 00:00:00 2001
From: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Wed, 17 Oct 2018 17:57:59 +0200
Subject: [PATCH 3/3] Use packaged version of minizip on Fedora <= 29.
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 0ad03bc..1038ffc 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -1,5 +1,6 @@
# Build conditionals...
%bcond_without gtk3
+%bcond_without clang
# Telegram Desktop's constants...
%global appname tdesktop
@@ -13,10 +14,15 @@
# Decrease debuginfo verbosity to reduce memory consumption...
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
+# Applying workaround to RHBZ#1559007...
+%if %{with clang}
+%global optflags %(echo %{optflags} | sed -e 's/-mcet//g' -e 's/-fcf-protection//g' -e 's/-fstack-clash-protection//g')
+%endif
+
Summary: Telegram Desktop official messaging app
Name: telegram-desktop
Version: 1.7.0
-Release: 1%{?dist}
+Release: 2%{?dist}
# Application and 3rd-party modules licensing:
# * S0 (Telegram Desktop) - GPLv3+ with OpenSSL exception -- main source;
@@ -35,6 +41,9 @@ Patch0: %{name}-build-fixes.patch
Patch1: %{name}-system-fonts.patch
Patch2: %{name}-unbundle-minizip.patch
+Patch100: %{name}-pr-6025.patch
+Patch101: %{name}-rr-ddb9c8.patch
+
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
Requires: qt5-qtimageformats%{?_isa}
Requires: hicolor-icon-theme
@@ -74,6 +83,12 @@ BuildRequires: dee-devel
Requires: gtk3%{?_isa}
%endif
+%if %{with clang}
+BuildRequires: compiler-rt
+BuildRequires: clang
+BuildRequires: llvm
+%endif
+
%if 0%{?fedora} >= 30
BuildRequires: minizip-compat-devel
%else
@@ -127,14 +142,23 @@ popd
LEN=$(($(wc -l < out/Release/CMakeLists.txt) - 2))
sed -i "$LEN r Telegram/gyp/CMakeLists.inj" out/Release/CMakeLists.txt
-# Exporting correct paths to AR and RANLIB in order to use LTO optimizations...
-%ifarch x86_64
-sed -e '/set(configuration "Release")/a\' -e 'set(CMAKE_AR "%{_bindir}/gcc-ar")\' -e 'set(CMAKE_RANLIB "%{_bindir}/gcc-ranlib")\' -e 'set(CMAKE_NM "%{_bindir}/gcc-nm")' -i out/Release/CMakeLists.txt
-%endif
-
# Building Telegram Desktop using cmake...
pushd out/Release
- %cmake .
+ %cmake \
+%if %{with clang}
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
+ -DCMAKE_AR=%{_bindir}/llvm-ar \
+ -DCMAKE_RANLIB=%{_bindir}/llvm-ranlib \
+ -DCMAKE_LINKER=%{_bindir}/llvm-ld \
+ -DCMAKE_OBJDUMP=%{_bindir}/llvm-objdump \
+ -DCMAKE_NM=%{_bindir}/llvm-nm \
+%else
+ -DCMAKE_AR=%{_bindir}/gcc-ar \
+ -DCMAKE_RANLIB=%{_bindir}/gcc-ranlib \
+ -DCMAKE_NM=%{_bindir}/gcc-nm \
+%endif
+ .
%make_build
popd
@@ -170,6 +194,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.appdat
%{_metainfodir}/%{name}.appdata.xml
%changelog
+* Sat May 18 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.7.0-2
+- Switched to clang as temporary workaround.
+
* Thu May 09 2019 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.7.0-1
- Updated to 1.7.0.
5 years, 6 months
[buildsys-build-rpmfusion/el8] Fixup
by Nicolas Chauvet
commit 5ae1bb4bde204da2618495321a3c528dbe173c2d
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Sat May 18 00:12:52 2019 +0200
Fixup
buildsys-build-rpmfusion.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/buildsys-build-rpmfusion.spec b/buildsys-build-rpmfusion.spec
index d3ec142..9e60ccb 100644
--- a/buildsys-build-rpmfusion.spec
+++ b/buildsys-build-rpmfusion.spec
@@ -3,7 +3,7 @@
Name: buildsys-build-%{repo}
Epoch: 11
Version: 30
-Release: 1.%{?dist}
+Release: 1%{?dist}
Summary: Tools and files used by the %{repo} buildsys
License: MIT
5 years, 6 months
[buildsys-build-rpmfusion/el8] Add back dist
by Nicolas Chauvet
commit f17d4589811be2e9c1067b3b7d1d963c85d92ac8
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Sat May 18 00:12:08 2019 +0200
Add back dist
buildsys-build-rpmfusion.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/buildsys-build-rpmfusion.spec b/buildsys-build-rpmfusion.spec
index cf8b901..d3ec142 100644
--- a/buildsys-build-rpmfusion.spec
+++ b/buildsys-build-rpmfusion.spec
@@ -3,7 +3,7 @@
Name: buildsys-build-%{repo}
Epoch: 11
Version: 30
-Release: 1
+Release: 1.%{?dist}
Summary: Tools and files used by the %{repo} buildsys
License: MIT
5 years, 6 months
[buildsys-build-rpmfusion] Bump epoch
by Nicolas Chauvet
commit 308821da551958fe2c95edee3d7c1983d72ea974
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Sat May 18 00:09:41 2019 +0200
Bump epoch
buildsys-build-rpmfusion.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/buildsys-build-rpmfusion.spec b/buildsys-build-rpmfusion.spec
index 2dbfcec..c1217c3 100644
--- a/buildsys-build-rpmfusion.spec
+++ b/buildsys-build-rpmfusion.spec
@@ -1,7 +1,7 @@
%define repo rpmfusion
Name: buildsys-build-%{repo}
-Epoch: 10
+Epoch: 11
Version: 31
Release: 0.1
Summary: Tools and files used by the %{repo} buildsys
5 years, 6 months
[buildsys-build-rpmfusion/el8] Bump epoch
by Nicolas Chauvet
commit 648531b0ed3ce51386eb5bf49440b0153f334a5f
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Sat May 18 00:08:17 2019 +0200
Bump epoch
buildsys-build-rpmfusion.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/buildsys-build-rpmfusion.spec b/buildsys-build-rpmfusion.spec
index a88b7ab..cf8b901 100644
--- a/buildsys-build-rpmfusion.spec
+++ b/buildsys-build-rpmfusion.spec
@@ -1,7 +1,7 @@
%define repo rpmfusion
Name: buildsys-build-%{repo}
-Epoch: 10
+Epoch: 11
Version: 30
Release: 1
Summary: Tools and files used by the %{repo} buildsys
5 years, 6 months
[buildsys-build-rpmfusion/el8] rebuild for kernel 4.18.0-80.el8
by Nicolas Chauvet
commit bd8d1b8d1f8c4c939a36eb547908b67977fa95b2
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Sat May 18 00:02:22 2019 +0200
rebuild for kernel 4.18.0-80.el8
buildsys-build-rpmfusion-kerneldevpkgs-current | 8 ++++----
buildsys-build-rpmfusion.spec | 5 ++++-
2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/buildsys-build-rpmfusion-kerneldevpkgs-current b/buildsys-build-rpmfusion-kerneldevpkgs-current
index b7174b4..457a42c 100644
--- a/buildsys-build-rpmfusion-kerneldevpkgs-current
+++ b/buildsys-build-rpmfusion-kerneldevpkgs-current
@@ -1,4 +1,4 @@
-4.18.0-32.el8
-4.18.0-32.el8smp
-4.18.0-32.el8PAE
-4.18.0-32.el8lpae
+4.18.0-80.el8
+4.18.0-80.el8smp
+4.18.0-80.el8PAE
+4.18.0-80.el8lpae
diff --git a/buildsys-build-rpmfusion.spec b/buildsys-build-rpmfusion.spec
index fa0b700..a88b7ab 100644
--- a/buildsys-build-rpmfusion.spec
+++ b/buildsys-build-rpmfusion.spec
@@ -3,7 +3,7 @@
Name: buildsys-build-%{repo}
Epoch: 10
Version: 30
-Release: 0.3
+Release: 1
Summary: Tools and files used by the %{repo} buildsys
License: MIT
@@ -77,6 +77,9 @@ sed -i 's|^default_prefix=.*|default_prefix=%{_datadir}/%{name}/|' \
%changelog
+* Fri May 17 2019 Nicolas Chauvet <kwizart(a)gmail.com> - 10:30-1
+- rebuild for kernel 4.18.0-80.el8
+
* Wed Nov 21 2018 Nicolas Chauvet <kwizart(a)gmail.com> - 10:30-0.3
- rebuild for kernel 4.18.0-32.el8
5 years, 6 months
[gr-dab/f29] Disabled the tests
by Jaroslav Škarvada
Summary of changes:
935150c... Disabled the tests (*)
(*) This commit already existed in another branch; no separate mail sent
5 years, 6 months
[gr-dab/f30] Disabled the tests
by Jaroslav Škarvada
Summary of changes:
935150c... Disabled the tests (*)
(*) This commit already existed in another branch; no separate mail sent
5 years, 6 months