Skip to contentSkip to conversation

xerces: bump to version 3.2.2

PATCH New Fabrice Fontaine 2 participants 2 messages Oct 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xerces: bump to version 3.2.2

- Remove patch (already in version)
- Move to cmake infrastructure because AC_RUN_IFELSE was added to configure
- Remove --with-icu, --with-gnu-ld and --with-curl options (not available in cmake)
- Replace --enable-netaccessor-curl by -Dnetwork-accessor=curl
- Replace --enable-threads option by -Dthreads
- Update XERCES_DISABLE_SAMPLES for cmake
- Add hash for license file

---
 package/xerces/0001-fix-CVE-2017-12627.patch | 22 --------------------
 package/xerces/xerces.hash                   |  7 +++++--
 package/xerces/xerces.mk                     | 18 +++++++---------
 3 files changed, 12 insertions(+), 35 deletions(-)
 delete mode 100644 package/xerces/0001-fix-CVE-2017-12627.patch
package/xerces/0001-fix-CVE-2017-12627.patch deleted +0 -22
deleted file mode 100644
index 010be7e3d5..0000000000
@@ -1,22 +0,0 @@
-XMLString: Don't call catString if relativePath is null
-
-https://xerces.apache.org/xerces-c/secadv/CVE-2017-12627.txt
-
-Upstream status: svn revision 1819998
-
-Signed-off-by: Baruch Siach <[email protected]>
-
---- trunk/src/xercesc/util/PlatformUtils.cpp	2018/01/03 18:58:30	1819997
-+++ trunk/src/xercesc/util/PlatformUtils.cpp	2018/01/03 18:59:30	1819998
-@@ -920,7 +920,10 @@
- 
-     XMLString::subString(tmpBuf, basePath, 0, (basePtr - basePath + 1), manager);
-     tmpBuf[basePtr - basePath + 1] = 0;
--    XMLString::catString(tmpBuf, relativePath);
-+    if (relativePath)
-+    {
-+        XMLString::catString(tmpBuf, relativePath);
-+    }
- 
-     removeDotSlash(tmpBuf, manager);
- 
package/xerces/xerces.hash +5 -2
index c621f5cd56..28db0c6062 100644
@@ -1,2 +1,5 @@
-# From http://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.4.tar.xz.sha256
-sha256 9973cc79481803f8b6652c52faf5195d963f50d209d4f681ec97e2aa014b6241 xerces-c-3.1.4.tar.xz
+# From http://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.2.tar.xz.sha256
+sha256 6daca3b23364d8d883dc77a73f681242f69389e3564543287ed3d073007e0a8e xerces-c-3.2.2.tar.xz
+
+# Hash for license file
+sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/xerces/xerces.mk +7 -11
index d74b1e2d3d..906e4b663c 100644
@@ -4,25 +4,21 @@
 #
 ################################################################################
 
-XERCES_VERSION = 3.1.4
+XERCES_VERSION = 3.2.2
 XERCES_SOURCE = xerces-c-$(XERCES_VERSION).tar.xz
 XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources
 XERCES_LICENSE = Apache-2.0
 XERCES_LICENSE_FILES = LICENSE
 XERCES_INSTALL_STAGING = YES
-XERCES_CONF_OPTS = --with-gnu-ld
 
 define XERCES_DISABLE_SAMPLES
-	$(SED) 's/ samples//' $(@D)/Makefile.in
+	$(SED) 's/add_subdirectory(samples)//' $(@D)/CMakeLists.txt
 endef
 
 XERCES_POST_PATCH_HOOKS += XERCES_DISABLE_SAMPLES
 
 ifeq ($(BR2_PACKAGE_ICU),y)
-XERCES_CONF_OPTS += --with-icu=$(STAGING_DIR)/usr
 XERCES_DEPENDENCIES += icu
-else
-XERCES_CONF_OPTS += --without-icu
 endif
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
@@ -31,16 +27,16 @@ XERCES_DEPENDENCIES += libiconv
 endif
 
 ifeq ($(BR2_PACKAGE_LIBCURL),y)
-XERCES_CONF_OPTS += --enable-netaccessor-curl --with-curl=$(STAGING_DIR)/usr/lib
+XERCES_CONF_OPTS += -Dnetwork-accessor=curl
 XERCES_DEPENDENCIES += libcurl
 else
-XERCES_CONF_OPTS += --disable-netaccessor-curl
+XERCES_CONF_OPTS += -Dnetwork-accessor=socket
 endif
 
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
-XERCES_CONF_OPTS += --enable-threads
+XERCES_CONF_OPTS += -Dthreads=ON
 else
-XERCES_CONF_OPTS += --disable-threads
+XERCES_CONF_OPTS += -Dthreads=OFF
 endif
 
-$(eval $(autotools-package))
+$(eval $(cmake-package))
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 xerces: bump to version 3.2.2

Hello,

Quoted 11 lines · Fabrice Fontaine

- Remove patch (already in version)
- Move to cmake infrastructure because AC_RUN_IFELSE was added to configure
- Remove --with-icu, --with-gnu-ld and --with-curl options (not available in cmake)
- Replace --enable-netaccessor-curl by -Dnetwork-accessor=curl
- Replace --enable-threads option by -Dthreads
- Update XERCES_DISABLE_SAMPLES for cmake
- Add hash for license file

I've applied, but...

package/xerces/xerces.mk line 16

Quoted 4 lines

define XERCES_DISABLE_SAMPLES

package/xerces/xerces.mk +1 -1
-	$(SED) 's/ samples//' $(@D)/Makefile.in
+	$(SED) 's/add_subdirectory(samples)//' $(@D)/CMakeLists.txt
 endef

... it would be good to replace this with a patch, making the build of samples conditional, and submit it upstream.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com