Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] LGOGDownloader: fix coredump with curl >= 7.87.0
@ 2023-01-18  7:15 RunningDroid
  2023-01-22  8:48 ` [PR PATCH] [Closed]: " sgn
  0 siblings, 1 reply; 2+ messages in thread
From: RunningDroid @ 2023-01-18  7:15 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Closed]: LGOGDownloader: fix coredump with curl >= 7.87.0
  2023-01-18  7:15 [PR PATCH] LGOGDownloader: fix coredump with curl >= 7.87.0 RunningDroid
@ 2023-01-22  8:48 ` sgn
  0 siblings, 0 replies; 2+ messages in thread
From: sgn @ 2023-01-22  8:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1362 bytes --]

There's a closed pull request on the void-packages repository

LGOGDownloader: fix coredump with curl >= 7.87.0
https://github.com/void-linux/void-packages/pull/41713

Description:
<!-- 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
-->


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-22  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18  7:15 [PR PATCH] LGOGDownloader: fix coredump with curl >= 7.87.0 RunningDroid
2023-01-22  8:48 ` [PR PATCH] [Closed]: " sgn

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).