Skip to content

Commit

Permalink
breakpad-git: Update to 2017-11-17 70914b2 (msys2#3154)
Browse files Browse the repository at this point in the history
Updated upstream
Updated patch set
Adjust prepare() to copy dotfiles as we now patch one
  • Loading branch information
jon-turney authored and Alexpux committed Nov 20, 2017
1 parent 9328941 commit eac69bb
Show file tree
Hide file tree
Showing 23 changed files with 617 additions and 649 deletions.
88 changes: 65 additions & 23 deletions mingw-w64-breakpad-git/0002-Remove-local-copy-of-curl-headers.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
From f05ddbfad42d233cf30b4ac705f0acb29bfdd1ed Mon Sep 17 00:00:00 2001
From efa1acb3becd8b9c5fb6743b909235b863ed303d Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sat, 12 Jul 2014 14:09:03 +0100
Subject: [PATCH 02/23] Remove local copy of curl headers
Subject: [PATCH 02/29] Remove local copy of curl headers

This reverts commit d9d863e153d12532fc85bd8b44bc47f079ed064c (svn r732)
This reverts commit 68e380d5a73a0d657693f166fbcb1dd77027766b (svn r829)

v2:
Add libcurl-dev to packages needed on travis
Also remove curl headers from EXTRA_DIST
Don't include curl/types.h doesn't exist anymore and has been deprecated
since 2004

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
.travis.yml | 1 +
Makefile.am | 11 -
src/common/linux/http_upload.cc | 3 +-
src/common/linux/libcurl_wrapper.cc | 3 +
src/common/linux/libcurl_wrapper.cc | 2 +
src/common/linux/libcurl_wrapper.h | 2 +-
src/third_party/curl/curl.h | 1936 ----------------------------------
src/third_party/curl/curlbuild.h | 202 ----
src/third_party/curl/curlbuild.h | 203 ----
src/third_party/curl/curlrules.h | 249 -----
src/third_party/curl/curlver.h | 70 --
src/third_party/curl/easy.h | 103 --
Expand All @@ -21,7 +29,7 @@ Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
src/third_party/curl/stdcheaders.h | 34 -
src/third_party/curl/typecheck-gcc.h | 551 ----------
src/third_party/curl/types.h | 1 -
13 files changed, 6 insertions(+), 3576 deletions(-)
15 files changed, 6 insertions(+), 3588 deletions(-)
delete mode 100644 src/third_party/curl/curl.h
delete mode 100644 src/third_party/curl/curlbuild.h
delete mode 100644 src/third_party/curl/curlrules.h
Expand All @@ -33,8 +41,42 @@ Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
delete mode 100644 src/third_party/curl/typecheck-gcc.h
delete mode 100644 src/third_party/curl/types.h

diff --git a/.travis.yml b/.travis.yml
index 4a7b775a..dd0fe22f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,7 @@ addons:
- clang
- gcc-4.8
- g++-4.8
+ - libcurl4-openssl-dev

env:
global:
diff --git a/Makefile.am b/Makefile.am
index 21e5867a..6f009196 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1469,17 +1469,6 @@ EXTRA_DIST = \
src/testing/googlemock/src/gmock-matchers.cc \
src/testing/googlemock/src/gmock-spec-builders.cc \
src/testing/googlemock/src/gmock_main.cc \
- src/third_party/curl/COPYING \
- src/third_party/curl/curlbuild.h \
- src/third_party/curl/curl.h \
- src/third_party/curl/curlrules.h \
- src/third_party/curl/curlver.h \
- src/third_party/curl/easy.h \
- src/third_party/curl/mprintf.h \
- src/third_party/curl/multi.h \
- src/third_party/curl/stdcheaders.h \
- src/third_party/curl/typecheck-gcc.h \
- src/third_party/curl/types.h \
src/third_party/mac_headers/architecture/byte_order.h \
src/third_party/mac_headers/i386/_types.h \
src/third_party/mac_headers/mach/boolean.h \
diff --git a/src/common/linux/http_upload.cc b/src/common/linux/http_upload.cc
index 4492fe8..a10583f 100644
index 702526af..c62b0cf0 100644
--- a/src/common/linux/http_upload.cc
+++ b/src/common/linux/http_upload.cc
@@ -31,7 +31,8 @@
Expand All @@ -48,21 +90,20 @@ index 4492fe8..a10583f 100644
namespace {

diff --git a/src/common/linux/libcurl_wrapper.cc b/src/common/linux/libcurl_wrapper.cc
index fd4e34c..3acc111 100644
index fd4e34cd..9fbfce66 100644
--- a/src/common/linux/libcurl_wrapper.cc
+++ b/src/common/linux/libcurl_wrapper.cc
@@ -27,6 +27,9 @@
@@ -27,6 +27,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+#include <curl/curl.h>
+#include <curl/easy.h>
+#include <curl/types.h>
#include <dlfcn.h>

#include <iostream>
diff --git a/src/common/linux/libcurl_wrapper.h b/src/common/linux/libcurl_wrapper.h
index 25905ad..21fb07c 100644
index 25905ad8..21fb07cd 100644
--- a/src/common/linux/libcurl_wrapper.h
+++ b/src/common/linux/libcurl_wrapper.h
@@ -32,12 +32,12 @@
Expand All @@ -81,7 +122,7 @@ index 25905ad..21fb07c 100644
class LibcurlWrapper {
diff --git a/src/third_party/curl/curl.h b/src/third_party/curl/curl.h
deleted file mode 100644
index 0d80936..0000000
index 0d80936f..00000000
--- a/src/third_party/curl/curl.h
+++ /dev/null
@@ -1,1936 +0,0 @@
Expand Down Expand Up @@ -2023,10 +2064,10 @@ index 0d80936..0000000
-#endif /* __CURL_CURL_H */
diff --git a/src/third_party/curl/curlbuild.h b/src/third_party/curl/curlbuild.h
deleted file mode 100644
index b0a53e6..0000000
index 595df4e4..00000000
--- a/src/third_party/curl/curlbuild.h
+++ /dev/null
@@ -1,202 +0,0 @@
@@ -1,203 +0,0 @@
-/* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */
-#ifndef __CURL_CURLBUILD_H
-#define __CURL_CURLBUILD_H
Expand Down Expand Up @@ -2184,7 +2225,8 @@ index b0a53e6..0000000
-
-/* The size of `long', as computed by sizeof. */
-#if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \
- defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64)
- defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) || \
- defined(__powerpc64__) || defined(__s390x__) || defined(__LP64__)
-#define CURL_SIZEOF_LONG 8
-#else
-#define CURL_SIZEOF_LONG 4
Expand Down Expand Up @@ -2231,7 +2273,7 @@ index b0a53e6..0000000
-#endif /* __CURL_CURLBUILD_H */
diff --git a/src/third_party/curl/curlrules.h b/src/third_party/curl/curlrules.h
deleted file mode 100644
index abac439..0000000
index abac4397..00000000
--- a/src/third_party/curl/curlrules.h
+++ /dev/null
@@ -1,249 +0,0 @@
Expand Down Expand Up @@ -2486,7 +2528,7 @@ index abac439..0000000
-#endif /* __CURL_CURLRULES_H */
diff --git a/src/third_party/curl/curlver.h b/src/third_party/curl/curlver.h
deleted file mode 100644
index afa85c1..0000000
index afa85c15..00000000
--- a/src/third_party/curl/curlver.h
+++ /dev/null
@@ -1,70 +0,0 @@
Expand Down Expand Up @@ -2562,7 +2604,7 @@ index afa85c1..0000000
-#endif /* __CURL_CURLVER_H */
diff --git a/src/third_party/curl/easy.h b/src/third_party/curl/easy.h
deleted file mode 100644
index 40449c3..0000000
index 40449c3e..00000000
--- a/src/third_party/curl/easy.h
+++ /dev/null
@@ -1,103 +0,0 @@
Expand Down Expand Up @@ -2671,7 +2713,7 @@ index 40449c3..0000000
-#endif
diff --git a/src/third_party/curl/mprintf.h b/src/third_party/curl/mprintf.h
deleted file mode 100644
index d7202de..0000000
index d7202de1..00000000
--- a/src/third_party/curl/mprintf.h
+++ /dev/null
@@ -1,82 +0,0 @@
Expand Down Expand Up @@ -2759,7 +2801,7 @@ index d7202de..0000000
-#endif /* __CURL_MPRINTF_H */
diff --git a/src/third_party/curl/multi.h b/src/third_party/curl/multi.h
deleted file mode 100644
index 153f772..0000000
index 153f7721..00000000
--- a/src/third_party/curl/multi.h
+++ /dev/null
@@ -1,346 +0,0 @@
Expand Down Expand Up @@ -3111,7 +3153,7 @@ index 153f772..0000000
-#endif
diff --git a/src/third_party/curl/stdcheaders.h b/src/third_party/curl/stdcheaders.h
deleted file mode 100644
index f739d7f..0000000
index f739d7f9..00000000
--- a/src/third_party/curl/stdcheaders.h
+++ /dev/null
@@ -1,34 +0,0 @@
Expand Down Expand Up @@ -3151,7 +3193,7 @@ index f739d7f..0000000
-#endif
diff --git a/src/third_party/curl/typecheck-gcc.h b/src/third_party/curl/typecheck-gcc.h
deleted file mode 100644
index 9788305..0000000
index 97883058..00000000
--- a/src/third_party/curl/typecheck-gcc.h
+++ /dev/null
@@ -1,551 +0,0 @@
Expand Down Expand Up @@ -3708,11 +3750,11 @@ index 9788305..0000000
-#endif /* __CURL_TYPECHECK_GCC_H */
diff --git a/src/third_party/curl/types.h b/src/third_party/curl/types.h
deleted file mode 100644
index d37d6ae..0000000
index d37d6ae9..00000000
--- a/src/third_party/curl/types.h
+++ /dev/null
@@ -1 +0,0 @@
-/* not used */
--
2.7.0
2.15.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 35dc7c53cce4398cb8c32252df31f0c9d248b92d Mon Sep 17 00:00:00 2001
From b0cd5238238ec4a169402418c6914822c6c46c21 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney@dronecode.org.uk>
Date: Sat, 5 Mar 2016 12:48:05 +0000
Subject: [PATCH 03/23] Link minidump_upload and sym_upload with curl
Subject: [PATCH 03/29] Link minidump_upload and sym_upload with curl

Don't link with -ldl and use dlopen to use libcurl.so, but just link with
libcurl
Expand All @@ -19,15 +19,15 @@ reasons for solving the bug above like this are obscure to me ...

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
---
Makefile.am | 4 +-
src/common/linux/http_upload.cc | 92 +++++++++--------------------------------
2 files changed, 21 insertions(+), 75 deletions(-)
Makefile.am | 4 +-
src/common/linux/http_upload.cc | 101 ++++++++--------------------------------
2 files changed, 21 insertions(+), 84 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 41bab38..0ee1249 100644
index 6f009196..f0939b8c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -576,12 +576,12 @@ src_tools_linux_md2core_minidump_2_core_SOURCES = \
@@ -601,7 +601,7 @@ src_tools_linux_md2core_minidump_2_core_SOURCES = \
src_tools_linux_symupload_minidump_upload_SOURCES = \
src/common/linux/http_upload.cc \
src/tools/linux/symupload/minidump_upload.cc
Expand All @@ -36,14 +36,17 @@ index 41bab38..0ee1249 100644

src_tools_linux_symupload_sym_upload_SOURCES = \
src/common/linux/http_upload.cc \
@@ -609,7 +609,7 @@ src_tools_linux_symupload_sym_upload_SOURCES = \
src/common/linux/symbol_upload.cc \
src/common/linux/symbol_upload.h \
src/tools/linux/symupload/sym_upload.cc
-src_tools_linux_symupload_sym_upload_LDADD = -ldl
+src_tools_linux_symupload_sym_upload_LDADD = -lcurl

src_tools_mac_dump_syms_dump_syms_mac_SOURCES = \
src/common/dwarf_cfi_to_module.cc \
diff --git a/src/common/linux/http_upload.cc b/src/common/linux/http_upload.cc
index a10583f..6670000 100644
index c62b0cf0..3d215810 100644
--- a/src/common/linux/http_upload.cc
+++ b/src/common/linux/http_upload.cc
@@ -30,7 +30,6 @@
Expand All @@ -54,14 +57,16 @@ index a10583f..6670000 100644
#include <curl/curl.h>
#include <curl/easy.h>

@@ -70,50 +69,13 @@ bool HTTPUpload::SendRequest(const string &url,
@@ -70,52 +69,13 @@ bool HTTPUpload::SendRequest(const string &url,
if (!CheckParameters(parameters))
return false;

- // We may have been linked statically; if curl_easy_init is in the
- // current binary, no need to search for a dynamic version.
- void* curl_lib = dlopen(NULL, RTLD_NOW);
- if (!curl_lib || dlsym(curl_lib, "curl_easy_init") == NULL) {
- if (!CheckCurlLib(curl_lib)) {
- fprintf(stderr,
- "Failed to open curl lib from binary, use libcurl.so instead\n");
- dlerror(); // Clear dlerror before attempting to open libraries.
- dlclose(curl_lib);
- curl_lib = NULL;
Expand Down Expand Up @@ -105,10 +110,10 @@ index a10583f..6670000 100644
- (*curl_easy_setopt)(curl, CURLOPT_USERAGENT, kUserAgent);
+ curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, kUserAgent);
// Set proxy information if necessary.
if (!proxy.empty())
(*curl_easy_setopt)(curl, CURLOPT_PROXY, proxy.c_str());
@@ -126,75 +88,59 @@ bool HTTPUpload::SendRequest(const string &url,
// Support multithread by disabling timeout handling, would get SIGSEGV with
// Curl_resolv_timeout in stack trace otherwise.
// See https://curl.haxx.se/libcurl/c/threadsafe.html
@@ -132,83 +92,60 @@ bool HTTPUpload::SendRequest(const string &url,
struct curl_httppost *formpost = NULL;
struct curl_httppost *lastptr = NULL;
// Add form data.
Expand Down Expand Up @@ -196,10 +201,18 @@ index a10583f..6670000 100644
+ curl_slist_free_all(headerlist);
}
- dlclose(curl_lib);
+
return err_code == CURLE_OK;
- return err_code == CURLE_OK;
-}

-// static
-bool HTTPUpload::CheckCurlLib(void* curl_lib) {
- return curl_lib &&
- dlsym(curl_lib, "curl_easy_init") &&
- dlsym(curl_lib, "curl_easy_setopt");
+ return err_code == CURLE_OK;
}

// static
--
2.7.0
2.15.0

Loading

0 comments on commit eac69bb

Please sign in to comment.