Compare commits

..

No commits in common. "rawhide" and "f29" have entirely different histories.

11 changed files with 569 additions and 324 deletions

4
.gitignore vendored
View file

@ -1,6 +1,2 @@
/0.9.1.tar.gz
/thrift-0.10.0.tar.gz
/thrift-0.13.0.tar.gz
/thrift-0.14.0.tar.gz
/thrift-0.15.0.tar.gz
/thrift-0.20.0.tar.gz

27
THRIFT-4177.patch Normal file
View file

@ -0,0 +1,27 @@
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; }

View file

@ -19,10 +19,7 @@
# under the License.
#
echo -n "make distclean... "
make -k distclean >/dev/null 2>&1
echo "ok"
./cleanup.sh
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)
@ -41,24 +38,17 @@ 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 [ $(format_version $AUTOMAKE_VERSION) -lt $(format_version 1.13) ]; then
if [ "$AUTOMAKE_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

158
fb303-0.10.0-buildxml.patch Normal file
View file

@ -0,0 +1,158 @@
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>

13
fix-ppc64le-builds.patch Normal file
View file

@ -0,0 +1,13 @@
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

View file

@ -1,47 +0,0 @@
From 1920f04398ca32e320f6cf942534ba9d8b3231fd Mon Sep 17 00:00:00 2001
From: Sutou Kouhei <kou@clear-code.com>
Date: Mon, 23 Dec 2024 12:33:22 +0900
Subject: [PATCH] THRIFT-5842: Add missing cstdint include for int64_t in
Mutex.h
Client: cpp
GCC 15 (not released yet) requires `#include <cstdint>` for `int64_t`
but `lib/cpp/src/thrift/concurrency/Mutex.h` doesn't have it. So we
can't build Thrift with GCC 15:
[80/359] Building CXX object lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o
FAILED: lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o
/bin/g++-15 -DBOOST_ALL_DYN_LINK -DBOOST_TEST_DYN_LINK -DTHRIFT_STATIC_DEFINE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/kou/work/cpp/thrift.kou.build/lib/cpp -I/home/kou/work/cpp/thrift.kou/lib/cpp -I/home/kou/work/cpp/thrift.kou.build -I/home/kou/work/cpp/thrift.kou/lib/cpp/src -g -std=c++11 -MD -MT lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -MF lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o.d -o lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -c /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp
In file included from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TServerSocket.h:25,
from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.h:23,
from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp:21:
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:47:26: error: 'int64_t' has not been declared
47 | virtual bool timedlock(int64_t milliseconds) const;
| ^~~~~~~
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:25:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
24 | #include <thrift/TNonCopyable.h>
+++ |+#include <cstdint>
25 |
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: error: 'int64_t' has not been declared
60 | Guard(const Mutex& value, int64_t timeout = 0) : mutex_(&value) {
| ^~~~~~~
/home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
See also: https://github.com/apache/arrow/issues/45096
---
lib/cpp/src/thrift/concurrency/Mutex.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/cpp/src/thrift/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h
index 1e5c3fba37c..12f1729d6bf 100644
--- a/lib/cpp/src/thrift/concurrency/Mutex.h
+++ b/lib/cpp/src/thrift/concurrency/Mutex.h
@@ -20,6 +20,7 @@
#ifndef _THRIFT_CONCURRENCY_MUTEX_H_
#define _THRIFT_CONCURRENCY_MUTEX_H_ 1
+#include <cstdint>
#include <memory>
#include <thrift/TNonCopyable.h>

104
libfb303-0.10.0.pom Normal file
View file

@ -0,0 +1,104 @@
<?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>

120
libthrift-0.10.0.pom Normal file
View file

@ -0,0 +1,120 @@
<?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>

View file

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://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">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.20.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>https://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.36</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.2.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.core5</groupId>
<artifactId>httpcore5</artifactId>
<version>5.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>2.1.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>

View file

@ -1 +1 @@
SHA512 (thrift-0.20.0.tar.gz) = 8dc77f666e60141a6b3cf7ee1407b08a0e80d176f8ccfee69317d7df89ab87aea2c7b3ba3e59d4561835edf1ce23762443ad5aeed0099bf075b010853d5eb1cd
SHA512 (thrift-0.10.0.tar.gz) = 3695cf0fb0e4080b02446ab694fb61476997d8b181942dd6fe1e3e7cf0dcf990b4184ea33f9d0bc290b96200f702cf1ac1579e36b6b5bfe9ba8914b2d2938ddc

View file

@ -1,9 +1,3 @@
# thrift: FTBFS in Fedora 36: /usr/include/c++/12/bits/new_allocator.h:158:33:
# error: 'operator delete' called on pointer '_605' with nonzero offset [1,
# 9223372036854775800] [-Werror=free-nonheap-object]
# https://bugzilla.redhat.com/show_bug.cgi?id=2046213
#
%global php_extdir %(php-config --extension-dir 2>/dev/null || echo "undefined")
%{?perl_default_filter}
@ -17,15 +11,6 @@
# We should be able to enable this in the future
%global want_d 0
# Can't do anything with java with all the build deps in modules
%global want_java 0
%if 0%{?want_java} == 0
%global java_configure --without-java
%else
%global java_configure --with-java
%endif
# Thrift's Ruby support depends on Mongrel. Since Mongrel is
# deprecated in Fedora, we can't support Ruby bindings for Thrift
# unless and until Thrift is patched to use a different HTTP server.
@ -63,15 +48,9 @@
%global want_golang 0
%global golang_configure --without-go
# Thrift's Lua support has not yet been worked on
%global want_lua 0
%global lua_configure --without-lua
# NOTE: thrift versions their libraries by package version, so each version
# change is a SONAME change and dependencies need to be rebuilt
Name: thrift
Version: 0.20.0
Release: 8%{?dist}
Version: 0.10.0
Release: 15%{?dist}
Summary: Software framework for cross-language services development
# Parts of the source are used under the BSD and zlib licenses, but
@ -81,7 +60,7 @@ Summary: Software framework for cross-language services development
# Here's the breakdown:
# ./lib/py/compat/win32/stdint.h is 2-clause BSD
# ./compiler/cpp/src/md5.[ch] are zlib
License: Apache-2.0 AND BSD-3-Clause AND Zlib
License: ASL 2.0 and BSD and zlib
URL: https://thrift.apache.org/
Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}.tar.gz
@ -89,33 +68,43 @@ Source0: https://archive.apache.org/dist/%{name}/%{version}/%{name}-%{version}.t
Source1: https://repo1.maven.org/maven2/org/apache/thrift/lib%{name}/%{version}/lib%{name}-%{version}.pom
Source2: https://raw.github.com/apache/%{name}/%{version}/bootstrap.sh
Source3: https://repo1.maven.org/maven2/org/apache/thrift/libfb303/%{version}/libfb303-%{version}.pom
# this patch is adapted from Gil Cattaneo's thrift-0.7.0 package
Patch0: %{name}-%{version}-buildxml.patch
# for fb303, excise maven ant tasks; build against system libraries; etc.
Patch1: fb303-%{version}-buildxml.patch
# fix configure.ac insistence on using /usr/local/lib for JAVA_PREFIX
Patch2: configure-java-prefix.patch
# fix build with GCC 15: https://github.com/apache/thrift/pull/3078
Patch3: gcc15.patch
# fix for ppc64le builds not linking to /usr/lib64 directory
Patch3: fix-ppc64le-builds.patch
# fix for s390x build; incorporates fix for THRIFT-4177 with some code from THRIFT-4136
Patch4: THRIFT-4177.patch
# Update fb303 for python3
Patch5: python3.patch
Group: Development/Libraries
# BuildRequires for language-specific bindings are listed under these
# subpackages, to facilitate enabling or disabling individual language
# bindings in the future
%if 0%{?want_java} > 0
BuildRequires: ant >= 1.7
%endif
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: boost-static
BuildRequires: flex
BuildRequires: flex-devel
BuildRequires: gcc-c++
BuildRequires: glib2-devel
BuildRequires: libevent-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: openssl-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt-devel
BuildRequires: texlive
BuildRequires: zlib-devel
@ -158,7 +147,6 @@ The %{name}-qt package contains GLib bindings for %{name}.
%package -n python3-%{name}
Summary: Python 3 support for %{name}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3
Obsoletes: python-%{name} < 0.10.0-1%{?dist}
@ -174,6 +162,7 @@ BuildRequires: perl(Bit::Vector)
BuildRequires: perl(Class::Accessor)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl-generators
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(Bit::Vector)
Requires: perl(Encode)
Requires: perl(HTTP::Request)
@ -187,11 +176,6 @@ Requires: perl(constant)
Requires: perl(strict)
Requires: perl(utf8)
Requires: perl(warnings)
# thrift improperly packages some components in files with names different
# than the package they contain
Provides: perl(Thrift::Exception)
Provides: perl(Thrift::MessageType)
Provides: perl(Thrift::Type)
BuildArch: noarch
%description -n perl-%{name}
@ -221,7 +205,6 @@ BuildRequires: php-devel
The php-%{name} package contains PHP bindings for %{name}.
%endif
%if 0%{?want_java} > 0
%package -n lib%{name}-javadoc
Summary: API documentation for java-%{name}
Requires: lib%{name}-java = %{version}-%{release}
@ -258,7 +241,6 @@ BuildArch: noarch
%description -n lib%{name}-java
The lib%{name}-java package contains Java bindings for %{name}.
%endif
%if 0%{?want_ruby} > 0
%package -n ruby-%{name}
@ -284,6 +266,44 @@ BuildRequires: erlang-rebar
The erlang-%{name} package contains Erlang bindings for %{name}.
%endif
%package -n fb303
Summary: Basic interface for Thrift services
Requires: %{name}%{?_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
Requires: javapackages-tools
Requires: mvn(org.slf4j:slf4j-api)
Requires: mvn(commons-lang:commons-lang)
Requires: 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
@ -297,17 +317,18 @@ cp -p %{SOURCE2} bootstrap.sh
# work around linking issues
echo 'libthrift_c_glib_la_LIBADD = $(GLIB_LIBS) $(GOBJECT_LIBS) -L../cpp/.libs ' >> lib/c_glib/Makefile.am
echo 'libthriftqt5_la_LIBADD = $(QT_LIBS) -lthrift -L.libs' >> lib/cpp/Makefile.am
echo 'libthriftqt_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_libthriftqt5_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
echo 'EXTRA_libthriftqt_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
echo 'EXTRA_libthriftz_la_DEPENDENCIES = libthrift.la' >> lib/cpp/Makefile.am
# echo 'libfb303_so_LIBADD = -lthrift -L../../../lib/cpp/.libs' >> contrib/fb303/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
# fix broken upstream check for ant version; we enforce this with BuildRequires, so no need to check here
sed -i 's|ANT_VALID=.*|ANT_VALID=1|' aclocal/ax_javac_and_java.m4
# explicitly set python3
shopt -s globstar
sed -i -E 's@^(#!.*/env) *python *$@\1 python3@' **/*.py
sed -i 's|ANT_VALID=.*|ANT_VALID=1|' contrib/fb303/aclocal/ax_javac_and_java.m4
%build
export PY_PREFIX=%{_prefix}
@ -327,24 +348,52 @@ 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}/%{name}|' lib/java/Makefile.*
# build a jar without a version number
#sed -i 's|${thrift.artifactid}-${version}|${thrift.artifactid}|' lib/java/build.xml
sed -i 's|${thrift.artifactid}-${version}|${thrift.artifactid}|' lib/java/build.xml
# Proper permissions for Erlang files
sed -i 's|$(INSTALL) $$p|$(INSTALL) --mode 644 $$p|g' lib/erl/Makefile.am
# Build fb303 jars against the in-situ copy of thrift
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
# Create a straightforward makefile for Java fb303
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
# use unversioned doc dirs where appropriate (via _pkgdocdir macro)
export PYTHON=%{__python3}
%configure --disable-dependency-tracking --disable-static --with-boost=%{_prefix} \
--docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} \
%{java_configure} %{ruby_configure} %{erlang_configure} %{golang_configure} %{php_configure} %{lua_configure}
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}/%{name}-%{version}}
# eliminate unused direct shlib dependencies
sed -i -e 's/ -shared / -Wl,--as-needed\0/g' libtool
%make_build
make %{?_smp_mflags}
# build fb303
(
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
)
)
%install
%make_install
@ -353,13 +402,14 @@ find %{buildroot} -name fastbinary.so | xargs -r chmod 755
find %{buildroot} -name \*.erl -or -name \*.hrl -or -name \*.app | xargs -r chmod 644
# Remove javadocs jar
%if 0%{?want_java} > 0
find %{buildroot}/%{_javadir} -name lib%{name}-javadoc.jar -exec rm -f '{}' \;
# Add POM file and depmap
mkdir -p %{buildroot}%{_mavenpomdir}
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-libthrift.pom
%add_maven_depmap JPP-libthrift.pom libthrift.jar
%endif
# Remove bundled jar files
find %{buildroot} -name \*.jar -a \! -name \*thrift\* -exec rm -f '{}' \;
@ -367,24 +417,40 @@ find %{buildroot} -name \*.jar -a \! -name \*thrift\* -exec rm -f '{}' \;
# Move perl files into appropriate places
find %{buildroot} -name \*.pod -exec rm -f '{}' \;
find %{buildroot} -name .packlist -exec rm -f '{}' \;
find %{buildroot}%{_prefix}/lib/perl5 -type d -empty -delete
find %{buildroot}/usr/lib/perl5 -type d -empty -delete
mkdir -p %{buildroot}/%{perl_vendorlib}/
mv %{buildroot}%{_prefix}/lib/perl5/* %{buildroot}/%{perl_vendorlib}
mv %{buildroot}/usr/lib/perl5/* %{buildroot}/%{perl_vendorlib}
%if 0%{?want_php} != 0
# Move arch-independent php files into the appropriate place
mkdir -p %{buildroot}/%{_datadir}/php/
mv %{buildroot}/%{php_extdir}/Thrift %{buildroot}/%{_datadir}/php/
%endif
%endif # want_php
# Fix permissions on Thread.h
find %{buildroot} -name Thread.h -exec chmod a-x '{}' \;
# install fb303
(
cd contrib/fb303
make DESTDIR=%{buildroot} install
(
cd java
ant -Dinstall.path=%{buildroot}%{_javadir} -Dinstall.javadoc.path=%{buildroot}%{_javadocdir}/fb303 install
)
)
# install maven pom and depmaps for fb303
install -pm 644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/JPP-libfb303.pom
%add_maven_depmap JPP-libfb303.pom libfb303.jar -f "fb303"
# Ensure all python scripts are executable
find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r chmod 755
%ldconfig_scriptlets
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc LICENSE NOTICE
@ -398,17 +464,19 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
%{_libdir}/libthrift_c_glib.so.*
%files qt
%{_libdir}/libthriftqt5.so
%{_libdir}/libthriftqt5-%{version}.so
%{_libdir}/libthriftqt.so
%{_libdir}/libthriftqt-%{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-qt5.pc
%{_libdir}/pkgconfig/thrift-qt.pc
%{_libdir}/pkgconfig/thrift-nb.pc
%{_libdir}/pkgconfig/thrift.pc
%{_libdir}/pkgconfig/thrift_c_glib.pc
@ -438,143 +506,32 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
%{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info
%doc LICENSE NOTICE
%if 0%{?want_java} > 0
%files -n lib%{name}-javadoc
%{_javadocdir}/%{name}
%doc LICENSE NOTICE
%files -n lib%{name}-java -f .mfiles
%doc LICENSE NOTICE
%endif
%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}/%{name}_fb303-%{version}-py%{python3_version}.egg-info
%doc LICENSE NOTICE
%files -n fb303-java -f .mfiles-fb303
%doc LICENSE NOTICE
%changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 0.20.0-8
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 0.20.0-7
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.20.0-5
- Rebuilt for Python 3.14
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 0.20.0-2
- Rebuilt for Python 3.13
* Fri May 17 2024 Orion Poplawski <orion@nwra.com> - 0.20.0-1
- Update to 0.20.0
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.15.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 16 2023 Orion Poplawski <orion@nwra.com> - 0.15.0-2
- Re-enable LTO, seems to be working again
* Thu Jun 15 2023 Orion Poplawski <orion@nwra.com> - 0.15.0-1
- Update to 0.15.0
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.14.0-14
- Rebuilt for Python 3.12
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Nov 18 2022 Christopher Tubbs <ctubbsii@fedoraproject.org> - 0.14.0-12
- Convert license tags to SPDX
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.14.0-10
- Rebuilt for Python 3.11
* Tue Jun 07 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-9
- Work around GCC 12 error by disabling LTO (close RHBZ#2046213)
* Wed Jun 01 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.14.0-8
- Perl 5.36 rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.14.0-6
- Rebuilt with OpenSSL 3.0.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.14.0-4
- Rebuilt for Python 3.10
* Sun May 23 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.14.0-3
- Perl 5.34 rebuild
* Thu Feb 18 2021 Orion Poplawski <orion@nwra.com> - 0.14.0-2
- Add patch to fix compilation on non-x86
* Mon Feb 15 2021 Orion Poplawski <orion@nwra.com> - 0.14.0-1
- Update to 0.14.0 (bz#1928172) CVE-2020-13949
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 05 2020 Orion Poplawski <orion@nwra.com> - 0.13.0-9
- Add BR python3-setuptools
* Wed Sep 23 2020 Christopher Tubbs <ctubbsii@fedoraproject.org> - 0.13.0-8
- rebuilt for side tag f34-build-side-30069
* Thu Sep 17 2020 Orion Poplawski <orion@nwra.com> - 0.13.0-7
- Drop unneeded BR on flex-devel (bz#1871095)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.13.0-5
- Perl 5.32 rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.13.0-4
- Rebuilt for Python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Dec 4 2019 Orion Poplawski <orion@nwra.com> - 0.13.0-2
- Fix perl dependencies
- Explicitly disable lua
* Sun Dec 1 2019 Orion Poplawski <orion@nwra.com> - 0.13.0-1
- Update to 0.13.0 (bz#1778343)
- Drops fb303 package
- Switch to Qt5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.10.0-20
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Tue Aug 20 2019 Christopher Tubbs <ctubbsii@fedoraproject.org> - 0.10.0-19
- Fix FTBFS (by removing Java support) and fix Python3 issues (rhbz#1738810 and rhbz#1533306)
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Jun 01 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.10.0-17
- Perl 5.30 rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Jul 18 2018 Christopher Tubbs <ctubbsii@fedoraproject.org> - 0.10.0-15
- Rebuild to address transient error