From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9C62E1396D9 for ; Wed, 11 Oct 2017 21:23:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA0CDE0DDD; Wed, 11 Oct 2017 21:23:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA219E0DDD for ; Wed, 11 Oct 2017 21:23:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0E10333BF47 for ; Wed, 11 Oct 2017 21:23:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C208F90A3 for ; Wed, 11 Oct 2017 21:23:47 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1507755858.82e3d3b953257976714cc144dcd960471caa42a7.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/obs-studio/files/, media-video/obs-studio/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-video/obs-studio/files/obs-studio-20.0.1-fix-curl-crash.patch media-video/obs-studio/obs-studio-20.0.1-r1.ebuild X-VCS-Directories: media-video/obs-studio/files/ media-video/obs-studio/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: 82e3d3b953257976714cc144dcd960471caa42a7 X-VCS-Branch: master Date: Wed, 11 Oct 2017 21:23:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ceb4c3d1-c480-4793-bf40-86e931f2ebfd X-Archives-Hash: 9717568457686184e9c7987fe849c86c commit: 82e3d3b953257976714cc144dcd960471caa42a7 Author: Jimi Huotari gentoo org> AuthorDate: Mon Oct 9 02:16:21 2017 +0000 Commit: Patrice Clement gentoo org> CommitDate: Wed Oct 11 21:04:18 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82e3d3b9 media-video/obs-studio: add a patch to fix a crash related to net-misc/curl. Upstream Pull Request: https://github.com/jp9000/obs-studio/pull/1038 Closes: https://bugs.gentoo.org/633596 Closes: https://github.com/gentoo/gentoo/pull/564 Package-Manager: Portage-2.3.11, Repoman-2.3.3 .../files/obs-studio-20.0.1-fix-curl-crash.patch | 46 ++++++++ media-video/obs-studio/obs-studio-20.0.1-r1.ebuild | 121 +++++++++++++++++++++ 2 files changed, 167 insertions(+) diff --git a/media-video/obs-studio/files/obs-studio-20.0.1-fix-curl-crash.patch b/media-video/obs-studio/files/obs-studio-20.0.1-fix-curl-crash.patch new file mode 100644 index 00000000000..178bb2e6715 --- /dev/null +++ b/media-video/obs-studio/files/obs-studio-20.0.1-fix-curl-crash.patch @@ -0,0 +1,46 @@ +From 379137d039e8db4a4f5f4dd8b56aaa21600fe962 Mon Sep 17 00:00:00 2001 +From: Thomas De Schampheleire +Date: Tue, 19 Sep 2017 15:33:55 +0200 +Subject: [PATCH] file-updater: fix crash due to network timeout + +If there is no network connection, OBS crashes after 5 minutes idling +with following crash: + +*** longjmp causes uninitialized stack frame ***: obs terminated +======= Backtrace: ========= +/lib64/libc.so.6(+0x6f1e3)[0x7f8f95f901e3] +/lib64/libc.so.6(__fortify_fail+0x37)[0x7f8f96018ba7] +/lib64/libc.so.6(+0xf7add)[0x7f8f96018add] +/lib64/libc.so.6(__longjmp_chk+0x29)[0x7f8f96018a39] +/usr/lib64/libcurl.so.4(+0xa5d5)[0x7f8f979b75d5] +/lib64/libpthread.so.0(+0x10e30)[0x7f8f962cae30] +/lib64/libc.so.6(__poll+0x2d)[0x7f8f95fff46d] +/usr/lib64/libglib-2.0.so.0(+0x4a64c)[0x7f8f91b5564c] +/usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c)[0x7f8f91b5575c] +/usr/lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f)[0x7f8f9706c1ff] +/usr/lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xfa)[0x7f8f9701defa] +/usr/lib64/libQt5Core.so.5(_ZN16QCoreApplication4execEv+0x9c)[0x7f8f970258fc] +obs(main+0x5ac)[0x4773dc] +/lib64/libc.so.6(__libc_start_main+0xf0)[0x7f8f95f41700] +obs(_start+0x29)[0x478389] + +Internet search [1] revealed that this is a libcurl bug that can be worked +around by asking curl not to install signal handlers. + +[1] https://stackoverflow.com/a/10755612 +--- + deps/file-updater/file-updater/file-updater.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/deps/file-updater/file-updater/file-updater.c b/deps/file-updater/file-updater/file-updater.c +index ec639aeee..b8d649e05 100644 +--- a/deps/file-updater/file-updater/file-updater.c ++++ b/deps/file-updater/file-updater/file-updater.c +@@ -117,6 +117,7 @@ static bool do_http_request(struct update_info *info, const char *url, + curl_easy_setopt(info->curl, CURLOPT_WRITEFUNCTION, http_write); + curl_easy_setopt(info->curl, CURLOPT_WRITEDATA, info); + curl_easy_setopt(info->curl, CURLOPT_FAILONERROR, true); ++ curl_easy_setopt(info->curl, CURLOPT_NOSIGNAL, 1); + + if (!info->remote_url) { + // We only care about headers from the main package file diff --git a/media-video/obs-studio/obs-studio-20.0.1-r1.ebuild b/media-video/obs-studio/obs-studio-20.0.1-r1.ebuild new file mode 100644 index 00000000000..d8c5d14af74 --- /dev/null +++ b/media-video/obs-studio/obs-studio-20.0.1-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit cmake-utils gnome2-utils + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/jp9000/obs-studio.git" + EGIT_SUBMODULES=() +else + SRC_URI="https://github.com/jp9000/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Software for Recording and Streaming Live Video Content" +HOMEPAGE="https://obsproject.com" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+alsa fdk imagemagick jack pulseaudio truetype v4l" + +COMMON_DEPEND=" + >=dev-libs/jansson-2.5 + dev-qt/qtcore:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5 + dev-qt/qtmultimedia:5 + dev-qt/qtnetwork:5 + dev-qt/qtquickcontrols:5 + dev-qt/qtsql:5 + dev-qt/qttest:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + media-video/ffmpeg:=[x264] + net-misc/curl + x11-libs/libXcomposite + x11-libs/libXinerama + x11-libs/libXrandr + alsa? ( media-libs/alsa-lib ) + fdk? ( media-libs/fdk-aac:= ) + imagemagick? ( media-gfx/imagemagick:= ) + jack? ( virtual/jack ) + pulseaudio? ( media-sound/pulseaudio ) + truetype? ( + media-libs/fontconfig + media-libs/freetype + ) + v4l? ( media-libs/libv4l ) +" +DEPEND="${COMMON_DEPEND} + imagemagick? ( + || ( + =media-gfx/imagemagick-7 + >=dev-util/cmake-3.9 + ) + ) + ) +" +RDEPEND="${COMMON_DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-20.0.1-fix-curl-crash.patch" + "${FILESDIR}/${PN}-ImageMagick-header-path.patch" +) + +CMAKE_REMOVE_MODULES_LIST=( FindFreetype ) + +src_configure() { + local libdir=$(get_libdir) + local mycmakeargs=( + -DDISABLE_ALSA=$(usex !alsa) + -DDISABLE_FREETYPE=$(usex !truetype) + -DDISABLE_JACK=$(usex !jack) + -DDISABLE_LIBFDK=$(usex !fdk) + -DDISABLE_PULSEAUDIO=$(usex !pulseaudio) + -DDISABLE_V4L2=$(usex !v4l) + -DLIBOBS_PREFER_IMAGEMAGICK=$(usex imagemagick) + -DOBS_MULTIARCH_SUFFIX=${libdir#lib} + -DOBS_VERSION_OVERRIDE=${PV} + -DUNIX_STRUCTURE=1 + ) + cmake-utils_src_configure +} + +pkg_postinst() { + gnome2_icon_cache_update + + if ! use alsa && ! use pulseaudio; then + elog + elog "For the audio capture features to be available," + elog "either the 'alsa' or the 'pulseaudio' USE-flag needs to" + elog "be enabled." + elog + fi + + if ! has_version "sys-apps/dbus"; then + elog + elog "The 'sys-apps/dbus' package is not installed, but" + elog "could be used for disabling hibernating, screensaving," + elog "and sleeping. Where it is not installed," + elog "'xdg-screensaver reset' is used instead" + elog "(if 'x11-misc/xdg-utils' is installed)." + elog + fi + + if ! has_version "media-libs/speex"; then + elog + elog "For the speexdsp-based noise suppression filter" + elog "to be available, the 'media-libs/speex' package needs" + elog "to be installed." + elog + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +}