update code
This commit is contained in:
commit
9ea011d226
@ -0,0 +1,83 @@
|
|||||||
|
From 78e995f9f2958fc54e2a559a52c81684dc3460cf Mon Sep 17 00:00:00 2001
|
||||||
|
From: giraffedata <giraffedata@98333e67-4a24-44d7-a75c-e53540dd3050>
|
||||||
|
Date: Sun, 21 Jan 2018 22:27:31 +0000
|
||||||
|
Subject: [PATCH] Remove trace statements accidentally committed with 2977
|
||||||
|
|
||||||
|
git-svn-id: https://svn.code.sf.net/p/xmlrpc-c/code/trunk@2981 98333e67-4a24-44d7-a75c-e53540dd3050
|
||||||
|
---
|
||||||
|
src/cpp/value.cpp | 8 --------
|
||||||
|
src/xmlrpc_string.c | 5 -----
|
||||||
|
2 files changed, 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cpp/value.cpp b/src/cpp/value.cpp
|
||||||
|
index e2c12372..b319430e 100644
|
||||||
|
--- a/src/cpp/value.cpp
|
||||||
|
+++ b/src/cpp/value.cpp
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#include <iostream>
|
||||||
|
/*****************************************************************************
|
||||||
|
value.cpp
|
||||||
|
******************************************************************************
|
||||||
|
@@ -622,13 +621,9 @@ public:
|
||||||
|
|
||||||
|
switch (nlCode) {
|
||||||
|
case value_string::nlCode_all:
|
||||||
|
- cerr << "Going to call xmlrpc_string_new_lp" << endl;
|
||||||
|
- cerr << "length = " << cppvalue.length() << ", value = "
|
||||||
|
- << cppvalue.c_str() << endl;
|
||||||
|
this->valueP = xmlrpc_string_new_lp(&env.env_c,
|
||||||
|
cppvalue.length(),
|
||||||
|
cppvalue.c_str());
|
||||||
|
- cerr << "Back from xmlrpc_string_new_lp" << endl;
|
||||||
|
break;
|
||||||
|
case value_string::nlCode_lf:
|
||||||
|
this->valueP = xmlrpc_string_new_lp_cr(&env.env_c,
|
||||||
|
@@ -661,12 +656,9 @@ value_string::value_string(std::string const& cppvalue,
|
||||||
|
|
||||||
|
value_string::value_string(std::string const& cppvalue) {
|
||||||
|
|
||||||
|
- cerr << "value_string constructor entered" << endl;
|
||||||
|
cNewStringWrapper wrapper(cppvalue, nlCode_all);
|
||||||
|
- cerr << "wrapper constructed" << endl;
|
||||||
|
|
||||||
|
this->instantiate(wrapper.valueP);
|
||||||
|
- cerr << "value_string constructor exiting" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/xmlrpc_string.c b/src/xmlrpc_string.c
|
||||||
|
index 2da61e4e..e6e00716 100644
|
||||||
|
--- a/src/xmlrpc_string.c
|
||||||
|
+++ b/src/xmlrpc_string.c
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-#include <stdio.h>
|
||||||
|
/*=============================================================================
|
||||||
|
xmlrpc_string
|
||||||
|
===============================================================================
|
||||||
|
@@ -746,15 +745,12 @@ stringNew(xmlrpc_env * const envP,
|
||||||
|
enum crTreatment const crTreatment,
|
||||||
|
xmlrpc_value ** const valPP) {
|
||||||
|
|
||||||
|
- fprintf(stderr, "stringNew entered\n");
|
||||||
|
xmlrpc_value * valP;
|
||||||
|
|
||||||
|
xmlrpc_validate_utf8(envP, value, length);
|
||||||
|
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
- fprintf(stderr, "Going to xmlrpc_createXmlrpcValue\n");
|
||||||
|
xmlrpc_createXmlrpcValue(envP, &valP);
|
||||||
|
- fprintf(stderr, "Back from createXmlrpcValue\n");
|
||||||
|
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
valP->_type = XMLRPC_TYPE_STRING;
|
||||||
|
@@ -774,7 +770,6 @@ stringNew(xmlrpc_env * const envP,
|
||||||
|
*valPP = valP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- fprintf(stderr, "stringNew exiting\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
||||||
1668
0001-add-meson-buildsystem-definitions.patch
Normal file
1668
0001-add-meson-buildsystem-definitions.patch
Normal file
File diff suppressed because it is too large
Load Diff
34
0001-xmlrpc_server_abyss-use-va_args-properly.patch
Normal file
34
0001-xmlrpc_server_abyss-use-va_args-properly.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From d31c2ffbf5181053330fa32e4f03c47283bd1448 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Sat, 17 Dec 2016 10:28:31 +0100
|
||||||
|
Subject: [PATCH 1/3] xmlrpc_server_abyss: use va_args properly
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
../src/xmlrpc_server_abyss.c: In function ‘createServer’:
|
||||||
|
../src/xmlrpc_server_abyss.c:783:13: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||||
|
xmlrpc_faultf(envP, error);
|
||||||
|
^~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
---
|
||||||
|
src/xmlrpc_server_abyss.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/xmlrpc_server_abyss.c b/src/xmlrpc_server_abyss.c
|
||||||
|
index 8aacb4b..58f5ba0 100644
|
||||||
|
--- a/src/xmlrpc_server_abyss.c
|
||||||
|
+++ b/src/xmlrpc_server_abyss.c
|
||||||
|
@@ -780,7 +780,7 @@ createServer(xmlrpc_env * const envP,
|
||||||
|
ServerInit2(abyssServerP, &error);
|
||||||
|
|
||||||
|
if (error) {
|
||||||
|
- xmlrpc_faultf(envP, error);
|
||||||
|
+ xmlrpc_faultf(envP, "%s", error);
|
||||||
|
xmlrpc_strfree(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.13.1
|
||||||
|
|
||||||
84
0002-Use-proper-datatypes-for-long-long.patch
Normal file
84
0002-Use-proper-datatypes-for-long-long.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
From aca713786debd68c81a823c5989afb3de82da45b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||||
|
Date: Sat, 5 Apr 2008 11:41:34 +0200
|
||||||
|
Subject: [PATCH 2/3] Use proper datatypes for 'long long'
|
||||||
|
|
||||||
|
xmlrpc-c uses 'long long' at some places (e.g. in printf
|
||||||
|
statements with PRId64) under the assumption that it has a
|
||||||
|
width of exactly 64 bits.
|
||||||
|
|
||||||
|
On 64 bit machines 'long long' has a width of 128 bit and
|
||||||
|
will cause overhead both in memory and cpu usage there. As
|
||||||
|
'long long' is used only to handle <i8> datatypes, the patch
|
||||||
|
uses a plain 64 integer type there.
|
||||||
|
|
||||||
|
It is arguable whether 'int_least64_t' (and 'int_least32_t')
|
||||||
|
would be a better choice for 'int64_t' (and 'int32_t'), but
|
||||||
|
for now, the patch uses datatypes with exact widths.
|
||||||
|
---
|
||||||
|
include/xmlrpc-c/base.h | 7 ++++---
|
||||||
|
lib/libutil/string_number.c | 1 +
|
||||||
|
src/cpp/param_list.cpp | 2 +-
|
||||||
|
3 files changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/xmlrpc-c/base.h b/include/xmlrpc-c/base.h
|
||||||
|
index e74e2c5..90f2c91 100644
|
||||||
|
--- a/include/xmlrpc-c/base.h
|
||||||
|
+++ b/include/xmlrpc-c/base.h
|
||||||
|
@@ -5,6 +5,7 @@
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
+#include <stdint.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <xmlrpc-c/c_util.h> /* For XMLRPC_DLLEXPORT */
|
||||||
|
#include <xmlrpc-c/util.h>
|
||||||
|
@@ -73,9 +74,9 @@ xmlrpc_version(unsigned int * const majorP,
|
||||||
|
|
||||||
|
typedef signed int xmlrpc_int;
|
||||||
|
/* An integer of the type defined by XML-RPC <int>; i.e. 32 bit */
|
||||||
|
-typedef XMLRPC_INT32 xmlrpc_int32;
|
||||||
|
+typedef int32_t xmlrpc_int32;
|
||||||
|
/* An integer of the type defined by XML-RPC <i4>; i.e. 32 bit */
|
||||||
|
-typedef XMLRPC_INT64 xmlrpc_int64;
|
||||||
|
+typedef int64_t xmlrpc_int64;
|
||||||
|
/* An integer of the type defined by "XML-RPC" <i8>; i.e. 64 bit */
|
||||||
|
typedef int xmlrpc_bool;
|
||||||
|
/* A boolean (of the type defined by XML-RPC <boolean>, but there's
|
||||||
|
@@ -112,7 +113,7 @@ typedef int xmlrpc_socket;
|
||||||
|
#define XMLRPC_INT32_MAX 0x7fffffff
|
||||||
|
#define XMLRPC_INT32_MIN (-XMLRPC_INT32_MAX - 1)
|
||||||
|
|
||||||
|
-#define XMLRPC_INT64_MAX 0x7fffffffffffffffll
|
||||||
|
+#define XMLRPC_INT64_MAX ((xmlrpc_int64)0x7fffffffffffffffll)
|
||||||
|
#define XMLRPC_INT64_MIN (-XMLRPC_INT64_MAX - 1)
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/lib/libutil/string_number.c b/lib/libutil/string_number.c
|
||||||
|
index 1c284af..a7e78ad 100644
|
||||||
|
--- a/lib/libutil/string_number.c
|
||||||
|
+++ b/lib/libutil/string_number.c
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
============================================================================*/
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
+#include <inttypes.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
diff --git a/src/cpp/param_list.cpp b/src/cpp/param_list.cpp
|
||||||
|
index 1f7ae41..60f7df9 100644
|
||||||
|
--- a/src/cpp/param_list.cpp
|
||||||
|
+++ b/src/cpp/param_list.cpp
|
||||||
|
@@ -277,7 +277,7 @@ paramList::getI8(unsigned int const paramNumber,
|
||||||
|
throw(fault("Parameter that is supposed to be 64-bit integer is not",
|
||||||
|
fault::CODE_TYPE));
|
||||||
|
|
||||||
|
- long long const longlongvalue(static_cast<long long>(
|
||||||
|
+ xmlrpc_int64 const longlongvalue(static_cast<xmlrpc_int64>(
|
||||||
|
value_i8(this->paramVector[paramNumber])));
|
||||||
|
|
||||||
|
if (longlongvalue < minimum)
|
||||||
|
--
|
||||||
|
2.13.1
|
||||||
|
|
||||||
16
0002-chmod-x-xml-rpc-api2txt.patch
Normal file
16
0002-chmod-x-xml-rpc-api2txt.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
From d97ec6e652690a321d7ce8c81aa30f87d9c0de8f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
Date: Mon, 19 Dec 2016 21:33:47 +0100
|
||||||
|
Subject: [PATCH 2/2] chmod +x xml-rpc-api2txt
|
||||||
|
|
||||||
|
It's script which is installing into $bindir, so it must be executable.
|
||||||
|
|
||||||
|
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
||||||
|
---
|
||||||
|
tools/xml-rpc-api2txt/xml-rpc-api2txt | 0
|
||||||
|
1 file changed, 0 insertions(+), 0 deletions(-)
|
||||||
|
mode change 100644 => 100755 tools/xml-rpc-api2txt/xml-rpc-api2txt
|
||||||
|
|
||||||
|
diff --git a/tools/xml-rpc-api2txt/xml-rpc-api2txt b/tools/xml-rpc-api2txt/xml-rpc-api2txt
|
||||||
|
old mode 100644
|
||||||
|
new mode 100755
|
||||||
27
0003-allow-30x-redirections.patch
Normal file
27
0003-allow-30x-redirections.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
From 9bb040a9ae29e1b5afcb674c74f107114b316818 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||||
|
Date: Thu, 29 Jul 2010 19:25:32 +0200
|
||||||
|
Subject: [PATCH 3/3] allow 30x redirections
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/curl_transport/curltransaction.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/curl_transport/curltransaction.c b/lib/curl_transport/curltransaction.c
|
||||||
|
index f0aafae..b5392a9 100644
|
||||||
|
--- a/lib/curl_transport/curltransaction.c
|
||||||
|
+++ b/lib/curl_transport/curltransaction.c
|
||||||
|
@@ -671,6 +671,10 @@ setupCurlSession(xmlrpc_env * const envP,
|
||||||
|
curl_easy_setopt(curlSessionP, CURLOPT_POST, 1);
|
||||||
|
curl_easy_setopt(curlSessionP, CURLOPT_URL, transP->serverUrl);
|
||||||
|
|
||||||
|
+ curl_easy_setopt(curlSessionP, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
+ curl_easy_setopt(curlSessionP, CURLOPT_MAXREDIRS, (long)10);
|
||||||
|
+ curl_easy_setopt(curlSessionP, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
|
||||||
|
+
|
||||||
|
XMLRPC_MEMBLOCK_APPEND(char, envP, transP->postDataP, "\0", 1);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
curl_easy_setopt(curlSessionP, CURLOPT_POSTFIELDS,
|
||||||
|
--
|
||||||
|
2.13.1
|
||||||
|
|
||||||
BIN
xmlrpc-c-1.51.0.tar.xz
Normal file
BIN
xmlrpc-c-1.51.0.tar.xz
Normal file
Binary file not shown.
91
xmlrpc-c.spec
Normal file
91
xmlrpc-c.spec
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
%bcond_with libxml2
|
||||||
|
|
||||||
|
Name: xmlrpc-c
|
||||||
|
Version: 1.51.0
|
||||||
|
Release: 7
|
||||||
|
Summary: Library implementing XML-based Remote Procedure Calls
|
||||||
|
License: BSD and MIT
|
||||||
|
URL: http://xmlrpc-c.sourceforge.net/
|
||||||
|
Source0: http://dl.sourceforge.net/sourceforge/xmlrpc-c/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch0001: 0001-xmlrpc_server_abyss-use-va_args-properly.patch
|
||||||
|
Patch0002: 0002-Use-proper-datatypes-for-long-long.patch
|
||||||
|
Patch0003: 0003-allow-30x-redirections.patch
|
||||||
|
Patch0004: 0001-Remove-trace-statements-accidentally-committed-with-.patch
|
||||||
|
Patch0005: 0001-add-meson-buildsystem-definitions.patch
|
||||||
|
Patch0006: 0002-chmod-x-xml-rpc-api2txt.patch
|
||||||
|
|
||||||
|
BuildRequires: git-core meson >= 0.36.0 gcc gcc-c++ ncurses-devel
|
||||||
|
BuildRequires: libcurl-devel readline-devel pkgconfig(openssl)
|
||||||
|
|
||||||
|
Provides: xmlrpc-c-c++ = %{version}-%{release} xmlrpc-c-c++%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: xmlrpc-c-c++ < %{version}-%{release} xmlrpc-c-c++%{_?isa} < %{version}-%{release}
|
||||||
|
|
||||||
|
Provides: xmlrpc-c-client = %{version}-%{release} xmlrpc-c-client%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: xmlrpc-c-client < %{version}-%{release} xmlrpc-c-client%{?_isa} < %{version}-%{release}
|
||||||
|
|
||||||
|
Provides: xmlrpc-c-client++ = %{version}-%{release} xmlrpc-c-client++%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: xmlrpc-c-client++ < %{version}-%{release} xmlrpc-c-client++%{?_isa} < %{version}-%{release}
|
||||||
|
|
||||||
|
Provides: xmlrpc-c-apps = %{version}-%{release} xmlrpc-c-apps%{?_isa} = %{version}-%{release}
|
||||||
|
Obsoletes: xmlrpc-c-apps < %{version}-%{release} xmlrpc-c-apps%{?_isa} < %{version}-%{release}
|
||||||
|
|
||||||
|
%if %{with libxml2}
|
||||||
|
BuildRequires: libxml2-devel
|
||||||
|
%else
|
||||||
|
Provides: bundled(expat)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
XML-RPC is a quick-and-easy way to make procedure calls
|
||||||
|
over the Internet. It converts the procedure call into
|
||||||
|
an XML document, sends it to a remote server using HTTP,
|
||||||
|
and gets back the response as XML.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Header files for xmlrpc-c
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Header files for xmlrpc-c.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%meson %{?with_libxml2:-Dlibxml2-backend=true}
|
||||||
|
%meson_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%meson_install
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license doc/COPYING lib/abyss/license.txt
|
||||||
|
%{_bindir}/xml*
|
||||||
|
%{_libdir}/*.so.*
|
||||||
|
%exclude %{_bindir}/xmlrpc-c-config
|
||||||
|
%if %{with libxml2}
|
||||||
|
%exclude %{_libdir}/libxmlrpc_xml*.so.*
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_bindir}/xmlrpc-c-config
|
||||||
|
%{_libdir}/libxmlrpc*.so
|
||||||
|
%{_libdir}/pkgconfig/xmlrpc*.pc
|
||||||
|
%{_includedir}/*.h
|
||||||
|
%{_includedir}/xmlrpc-c/
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc doc/CREDITS doc/HISTORY doc/TODO README
|
||||||
|
%doc tools/xmlrpc_transport/xmlrpc_transport.html
|
||||||
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Oct 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.51.0-7
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user