Update to 0.14.0 to fix CVE-2020-13949 and Drop fb303 package and switch to qt5
This commit is contained in:
parent
55954b59d8
commit
2c30cbb510
@ -1,63 +0,0 @@
|
||||
From 54356a41474cccb0e2e2a7fc4b646812acadb7ec Mon Sep 17 00:00:00 2001
|
||||
From: jfarrell <jfarrell@apache.org>
|
||||
Date: Thu, 4 Oct 2018 23:00:28 -0400
|
||||
Subject: [PATCH] Thrift-4647: Node.js Filesever webroot fixed path
|
||||
|
||||
Updates the node.js fileserver to have a fixed based webroot which can
|
||||
not be escaped by end users.
|
||||
---
|
||||
lib/js/test/server_http.js | 2 +-
|
||||
lib/js/test/server_https.js | 2 +-
|
||||
lib/nodejs/lib/thrift/web_server.js | 10 +++++++++-
|
||||
3 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/js/test/server_http.js b/lib/js/test/server_http.js
|
||||
index e195e80..c516409 100644
|
||||
--- a/lib/js/test/server_http.js
|
||||
+++ b/lib/js/test/server_http.js
|
||||
@@ -36,7 +36,7 @@ var ThriftTestSvcOpt = {
|
||||
};
|
||||
|
||||
var ThriftWebServerOptions = {
|
||||
- files: ".",
|
||||
+ files: __dirname,
|
||||
services: {
|
||||
"/service": ThriftTestSvcOpt
|
||||
}
|
||||
diff --git a/lib/js/test/server_https.js b/lib/js/test/server_https.js
|
||||
index af1745b..9499b09 100644
|
||||
--- a/lib/js/test/server_https.js
|
||||
+++ b/lib/js/test/server_https.js
|
||||
@@ -40,7 +40,7 @@ var ThriftTestSvcOpt = {
|
||||
};
|
||||
|
||||
var ThriftWebServerOptions = {
|
||||
- files: ".",
|
||||
+ files: __dirname,
|
||||
tls: {
|
||||
key: fs.readFileSync("../../../test/keys/server.key"),
|
||||
cert: fs.readFileSync("../../../test/keys/server.crt")
|
||||
diff --git a/lib/nodejs/lib/thrift/web_server.js b/lib/nodejs/lib/thrift/web_server.js
|
||||
index 37159ea..47e8a9f 100644
|
||||
--- a/lib/nodejs/lib/thrift/web_server.js
|
||||
+++ b/lib/nodejs/lib/thrift/web_server.js
|
||||
@@ -414,7 +414,15 @@ exports.createWebServer = function(options) {
|
||||
|
||||
//Locate the file requested and send it
|
||||
var uri = url.parse(request.url).pathname;
|
||||
- var filename = path.join(baseDir, uri);
|
||||
+ var filename = path.resolve(path.join(baseDir, uri));
|
||||
+
|
||||
+ //Ensure the basedir path is not able to be escaped
|
||||
+ if (filename.indexOf(baseDir) != 0) {
|
||||
+ response.writeHead(400, "Invalid request path", {});
|
||||
+ response.end();
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
fs.exists(filename, function(exists) {
|
||||
if(!exists) {
|
||||
response.writeHead(404);
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
From d973409661f820d80d72c0034d06a12348c8705e Mon Sep 17 00:00:00 2001
|
||||
From: "James E. King III" <jking@apache.org>
|
||||
Date: Mon, 5 Mar 2018 11:34:21 -0500
|
||||
Subject: [PATCH] THRIFT-4506: fix use of assert for correctness in Java SASL
|
||||
negotiation Client: java
|
||||
|
||||
---
|
||||
lib/java/src/org/apache/thrift/transport/TSaslTransport.java | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
|
||||
index a94d9a7760..bbd3f9a34a 100644
|
||||
--- a/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
|
||||
+++ b/lib/java/src/org/apache/thrift/transport/TSaslTransport.java
|
||||
@@ -287,7 +287,7 @@ public void open() throws TTransportException {
|
||||
if (message.status == NegotiationStatus.COMPLETE &&
|
||||
getRole() == SaslRole.CLIENT) {
|
||||
LOGGER.debug("{}: All done!", getRole());
|
||||
- break;
|
||||
+ continue;
|
||||
}
|
||||
|
||||
sendSaslMessage(sasl.isComplete() ? NegotiationStatus.COMPLETE : NegotiationStatus.OK,
|
||||
@@ -295,8 +295,6 @@ public void open() throws TTransportException {
|
||||
}
|
||||
LOGGER.debug("{}: Main negotiation loop complete", getRole());
|
||||
|
||||
- assert sasl.isComplete();
|
||||
-
|
||||
// If we're the client, and we're complete, but the server isn't
|
||||
// complete yet, we need to wait for its response. This will occur
|
||||
// with ANONYMOUS auth, for example, where we send an initial response
|
||||
@ -1,23 +0,0 @@
|
||||
From 2b70c1df2bb2c1667f30dff6d4b263459fabe91a Mon Sep 17 00:00:00 2001
|
||||
From: Jens Geyer <jensg@apache.org>
|
||||
Date: Sat, 9 Feb 2019 11:50:03 +0100
|
||||
Subject: [PATCH] THRIFT-4784 Thrift should throw when skipping over unexpected
|
||||
data Client: as3 Patch: Jens Geyer
|
||||
|
||||
---
|
||||
lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
|
||||
index 513df954be..22877b75b2 100644
|
||||
--- a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
|
||||
+++ b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
|
||||
@@ -141,7 +141,7 @@ package org.apache.thrift.protocol {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
- break;
|
||||
+ throw new TProtocolError(TProtocolError.INVALID_DATA, "invalid data");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,79 +0,0 @@
|
||||
From 264a3f318ed3e9e51573f67f963c8509786bcec2 Mon Sep 17 00:00:00 2001
|
||||
From: Jens Geyer <jensg@apache.org>
|
||||
Date: Sat, 23 Feb 2019 13:11:40 +0100
|
||||
Subject: [PATCH] additional test for TSimpleJSONProtocol
|
||||
|
||||
---
|
||||
lib/go/thrift/json_protocol.go | 5 +----
|
||||
lib/go/thrift/simple_json_protocol.go | 4 ++--
|
||||
lib/go/thrift/simple_json_protocol_test.go | 22 ++++++++++++++++++++++
|
||||
3 files changed, 25 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/lib/go/thrift/json_protocol.go b/lib/go/thrift/json_protocol.go
|
||||
index 7be685d43f..800ac22c7b 100644
|
||||
--- a/lib/go/thrift/json_protocol.go
|
||||
+++ b/lib/go/thrift/json_protocol.go
|
||||
@@ -31,10 +31,7 @@ const (
|
||||
// for references to _ParseContext see tsimplejson_protocol.go
|
||||
|
||||
// JSON protocol implementation for thrift.
|
||||
-//
|
||||
-// This protocol produces/consumes a simple output format
|
||||
-// suitable for parsing by scripting languages. It should not be
|
||||
-// confused with the full-featured TJSONProtocol.
|
||||
+// Utilizes Simple JSON protocol
|
||||
//
|
||||
type TJSONProtocol struct {
|
||||
*TSimpleJSONProtocol
|
||||
diff --git a/lib/go/thrift/simple_json_protocol.go b/lib/go/thrift/simple_json_protocol.go
|
||||
index 2e8a71112a..f5e0c05d18 100644
|
||||
--- a/lib/go/thrift/simple_json_protocol.go
|
||||
+++ b/lib/go/thrift/simple_json_protocol.go
|
||||
@@ -59,7 +59,7 @@ func (p _ParseContext) String() string {
|
||||
return "UNKNOWN-PARSE-CONTEXT"
|
||||
}
|
||||
|
||||
-// JSON protocol implementation for thrift.
|
||||
+// Simple JSON protocol implementation for thrift.
|
||||
//
|
||||
// This protocol produces/consumes a simple output format
|
||||
// suitable for parsing by scripting languages. It should not be
|
||||
@@ -1316,7 +1316,7 @@ func (p *TSimpleJSONProtocol) readNumeric() (Numeric, error) {
|
||||
func (p *TSimpleJSONProtocol) safePeekContains(b []byte) bool {
|
||||
for i := 0; i < len(b); i++ {
|
||||
a, _ := p.reader.Peek(i + 1)
|
||||
- if len(a) == 0 || a[i] != b[i] {
|
||||
+ if len(a) < (i+1) || a[i] != b[i] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
diff --git a/lib/go/thrift/simple_json_protocol_test.go b/lib/go/thrift/simple_json_protocol_test.go
|
||||
index 7b98082a4e..0126da0a8e 100644
|
||||
--- a/lib/go/thrift/simple_json_protocol_test.go
|
||||
+++ b/lib/go/thrift/simple_json_protocol_test.go
|
||||
@@ -713,3 +713,25 @@ func TestWriteSimpleJSONProtocolMap(t *testing.T) {
|
||||
}
|
||||
trans.Close()
|
||||
}
|
||||
+
|
||||
+func TestWriteSimpleJSONProtocolSafePeek(t *testing.T) {
|
||||
+ trans := NewTMemoryBuffer()
|
||||
+ p := NewTSimpleJSONProtocol(trans)
|
||||
+ trans.Write([]byte{'a', 'b'})
|
||||
+ trans.Flush(context.Background())
|
||||
+
|
||||
+ test1 := p.safePeekContains([]byte{'a', 'b'})
|
||||
+ if !test1 {
|
||||
+ t.Fatalf("Should match at test 1")
|
||||
+ }
|
||||
+
|
||||
+ test2 := p.safePeekContains([]byte{'a', 'b', 'c', 'd'})
|
||||
+ if test2 {
|
||||
+ t.Fatalf("Should not match at test 2")
|
||||
+ }
|
||||
+
|
||||
+ test3 := p.safePeekContains([]byte{'x', 'y'})
|
||||
+ if test3 {
|
||||
+ t.Fatalf("Should not match at test 3")
|
||||
+ }
|
||||
+}
|
||||
@ -1,27 +0,0 @@
|
||||
diff --git a/compiler/cpp/src/thrift/generate/t_java_generator.cc b/compiler/cpp/src/thrift/generate/t_java_generator.cc
|
||||
index fb581e4..90dfa06 100644
|
||||
--- a/compiler/cpp/src/thrift/generate/t_java_generator.cc
|
||||
+++ b/compiler/cpp/src/thrift/generate/t_java_generator.cc
|
||||
@@ -4657,8 +4657,9 @@ void t_java_generator::generate_deep_copy_non_container(ofstream& out,
|
||||
std::string dest_name,
|
||||
t_type* type) {
|
||||
(void)dest_name;
|
||||
+ type = get_true_type(type);
|
||||
if (type->is_base_type() || type->is_enum() || type->is_typedef()) {
|
||||
- if (((t_base_type*)type)->is_binary()) {
|
||||
+ if (type->is_binary()) {
|
||||
out << "org.apache.thrift.TBaseHelper.copyBinary(" << source_name << ")";
|
||||
} else {
|
||||
// everything else can be copied directly
|
||||
diff --git a/compiler/cpp/src/thrift/parse/t_type.h b/compiler/cpp/src/thrift/parse/t_type.h
|
||||
index 30f8c1f7..3a6d1e04 100644
|
||||
--- a/compiler/cpp/src/thrift/parse/t_type.h
|
||||
+++ b/compiler/cpp/src/thrift/parse/t_type.h
|
||||
@@ -47,6 +47,7 @@ public:
|
||||
virtual bool is_void() const { return false; }
|
||||
virtual bool is_base_type() const { return false; }
|
||||
virtual bool is_string() const { return false; }
|
||||
+ virtual bool is_binary() const { return false; }
|
||||
virtual bool is_bool() const { return false; }
|
||||
virtual bool is_typedef() const { return false; }
|
||||
virtual bool is_enum() const { return false; }
|
||||
14
bootstrap.sh
14
bootstrap.sh
@ -19,7 +19,10 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
./cleanup.sh
|
||||
echo -n "make distclean... "
|
||||
make -k distclean >/dev/null 2>&1
|
||||
echo "ok"
|
||||
|
||||
if test -d lib/php/src/ext/thrift_protocol ; then
|
||||
if phpize -v >/dev/null 2>/dev/null ; then
|
||||
(cd lib/php/src/ext/thrift_protocol && phpize)
|
||||
@ -38,17 +41,24 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
format_version () {
|
||||
printf "%03d%03d%03d%03d" $(echo $1 | tr '.' ' ');
|
||||
}
|
||||
|
||||
# we require automake 1.13 or later
|
||||
# check must happen externally due to use of newer macro
|
||||
AUTOMAKE_VERSION=`automake --version | grep automake | egrep -o '([0-9]{1,}\.)+[0-9]{1,}'`
|
||||
if [ "$AUTOMAKE_VERSION" \< "1.13" ]; then
|
||||
if [ $(format_version $AUTOMAKE_VERSION) -lt $(format_version 1.13) ]; then
|
||||
echo >&2 "automake version $AUTOMAKE_VERSION is too old (need 1.13 or later)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
autoscan
|
||||
$LIBTOOLIZE --copy --automake
|
||||
aclocal -I ./aclocal
|
||||
autoheader
|
||||
sed '/undef VERSION/d' config.hin > config.hin2
|
||||
mv config.hin2 config.hin
|
||||
autoconf
|
||||
automake --copy --add-missing --foreign
|
||||
|
||||
@ -1,158 +0,0 @@
|
||||
diff --git a/contrib/fb303/java/build.xml b/contrib/fb303/java/build.xml
|
||||
index 8f2fa51..d89f05e 100755
|
||||
--- a/contrib/fb303/java/build.xml
|
||||
+++ b/contrib/fb303/java/build.xml
|
||||
@@ -17,8 +17,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
-<project name="libfb303" default="dist" basedir="."
|
||||
- xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||
+<project name="libfb303" default="dist" basedir=".">
|
||||
|
||||
<!-- project wide settings. All directories relative to basedir -->
|
||||
<property name="thrift.root" location="${basedir}/../../../"/>
|
||||
@@ -38,8 +37,8 @@
|
||||
</condition>
|
||||
<property name="version" value="${thrift.version}-snapshot"/>
|
||||
|
||||
- <property name="fb303.final.name" value="${fb303.artifactid}-${version}"/>
|
||||
- <property name="thrift.java.libthrift" value="${thrift.java.dir}/build/libthrift-${version}.jar"/>
|
||||
+ <property name="fb303.final.name" value="${fb303.artifactid}"/>
|
||||
+ <property name="thrift.java.libthrift" value="${thrift.java.dir}/build/libthrift.jar"/>
|
||||
|
||||
<property name="src" value="${basedir}/src"/>
|
||||
<property name="gen" value="${basedir}/gen-java"/>
|
||||
@@ -50,7 +49,7 @@
|
||||
<property name="fb303.jar.file" location="${build.dir}/${fb303.final.name}.jar"/>
|
||||
<property name="fb303.pom.xml" location="${build.dir}/${fb303.final.name}.pom"/>
|
||||
|
||||
- <target name="init" depends="setup.init,mvn.init" unless="init.finished">
|
||||
+ <target name="init" depends="setup.init" unless="init.finished">
|
||||
<property name="init.finished" value="true"/>
|
||||
</target>
|
||||
|
||||
@@ -72,13 +71,21 @@
|
||||
<!-- compile the base and thrift generated code and jar them -->
|
||||
<target name="dist" depends="init,generate">
|
||||
<echo message="Building ${fb303.final.name}.jar"/>
|
||||
- <javac destdir="${build.classes.dir}" debug="on">
|
||||
+ <javac destdir="${build.classes.dir}" debug="on" includeantruntime="false" >
|
||||
<classpath>
|
||||
<pathelement location="${thrift.java.libthrift}"/>
|
||||
- <fileset dir="${thrift.root}/lib/java/build/lib">
|
||||
- <include name="*.jar"/>
|
||||
- </fileset>
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="commons-codec.jar"/>
|
||||
+ <include name="commons-lang.jar"/>
|
||||
+ <include name="commons-logging.jar"/>
|
||||
+ <include name="httpcomponents/httpcore.jar"/>
|
||||
+ <include name="httpcomponents/httpclient.jar"/>
|
||||
+ <include name="log4j.jar"/>
|
||||
+ <include name="slf4j/api.jar"/>
|
||||
+ <include name="glassfish-servlet-api.jar"/>
|
||||
+ </fileset>
|
||||
</classpath>
|
||||
+
|
||||
<src path="${src}"/>
|
||||
<src path="${gen}"/>
|
||||
<include name="**/*.java"/>
|
||||
@@ -99,97 +106,4 @@
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="${gen}"/>
|
||||
</target>
|
||||
-
|
||||
- <target name="mvn.ant.tasks.download" depends="setup.init,mvn.ant.tasks.check" unless="mvn.ant.tasks.found">
|
||||
- <get src="${mvn.ant.task.url}/${mvn.ant.task.jar}" dest="${build.tools.dir}/${mvn.ant.task.jar}" usetimestamp="true"/>
|
||||
- </target>
|
||||
-
|
||||
- <target name="mvn.ant.tasks.check">
|
||||
- <condition property="mvn.ant.tasks.found">
|
||||
- <typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
|
||||
- </condition>
|
||||
- </target>
|
||||
-
|
||||
- <target name="mvn.init" depends="mvn.ant.tasks.download" unless="mvn.finished">
|
||||
- <echo message="${mvn.ant.task.jar}"/>
|
||||
- <!-- Download mvn ant tasks, download dependencies, and setup pom file -->
|
||||
- <typedef uri="antlib:org.apache.maven.artifact.ant" classpath="${build.tools.dir}/${mvn.ant.task.jar}"/>
|
||||
-
|
||||
- <!-- remote repositories used to download dependencies from -->
|
||||
- <artifact:remoteRepository id="central" url="${mvn.repo}"/>
|
||||
- <artifact:remoteRepository id="apache" url="${apache.repo}"/>
|
||||
-
|
||||
- <!-- Pom file information -->
|
||||
- <artifact:pom id="pom"
|
||||
- groupId="${thrift.groupid}"
|
||||
- artifactId="${fb303.artifactid}"
|
||||
- version="${version}"
|
||||
- url="http://thrift.apache.org"
|
||||
- name="Apache Thrift"
|
||||
- description="Thrift is a software framework for scalable cross-language services development."
|
||||
- packaging="pom"
|
||||
- >
|
||||
- <remoteRepository refid="central"/>
|
||||
- <remoteRepository refid="apache"/>
|
||||
- <license name="The Apache Software License, Version 2.0" url="${license}"/>
|
||||
- <scm connection="scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git"
|
||||
- developerConnection="scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git"
|
||||
- url="https://git-wip-us.apache.org/repos/asf?p=thrift.git"
|
||||
- />
|
||||
- <!-- Thrift Developers -->
|
||||
- <developer id="mcslee" name="Mark Slee"/>
|
||||
- <developer id="dreiss" name="David Reiss"/>
|
||||
- <developer id="aditya" name="Aditya Agarwal"/>
|
||||
- <developer id="marck" name="Marc Kwiatkowski"/>
|
||||
- <developer id="jwang" name="James Wang"/>
|
||||
- <developer id="cpiro" name="Chris Piro"/>
|
||||
- <developer id="bmaurer" name="Ben Maurer"/>
|
||||
- <developer id="kclark" name="Kevin Clark"/>
|
||||
- <developer id="jake" name="Jake Luciani"/>
|
||||
- <developer id="bryanduxbury" name="Bryan Duxbury"/>
|
||||
- <developer id="esteve" name="Esteve Fernandez"/>
|
||||
- <developer id="todd" name="Todd Lipcon"/>
|
||||
- <developer id="geechorama" name="Andrew McGeachie"/>
|
||||
- <developer id="molinaro" name="Anthony Molinaro"/>
|
||||
- <developer id="roger" name="Roger Meier"/>
|
||||
- <developer id="jfarrell" name="Jake Farrell"/>
|
||||
- <developer id="jensg" name="Jens Geyer"/>
|
||||
- <developer id="carl" name="Carl Yeksigian"/>
|
||||
-
|
||||
- <!-- Thrift dependencies list -->
|
||||
- <dependency groupId="org.apache.thrift" artifactId="libthrift" version="${version}"/>
|
||||
- </artifact:pom>
|
||||
-
|
||||
- <!-- Generate the pom file -->
|
||||
- <artifact:writepom pomRefId="pom" file="${fb303.pom.xml}"/>
|
||||
-
|
||||
- <property name="mvn.finished" value="true"/>
|
||||
- </target>
|
||||
-
|
||||
- <macrodef name="signAndDeploy">
|
||||
- <!-- Sign and deploy jars to apache repo -->
|
||||
- <attribute name="file"/>
|
||||
- <attribute name="classifier" default=""/>
|
||||
- <attribute name="packaging" default="jar"/>
|
||||
- <attribute name="pom" default=""/>
|
||||
- <sequential>
|
||||
- <artifact:mvn fork="true">
|
||||
- <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file"/>
|
||||
- <arg value="-DrepositoryId=${maven-repository-id}"/>
|
||||
- <arg value="-Durl=${maven-repository-url}"/>
|
||||
- <arg value="-DpomFile=@{pom}"/>
|
||||
- <arg value="-Dfile=@{file}"/>
|
||||
- <arg value="-Dclassifier=@{classifier}"/>
|
||||
- <arg value="-Dpackaging=@{packaging}"/>
|
||||
- <arg value="-Pgpg"/>
|
||||
- </artifact:mvn>
|
||||
- </sequential>
|
||||
- </macrodef>
|
||||
-
|
||||
- <target name="publish" depends="clean,dist">
|
||||
- <!-- Compile, packages and then send release to apache maven repo -->
|
||||
- <!-- run with: ant -Drelease=true publish-->
|
||||
- <signAndDeploy file="${fb303.pom.xml}" packaging="pom" classifier="" pom="${fb303.pom.xml}"/>
|
||||
- <signAndDeploy file="${fb303.jar.file}" packaging="jar" classifier="" pom="${fb303.pom.xml}"/>
|
||||
- </target>
|
||||
</project>
|
||||
@ -1,13 +0,0 @@
|
||||
diff --git a/aclocal/ax_boost_base.m4 b/aclocal/ax_boost_base.m4
|
||||
index b496020..30ee0df 100644
|
||||
--- a/aclocal/ax_boost_base.m4
|
||||
+++ b/aclocal/ax_boost_base.m4
|
||||
@@ -92,7 +92,7 @@ if test "x$want_boost" = "xyes"; then
|
||||
libsubdirs="lib"
|
||||
ax_arch=`uname -m`
|
||||
case $ax_arch in
|
||||
- x86_64|ppc64|s390x|sparc64|aarch64)
|
||||
+ x86_64|ppc64|ppc64le|s390x|sparc64|aarch64)
|
||||
libsubdirs="lib64 lib lib64"
|
||||
;;
|
||||
esac
|
||||
@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.thrift</groupId>
|
||||
<artifactId>libfb303</artifactId>
|
||||
<version>0.10.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Apache Thrift</name>
|
||||
<description>Thrift is a software framework for scalable cross-language services development.</description>
|
||||
<url>http://thrift.apache.org</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>mcslee</id>
|
||||
<name>Mark Slee</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>dreiss</id>
|
||||
<name>David Reiss</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>aditya</id>
|
||||
<name>Aditya Agarwal</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>marck</id>
|
||||
<name>Marc Kwiatkowski</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jwang</id>
|
||||
<name>James Wang</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>cpiro</id>
|
||||
<name>Chris Piro</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>bmaurer</id>
|
||||
<name>Ben Maurer</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>kclark</id>
|
||||
<name>Kevin Clark</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jake</id>
|
||||
<name>Jake Luciani</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>bryanduxbury</id>
|
||||
<name>Bryan Duxbury</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>esteve</id>
|
||||
<name>Esteve Fernandez</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>todd</id>
|
||||
<name>Todd Lipcon</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>geechorama</id>
|
||||
<name>Andrew McGeachie</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>molinaro</id>
|
||||
<name>Anthony Molinaro</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>roger</id>
|
||||
<name>Roger Meier</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jfarrell</id>
|
||||
<name>Jake Farrell</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jensg</id>
|
||||
<name>Jens Geyer</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>carl</id>
|
||||
<name>Carl Yeksigian</name>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git</connection>
|
||||
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git</developerConnection>
|
||||
<url>https://git-wip-us.apache.org/repos/asf?p=thrift.git</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.thrift</groupId>
|
||||
<artifactId>libthrift</artifactId>
|
||||
<version>0.10.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.thrift</groupId>
|
||||
<artifactId>libthrift</artifactId>
|
||||
<version>0.10.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Apache Thrift</name>
|
||||
<description>Thrift is a software framework for scalable cross-language services development.</description>
|
||||
<url>http://thrift.apache.org</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>mcslee</id>
|
||||
<name>Mark Slee</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>dreiss</id>
|
||||
<name>David Reiss</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>aditya</id>
|
||||
<name>Aditya Agarwal</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>marck</id>
|
||||
<name>Marc Kwiatkowski</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jwang</id>
|
||||
<name>James Wang</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>cpiro</id>
|
||||
<name>Chris Piro</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>bmaurer</id>
|
||||
<name>Ben Maurer</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>kclark</id>
|
||||
<name>Kevin Clark</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jake</id>
|
||||
<name>Jake Luciani</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>bryanduxbury</id>
|
||||
<name>Bryan Duxbury</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>esteve</id>
|
||||
<name>Esteve Fernandez</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>todd</id>
|
||||
<name>Todd Lipcon</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>geechorama</id>
|
||||
<name>Andrew McGeachie</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>molinaro</id>
|
||||
<name>Anthony Molinaro</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>roger</id>
|
||||
<name>Roger Meier</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jfarrell</id>
|
||||
<name>Jake Farrell</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>jensg</id>
|
||||
<name>Jens Geyer</name>
|
||||
</developer>
|
||||
<developer>
|
||||
<id>carl</id>
|
||||
<name>Carl Yeksigian</name>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git</connection>
|
||||
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git</developerConnection>
|
||||
<url>https://git-wip-us.apache.org/repos/asf?p=thrift.git</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
80
libthrift-0.14.0.pom
Normal file
80
libthrift-0.14.0.pom
Normal file
@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.thrift</groupId>
|
||||
<artifactId>libthrift</artifactId>
|
||||
<version>0.14.0</version>
|
||||
<name>Apache Thrift</name>
|
||||
<description>Thrift is a software framework for scalable cross-language services development.</description>
|
||||
<url>http://thrift.apache.org</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>dev</id>
|
||||
<name>Apache Thrift Developers</name>
|
||||
<email>dev@thrift.apache.org</email>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/apache/thrift.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:apache/thrift.git</developerConnection>
|
||||
<url>https://github.com/apache/thrift</url>
|
||||
</scm>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.9.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -1,72 +0,0 @@
|
||||
diff --git a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
|
||||
index 4b1c257..df1c8cc 100644
|
||||
--- a/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
|
||||
+++ b/contrib/fb303/py/fb303_scripts/fb303_simple_mgmt.py
|
||||
@@ -57,24 +57,24 @@ def service_ctrl(
|
||||
msg = fb_status_string(status)
|
||||
if (len(status_details)):
|
||||
msg += " - %s" % status_details
|
||||
- print msg
|
||||
+ print(msg)
|
||||
|
||||
if (status == fb_status.ALIVE):
|
||||
return 2
|
||||
else:
|
||||
return 3
|
||||
except:
|
||||
- print "Failed to get status"
|
||||
+ print("Failed to get status")
|
||||
return 3
|
||||
|
||||
# scalar commands
|
||||
if command in ["version", "alive", "name"]:
|
||||
try:
|
||||
result = fb303_wrapper(command, port, trans_factory, prot_factory)
|
||||
- print result
|
||||
+ print(result)
|
||||
return 0
|
||||
except:
|
||||
- print "failed to get ", command
|
||||
+ print("failed to get ", command)
|
||||
return 3
|
||||
|
||||
# counters
|
||||
@@ -82,10 +82,10 @@ def service_ctrl(
|
||||
try:
|
||||
counters = fb303_wrapper('counters', port, trans_factory, prot_factory)
|
||||
for counter in counters:
|
||||
- print "%s: %d" % (counter, counters[counter])
|
||||
+ print("%s: %d" % (counter, counters[counter]))
|
||||
return 0
|
||||
except:
|
||||
- print "failed to get counters"
|
||||
+ print("failed to get counters")
|
||||
return 3
|
||||
|
||||
# Only root should be able to run the following commands
|
||||
@@ -96,19 +96,19 @@ def service_ctrl(
|
||||
fb303_wrapper(command, port, trans_factory, prot_factory)
|
||||
return 0
|
||||
except:
|
||||
- print "failed to tell the service to ", command
|
||||
+ print("failed to tell the service to ", command)
|
||||
return 3
|
||||
else:
|
||||
if command in ["stop", "reload"]:
|
||||
- print "root privileges are required to stop or reload the service."
|
||||
+ print("root privileges are required to stop or reload the service.")
|
||||
return 4
|
||||
|
||||
- print "The following commands are available:"
|
||||
+ print("The following commands are available:")
|
||||
for command in ["counters", "name", "version", "alive", "status"]:
|
||||
- print "\t%s" % command
|
||||
- print "The following commands are available for users with root privileges:"
|
||||
+ print("\t%s" % command)
|
||||
+ print("The following commands are available for users with root privileges:")
|
||||
for command in ["stop", "reload"]:
|
||||
- print "\t%s" % command
|
||||
+ print("\t%s" % command)
|
||||
|
||||
return 0
|
||||
|
||||
@ -1,235 +0,0 @@
|
||||
diff --git a/lib/java/build.xml b/lib/java/build.xml
|
||||
index 40e5284..db1ce54 100644
|
||||
--- a/lib/java/build.xml
|
||||
+++ b/lib/java/build.xml
|
||||
@@ -17,8 +17,7 @@
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
-<project name="libthrift" default="dist" basedir="."
|
||||
- xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||
+<project name="libthrift" default="dist" basedir=".">
|
||||
|
||||
<description>Thrift Build File</description>
|
||||
<property name="thrift.root" location="../../"/>
|
||||
@@ -67,8 +66,15 @@
|
||||
<property name="pom.xml" location="${build.dir}/${final.name}.pom"/>
|
||||
|
||||
<path id="compile.classpath">
|
||||
- <fileset dir="${build.lib.dir}">
|
||||
- <include name="**/*.jar"/>
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="commons-codec.jar"/>
|
||||
+ <include name="commons-lang.jar"/>
|
||||
+ <include name="commons-logging.jar"/>
|
||||
+ <include name="httpcomponents/httpcore.jar"/>
|
||||
+ <include name="httpcomponents/httpclient.jar"/>
|
||||
+ <include name="log4j.jar"/>
|
||||
+ <include name="slf4j/api.jar"/>
|
||||
+ <include name="glassfish-servlet-api.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
@@ -78,11 +84,14 @@
|
||||
<pathelement location="${build.test.dir}"/>
|
||||
<pathelement location="${jar.file}"/>
|
||||
<pathelement location="${test.jar.file}"/>
|
||||
-
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="junit.jar"/>
|
||||
+ <include name="slf4j/log4j12.jar"/>
|
||||
+ </fileset>
|
||||
</path>
|
||||
|
||||
<!-- Tasks -->
|
||||
- <target name="init" depends="setup.init,mvn.init" unless="init.finished">
|
||||
+ <target name="init" depends="setup.init" unless="init.finished">
|
||||
<property name="init.finished" value="true"/>
|
||||
</target>
|
||||
|
||||
@@ -295,120 +304,12 @@
|
||||
</target>
|
||||
|
||||
<target name="mvn.ant.tasks.download" depends="setup.init,mvn.ant.tasks.check,proxy" unless="mvn.ant.tasks.found">
|
||||
- <get src="${mvn.ant.task.url}/${mvn.ant.task.jar}" dest="${build.tools.dir}/${mvn.ant.task.jar}" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="mvn.ant.tasks.check">
|
||||
- <condition property="mvn.ant.tasks.found">
|
||||
- <typefound uri="antlib:org.apache.maven.artifact.ant" name="artifact"/>
|
||||
- </condition>
|
||||
</target>
|
||||
|
||||
- <target name="mvn.init" depends="mvn.ant.tasks.download" unless="mvn.finished">
|
||||
- <!-- Download mvn ant tasks, download dependencies, and setup pom file -->
|
||||
- <typedef uri="antlib:org.apache.maven.artifact.ant" classpath="${build.tools.dir}/${mvn.ant.task.jar}"/>
|
||||
-
|
||||
- <!-- remote repositories used to download dependencies from -->
|
||||
- <artifact:remoteRepository id="central" url="${mvn.repo}"/>
|
||||
- <artifact:remoteRepository id="apache" url="${apache.repo}"/>
|
||||
-
|
||||
- <!-- Pom file information -->
|
||||
- <artifact:pom id="pom"
|
||||
- groupId="${thrift.groupid}"
|
||||
- artifactId="${thrift.artifactid}"
|
||||
- version="${version}"
|
||||
- url="http://thrift.apache.org"
|
||||
- name="Apache Thrift"
|
||||
- description="Thrift is a software framework for scalable cross-language services development."
|
||||
- packaging="pom"
|
||||
- >
|
||||
- <remoteRepository refid="central"/>
|
||||
- <remoteRepository refid="apache"/>
|
||||
- <license name="The Apache Software License, Version 2.0" url="${license}"/>
|
||||
- <scm connection="scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git"
|
||||
- developerConnection="scm:git:https://git-wip-us.apache.org/repos/asf/thrift.git"
|
||||
- url="https://git-wip-us.apache.org/repos/asf?p=thrift.git"
|
||||
- />
|
||||
- <!-- Thrift Developers -->
|
||||
- <developer id="mcslee" name="Mark Slee"/>
|
||||
- <developer id="dreiss" name="David Reiss"/>
|
||||
- <developer id="aditya" name="Aditya Agarwal"/>
|
||||
- <developer id="marck" name="Marc Kwiatkowski"/>
|
||||
- <developer id="jwang" name="James Wang"/>
|
||||
- <developer id="cpiro" name="Chris Piro"/>
|
||||
- <developer id="bmaurer" name="Ben Maurer"/>
|
||||
- <developer id="kclark" name="Kevin Clark"/>
|
||||
- <developer id="jake" name="Jake Luciani"/>
|
||||
- <developer id="bryanduxbury" name="Bryan Duxbury"/>
|
||||
- <developer id="esteve" name="Esteve Fernandez"/>
|
||||
- <developer id="todd" name="Todd Lipcon"/>
|
||||
- <developer id="geechorama" name="Andrew McGeachie"/>
|
||||
- <developer id="molinaro" name="Anthony Molinaro"/>
|
||||
- <developer id="roger" name="Roger Meier"/>
|
||||
- <developer id="jfarrell" name="Jake Farrell"/>
|
||||
- <developer id="jensg" name="Jens Geyer"/>
|
||||
- <developer id="carl" name="Carl Yeksigian"/>
|
||||
-
|
||||
- <!-- Thrift dependencies list -->
|
||||
- <dependency groupId="org.slf4j" artifactId="slf4j-api" version="${slf4j.version}"/>
|
||||
- <dependency groupId="javax.servlet" artifactId="servlet-api" version="${servlet.version}" scope="provided"/>
|
||||
- <dependency groupId="org.apache.httpcomponents" artifactId="httpclient" version="${httpclient.version}"/>
|
||||
- <dependency groupId="org.apache.httpcomponents" artifactId="httpcore" version="${httpcore.version}"/>
|
||||
- </artifact:pom>
|
||||
-
|
||||
- <!-- Generate the pom file -->
|
||||
- <artifact:writepom pomRefId="pom" file="${pom.xml}"/>
|
||||
-
|
||||
- <!-- Download the dependencies -->
|
||||
- <artifact:dependencies filesetId="build-dependency-jars" pomRefId="pom"/>
|
||||
-
|
||||
- <!-- Copy the dependencies to the build/lib dir -->
|
||||
- <copy todir="${build.dir}/lib">
|
||||
- <fileset refid="build-dependency-jars"/>
|
||||
- <mapper type="flatten"/>
|
||||
- </copy>
|
||||
-
|
||||
- <!-- Dependencies needed for testing -->
|
||||
- <artifact:dependencies filesetId="test-dependency-jars" useScope="runtime">
|
||||
- <dependency groupId="org.slf4j" artifactId="slf4j-log4j12" version="${slf4j.version}"/>
|
||||
- <dependency groupId="junit" artifactId="junit" version="4.4"/>
|
||||
- </artifact:dependencies>
|
||||
-
|
||||
- <!-- Copy the test dependencies to the build/lib dir -->
|
||||
- <copy todir="${build.dir}/lib">
|
||||
- <fileset refid="test-dependency-jars"/>
|
||||
- <mapper type="flatten"/>
|
||||
- </copy>
|
||||
-
|
||||
- <property name="mvn.finished" value="true"/>
|
||||
+ <target name="mvn.init" unless="mvn.finished">
|
||||
</target>
|
||||
|
||||
- <macrodef name="signAndDeploy">
|
||||
- <!-- Sign and deploy jars to apache repo -->
|
||||
- <attribute name="file"/>
|
||||
- <attribute name="classifier" default=""/>
|
||||
- <attribute name="packaging" default="jar"/>
|
||||
- <attribute name="pom" default=""/>
|
||||
- <sequential>
|
||||
- <artifact:mvn fork="true">
|
||||
- <arg value="org.apache.maven.plugins:maven-gpg-plugin:1.6:sign-and-deploy-file"/>
|
||||
- <arg value="-DrepositoryId=${maven-repository-id}"/>
|
||||
- <arg value="-Durl=${maven-repository-url}"/>
|
||||
- <arg value="-DpomFile=@{pom}"/>
|
||||
- <arg value="-Dfile=@{file}"/>
|
||||
- <arg value="-Dclassifier=@{classifier}"/>
|
||||
- <arg value="-Dpackaging=@{packaging}"/>
|
||||
- <arg value="-Pgpg"/>
|
||||
- </artifact:mvn>
|
||||
- </sequential>
|
||||
- </macrodef>
|
||||
-
|
||||
- <target name="publish" depends="clean,init,test,dist,javadoc,pack.src">
|
||||
- <!-- Compile, package, test and then send release to apache maven repo -->
|
||||
- <!-- run with: ant -Drelease=true publish-->
|
||||
- <signAndDeploy file="${pom.xml}" packaging="pom" classifier="" pom="${pom.xml}"/>
|
||||
- <signAndDeploy file="${jar.file}" classifier="" pom="${pom.xml}"/>
|
||||
- <signAndDeploy file="${javadoc.jar.file}" classifier="javadoc" pom="${pom.xml}"/>
|
||||
- <signAndDeploy file="${source.jar.file}" classifier="sources" pom="${pom.xml}"/>
|
||||
- </target>
|
||||
</project>
|
||||
diff --git a/tutorial/java/build.xml b/tutorial/java/build.xml
|
||||
index 7638d5b..c5ca703 100644
|
||||
--- a/tutorial/java/build.xml
|
||||
+++ b/tutorial/java/build.xml
|
||||
@@ -29,13 +29,33 @@
|
||||
<include name="*.jar" />
|
||||
<exclude name="-test.jar" />
|
||||
</fileset>
|
||||
- <fileset dir="../../lib/java/build/lib">
|
||||
- <include name="*.jar" />
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="commons-codec.jar"/>
|
||||
+ <include name="commons-lang.jar"/>
|
||||
+ <include name="commons-logging.jar"/>
|
||||
+ <include name="httpcomponents/httpcore.jar"/>
|
||||
+ <include name="httpcomponents/httpclient.jar"/>
|
||||
+ <include name="log4j.jar"/>
|
||||
+ <include name="slf4j/api.jar"/>
|
||||
+ <include name="glassfish-servlet-api.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<path id="build.classpath">
|
||||
- <path refid="libs.classpath" />
|
||||
<pathelement path="${gen}" />
|
||||
+ <fileset dir="../../lib/java/build">
|
||||
+ <include name="*.jar" />
|
||||
+ <exclude name="-test.jar" />
|
||||
+ </fileset>
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="commons-codec.jar"/>
|
||||
+ <include name="commons-lang.jar"/>
|
||||
+ <include name="commons-logging.jar"/>
|
||||
+ <include name="httpcomponents/httpcore.jar"/>
|
||||
+ <include name="httpcomponents/httpclient.jar"/>
|
||||
+ <include name="log4j.jar"/>
|
||||
+ <include name="slf4j/api.jar"/>
|
||||
+ <include name="glassfish-servlet-api.jar"/>
|
||||
+ </fileset>
|
||||
</path>
|
||||
<path id="tutorial.classpath">
|
||||
<path refid="build.classpath" />
|
||||
diff --git a/tutorial/js/build.xml b/tutorial/js/build.xml
|
||||
index a9a9ad4..2fddf0c 100644
|
||||
--- a/tutorial/js/build.xml
|
||||
+++ b/tutorial/js/build.xml
|
||||
@@ -35,8 +35,16 @@
|
||||
<include name="*.jar" />
|
||||
<exclude name="-test.jar" />
|
||||
</fileset>
|
||||
- <fileset dir="../../lib/java/build/lib">
|
||||
- <include name="*.jar" />
|
||||
+
|
||||
+ <fileset dir="/usr/share/java">
|
||||
+ <include name="commons-codec.jar"/>
|
||||
+ <include name="commons-lang.jar"/>
|
||||
+ <include name="commons-logging.jar"/>
|
||||
+ <include name="httpcomponents/httpcore.jar"/>
|
||||
+ <include name="httpcomponents/httpclient.jar"/>
|
||||
+ <include name="log4j.jar"/>
|
||||
+ <include name="slf4j/api.jar"/>
|
||||
+ <include name="glassfish-servlet-api.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<path id="build.classpath">
|
||||
Binary file not shown.
BIN
thrift-0.14.0.tar.gz
Normal file
BIN
thrift-0.14.0.tar.gz
Normal file
Binary file not shown.
13
thrift-char.patch
Normal file
13
thrift-char.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/compiler/cpp/src/thrift/generate/t_delphi_generator.cc b/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
|
||||
index d3ad76a32..eac46a6c7 100644
|
||||
--- a/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
|
||||
+++ b/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
|
||||
@@ -1062,7 +1062,7 @@ std::string t_delphi_generator::make_pascal_string_literal(std::string value) {
|
||||
}
|
||||
|
||||
result << "'";
|
||||
- for (char const &c: value) {
|
||||
+ for (signed char const c: value) {
|
||||
if( (c >= 0) && (c < 32)) { // convert ctrl chars, but leave UTF-8 alone
|
||||
result << "#" << (int)c;
|
||||
} else if (c == '\'') {
|
||||
165
thrift.spec
165
thrift.spec
@ -4,6 +4,12 @@
|
||||
%global have_mongrel 0
|
||||
%global have_jsx 0
|
||||
%global want_d 0
|
||||
%global want_java 0
|
||||
%if 0%{?want_java} == 0
|
||||
%global java_configure --without-java
|
||||
%else
|
||||
%global java_configure --with-java
|
||||
%endif
|
||||
%if 0%{?have_mongrel} == 0
|
||||
%global ruby_configure --without-ruby
|
||||
%global with_ruby 0
|
||||
@ -28,30 +34,32 @@
|
||||
%endif
|
||||
%global want_golang 0
|
||||
%global golang_configure --without-go
|
||||
%global want_lua 0
|
||||
%global lua_configure --without-lua
|
||||
Name: thrift
|
||||
Version: 0.10.0
|
||||
Release: 3
|
||||
Version: 0.14.0
|
||||
Release: 1
|
||||
Summary: Software framework for cross-language services development
|
||||
License: ASL 2.0 and BSD and zlib
|
||||
URL: https://thrift.apache.org/
|
||||
Source0: https://archive.apache.org/dist/thrift/%{version}/thrift-%{version}.tar.gz
|
||||
Source1: https://repo1.maven.org/maven2/org/apache/thrift/libthrift/%{version}/libthrift-%{version}.pom
|
||||
Source2: https://raw.github.com/apache/thrift/%{version}/bootstrap.sh
|
||||
Source3: https://repo1.maven.org/maven2/org/apache/thrift/libfb303/%{version}/libfb303-%{version}.pom
|
||||
Patch0: thrift-%{version}-buildxml.patch
|
||||
Patch1: fb303-%{version}-buildxml.patch
|
||||
Patch0: thrift-char.patch
|
||||
Patch2: configure-java-prefix.patch
|
||||
Patch3: fix-ppc64le-builds.patch
|
||||
Patch4: THRIFT-4177.patch
|
||||
Patch5: python3.patch
|
||||
Patch6: CVE-2018-11798.patch
|
||||
Patch7: CVE-2018-1320.patch
|
||||
Patch8: CVE-2019-0205.patch
|
||||
Patch9: CVE-2019-0210.patch
|
||||
%if 0%{?want_java} > 0
|
||||
BuildRequires: ant >= 1.7
|
||||
%endif
|
||||
BuildRequires: make autoconf automake bison boost-devel boost-static flex gcc-c++ glib2-devel
|
||||
BuildRequires: libevent-devel libstdc++-devel libtool openssl-devel qt5-qtbase-devel texlive
|
||||
BuildRequires: zlib-devel
|
||||
Obsoletes: libthrift-java < %{version}-%{release}
|
||||
Obsoletes: libthrift-javadoc < %{version}-%{release}
|
||||
Obsoletes: fb303 < %{version}-%{release}
|
||||
Obsoletes: python3-fb303 < %{version}-%{release}
|
||||
Obsoletes: fb303-devel < %{version}-%{release}
|
||||
Obsoletes: fb303-java < %{version}-%{release}
|
||||
|
||||
BuildRequires: ant >= 1.7 autoconf automake bison boost-devel flex flex-devel gcc-c++
|
||||
BuildRequires: glib2-devel libevent-devel libstdc++-devel libtool openssl-devel qt-devel
|
||||
BuildRequires: texlive zlib-devel
|
||||
%if 0%{?want_golang} > 0
|
||||
BuildRequires: golang
|
||||
Requires: golang
|
||||
@ -83,7 +91,7 @@ The thrift-qt package contains GLib bindings for thrift.
|
||||
|
||||
%package -n python3-thrift
|
||||
Summary: Python 3 support for thrift
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
Requires: thrift%{?_isa} = %{version}-%{release} python3
|
||||
Obsoletes: python-thrift < 0.10.0-1%{?dist}
|
||||
Obsoletes: python2-thrift < 0.10.0-14%{?dist}
|
||||
@ -99,6 +107,9 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $
|
||||
Requires: perl(Bit::Vector) perl(Encode) perl(HTTP::Request) perl(IO::Select)
|
||||
Requires: perl(IO::Socket::INET) perl(IO::String) perl(LWP::UserAgent) perl(POSIX)
|
||||
Requires: perl(base) perl(constant) perl(strict) perl(utf8) perl(warnings)
|
||||
Provides: perl(Thrift::Exception)
|
||||
Provides: perl(Thrift::MessageType)
|
||||
Provides: perl(Thrift::Type)
|
||||
BuildArch: noarch
|
||||
%description -n perl-thrift
|
||||
The perl-thrift package contains Perl bindings for thrift.
|
||||
@ -120,6 +131,7 @@ BuildRequires: php-devel
|
||||
%description -n php-thrift
|
||||
The php-thrift package contains PHP bindings for thrift.
|
||||
%endif
|
||||
%if 0%{?want_java} > 0
|
||||
|
||||
%package -n libthrift-javadoc
|
||||
Summary: API documentation for java-thrift
|
||||
@ -141,6 +153,7 @@ Requires: mvn(org.apache.httpcomponents:httpcore)
|
||||
BuildArch: noarch
|
||||
%description -n libthrift-java
|
||||
The libthrift-java package contains Java bindings for thrift.
|
||||
%endif
|
||||
%if 0%{?want_ruby} > 0
|
||||
|
||||
%package -n ruby-thrift
|
||||
@ -160,51 +173,19 @@ BuildRequires: erlang erlang-rebar
|
||||
The erlang-thrift package contains Erlang bindings for thrift.
|
||||
%endif
|
||||
|
||||
%package -n fb303
|
||||
Summary: Basic interface for Thrift services
|
||||
Requires: thrift%{?_isa} = %{version}-%{release}
|
||||
%description -n fb303
|
||||
fb303 is the shared root of all Thrift services; it provides a
|
||||
standard interface to monitoring, dynamic options and configuration,
|
||||
uptime reports, activity, etc.
|
||||
|
||||
%package -n fb303-devel
|
||||
Summary: Development files for fb303
|
||||
Requires: fb303%{?_isa} = %{version}-%{release}
|
||||
%description -n fb303-devel
|
||||
The fb303-devel package contains header files for fb303
|
||||
|
||||
%package -n python3-fb303
|
||||
Summary: Python 3 bindings for fb303
|
||||
Requires: fb303%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: python3-devel
|
||||
Obsoletes: python-fb303 < 0.10.0-1%{?dist}
|
||||
Obsoletes: python2-fb303 < 0.10.0-14%{?dist}
|
||||
%description -n python3-fb303
|
||||
The python3-fb303 package contains Python bindings for fb303.
|
||||
|
||||
%package -n fb303-java
|
||||
Summary: Java bindings for fb303
|
||||
Requires: java-headless >= 1:1.6.0 javapackages-tools mvn(org.slf4j:slf4j-api)
|
||||
Requires: mvn(commons-lang:commons-lang) mvn(org.apache.httpcomponents:httpclient)
|
||||
Requires: mvn(org.apache.httpcomponents:httpcore)
|
||||
BuildArch: noarch
|
||||
%description -n fb303-java
|
||||
The fb303-java package contains Java bindings for fb303.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%{?!el5:sed -i -e 's/^AC_PROG_LIBTOOL/LT_INIT/g' configure.ac}
|
||||
find . -name \*.cpp -or -name \*.cc -or -name \*.h | xargs -r chmod 644
|
||||
cp -p %{SOURCE2} bootstrap.sh
|
||||
echo 'libthrift_c_glib_la_LIBADD = $(GLIB_LIBS) $(GOBJECT_LIBS) -L../cpp/.libs ' >> lib/c_glib/Makefile.am
|
||||
echo 'libthriftqt_la_LIBADD = $(QT_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
|
||||
echo 'libthriftqt5_la_LIBADD = $(QT_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
|
||||
echo 'libthriftz_la_LIBADD = $(ZLIB_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
|
||||
echo 'EXTRA_libthriftqt_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
|
||||
echo 'EXTRA_libthriftqt5_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
|
||||
echo 'EXTRA_libthriftz_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
|
||||
sed -i 's|libfb303_so_LDFLAGS = $(SHARED_LDFLAGS)|libfb303_so_LDFLAGS = $(SHARED_LDFLAGS) -lthrift -L../../../lib/cpp/.libs -Wl,--as-needed|g' contrib/fb303/cpp/Makefile.am
|
||||
sed -i 's|ANT_VALID=.*|ANT_VALID=1|' aclocal/ax_javac_and_java.m4
|
||||
sed -i 's|ANT_VALID=.*|ANT_VALID=1|' contrib/fb303/aclocal/ax_javac_and_java.m4
|
||||
shopt -s globstar
|
||||
sed -i -E 's@^(#!.*/env) *python *$@\1 python3@' **/*.py
|
||||
|
||||
%build
|
||||
export PY_PREFIX=%{_prefix}
|
||||
@ -219,46 +200,26 @@ export GOBJECT_CFLAGS=$(pkg-config --cflags gobject-2.0)
|
||||
find %{_builddir} -name rebar -exec rm -f '{}' \;
|
||||
find . -name Makefile\* -exec sed -i -e 's/[.][/]rebar/rebar/g' {} \;
|
||||
sed -i 's|-Dinstall.javadoc.path=$(DESTDIR)$(docdir)/java|-Dinstall.javadoc.path=$(DESTDIR)%{_javadocdir}/thrift|' lib/java/Makefile.*
|
||||
sed -i 's|${thrift.artifactid}-${version}|${thrift.artifactid}|' lib/java/build.xml
|
||||
sed -i 's|$(INSTALL) $$p|$(INSTALL) --mode 644 $$p|g' lib/erl/Makefile.am
|
||||
sed -i 's|$(thrift_home)/bin/thrift|../../../compiler/cpp/thrift|g' \
|
||||
contrib/fb303/cpp/Makefile.am \
|
||||
contrib/fb303/py/Makefile.am
|
||||
sed -i 's|$(prefix)/lib$|%{_libdir}|g' contrib/fb303/cpp/Makefile.am
|
||||
sed -i 's|$(thrift_home)/include/thrift|../../../lib/cpp/src|g' \
|
||||
contrib/fb303/cpp/Makefile.am
|
||||
echo "all:
|
||||
ant
|
||||
install: build/libfb303.jar
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
/usr/bin/install -c -m 644 build/libfb303.jar %{buildroot}%{_javadir}
|
||||
" > contrib/fb303/java/Makefile
|
||||
sh ./bootstrap.sh
|
||||
export PYTHON=%{_bindir}/python3
|
||||
%configure --disable-dependency-tracking --disable-static --with-boost=/usr %{ruby_configure} %{erlang_configure} %{golang_configure} %{php_configure} --with-py3 --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/thrift-%{version}}
|
||||
%configure --disable-dependency-tracking --disable-static --with-boost=/usr \
|
||||
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/thrift-%{version}} \
|
||||
%{java_configure} %{ruby_configure} %{erlang_configure} %{golang_configure} %{php_configure} %{lua_configure}
|
||||
sed -i -e 's/ -shared / -Wl,--as-needed\0/g' libtool
|
||||
make %{?_smp_mflags}
|
||||
(
|
||||
cd contrib/fb303
|
||||
sed -i '/^[.][/]configure.*/d' bootstrap.sh
|
||||
sh bootstrap.sh
|
||||
%configure --disable-static --with-java --without-php --with-py3 --libdir=%{_libdir}
|
||||
make %{?_smp_mflags}
|
||||
(
|
||||
cd java
|
||||
ant dist
|
||||
)
|
||||
)
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
find %{buildroot} -name fastbinary.so | xargs -r chmod 755
|
||||
find %{buildroot} -name \*.erl -or -name \*.hrl -or -name \*.app | xargs -r chmod 644
|
||||
%if 0%{?want_java} > 0
|
||||
find %{buildroot}/%{_javadir} -name libthrift-javadoc.jar -exec rm -f '{}' \;
|
||||
mkdir -p %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-libthrift.pom
|
||||
%add_maven_depmap JPP-libthrift.pom libthrift.jar
|
||||
%endif
|
||||
find %{buildroot} -name \*.jar -a \! -name \*thrift\* -exec rm -f '{}' \;
|
||||
find %{buildroot} -name \*.pod -exec rm -f '{}' \;
|
||||
find %{buildroot} -name .packlist -exec rm -f '{}' \;
|
||||
@ -270,21 +231,8 @@ mkdir -p %{buildroot}/%{_datadir}/php/
|
||||
mv %{buildroot}/%{php_extdir}/Thrift %{buildroot}/%{_datadir}/php/
|
||||
%endif # want_php
|
||||
find %{buildroot} -name Thread.h -exec chmod a-x '{}' \;
|
||||
(
|
||||
cd contrib/fb303
|
||||
make DESTDIR=%{buildroot} install
|
||||
(
|
||||
cd java
|
||||
ant -Dinstall.path=%{buildroot}%{_javadir} -Dinstall.javadoc.path=%{buildroot}%{_javadocdir}/fb303 install
|
||||
)
|
||||
)
|
||||
install -pm 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP-libfb303.pom
|
||||
%add_maven_depmap JPP-libfb303.pom libfb303.jar -f "fb303"
|
||||
find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r chmod 755
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc LICENSE NOTICE
|
||||
@ -298,19 +246,17 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
|
||||
%{_libdir}/libthrift_c_glib.so.*
|
||||
|
||||
%files qt
|
||||
%{_libdir}/libthriftqt.so
|
||||
%{_libdir}/libthriftqt-%{version}.so
|
||||
%{_libdir}/libthriftqt5.so
|
||||
%{_libdir}/libthriftqt5-%{version}.so
|
||||
|
||||
%files devel
|
||||
%{_includedir}/thrift
|
||||
%exclude %{_includedir}/thrift/fb303
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/*.so.0
|
||||
%{_libdir}/*.so.0.0.0
|
||||
%exclude %{_libdir}/lib*-%{version}.so
|
||||
%exclude %{_libdir}/libfb303.so
|
||||
%{_libdir}/pkgconfig/thrift-z.pc
|
||||
%{_libdir}/pkgconfig/thrift-qt.pc
|
||||
%{_libdir}/pkgconfig/thrift-qt5.pc
|
||||
%{_libdir}/pkgconfig/thrift-nb.pc
|
||||
%{_libdir}/pkgconfig/thrift.pc
|
||||
%{_libdir}/pkgconfig/thrift_c_glib.pc
|
||||
@ -339,6 +285,7 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
|
||||
%{python3_sitearch}/thrift
|
||||
%{python3_sitearch}/thrift-%{version}-py%{python3_version}.egg-info
|
||||
%doc LICENSE NOTICE
|
||||
%if 0%{?want_java} > 0
|
||||
|
||||
%files -n libthrift-javadoc
|
||||
%{_javadocdir}/thrift
|
||||
@ -346,27 +293,13 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
|
||||
|
||||
%files -n libthrift-java -f .mfiles
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%files -n fb303
|
||||
%{_datarootdir}/fb303
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%files -n fb303-devel
|
||||
%{_libdir}/libfb303.so
|
||||
%{_includedir}/thrift/fb303
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%files -n python3-fb303
|
||||
%{python3_sitelib}/fb303
|
||||
%{python3_sitelib}/fb303_scripts
|
||||
%{python3_sitelib}/thrift_fb303-%{version}-py%{python3_version}.egg-info
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%files -n fb303-java -f .mfiles-fb303
|
||||
%doc LICENSE NOTICE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 12 2020 wangxiao <wangxiao65@huawei.com> - 0.10.0-3
|
||||
* Tue Feb 23 2021 wangyue <wangyue92@huawei.com> - 0.14.0-1
|
||||
- Update to 0.14.0 to fix CVE-2020-13949 and Drop fb303 package and switch to qt5
|
||||
|
||||
* Thu Nov 12 2020 wangxiao <wangxiao65@huawei.com> - 0.10.0-3
|
||||
- Fix CVE-2019-0205 and CVE-2019-0210
|
||||
|
||||
* Thu Nov 05 2020 wangyue <wangyue92@huawei.com> - 0.10.0-2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user