Skip to contentSkip to conversation

package/thrift: bump to 0.12.0, add support for openssl 1.1.x

PATCH New Patrick Havelange 2 participants 2 messages Jan 21, 2019 – Feb 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/thrift: bump to 0.12.0, add support for openssl 1.1.x

Switching to CMake as the autotools are not crosscompiler compatible. Removed the patches related to autotools as no longer used.

---
 ...ipedTransport-peek-to-avoid-linker-e.patch | 31 +++++++
 package/thrift/0001-libevent-cross.patch      | 16 ----
 package/thrift/0002-autoreconf.patch          | 28 -------
 package/thrift/0003-zlib-cross.patch          | 16 ----
 ...k-minimum-required-version-of-automa.patch | 47 -----------
 .../0005-configure.ac-C-11-is-optional.patch  | 28 -------
 package/thrift/thrift.hash                    |  6 +-
 package/thrift/thrift.mk                      | 84 +++++++++----------
 8 files changed, 73 insertions(+), 183 deletions(-)
 create mode 100644 package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch
 delete mode 100644 package/thrift/0001-libevent-cross.patch
 delete mode 100644 package/thrift/0002-autoreconf.patch
 delete mode 100644 package/thrift/0003-zlib-cross.patch
 delete mode 100644 package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch
 delete mode 100644 package/thrift/0005-configure.ac-C-11-is-optional.patch
package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch new file +31 -0
new file mode 100644
index 0000000000..92c55d05a4
@@ -0,0 +1,31 @@
+From f87ae3963e651fe9f4b3125192c77aae86c007e0 Mon Sep 17 00:00:00 2001
+From: Patrick Havelange <[email protected]>
+Date: Mon, 21 Jan 2019 09:49:23 +0100
+Subject: [PATCH] Force to keep TPipedTransport::peek() to avoid linker error.
+
+Otherwise got the "defined in discarded section" linker error
+with x86-64-musl toolchain. This is probably a toolchain issue - the
+compiler shouldn't remove that function.
+
+Signed-off-by: Patrick Havelange <[email protected]>
+Upstream-status: Not Applicable
+---
+ lib/cpp/src/thrift/transport/TTransportUtils.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/cpp/src/thrift/transport/TTransportUtils.h b/lib/cpp/src/thrift/transport/TTransportUtils.h
+index f3b4c5a..7589182 100644
+--- a/lib/cpp/src/thrift/transport/TTransportUtils.h
++++ b/lib/cpp/src/thrift/transport/TTransportUtils.h
+@@ -114,7 +114,7 @@ public:
+ 
+   bool isOpen() { return srcTrans_->isOpen(); }
+ 
+-  bool peek() {
++  bool __attribute__ ((used)) peek() {
+     if (rPos_ >= rLen_) {
+       // Double the size of the underlying buffer if it is full
+       if (rLen_ == rBufSize_) {
+-- 
+2.17.1
+
package/thrift/0001-libevent-cross.patch deleted +0 -16
deleted file mode 100644
index f07caa762a..0000000000
@@ -1,16 +0,0 @@
-Make it cross-compile happy the hard way, there's no clean way.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4 thrift-0.9.1/aclocal/ax_lib_event.m4
---- thrift-0.9.1.orig/aclocal/ax_lib_event.m4	2013-08-15 11:04:29.000000000 -0300
-+++ thrift-0.9.1/aclocal/ax_lib_event.m4	2013-10-07 20:40:44.076435613 -0300
-@@ -75,7 +75,7 @@
-           AC_LANG_PUSH([C])
-           dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling,
-           dnl but then the version cannot be checked.
--          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-           #include <sys/types.h>
-           #include <event.h>
-           ]], [[
package/thrift/0002-autoreconf.patch deleted +0 -28
deleted file mode 100644
index 1a52f7c70d..0000000000
@@ -1,28 +0,0 @@
-Fillers to make autoreconf (automake) happy.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-diff -Nura thrift-0.9.2.orig/AUTHORS thrift-0.9.2/AUTHORS
---- thrift-0.9.2.orig/AUTHORS	1969-12-31 21:00:00.000000000 -0300
-+++ thrift-0.9.2/AUTHORS	2014-12-05 14:46:20.431211224 -0300
-@@ -0,0 +1,2 @@
-+
-+
-diff -Nura thrift-0.9.2.orig/ChangeLog thrift-0.9.2/ChangeLog
---- thrift-0.9.2.orig/ChangeLog	1969-12-31 21:00:00.000000000 -0300
-+++ thrift-0.9.2/ChangeLog	2014-12-05 14:46:34.290686170 -0300
-@@ -0,0 +1,2 @@
-+
-+
-diff -Nura thrift-0.9.2.orig/NEWS thrift-0.9.2/NEWS
---- thrift-0.9.2.orig/NEWS	1969-12-31 21:00:00.000000000 -0300
-+++ thrift-0.9.2/NEWS	2014-12-05 14:46:32.308618241 -0300
-@@ -0,0 +1,2 @@
-+
-+
-diff -Nura thrift-0.9.2.orig/README thrift-0.9.2/README
---- thrift-0.9.2.orig/README	1969-12-31 21:00:00.000000000 -0300
-+++ thrift-0.9.2/README	2014-12-05 14:46:28.305481028 -0300
-@@ -0,0 +1,2 @@
-+
-+
package/thrift/0003-zlib-cross.patch deleted +0 -16
deleted file mode 100644
index 3af39c4691..0000000000
@@ -1,16 +0,0 @@
-Make zlib version detection cross-compile happy.
-
-Signed-off-by: Gustavo Zacarias <[email protected]>
-
-diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 thrift-0.9.1/aclocal/ax_lib_zlib.m4
---- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4	2013-08-15 11:04:29.000000000 -0300
-+++ thrift-0.9.1/aclocal/ax_lib_zlib.m4	2013-10-07 20:47:44.523177973 -0300
-@@ -73,7 +73,7 @@
-           #   (defined in the library).
-           AC_LANG_PUSH([C])
-           dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling.
--          AC_RUN_IFELSE([AC_LANG_PROGRAM([[
-+          AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-           #include <zlib.h>
-           #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION
-           #else
package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch deleted +0 -47

47 lines not on this page · raw message

package/thrift/0005-configure.ac-C-11-is-optional.patch deleted +0 -28
deleted file mode 100644
index 9ed7e0a691..0000000000
@@ -1,28 +0,0 @@
-From 9c3a7e79b256730dd85a7acadbaf57ab018b3127 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Tue, 7 Apr 2015 07:37:26 +0200
-Subject: [PATCH] configure.ac: C++11 is optional
-
-Thrift build fine whitout c++11 support.
-
-Signed-off-by: Romain Naour <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 8daeb03..bfd49ae 100755
---- a/configure.ac
-+++ b/configure.ac
-@@ -99,7 +99,7 @@ AC_PROG_AWK
- AC_PROG_RANLIB
- 
- AC_LANG([C++])
--AX_CXX_COMPILE_STDCXX_11([noext])
-+AX_CXX_COMPILE_STDCXX_11([noext], [optional])
- 
- AC_ARG_ENABLE([libs],
-   AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]),
--- 
-1.9.3
-
package/thrift/thrift.hash +4 -2
index 811aa988e3..e71d3f4d84 100644
@@ -1,2 +1,4 @@
-# From https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.md5
-md5	89f63cc4d0100912f4a1f8a9dee63678	thrift-0.9.2.tar.gz
+# From https://www.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz.md5
+md5	3deebbb4d1ca77dd9c9e009a1ea02183	thrift-0.12.0.tar.gz
+# License files, locally calculated
+sha256  23df881cec3192d1f4474633c14eb2ec30a45b84f8daeb82b9de5d2bd3ac8218        LICENSE
package/thrift/thrift.mk +38 -46

113 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 package/thrift: bump to 0.12.0, add support for openssl 1.1.x

Quoted 30 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Patrick" == Patrick Havelange <[email protected]> writes:

Switching to CMake as the autotools are not crosscompiler compatible. Removed the patches related to autotools as no longer used.

---
 ...ipedTransport-peek-to-avoid-linker-e.patch | 31 +++++++
 package/thrift/0001-libevent-cross.patch      | 16 ----
 package/thrift/0002-autoreconf.patch          | 28 -------
 package/thrift/0003-zlib-cross.patch          | 16 ----
 ...k-minimum-required-version-of-automa.patch | 47 -----------
 .../0005-configure.ac-C-11-is-optional.patch  | 28 -------
 package/thrift/thrift.hash                    |  6 +-
 package/thrift/thrift.mk                      | 84 +++++++++----------
 8 files changed, 73 insertions(+), 183 deletions(-)
 create mode 100644 package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch
 delete mode 100644 package/thrift/0001-libevent-cross.patch
 delete mode 100644 package/thrift/0002-autoreconf.patch
 delete mode 100644 package/thrift/0003-zlib-cross.patch
 delete mode 100644 package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch
 delete mode 100644 package/thrift/0005-configure.ac-C-11-is-optional.patch
package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch new file +1 -0
new file mode 100644
index 0000000000..92c55d05a4
@@ -0,0 +1,31 @@
+From f87ae3963e651fe9f4b3125192c77aae86c007e0 Mon Sep 17 00:00:00 2001

package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch line 11

Quoted 10 lines
package/thrift/0001-Force-to-keep-TPipedTransport-peek-to-avoid-linker-e.patch new file +10 -0
+From: Patrick Havelange <[email protected]>
+Date: Mon, 21 Jan 2019 09:49:23 +0100
+Subject: [PATCH] Force to keep TPipedTransport::peek() to avoid linker error.
+
+Otherwise got the "defined in discarded section" linker error
+with x86-64-musl toolchain. This is probably a toolchain issue - the
+compiler shouldn't remove that function.
+
+Signed-off-by: Patrick Havelange <[email protected]>
+Upstream-status: Not Applicable

That sounds a bit odd, but oh well.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard