1
0

Accepting request 522975 from home:badshah400:Telegram

Update to version 1.1.23; refresh third party sources; patch to fix breakpad building with glibc-2.26 (for openSUSE > 1320)

OBS-URL: https://build.opensuse.org/request/show/522975
OBS-URL: https://build.opensuse.org/package/show/server:messaging/telegram-desktop?expand=0&rev=26
This commit is contained in:
Xu Zhao 2017-09-11 13:11:23 +00:00 committed by Git OBS Bridge
parent 53a244aea4
commit 75df68587b
13 changed files with 11933 additions and 56 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d0b2daaaca0925a08b21a92637f79edc047063784f4a74e558abdc100940dee
size 69329
oid sha256:42d3448260c72fd1dc57a420d893588a27db6b97e1a9bf240f3ee39d74a60911
size 71929

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:863b17993f4fbcb7b8e76381f22d2cf2d383d74f6530143a01f2fc1489cf2edc
size 5183382
oid sha256:aaa2037e8635f192739bde7e20523a88a03bbfa51fd83fd20a2158f798b5caa4
size 5304734

View File

@ -0,0 +1,233 @@
diff --git a/client/linux/dump_writer_common/ucontext_reader.cc b/client/linux/dump_writer_common/ucontext_reader.cc
index c80724d..052ce37 100644
--- a/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/client/linux/dump_writer_common/ucontext_reader.cc
@@ -36,19 +36,19 @@
// Minidump defines register structures which are different from the raw
// structures which we get from the kernel. These are platform specific
-// functions to juggle the ucontext and user structures into minidump format.
+// functions to juggle the ucontext_t and user structures into minidump format.
#if defined(__i386__)
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gregs[REG_ESP];
}
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gregs[REG_EIP];
}
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct _libc_fpstate* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
@@ -88,15 +88,15 @@
#elif defined(__x86_64)
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gregs[REG_RSP];
}
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gregs[REG_RIP];
}
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct _libc_fpstate* fpregs) {
const greg_t* regs = uc->uc_mcontext.gregs;
@@ -145,15 +145,15 @@
#elif defined(__ARM_EABI__)
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.arm_sp;
}
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
return uc->uc_mcontext.arm_pc;
}
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
out->context_flags = MD_CONTEXT_ARM_FULL;
out->iregs[0] = uc->uc_mcontext.arm_r0;
@@ -184,15 +184,15 @@
#elif defined(__aarch64__)
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.sp;
}
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
return uc->uc_mcontext.pc;
}
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct fpsimd_context* fpregs) {
out->context_flags = MD_CONTEXT_ARM64_FULL;
@@ -210,15 +210,15 @@
#elif defined(__mips__)
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
}
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
return uc->uc_mcontext.pc;
}
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
#if _MIPS_SIM == _ABI64
out->context_flags = MD_CONTEXT_MIPS64_FULL;
#elif _MIPS_SIM == _ABIO32
diff --git a/client/linux/dump_writer_common/ucontext_reader.h b/client/linux/dump_writer_common/ucontext_reader.h
index b6e77b4..2de80b7 100644
--- a/client/linux/dump_writer_common/ucontext_reader.h
+++ b/client/linux/dump_writer_common/ucontext_reader.h
@@ -39,23 +39,23 @@
namespace google_breakpad {
-// Wraps platform-dependent implementations of accessors to ucontext structs.
+// Wraps platform-dependent implementations of accessors to ucontext_t structs.
struct UContextReader {
- static uintptr_t GetStackPointer(const struct ucontext* uc);
+ static uintptr_t GetStackPointer(const ucontext_t* uc);
- static uintptr_t GetInstructionPointer(const struct ucontext* uc);
+ static uintptr_t GetInstructionPointer(const ucontext_t* uc);
- // Juggle a arch-specific ucontext into a minidump format
+ // Juggle a arch-specific ucontext_t into a minidump format
// out: the minidump structure
// info: the collection of register structures.
#if defined(__i386__) || defined(__x86_64)
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct _libc_fpstate* fp);
#elif defined(__aarch64__)
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
const struct fpsimd_context* fpregs);
#else
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
#endif
};
diff --git a/client/linux/handler/exception_handler.cc b/client/linux/handler/exception_handler.cc
index 586d84e..05936d2 100644
--- a/client/linux/handler/exception_handler.cc
+++ b/client/linux/handler/exception_handler.cc
@@ -457,9 +457,9 @@
// Fill in all the holes in the struct to make Valgrind happy.
memset(&g_crash_context_, 0, sizeof(g_crash_context_));
memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
+ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t));
#if defined(__aarch64__)
- struct ucontext* uc_ptr = (struct ucontext*)uc;
+ ucontext_t* uc_ptr = (ucontext_t*)uc;
struct fpsimd_context* fp_ptr =
(struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
if (fp_ptr->head.magic == FPSIMD_MAGIC) {
@@ -468,9 +468,9 @@
}
#elif !defined(__ARM_EABI__) && !defined(__mips__)
// FP state is not part of user ABI on ARM Linux.
- // In case of MIPS Linux FP state is already part of struct ucontext
+ // In case of MIPS Linux FP state is already part of ucontext_t
// and 'float_state' is not a member of CrashContext.
- struct ucontext* uc_ptr = (struct ucontext*)uc;
+ ucontext_t* uc_ptr = (ucontext_t*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
sizeof(g_crash_context_.float_state));
@@ -494,7 +494,7 @@
// ExceptionHandler::HandleSignal().
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
- struct ucontext context;
+ ucontext_t context;
getcontext(&context);
return HandleSignal(sig, &siginfo, &context);
}
diff --git a/client/linux/handler/exception_handler.h b/client/linux/handler/exception_handler.h
index daba57e..d246f60 100644
--- a/client/linux/handler/exception_handler.h
+++ b/client/linux/handler/exception_handler.h
@@ -191,11 +191,11 @@
struct CrashContext {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
- struct ucontext context;
+ ucontext_t context;
#if !defined(__ARM_EABI__) && !defined(__mips__)
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
- // In case of MIPS Linux FP state is already part of struct
- // ucontext so 'float_state' is not required.
+ // In case of MIPS Linux FP state is already part of ucontext_t so
+ // 'float_state' is not required.
fpstate_t float_state;
#endif
};
diff --git a/client/linux/microdump_writer/microdump_writer.cc b/client/linux/microdump_writer/microdump_writer.cc
index 5c3c751..41dc450 100644
--- a/client/linux/microdump_writer/microdump_writer.cc
+++ b/client/linux/microdump_writer/microdump_writer.cc
@@ -604,7 +604,7 @@
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
- const struct ucontext* const ucontext_;
+ const ucontext_t* const ucontext_;
#if !defined(__ARM_EABI__) && !defined(__mips__)
const google_breakpad::fpstate_t* const float_state_;
#endif
diff --git a/client/linux/minidump_writer/minidump_writer.cc b/client/linux/minidump_writer/minidump_writer.cc
index d11ba6e..c716143 100644
--- a/client/linux/minidump_writer/minidump_writer.cc
+++ b/client/linux/minidump_writer/minidump_writer.cc
@@ -1323,7 +1323,7 @@
const int fd_; // File descriptor where the minidum should be written.
const char* path_; // Path to the file where the minidum should be written.
- const struct ucontext* const ucontext_; // also from the signal handler
+ const ucontext_t* const ucontext_; // also from the signal handler
#if !defined(__ARM_EABI__) && !defined(__mips__)
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif

11606
catch.hpp Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1aadeb32f93abfef23c120497403d36b69c9d13a377580450fd561bacaf99c3
size 625904
oid sha256:e8965d477c62d7eac987df253be8ab2e4b3a54c1c40f83d244108f0794bdf26c
size 628466

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb6cf0581e6654b25d3e42534f6fc75497892ef18d77c643bef8f15faed41c2f
size 570334
oid sha256:8097bccebb904800f06bc10d1f258150930df3f9de1aaed27b21bb83f3387790
size 574566

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0935a712c40d5458e82a69812757f7c811ad1ff7367b990f9872a9e025e37864
size 28288
oid sha256:84a67a948080c52354fe27ff8b1c9d74046bf083f7ca28472916597072843133
size 30117

View File

@ -1,7 +1,7 @@
Index: tdesktop-1.1.19/Telegram/gyp/qt.gypi
Index: tdesktop-1.1.23/Telegram/gyp/qt.gypi
===================================================================
--- tdesktop-1.1.19.orig/Telegram/gyp/qt.gypi
+++ tdesktop-1.1.19/Telegram/gyp/qt.gypi
--- tdesktop-1.1.23.orig/Telegram/gyp/qt.gypi
+++ tdesktop-1.1.23/Telegram/gyp/qt.gypi
@@ -38,7 +38,6 @@
'Qt5Network',
'Qt5Widgets',
@ -55,28 +55,27 @@ Index: tdesktop-1.1.19/Telegram/gyp/qt.gypi
'<@(qt_libs_release)',
'<(linux_lib_ssl)',
'<(linux_lib_crypto)',
@@ -231,14 +213,29 @@
'dbus-1',
'dl',
'gthread-2.0',
+ 'jpeg',
'glib-2.0',
'pthread',
+ 'GL',
+ 'freetype',
+ 'fontconfig',
+ 'Xi',
+ 'SM',
+ 'ICE',
+ 'proxy',
+ 'z',
+ '<!(pkg-config 2> /dev/null --libs xkbcommon xkbcommon-x11)',
+ '<!(pkg-config 2> /dev/null --libs libpcre16)',
+ '<!(pkg-config 2> /dev/null --libs zlib)',
+ '<!(pkg-config 2> /dev/null --libs libpng16)',
+ '<!(pkg-config 2> /dev/null --libs libwebp)',
+ '<!(pkg-config 2> /dev/null --libs harfbuzz)',
+ '<!(pkg-config 2> /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)',
@@ -233,12 +215,28 @@
'-lgthread-2.0',
'-lglib-2.0',
'-lpthread',
+ '-ljpeg',
+ '-lGL',
+ '-lfreetype',
+ '-lfontconfig',
+ '-lXi',
+ '-lSM',
+ '-lICE',
+ '-lproxy',
+ '-lz',
+ '<!(pkg-config 2> /dev/null --libs xkbcommon xkbcommon-x11)',
+ '<!(pkg-config 2> /dev/null --libs libpcre16)',
+ '<!(pkg-config 2> /dev/null --libs zlib)',
+ '<!(pkg-config 2> /dev/null --libs libpng16)',
+ '<!(pkg-config 2> /dev/null --libs libwebp)',
+ '<!(pkg-config 2> /dev/null --libs harfbuzz)',
+ '<!(pkg-config 2> /dev/null --libs xcb-shm xcb-xfixes xcb-render xcb-renderutil xcb-sync xcb-randr xcb-xinerama xcb-xkb xcb-icccm xcb-image xcb-shape xcb-keysyms xcb-util)',
+
],
'include_dirs': [
'<(qt_loc)/mkspecs/linux-g++',
@ -86,10 +85,10 @@ Index: tdesktop-1.1.19/Telegram/gyp/qt.gypi
'-pthread',
'-g',
'-rdynamic',
Index: tdesktop-1.1.19/Telegram/gyp/telegram_linux.gypi
Index: tdesktop-1.1.23/Telegram/gyp/telegram_linux.gypi
===================================================================
--- tdesktop-1.1.19.orig/Telegram/gyp/telegram_linux.gypi
+++ tdesktop-1.1.19/Telegram/gyp/telegram_linux.gypi
--- tdesktop-1.1.23.orig/Telegram/gyp/telegram_linux.gypi
+++ tdesktop-1.1.23/Telegram/gyp/telegram_linux.gypi
@@ -21,11 +21,20 @@
'conditions': [[ 'build_linux', {
'variables': {
@ -175,11 +174,11 @@ Index: tdesktop-1.1.19/Telegram/gyp/telegram_linux.gypi
],
'configurations': {
'Release': {
Index: tdesktop-1.1.19/Telegram/gyp/Telegram.gyp
Index: tdesktop-1.1.23/Telegram/gyp/Telegram.gyp
===================================================================
--- tdesktop-1.1.19.orig/Telegram/gyp/Telegram.gyp
+++ tdesktop-1.1.19/Telegram/gyp/Telegram.gyp
@@ -84,10 +84,13 @@
--- tdesktop-1.1.23.orig/Telegram/gyp/Telegram.gyp
+++ tdesktop-1.1.23/Telegram/gyp/Telegram.gyp
@@ -85,10 +85,13 @@
],
'defines': [
@ -194,10 +193,10 @@ Index: tdesktop-1.1.19/Telegram/gyp/Telegram.gyp
],
'include_dirs': [
Index: tdesktop-1.1.19/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
Index: tdesktop-1.1.23/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
===================================================================
--- tdesktop-1.1.19.orig/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
+++ tdesktop-1.1.19/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
--- tdesktop-1.1.23.orig/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
+++ tdesktop-1.1.23/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
@@ -13,7 +13,7 @@
'variables': {
'tgvoip_src_loc': '.',
@ -207,10 +206,10 @@ Index: tdesktop-1.1.19/Telegram/ThirdParty/libtgvoip/libtgvoip.gyp
},
'include_dirs': [
'<(tgvoip_src_loc)/webrtc_dsp',
Index: tdesktop-1.1.19/Telegram/gyp/settings_linux.gypi
Index: tdesktop-1.1.23/Telegram/gyp/settings_linux.gypi
===================================================================
--- tdesktop-1.1.19.orig/Telegram/gyp/settings_linux.gypi
+++ tdesktop-1.1.19/Telegram/gyp/settings_linux.gypi
--- tdesktop-1.1.23.orig/Telegram/gyp/settings_linux.gypi
+++ tdesktop-1.1.23/Telegram/gyp/settings_linux.gypi
@@ -36,6 +36,7 @@
'-Wno-unused-but-set-variable',
'-Wno-missing-field-initializers',

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Fri Sep 8 16:06:12 UTC 2017 - badshah400@gmail.com
- Update to version 1.1.23:
* See the message author photo and name while searching specific
chat messages.
* Fix "Send To" menu action on Windows.
- Rebase and rename patch-1.1.19.diff to patch-1.1.23.diff.
- Add catch.hpp as source and copy to required dir; remove
includes referring to subdirs of catch as we are using the one
header version.
- Refresh all third-party sources to their current versions.
- Add breakpad-ucontext_t-glibc2_26.patch: Replace
`struct ucontext` by `ucontext_t` to make breakpad compatible
with glib-2.26; merged upstream as commit e3035bc; only apply
for openSUSE > 1320.
-------------------------------------------------------------------
Wed Aug 2 05:23:10 UTC 2017 - badshah400@gmail.com

View File

@ -17,22 +17,31 @@
Name: telegram-desktop
Version: 1.1.19
Version: 1.1.23
Release: 0
Summary: A new era of messaging
License: GPL-3.0
Url: https://github.com/telegramdesktop/tdesktop
Source: https://github.com/telegramdesktop/tdesktop/archive/v%{version}.tar.gz
# curl https://chromium.googlesource.com/breakpad/breakpad/+archive/refs/heads/master.tar.gz -o breakpad-master.tar.gz
Source1: breakpad-master.tar.gz
# curl https://chromium.googlesource.com/linux-syscall-support/+archive/master.tar.gz -o linux-syscall-support-refs-heads-master.tar.gz
Source2: linux-syscall-support-refs-heads-master.tar.gz
# curl https://chromium.googlesource.com/external/gyp/+archive/master.tar.gz -o gyp-master.tar.gz
Source3: gyp-master.tar.gz
Source4: patch-%{version}.diff
# curl https://codeload.github.com/Microsoft/GSL/zip/master -o GSL-master.zip
Source5: GSL-master.zip
# curl https://codeload.github.com/mapbox/variant/zip/master -o variant-master.zip
Source6: variant-master.zip
# curl https://codeload.github.com/grishka/libtgvoip/zip/public -o libtgvoip.zip
Source7: libtgvoip.zip
# curl https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp -o catch.hpp
Source8: catch.hpp
# PATCH-FIX-UPSTREAM breakpad-ucontext_t-glibc2_26.patch badshah400@gmail.com -- Replace `struct ucontext` by `ucontext_t` to make compatible with glib-2.26; merged upstream
Patch0: breakpad-ucontext_t-glibc2_26.patch
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: cmake glibc-devel
BuildRequires: desktop-file-utils
BuildRequires: ffmpeg-devel
BuildRequires: fontconfig-devel
@ -41,7 +50,7 @@ BuildRequires: freetype-devel
BuildRequires: gcc6-c++ >= 6.2
BuildRequires: libgcc_s1 >= 6.2
%else
BuildRequires: gcc-c++ >= 5.0
BuildRequires: gcc-c++
%endif
BuildRequires: libXfixes-devel
BuildRequires: libexpat-devel
@ -106,6 +115,10 @@ Telegram Desktop app. A new era of messaging.
%setup -q -n tdesktop-%{version}
cp %{_sourcedir}/patch-%{version}.diff .
cp %{S:8} Telegram/SourceFiles/base/
# Already included in %{S:8}
sed -i "/catch_reporter_compact.hpp/d" Telegram/SourceFiles/base/tests_main.cpp
rm -rf %{_builddir}/tdesktop-%{version}/ThirdParty/*
@ -125,11 +138,18 @@ mv libtgvoip %{_builddir}/tdesktop-%{version}/Telegram/ThirdParty/
%setup -q -T -c -n breakpad-lss -b 2
%setup -q -T -c -n gyp -b 3
%if 0%{?suse_version} > 1320
pushd %{_builddir}/breakpad/src
%patch0 -p1
popd
%endif
%build
# generate patch
# git diff --relative-directory=./a a b
# Setup compiler variables
mv %{_builddir}/tdesktop-%{version} %{_builddir}/tdesktop
mkdir -p %{_builddir}/Libraries
@ -166,7 +186,9 @@ patch -p1 < patch-%{version}.diff
cd %{_builddir}/tdesktop/Telegram/gyp
# patch qt.gypi to change libxkbcommon path
../../../Libraries/gyp/gyp \
%if 0%{?suse_version} <= 1320
-DCMAKE_CXX_COMPILER='g++-6' \
%endif
-Dlinux_path_qt="%{_builddir}/Libraries/QtStatic" \
-Dqt_version="5.6.2" \
-Dlinux_lib_ssl=-lssl \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a1dceffb4ba3039d1ca7ad3859616556ac46ada3c6ea8425b23569500b705ada
size 16839630

3
v1.1.23.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56b7fce84adf85a4af1c3174353169f32d0b0c052a4e7a284fc741fa96b04030
size 16863984

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c30b6528886e32043b3a22fb3f4a431678f4ce45adfd165de6b52dac5148ec6
size 112798
oid sha256:a8eade59e7425b2670a2e6c84c7f1921979e765fff0d08aef3ceb607747bb8ad
size 126356