From: RunningDroid <RunningDroid@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] LGOGDownloader: fix coredump with curl >= 7.87.0
Date: Wed, 18 Jan 2023 08:15:36 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41713@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]
There is a new pull request by RunningDroid against master on the void-packages repository
https://github.com/RunningDroid/void-packages fix_LGOGDownloader
https://github.com/void-linux/void-packages/pull/41713
LGOGDownloader: fix coredump with curl >= 7.87.0
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
I also added `help2man` as a hostmakedep for native builds and an option to build with a `qt5-webengine` dep for solving captchas, but the `qt5-webengine` dep isn't enabled by default because I don't know how common it is to get a captcha from GOG.
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/41713.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix_LGOGDownloader-41713.patch --]
[-- Type: text/x-diff, Size: 3408 bytes --]
From eb1776d2e0a67453c2d5f005549a0b8a1aac3cf6 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Wed, 18 Jan 2023 01:56:00 -0500
Subject: [PATCH] LGOGDownloader: fix coredump with curl >= 7.87.0
---
.../patches/Fix-coredump-with-new-curl.patch | 43 +++++++++++++++++++
srcpkgs/LGOGDownloader/template | 13 +++++-
2 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/LGOGDownloader/patches/Fix-coredump-with-new-curl.patch
diff --git a/srcpkgs/LGOGDownloader/patches/Fix-coredump-with-new-curl.patch b/srcpkgs/LGOGDownloader/patches/Fix-coredump-with-new-curl.patch
new file mode 100644
index 000000000000..c836a8f85845
--- /dev/null
+++ b/srcpkgs/LGOGDownloader/patches/Fix-coredump-with-new-curl.patch
@@ -0,0 +1,43 @@
+Force destruction of downloader before curl_global_cleanup
+See: https://github.com/Sude-/lgogdownloader/commit/6ce6aeb1dc06f8af1508c5ce6ee71775b8d188b3
+Index: LGOGDownloader-3.9/main.cpp
+===================================================================
+--- LGOGDownloader-3.9.orig/main.cpp
++++ LGOGDownloader-3.9/main.cpp
+@@ -607,9 +607,10 @@ int main(int argc, char *argv[])
+ std::cerr << std::endl;
+ }
+
++ int res = 0;
+ // Init curl globally
+ curl_global_init(CURL_GLOBAL_ALL);
+-
++ {
+ Downloader downloader;
+
+ int iLoginTries = 0;
+@@ -733,12 +734,10 @@ int main(int argc, char *argv[])
+ bool bInitOK = downloader.init();
+ if (!bInitOK)
+ {
+- curl_global_cleanup();
+- return 1;
++ res = 1;
++ goto end;
+ }
+
+- int res = 0;
+-
+ if (Globals::globalConfig.bShowWishlist)
+ downloader.showWishlist();
+ else if (Globals::globalConfig.bUpdateCache)
+@@ -801,7 +800,8 @@ int main(int argc, char *argv[])
+ // Orphan check was called at the same time as download. Perform it after download has finished
+ if (!Globals::globalConfig.sOrphanRegex.empty() && Globals::globalConfig.bDownload)
+ downloader.checkOrphans();
+-
++ }
++end:
+ curl_global_cleanup();
+
+ return res;
diff --git a/srcpkgs/LGOGDownloader/template b/srcpkgs/LGOGDownloader/template
index d2526d97468c..fd0f265685bc 100644
--- a/srcpkgs/LGOGDownloader/template
+++ b/srcpkgs/LGOGDownloader/template
@@ -1,11 +1,14 @@
# Template file for 'LGOGDownloader'
pkgname=LGOGDownloader
version=3.9
-revision=3
+revision=4
build_style=cmake
+configure_args="$(vopt_bool qt USE_QT_GUI)"
hostmakedepends="pkg-config"
makedepends="htmlcxx-devel tinyxml2-devel libcurl-devel rhash-devel
- jsoncpp-devel boost-devel openssl-devel zlib-devel"
+ jsoncpp-devel boost-devel openssl-devel zlib-devel
+ $(vopt_if qt "qt5-webengine-devel qt5-declarative-devel
+ qt5-webchannel-devel qt5-location-devel")"
short_desc="Open source downloader for GOG.com games that uses the GOG.com API"
maintainer="RunningDroid <runningdroid@zoho.com>"
license="WTFPL"
@@ -13,7 +16,13 @@ homepage="https://github.com/Sude-/lgogdownloader"
distfiles="https://github.com/Sude-/lgogdownloader/archive/v${version}.tar.gz"
checksum=4ab9fe89b47bde7744d5100663c7822de74bb161e2790baddede8146056430b1
+build_options="qt"
+desc_option_qt="Include QT WebEngine to support solving captchas"
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
+
+if [ -z "$CROSS_BUILD" ]; then
+ hostmakedepends+=" help2man"
+fi
next reply other threads:[~2023-01-18 7:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-18 7:15 RunningDroid [this message]
2023-01-22 8:48 ` [PR PATCH] [Closed]: " sgn
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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41713@inbox.vuxu.org \
--to=runningdroid@users.noreply.github.com \
--cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).