diff --git a/backport-THRIFT-5348-Update-debian-copyright.patch b/backport-THRIFT-5348-Update-debian-copyright.patch deleted file mode 100644 index ea94c2cdeab61cc42dd08ad2d2d2fdcd660d5637..0000000000000000000000000000000000000000 --- a/backport-THRIFT-5348-Update-debian-copyright.patch +++ /dev/null @@ -1,173 +0,0 @@ -commit 897652e5f08147efad9db66b86c3036b3d3826db -Author: Jihoon Seo -Date: Wed Feb 10 19:08:28 2021 +0900 - - THRIFT-5348: Update debian/copyright [skip ci] - Patch: Jihoon Seo - - This closes #2326 - -diff --git a/debian/copyright b/debian/copyright -index ada769b08..a7038b1c4 100644 ---- a/debian/copyright -+++ b/debian/copyright -@@ -17,69 +17,67 @@ conditions of the following licenses. - -------------------------------------------------- - Portions of the following files are licensed under the MIT License: - -- lib/erl/src/Makefile.am -+ lib/erl/Makefile.am - --Please see doc/otp-base-license.txt for the full terms of this license. -+Please see doc/licenses/otp-base-license.txt for the full terms of this license. - - - -------------------------------------------------- - The following files contain some portions of code contributed under --the Thrift Software License (see doc/old-thrift-license.txt), and relicensed -+the Thrift Software License (see doc/licenses/old-thrift-license.txt), and relicensed - under the Apache 2.0 License: - - compiler/cpp/Makefile.am -- compiler/cpp/src/generate/t_cpp_generator.cc -- compiler/cpp/src/generate/t_netstd_generator.cc -- compiler/cpp/src/generate/t_erl_generator.cc -- compiler/cpp/src/generate/t_hs_generator.cc -- compiler/cpp/src/generate/t_java_generator.cc -- compiler/cpp/src/generate/t_ocaml_generator.cc -- compiler/cpp/src/generate/t_perl_generator.cc -- compiler/cpp/src/generate/t_php_generator.cc -- compiler/cpp/src/generate/t_py_generator.cc -- compiler/cpp/src/generate/t_rb_generator.cc -- compiler/cpp/src/generate/t_st_generator.cc -- compiler/cpp/src/generate/t_xsd_generator.cc -- compiler/cpp/src/main.cc -- compiler/cpp/src/parse/t_field.h -- compiler/cpp/src/parse/t_program.h -- compiler/cpp/src/platform.h -- compiler/cpp/src/thriftl.ll -- compiler/cpp/src/thrifty.yy -- lib/netstd/src/Protocol/TBinaryProtocol.cs -- lib/netstd/src/Protocol/TField.cs -- lib/netstd/src/Protocol/TList.cs -- lib/netstd/src/Protocol/TMap.cs -- lib/netstd/src/Protocol/TMessage.cs -- lib/netstd/src/Protocol/TMessageType.cs -- lib/netstd/src/Protocol/TProtocol.cs -- lib/netstd/src/Protocol/TProtocolException.cs -- lib/netstd/src/Protocol/TProtocolFactory.cs -- lib/netstd/src/Protocol/TProtocolUtil.cs -- lib/netstd/src/Protocol/TSet.cs -- lib/netstd/src/Protocol/TStruct.cs -- lib/netstd/src/Protocol/TType.cs -- lib/netstd/src/Server/TServer.cs -- lib/netstd/src/Server/TSimpleServer.cs -- lib/netstd/src/Server/TThreadPoolServer.cs -- lib/netstd/src/TApplicationException.cs -- lib/netstd/src/Thrift.csproj -- lib/netstd/src/Thrift.sln -- lib/netstd/src/TProcessor.cs -- lib/netstd/src/Transport/TServerSocket.cs -- lib/netstd/src/Transport/TServerTransport.cs -- lib/netstd/src/Transport/TSocket.cs -- lib/netstd/src/Transport/TStreamTransport.cs -- lib/netstd/src/Transport/TTransport.cs -- lib/netstd/src/Transport/TTransportException.cs -- lib/netstd/src/Transport/TTransportFactory.cs -- lib/netstd/ThriftMSBuildTask/Properties/AssemblyInfo.cs -- lib/netstd/ThriftMSBuildTask/ThriftBuild.cs -- lib/netstd/ThriftMSBuildTask/ThriftMSBuildTask.csproj -+ compiler/cpp/src/thrift/generate/t_cpp_generator.cc -+ compiler/cpp/src/thrift/generate/t_netstd_generator.cc -+ compiler/cpp/src/thrift/generate/t_erl_generator.cc -+ compiler/cpp/src/thrift/generate/t_hs_generator.cc -+ compiler/cpp/src/thrift/generate/t_java_generator.cc -+ compiler/cpp/src/thrift/generate/t_ocaml_generator.cc -+ compiler/cpp/src/thrift/generate/t_perl_generator.cc -+ compiler/cpp/src/thrift/generate/t_php_generator.cc -+ compiler/cpp/src/thrift/generate/t_py_generator.cc -+ compiler/cpp/src/thrift/generate/t_rb_generator.cc -+ compiler/cpp/src/thrift/generate/t_st_generator.cc -+ compiler/cpp/src/thrift/generate/t_xsd_generator.cc -+ compiler/cpp/src/thrift/main.cc -+ compiler/cpp/src/thrift/parse/t_field.h -+ compiler/cpp/src/thrift/parse/t_program.h -+ compiler/cpp/src/thrift/platform.h -+ compiler/cpp/src/thrift/thriftl.ll -+ compiler/cpp/src/thrift/thrifty.yy -+ lib/netstd/Thrift/Protocol/TBinaryProtocol.cs -+ lib/netstd/Thrift/Protocol/Entities/TField.cs -+ lib/netstd/Thrift/Protocol/Entities/TList.cs -+ lib/netstd/Thrift/Protocol/Entities/TMap.cs -+ lib/netstd/Thrift/Protocol/Entities/TMessage.cs -+ lib/netstd/Thrift/Protocol/Entities/TMessageType.cs -+ lib/netstd/Thrift/Protocol/TProtocol.cs -+ lib/netstd/Thrift/Protocol/TProtocolException.cs -+ lib/netstd/Thrift/Protocol/TProtocolFactory.cs -+ lib/netstd/Thrift/Protocol/Utilities/TProtocolUtil.cs -+ lib/netstd/Thrift/Protocol/Entities/TSet.cs -+ lib/netstd/Thrift/Protocol/Entities/TStruct.cs -+ lib/netstd/Thrift/Protocol/Entities/TType.cs -+ lib/netstd/Thrift/Server/TServer.cs -+ lib/netstd/Thrift/Server/TSimpleAsyncServer.cs -+ lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs -+ lib/netstd/Thrift/TApplicationException.cs -+ lib/netstd/Thrift/Thrift.csproj -+ lib/netstd/Thrift.sln -+ lib/netstd/Thrift/Transport/Server/TServerSocketTransport.cs -+ lib/netstd/Thrift/Transport/Server/TServerTransport.cs -+ lib/netstd/Thrift/Transport/Client/TSocketTransport.cs -+ lib/netstd/Thrift/Transport/Client/TStreamTransport.cs -+ lib/netstd/Thrift/Transport/TTransport.cs -+ lib/netstd/Thrift/Transport/TTransportException.cs -+ lib/netstd/Thrift/Transport/TTransportFactory.cs -+ lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Properties/AssemblyInfo.cs -+ lib/netstd/Tests/Thrift.PublicInterfaces.Compile.Tests/Thrift.PublicInterfaces.Compile.Tests.csproj - lib/rb/lib/thrift.rb -- lib/st/README -+ lib/st/README.md - lib/st/thrift.st -- test/OptionalRequiredTest.cpp -+ lib/cpp/test/OptionalRequiredTest.cpp - test/OptionalRequiredTest.thrift - test/ThriftTest.thrift - -@@ -91,38 +89,3 @@ For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 comp - # Copying and distribution of this file, with or without - # modification, are permitted in any medium without royalty provided - # the copyright notice and this notice are preserved. -- ---------------------------------------------------- --For the compiler/cpp/src/md5.[ch] components: -- --/* -- Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. -- -- This software is provided 'as-is', without any express or implied -- warranty. In no event will the authors be held liable for any damages -- arising from the use of this software. -- -- Permission is granted to anyone to use this software for any purpose, -- including commercial applications, and to alter it and redistribute it -- freely, subject to the following restrictions: -- -- 1. The origin of this software must not be misrepresented; you must not -- claim that you wrote the original software. If you use this software -- in a product, an acknowledgment in the product documentation would be -- appreciated but is not required. -- 2. Altered source versions must be plainly marked as such, and must not be -- misrepresented as being the original software. -- 3. This notice may not be removed or altered from any source distribution. -- -- L. Peter Deutsch -- ghost@aladdin.com -- -- */ -- ----------------------------------------------------- --For the lib/rb/setup.rb: Copyright (c) 2000-2005 Minero Aoki, --lib/ocaml/OCamlMakefile and lib/ocaml/README-OCamlMakefile components: -- Copyright (C) 1999 - 2007 Markus Mottl -- --Licensed under the terms of the GNU Lesser General Public License 2.1 --(see doc/lgpl-2.1.txt for the full terms of this license) diff --git a/compiler-cpp-src-thrift-generator.patch b/compiler-cpp-src-thrift-generator.patch new file mode 100644 index 0000000000000000000000000000000000000000..d1b7692a93ee7540d2923de477c8c82ecf120dad --- /dev/null +++ b/compiler-cpp-src-thrift-generator.patch @@ -0,0 +1,553 @@ +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_xml_generator.cc.orig 2025-08-04 14:38:17.848945376 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_xml_generator.cc 2025-08-04 15:37:52.156774966 -0400 +@@ -17,6 +17,7 @@ + * under the License. + */ + ++#include + #include + #include + #include +@@ -84,6 +85,7 @@ + void init_generator() override; + void close_generator() override; + std::string display_name() const override; ++ std::string xml_autogen_comment(); + + void generate_program() override; + +@@ -149,12 +151,13 @@ + void write_element_string(string name, string value); + void write_value(t_type* tvalue); + void write_const_value(t_const_value* value); +- virtual std::string xml_autogen_comment() { +- return std::string("\n") + " * Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + " *\n" + " * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n"; +- } + }; + ++std::string t_xml_generator::xml_autogen_comment() { ++ return std::string("'") + "Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" + "\n" ++ + "DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" + "'!\n"; ++} ++ + void t_xml_generator::init_generator() { + MKDIR(get_out_dir().c_str()); + +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_delphi_generator.cc.orig 2025-08-05 07:22:28.924176865 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_delphi_generator.cc 2025-08-05 07:25:26.650236588 -0400 +@@ -371,11 +371,7 @@ + void write_struct(std::string line); + void write_service(std::string line); + +- std::string autogen_comment() override { +- return std::string("(**\n") + " * Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + " *\n" + " * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +- + " *)\n"; +- } ++ std::string delphi_autogen_comment(); + + string replace_all(string contents, string search, string replace); + string xml_encode(string contents); +@@ -490,6 +486,11 @@ + std::ostream& indent_impl(std::ostream& os) { return os << indent_impl(); }; + }; + ++std::string t_delphi_generator::delphi_autogen_comment() { ++ return std::string("(**\n") + " * Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" ++ + " *\n" + " * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n *)\n"; ++ } ++ + string t_delphi_generator::replace_all(string contents, string search, string repl) { + string str(contents); + +@@ -722,7 +723,7 @@ + + f_all.open(f_name); + +- f_all << autogen_comment() << endl; ++ f_all << delphi_autogen_comment() << endl; + generate_delphi_doc(f_all, program_); + f_all << "unit " << unitname << ";" << endl << endl; + f_all << "{$WARN SYMBOL_DEPRECATED OFF}" << endl; +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_haxe_generator.cc.orig 2025-08-05 08:00:57.821921061 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_haxe_generator.cc 2025-08-05 08:29:16.248683254 -0400 +@@ -313,19 +313,19 @@ + * + * @return List of imports for haxe types that are used in here + */ +-string t_haxe_generator::haxe_type_imports() { +- return string() +- + "import org.apache.thrift.helper.*;\n" +- + "import haxe.io.Bytes;\n" +- + "import haxe.ds.IntMap;\n" +- + "import haxe.ds.StringMap;\n" +- + "import haxe.ds.ObjectMap;\n" +- + "import org.apache.thrift.helper.ObjectSet;\n" +- + "\n" +- + "#if flash\n" +- + "import flash.errors.ArgumentError;\n" +- + "#end\n" +- + "\n"; ++std::string t_haxe_generator::haxe_type_imports() { ++ return std::string( ++ "import org.apache.thrift.helper.*;\n" ++ "import haxe.io.Bytes;\n" ++ "import haxe.ds.IntMap;\n" ++ "import haxe.ds.StringMap;\n" ++ "import haxe.ds.ObjectMap;\n" ++ "import org.apache.thrift.helper.ObjectSet;\n" ++ "\n" ++ "#if flash\n" ++ "import flash.errors.ArgumentError;\n" ++ "#end\n" ++ "\n"); + } + + /** +@@ -333,12 +333,12 @@ + * + * @return List of imports necessary for thrift + */ +-string t_haxe_generator::haxe_thrift_imports() { +- return string() +- + "import org.apache.thrift.*;\n" +- + "import org.apache.thrift.meta_data.*;\n" +- + "import org.apache.thrift.protocol.*;\n" +- + "\n"; ++std::string t_haxe_generator::haxe_thrift_imports() { ++ return std::string( ++ "import org.apache.thrift.*;\n" ++ "import org.apache.thrift.meta_data.*;\n" ++ "import org.apache.thrift.protocol.*;\n" ++ "\n"); + } + + /** +@@ -346,7 +346,7 @@ + * + * @return List of imports necessary for a given t_struct + */ +-string t_haxe_generator::haxe_thrift_gen_imports(t_struct* tstruct, string& imports) { ++std::string t_haxe_generator::haxe_thrift_gen_imports(t_struct* tstruct, std::string& imports) { + + const vector& members = tstruct->get_members(); + vector::const_iterator m_iter; +@@ -355,7 +355,7 @@ + for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) { + t_program* program = (*m_iter)->get_type()->get_program(); + if (program != nullptr && program != program_) { +- string package = make_package_name( program->get_namespace("haxe")); ++ std::string package = make_package_name( program->get_namespace("haxe")); + if (!package.empty()) { + if (imports.find(package + "." + (*m_iter)->get_type()->get_name()) == string::npos) { + imports.append("import " + package + "." + get_cap_name((*m_iter)->get_type()->get_name()) + ";\n"); +@@ -371,8 +371,8 @@ + * + * @return List of imports necessary for a given t_service + */ +-string t_haxe_generator::haxe_thrift_gen_imports(t_service* tservice) { +- string imports; ++std::string t_haxe_generator::haxe_thrift_gen_imports(t_service* tservice) { ++ std::string imports; + const vector& functions = tservice->get_functions(); + vector::const_iterator f_iter; + +@@ -380,7 +380,7 @@ + for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) { + t_program* program = (*f_iter)->get_returntype()->get_program(); + if (program != nullptr && program != program_) { +- string package = make_package_name( program->get_namespace("haxe")); ++ std::string package = make_package_name( program->get_namespace("haxe")); + if (!package.empty()) { + if (imports.find(package + "." + (*f_iter)->get_returntype()->get_name()) == string::npos) { + imports.append("import " + package + "." + get_cap_name((*f_iter)->get_returntype()->get_name())+ ";\n"); +@@ -419,7 +419,7 @@ + */ + void t_haxe_generator::generate_enum(t_enum* tenum) { + // Make output file +- string f_enum_name = package_dir_ + "/" + get_cap_name(tenum->get_name()) + ".hx"; ++ std::string f_enum_name = package_dir_ + "/" + get_cap_name(tenum->get_name()) + ".hx"; + ofstream_with_content_based_conditional_update f_enum; + f_enum.open(f_enum_name.c_str()); + +@@ -481,7 +481,7 @@ + return; + } + +- string f_consts_name = package_dir_ + "/" + get_cap_name(program_name_) + "Constants.hx"; ++ std::string f_consts_name = package_dir_ + "/" + get_cap_name(program_name_) + "Constants.hx"; + ofstream_with_content_based_conditional_update f_consts; + f_consts.open(f_consts_name.c_str()); + +@@ -509,7 +509,7 @@ + } + + void t_haxe_generator::print_const_value(std::ostream& out, +- string name, ++ std::string name, + t_type* type, + t_const_value* value) { + type = get_true_type(type); +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_generator.h.orig 2025-08-05 08:54:30.790114246 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_generator.h 2025-08-05 08:56:23.064220140 -0400 +@@ -207,9 +207,7 @@ + + " * @generated\n" + " */\n"; + } + +- virtual std::string autogen_summary() { +- return std::string("Autogenerated by Thrift Compiler (") + THRIFT_VERSION + ")"; +- } ++ std::string autogen_summary(); + + /** + * Indentation level modifiers +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_st_generator.cc.orig 2025-08-05 07:41:50.871944030 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_st_generator.cc 2025-08-05 13:02:16.075895211 -0400 +@@ -212,9 +212,9 @@ + /** + * Autogen'd comment + */ +-string t_st_generator::st_autogen_comment() { +- return std::string("'") + "Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" + "\n" +- + "DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" + "'!\n"; ++std::string t_st_generator::st_autogen_comment() { ++ return std::string("'Autogenerated by Thrift Compiler (") + THRIFT_VERSION + ")\n" ++ + "DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n'!\n"; + } + + void t_st_generator::generate_force_consts() { +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_generator.cc.orig 2025-08-05 08:56:37.378978641 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_generator.cc 2025-08-05 14:52:28.171996778 -0400 +@@ -18,7 +18,15 @@ + */ + + #include "thrift/generate/t_generator.h" +-using namespace std; ++using std::map; ++using std::ofstream; ++using std::ostream; ++using std::ostringstream; ++using std::string; ++using std::stringstream; ++using std::vector; ++using std::stack; ++using std::set; + + /** + * Top level program generation function. Calls the generator subclass methods +@@ -166,7 +174,7 @@ + const string& comment_end) { + if (!comment_start.empty()) + indent(out) << comment_start; +- stringstream docs(contents, ios_base::in); ++ std::stringstream docs(contents, std::ios_base::in); + while (!(docs.eof() || docs.fail())) { + char line[1024]; + docs.getline(line, 1024); +@@ -256,3 +264,12 @@ + : short_name_(short_name), long_name_(long_name), documentation_(documentation) { + t_generator_registry::register_generator(this); + } ++ ++std::string t_generator::autogen_summary() { ++ std::string summary; ++ summary.reserve(128); ++ summary += "\nAutogenerated by Thrift Compiler ("; ++ summary += THRIFT_VERSION; ++ summary += ")\n"; ++ return summary; ++} +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_ocaml_generator.cc.orig 2025-08-05 15:26:13.192881959 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_ocaml_generator.cc 2025-08-05 16:14:30.751712514 -0400 +@@ -147,7 +147,7 @@ + */ + + /** Need to disable codegen comment for unit tests to be version-agnostic */ +- virtual std::string ocaml_autogen_comment(); ++ std::string ocaml_autogen_comment(); + + std::string ocaml_imports(); + std::string type_name(t_type* ttype); +@@ -250,9 +250,14 @@ + /** + * Autogen'd comment + */ +-string t_ocaml_generator::ocaml_autogen_comment() { +- return std::string("(*\n") + " Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" + "\n" +- + " DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING\n" + "*)\n"; ++std::string t_ocaml_generator::ocaml_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "(*\nAutogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n\n"; ++ comment += "DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n'*)\n"; ++ return comment; + } + + /** +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_erl_generator.cc.orig 2025-08-05 06:44:05.974173879 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_erl_generator.cc 2025-08-05 18:22:44.776857772 -0400 +@@ -327,10 +327,14 @@ + /** + * Autogen'd comment + */ +-string t_erl_generator::erl_autogen_comment() { +- return std::string("%%\n") + "%% Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + "%%\n" + "%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +- + "%%\n"; ++std::string t_erl_generator::erl_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "%%\n%% Autogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n%%\n"; ++ comment += "%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n%%\n"; ++ return comment; + } + + /** +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_js_generator.cc.orig 2025-08-05 17:40:43.927226068 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_js_generator.cc 2025-08-05 18:41:15.771457833 -0400 +@@ -237,11 +237,7 @@ + void parse_imports(t_program* program, const std::string& imports_string); + void parse_thrift_package_output_directory(const std::string& thrift_package_output_directory); + +- std::string autogen_comment() override { +- return std::string("//\n") + "// Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + "//\n" + "// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" +- + "//\n"; +- } ++ std::string autogen_comment(); + + t_type* get_contained_type(t_type* t); + +@@ -435,6 +431,16 @@ + ofstream_with_content_based_conditional_update f_service_ts_; + }; + ++std::string t_js_generator::autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "//\n// Autogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n"; ++ comment += "//\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n"; ++ return comment; ++} ++ + /** + * Prepares for file generation by opening up the necessary file output + * streams. +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_go_generator.cc.orig 2025-08-05 08:36:19.359430996 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_go_generator.cc 2025-08-06 07:28:46.462692125 -0400 +@@ -679,24 +679,27 @@ + * Autogen'd comment. The different text is necessary due to + * https://github.com/golang/go/issues/13560#issuecomment-288457920 + */ +-string t_go_generator::go_autogen_comment() { +- return +- std::string() + +- "// Code generated by Thrift Compiler (" + THRIFT_VERSION + "). DO NOT EDIT.\n\n"; ++std::string t_go_generator::go_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "// Autogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n//\n"; ++ return comment; + } + + /** + * Prints standard thrift package + */ +-string t_go_generator::go_package() { +- return string("package ") + package_name_ + "\n\n"; ++std::string t_go_generator::go_package() { ++ return std::string("package ") + package_name_ + "\n\n"; + } + + /** + * Render the beginning of the import statement. + * If consts include the additional imports. + */ +-string t_go_generator::go_imports_begin(bool consts) { ++std::string t_go_generator::go_imports_begin(bool consts) { + std::vector system_packages; + system_packages.push_back("bytes"); + system_packages.push_back("context"); +@@ -723,8 +726,8 @@ + * These "_ =" prevent the go compiler complaining about unused imports. + * This will have to do in lieu of more intelligent import statement construction + */ +-string t_go_generator::go_imports_end() { +- string import_end = string( ++std::string t_go_generator::go_imports_end() { ++ std::string import_end = string( + ")\n\n" + "// (needed to ensure safety because of naive import list construction.)\n" + "var _ = bytes.Equal\n" +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_perl_generator.cc.orig 2025-08-05 06:49:45.658579711 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_perl_generator.cc 2025-08-06 07:50:36.953301418 -0400 +@@ -153,10 +153,7 @@ + std::string argument_list(t_struct* tstruct); + std::string type_to_enum(t_type* ttype); + +- std::string autogen_comment() override { +- return std::string("#\n") + "# Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + "#\n" + "# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" + "#\n"; +- } ++ std::string perl_autogen_comment(); + + void perl_namespace_dirs(t_program* p, std::list& dirs) { + std::string ns = p->get_namespace("perl"); +@@ -217,6 +214,15 @@ + bool f_types_use_includes_emitted_; + }; + ++std::string t_perl_generator::perl_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "#\n# Autogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n#\n DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n#\n"; ++ return comment; ++} ++ + /** + * Prepares for file generation by opening up the necessary file output + * streams. +@@ -243,10 +249,10 @@ + f_consts_.open(f_consts_name.c_str()); + + // Print header +- f_types_ << autogen_comment() << perl_includes(); ++ f_types_ << perl_autogen_comment() << perl_includes(); + + // Print header +- f_consts_ << autogen_comment() << "package " << perl_namespace(program_) << "Constants;" << endl ++ f_consts_ << perl_autogen_comment() << "package " << perl_namespace(program_) << "Constants;" << endl + << perl_includes() << endl; + } + +@@ -675,7 +681,7 @@ + string f_service_name = get_namespace_out_dir() + service_name_ + ".pm"; + f_service_.open(f_service_name.c_str()); + +- f_service_ << autogen_comment() << perl_includes(); ++ f_service_ << perl_autogen_comment() << perl_includes(); + + bool done = false; + generate_use_includes(f_service_, done, tservice, true); +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_xsd_generator.cc.orig 2025-08-06 08:24:24.106666466 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_xsd_generator.cc 2025-08-06 08:27:46.233264170 -0400 +@@ -17,6 +17,7 @@ + * under the License. + */ + ++#include + #include + #include + #include +@@ -95,11 +96,7 @@ + std::string type_name(t_type* ttype); + std::string base_type_name(t_base_type::t_base tbase); + +- virtual std::string xml_autogen_comment() { +- return std::string("\n"; +- } ++ std::string xml_autogen_comment(); + + /** + * Output xsd/php file +@@ -113,6 +110,15 @@ + std::ostringstream s_xsd_types_; + }; + ++std::string t_xsd_generator::xml_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "\n"; ++ return comment; ++} ++ + void t_xsd_generator::init_generator() { + // Make output directory + MKDIR(get_out_dir().c_str()); +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_rb_generator.cc.orig 2025-08-05 06:52:06.709253127 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_rb_generator.cc 2025-08-06 08:46:59.505068090 -0400 +@@ -328,9 +328,13 @@ + /** + * Autogen'd comment + */ +-string t_rb_generator::rb_autogen_comment() { +- return std::string("#\n") + "# Autogenerated by Thrift Compiler (" + THRIFT_VERSION + ")\n" +- + "#\n" + "# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" + "#\n"; ++std::string t_rb_generator::rb_autogen_comment() { ++ std::string comment; ++ comment.reserve(256); ++ comment += "#\n# Autogenerated by Thrift Compiler ("; ++ comment += THRIFT_VERSION; ++ comment += ")\n#\n#DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n#\n"; ++ return comment; + } + + /** +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_lua_generator.cc.orig 2025-08-06 08:53:27.475932591 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_lua_generator.cc 2025-08-06 08:57:37.135854100 -0400 +@@ -157,10 +157,11 @@ + static std::string get_namespace(const t_program* program); + + std::string autogen_comment() override { +- return std::string("--\n") + "-- Autogenerated by Thrift\n" + "--\n" +- + "-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" + "-- @" +- "generated\n" +- + "--\n"; ++ return std::string( ++ "--\n-- Autogenerated by Thrift\n--\n" ++ "-- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING\n" ++ "-- @generated\n--\n" ++ ); + } + + /** +--- thrift-0.20.0/compiler/cpp/src/thrift/generate/t_javame_generator.cc.orig 2025-08-05 06:46:58.897327122 -0400 ++++ thrift-0.20.0/compiler/cpp/src/thrift/generate/t_javame_generator.cc 2025-08-06 09:24:15.878425693 -0400 +@@ -290,9 +290,12 @@ + * + * @return List of imports for Java types that are used in here + */ +-string t_javame_generator::java_type_imports() { +- return string() + "import java.util.Hashtable;\n" + "import java.util.Vector;\n" +- + "import java.util.Enumeration;\n\n"; ++std::string t_javame_generator::java_type_imports() { ++ return std::string( ++ "import java.util.Hashtable;\n" ++ "import java.util.Vector;\n" ++ "import java.util.Enumeration;\n\n" ++ ); + } + + /** +@@ -300,9 +303,13 @@ + * + * @return List of imports necessary for thrift + */ +-string t_javame_generator::java_thrift_imports() { +- return string() + "import org.apache.thrift.*;\n" + "import org.apache.thrift.meta_data.*;\n" +- + "import org.apache.thrift.transport.*;\n" + "import org.apache.thrift.protocol.*;\n\n"; ++std::string t_javame_generator::java_thrift_imports() { ++ return std::string( ++ "import org.apache.thrift.*;\n" ++ "import org.apache.thrift.meta_data.*;\n" ++ "import org.apache.thrift.transport.*;\n" ++ "import org.apache.thrift.protocol.*;\n\n" ++ ); + } + + /** diff --git a/libthrift-0.14.1-sources.jar b/libthrift-0.14.1-sources.jar deleted file mode 100644 index 24fdd1566b144ca14bffce1d1e8c78bb36582ef1..0000000000000000000000000000000000000000 Binary files a/libthrift-0.14.1-sources.jar and /dev/null differ diff --git a/libthrift-0.20.0-sources.jar b/libthrift-0.20.0-sources.jar new file mode 100644 index 0000000000000000000000000000000000000000..b848552e550c22ba94ddea51d331fb362e07075b Binary files /dev/null and b/libthrift-0.20.0-sources.jar differ diff --git a/libthrift-0.14.1.pom b/libthrift-0.20.0.pom similarity index 51% rename from libthrift-0.14.1.pom rename to libthrift-0.20.0.pom index 09dc285c64e1a60c464c6c2f3ecd93d94198fa5d..7cc8e436ba93c35ab69fc12cdc1d2836049638cb 100644 --- a/libthrift-0.14.1.pom +++ b/libthrift-0.20.0.pom @@ -1,10 +1,15 @@ - + + + + + 4.0.0 org.apache.thrift libthrift - 0.14.1 + 0.20.0 Apache Thrift Thrift is a software framework for scalable cross-language services development. http://thrift.apache.org @@ -31,50 +36,38 @@ org.slf4j slf4j-api - 1.7.28 - compile + 1.7.36 + runtime - org.apache.httpcomponents - httpclient - 4.5.10 - compile + org.apache.httpcomponents.client5 + httpclient5 + 5.2.1 + runtime - org.apache.httpcomponents - httpcore - 4.4.12 - compile + org.apache.httpcomponents.core5 + httpcore5 + 5.2 + runtime - org.apache.tomcat.embed - tomcat-embed-core - 8.5.46 - compile + jakarta.servlet + jakarta.servlet-api + 5.0.0 + runtime - javax.annotation - javax.annotation-api - 1.3.2 - compile + jakarta.annotation + jakarta.annotation-api + 2.1.1 + runtime - junit - junit - 4.12 - test - - - org.mockito - mockito-all - 1.10.19 - test - - - org.slf4j - slf4j-log4j12 - 1.7.28 - test + org.apache.commons + commons-lang3 + 3.12.0 + runtime diff --git a/thrift-0.14.1.tar.gz b/thrift-0.20.0.tar.gz similarity index 37% rename from thrift-0.14.1.tar.gz rename to thrift-0.20.0.tar.gz index 4305bdc3629b732bc581e8e31ff422b1f9faca18..7883d7e3b2cc4e4dff26d28fe92ee9c63d967393 100644 Binary files a/thrift-0.14.1.tar.gz and b/thrift-0.20.0.tar.gz differ diff --git a/thrift.spec b/thrift.spec index 2f4b79a549524a704c749e20fa3dd2a67f258f6f..7e53ff71e0e5807f60e00508e5eb98c06cfa93d1 100644 --- a/thrift.spec +++ b/thrift.spec @@ -37,7 +37,7 @@ %global want_lua 0 %global lua_configure --without-lua Name: thrift -Version: 0.14.1 +Version: 0.20.0 Release: 1 Summary: Software framework for cross-language services development License: Apache-2.0 and BSD-3-Clause and Zlib @@ -49,7 +49,8 @@ Source1: libthrift-%{version}.pom Source2: https://raw.github.com/apache/thrift/%{version}/bootstrap.sh Source3: https://repo1.maven.org/maven2/org/apache/thrift/libthrift/%{version}/libthrift-%{version}-sources.jar Patch2: configure-java-prefix.patch -Patch3: backport-THRIFT-5348-Update-debian-copyright.patch +Patch3: compiler-cpp-src-thrift-generator.patch + BuildRequires: make autoconf automake bison boost-devel boost-static flex gcc-c++ glib2-devel BuildRequires: libevent-devel libstdc++-devel libtool maven openssl-devel qt5-qtbase-devel texlive BuildRequires: zlib-devel @@ -300,6 +301,9 @@ cp libthrift_dir/pom.xml %{buildroot}%{_datadir}/maven-poms/libthrift/libthrift. %endif %changelog +* Tue Nov 18 2025 dillon chen - 0.20.0-1 +- Update to 0.20.0 + * Wed Nov 12 2025 dillon chen - 0.14.1-1 - Update to 0.14.1