From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/
Date: Sat, 17 Jul 2021 20:05:31 +0000 (UTC) [thread overview]
Message-ID: <1626552284.d091935d85df82d49cf2473e21881b7a2e628deb.gyakovlev@gentoo> (raw)
commit: d091935d85df82d49cf2473e21881b7a2e628deb
Author: Esteve Varela Colominas <esteve.varela <AT> gmail <DOT> com>
AuthorDate: Sat Jul 17 10:39:22 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sat Jul 17 20:04:44 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d091935d
net-im/telegram-desktop: Drop jemalloc patch
Upstream clarified; The glibc allocator causes telegram to use excessive
amounts of memory, and never free it. That's a bug.
See-also: https://github.com/telegramdesktop/tdesktop/issues/16084
See-also: https://github.com/desktop-app/cmake_helpers/pull/91#issuecomment-881788003
Closes: https://github.com/gentoo/gentoo/pull/21688
Signed-off-by: Esteve Varela Colominas <esteve.varela <AT> gmail.com>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
...desktop-2.8.9-disable-jemalloc-separately.patch | 100 ---------------------
.../telegram-desktop-2.8.10.ebuild | 10 +--
2 files changed, 3 insertions(+), 107 deletions(-)
diff --git a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch b/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
deleted file mode 100644
index dff2455d4e3..00000000000
--- a/net-im/telegram-desktop/files/tdesktop-2.8.9-disable-jemalloc-separately.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-Allow controlling the use of jemalloc
-
-Jemalloc is often controlled through USE=jemalloc in Gentoo. Removing or
-replacing it is trivial, and I'm not aware of any particular advantages that
-come with using this allocator, especially for an IM client. Benchmarks
-regarding this allocator provide a huge variety of results depending on the
-workload and system, so it's hard to establish when this allocator provides any
-tangible advantage.
-
-Considering things like Hardened Gentoo, the user might prefer to use a more
-exploit-resistant allocator, like GrapheneOS/hardened_malloc, and I've heard
-Musl is hardening their allocator as well.
-
-I trust the user can better judge if they need this in their particular setup.
-
-If a telegram dev is reading this, feel free to drop me a message (metadata.xml
-contains the maintainer's address), if you believe it should be forced due to
-usability concerns, or if you can provide me with some context I might be
-missing. Jemalloc is currently enabled by default.
-
---- tdesktop-2.8.9-full.orig/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-+++ tdesktop-2.8.9-full/Telegram/SourceFiles/platform/linux/specific_linux.cpp
-@@ -48,7 +48,10 @@
- #include <gio/gio.h>
- #include <glibmm.h>
- #include <giomm.h>
-+
-+#ifndef DESKTOP_APP_DISABLE_JEMALLOC
- #include <jemalloc/jemalloc.h>
-+#endif // !DESKTOP_APP_DISABLE_JEMALLOC
-
- #include <sys/stat.h>
- #include <sys/types.h>
-@@ -727,8 +730,10 @@
- namespace Platform {
-
- void start() {
-+#ifndef DESKTOP_APP_DISABLE_JEMALLOC
- auto backgroundThread = true;
- mallctl("background_thread", nullptr, nullptr, &backgroundThread, sizeof(bool));
-+#endif // !DESKTOP_APP_DISABLE_JEMALLOC
-
- LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName()));
-
---- tdesktop-2.8.9-full.orig/cmake/external/CMakeLists.txt
-+++ tdesktop-2.8.9-full/cmake/external/CMakeLists.txt
-@@ -37,7 +37,7 @@
- add_checked_subdirectory(hunspell)
- endif()
- add_checked_subdirectory(iconv)
--if (LINUX)
-+if (LINUX AND NOT DESKTOP_APP_DISABLE_JEMALLOC)
- add_checked_subdirectory(jemalloc)
- endif()
- add_checked_subdirectory(jpeg)
---- tdesktop-2.8.9-full.orig/cmake/options.cmake
-+++ tdesktop-2.8.9-full/cmake/options.cmake
-@@ -56,6 +56,13 @@
- )
- endif()
-
-+if (DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_compile_definitions(common_options
-+ INTERFACE
-+ DESKTOP_APP_DISABLE_JEMALLOC
-+ )
-+endif()
-+
- if (DESKTOP_APP_USE_PACKAGED)
- target_compile_definitions(common_options
- INTERFACE
---- tdesktop-2.8.9-full.orig/cmake/options_linux.cmake
-+++ tdesktop-2.8.9-full/cmake/options_linux.cmake
-@@ -58,10 +58,12 @@
- endif()
- endif()
-
--target_link_libraries(common_options
--INTERFACE
-- desktop-app::external_jemalloc
--)
-+if (NOT DESKTOP_APP_DISABLE_JEMALLOC)
-+ target_link_libraries(common_options
-+ INTERFACE
-+ desktop-app::external_jemalloc
-+ )
-+endif()
-
- if (DESKTOP_APP_USE_PACKAGED)
- find_library(ATOMIC_LIBRARY atomic)
---- tdesktop-2.8.9-full.orig/cmake/variables.cmake
-+++ tdesktop-2.8.9-full/cmake/variables.cmake
-@@ -38,6 +38,7 @@
- option(DESKTOP_APP_USE_PACKAGED_FFMPEG_STATIC "Link ffmpeg statically in packaged mode." OFF)
- option(DESKTOP_APP_DISABLE_SPELLCHECK "Disable spellcheck library." ${osx_special_target})
- option(DESKTOP_APP_DISABLE_WEBKIT "Disable WebkitGTK library (Linux only)." OFF)
-+option(DESKTOP_APP_DISABLE_JEMALLOC "Disable use of the jemalloc allocator (Linux only)." OFF)
- option(DESKTOP_APP_DISABLE_CRASH_REPORTS "Disable crash report generation." ${no_special_target})
- option(DESKTOP_APP_DISABLE_AUTOUPDATE "Disable autoupdate." ${disable_autoupdate})
- option(DESKTOP_APP_USE_HUNSPELL_ONLY "Disable system spellchecker and use bundled Hunspell only. (For debugging purposes)" OFF)
diff --git a/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
index 69bfb7c3a17..e738b91f41d 100644
--- a/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
+++ b/net-im/telegram-desktop/telegram-desktop-2.8.10.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v${PV}/${
LICENSE="BSD GPL-3-with-openssl-exception LGPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64"
-IUSE="+dbus enchant +gtk +hunspell +jemalloc +spell wayland webkit +X"
+IUSE="+dbus enchant +gtk +hunspell +spell wayland webkit +X"
REQUIRED_USE="
spell? (
^^ ( enchant hunspell )
@@ -29,6 +29,7 @@ RDEPEND="
!net-im/telegram-desktop-bin
app-arch/lz4:=
dev-cpp/glibmm:2
+ dev-libs/jemalloc:=
dev-libs/xxhash
>=dev-qt/qtcore-5.15:5
>=dev-qt/qtgui-5.15:5[dbus?,jpeg,png,wayland?,X(-)?]
@@ -53,7 +54,6 @@ RDEPEND="
enchant? ( app-text/enchant:= )
gtk? ( x11-libs/gtk+:3[X?,wayland?] )
hunspell? ( >=app-text/hunspell-1.7:= )
- jemalloc? ( dev-libs/jemalloc:= )
wayland? ( kde-frameworks/kwayland:= )
webkit? ( net-libs/webkit-gtk:= )
X? ( x11-libs/libxcb:= )
@@ -74,9 +74,6 @@ PATCHES=(
# https://github.com/desktop-app/cmake_helpers/pull/91
# https://github.com/desktop-app/lib_webview/pull/2
"${FILESDIR}/tdesktop-2.8.9-disable-webkit-separately.patch"
- # Not going to attempt upstreaming this after the reaction to
- # "disable-webkit-separately"
- "${FILESDIR}/tdesktop-2.8.9-disable-jemalloc-separately.patch"
# Not a proper fix, not upstreamed
"${FILESDIR}/tdesktop-2.8.9-webview-fix-glib.patch"
)
@@ -110,7 +107,6 @@ src_configure() {
-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=$(usex dbus OFF ON)
-DDESKTOP_APP_DISABLE_GTK_INTEGRATION=$(usex gtk OFF ON)
-DDESKTOP_APP_DISABLE_WEBKIT=$(usex webkit OFF ON)
- -DDESKTOP_APP_DISABLE_JEMALLOC=$(usex jemalloc OFF ON)
-DDESKTOP_APP_DISABLE_SPELLCHECK=$(usex spell OFF ON) # enables hunspell (recommended)
-DDESKTOP_APP_USE_ENCHANT=$(usex enchant ON OFF) # enables enchant and disables hunspell
)
@@ -143,5 +139,5 @@ src_configure() {
pkg_postinst() {
xdg_pkg_postinst
- use gtk || elog "enable 'gtk' useflag if you have image copy-paste problems"
+ use gtk || elog "enable the 'gtk' useflag if you have image copy-paste problems"
}
next reply other threads:[~2021-07-17 20:05 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-17 20:05 Georgy Yakovlev [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-30 21:58 [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/ Andreas Sturmlechner
2025-03-25 10:20 Yixun Lan
2024-05-15 8:51 Yixun Lan
2024-05-14 2:08 Yixun Lan
2024-04-10 23:34 Yixun Lan
2023-12-28 13:58 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-12-11 13:25 Yixun Lan
2023-10-28 15:01 Yixun Lan
2023-07-15 16:25 Sam James
2023-06-10 13:43 Sam James
2023-05-16 17:07 Sam James
2023-04-17 20:16 Georgy Yakovlev
2023-02-13 21:03 Georgy Yakovlev
2022-12-13 3:13 John Helmert III
2022-10-03 22:52 Georgy Yakovlev
2022-08-23 5:24 Sam James
2022-08-23 5:24 Sam James
2022-04-25 1:43 Georgy Yakovlev
2022-04-15 6:04 Sam James
2022-04-15 6:04 Sam James
2022-01-28 20:02 Georgy Yakovlev
2021-12-10 21:31 Georgy Yakovlev
2021-09-16 12:07 Georgy Yakovlev
2021-08-12 17:56 Georgy Yakovlev
2021-08-05 16:42 Georgy Yakovlev
2021-08-04 8:31 Georgy Yakovlev
2021-07-17 0:06 Georgy Yakovlev
2021-06-28 8:38 Georgy Yakovlev
2021-06-03 2:11 Stefan Strogin
2021-05-09 8:05 Georgy Yakovlev
2021-05-03 17:01 Georgy Yakovlev
2021-03-25 19:31 Georgy Yakovlev
2020-10-31 21:17 Georgy Yakovlev
2020-05-28 6:14 Georgy Yakovlev
2020-03-31 8:33 Georgy Yakovlev
2020-03-19 17:47 Georgy Yakovlev
2020-03-15 19:14 Georgy Yakovlev
2020-02-25 2:53 Georgy Yakovlev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1626552284.d091935d85df82d49cf2473e21881b7a2e628deb.gyakovlev@gentoo \
--to=gyakovlev@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox