MFH: r371120

Update to 2.9.2.

This release fixes CVE-2014-3660 (DoS).

Security:	0642b064-56c4-11e4-8b87-bcaec565249c
Approved by:	portmgr (bapt@)
This commit is contained in:
Koop Mast 2014-10-20 15:12:20 +00:00
parent 98f378cab9
commit 1f43541dd9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2014Q4/; revision=371275
8 changed files with 17 additions and 206 deletions

View File

@ -3,8 +3,8 @@
# $MCom: ports/trunk/textproc/libxml2/Makefile 19578 2014-04-25 21:50:30Z kwm $
PORTNAME= libxml2
PORTVERSION= 2.9.1
PORTREVISION?= 1
PORTVERSION= 2.9.2
PORTREVISION?= 0
CATEGORIES?= textproc gnome
MASTER_SITES= ftp://xmlsoft.org/libxml2/ \
http://xmlsoft.org/sources/ \
@ -17,7 +17,7 @@ COMMENT?= XML parser library for GNOME
.if !defined(REFERENCE_PORT)
GNU_CONFIGURE= yes
USES= gmake iconv libtool:keepla pathfix pkgconfig shebangfix
USES+= gmake iconv libtool pathfix pkgconfig shebangfix
USE_LDCONFIG= yes
CONFIGURE_ARGS?=--with-iconv=${ICONV_PREFIX} \
--with-html-dir=${PREFIX}/share/doc \

View File

@ -1,2 +1,2 @@
SHA256 (gnome2/libxml2-2.9.1.tar.gz) = fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb
SIZE (gnome2/libxml2-2.9.1.tar.gz) = 5172503
SHA256 (gnome2/libxml2-2.9.2.tar.gz) = 5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc
SIZE (gnome2/libxml2-2.9.2.tar.gz) = 5444991

View File

@ -1,6 +1,6 @@
--- Makefile.in.orig 2013-11-24 09:26:25.000000000 +0100
+++ Makefile.in 2013-11-24 09:26:37.000000000 +0100
@@ -1130,7 +1130,7 @@
--- Makefile.in.orig 2014-10-17 20:26:52.547793054 +0200
+++ Makefile.in 2014-10-17 20:27:34.868791352 +0200
@@ -1234,7 +1234,7 @@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@ -9,7 +9,7 @@
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -1635,7 +1635,7 @@
@@ -1712,7 +1712,7 @@
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
@ -18,12 +18,12 @@
config.h
install-binPROGRAMS: install-libLTLIBRARIES
@@ -1703,7 +1703,7 @@
@@ -1780,7 +1780,7 @@
info-am:
-install-data-am: install-data-local install-m4dataDATA install-man \
+install-data-am: install-m4dataDATA install-man \
install-pkgconfigDATA
-install-data-am: install-cmakeDATA install-data-local \
+install-data-am: install-cmakeDATA \
install-m4dataDATA install-man install-pkgconfigDATA
install-dvi: install-dvi-recursive

View File

@ -1,46 +0,0 @@
From 6c9c611beed57f001ca3ae6b964518d9c7336a69 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Thu, 11 Jul 2013 03:00:54 +0000
Subject: python: fix drv_libxml2.py for python3 compatibility
https://bugzilla.gnome.org/show_bug.cgi?id=703979
---
diff --git a/python/drv_libxml2.py b/python/drv_libxml2.py
index e43fb1d..c9075e6 100644
--- python/drv_libxml2.py
+++ python/drv_libxml2.py
@@ -34,12 +34,20 @@ TODO
"""
-__author__ = u"Stéphane Bidoul <sbi@skynet.be>"
+__author__ = "Stéphane Bidoul <sbi@skynet.be>"
__version__ = "0.3"
+import sys
import codecs
-from types import StringType, UnicodeType
-StringTypes = (StringType,UnicodeType)
+
+if sys.version < "3":
+ __author__ = codecs.unicode_escape_decode(__author__)[0]
+
+ from types import StringType, UnicodeType
+ StringTypes = (StringType,UnicodeType)
+
+else:
+ StringTypes = (str)
from xml.sax._exceptions import *
from xml.sax import xmlreader, saxutils
@@ -65,7 +73,7 @@ def _d(s):
try:
import libxml2
-except ImportError, e:
+except ImportError as e:
raise SAXReaderNotAvailable("libxml2 not available: " \
"import error was: %s" % e)
--
cgit v0.9.2

View File

@ -1,142 +0,0 @@
--- python/setup.py.in.orig 2014-03-24 21:27:16.000000000 +0100
+++ python/setup.py.in 2014-03-24 21:31:10.000000000 +0100
@@ -67,7 +67,7 @@
for dir in includes_dir:
if not missing(dir + "/libxml2/libxml/tree.h"):
xml_includes=dir + "/libxml2"
- break;
+ break;
if xml_includes == "":
print("failed to find headers for libxml2: update includes_dir")
@@ -77,7 +77,7 @@
for dir in includes_dir:
if not missing(dir + "/iconv.h"):
iconv_includes=dir
- break;
+ break;
if iconv_includes == "":
print("failed to find headers for libiconv: update includes_dir")
@@ -90,22 +90,22 @@
xml_files = ["libxml2-api.xml", "libxml2-python-api.xml",
"libxml.c", "libxml.py", "libxml_wrap.h", "types.c",
- "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
+ "xmlgenerator.py", "README", "TODO", "drv_libxml2.py"]
xslt_files = ["libxslt-api.xml", "libxslt-python-api.xml",
"libxslt.c", "libxsl.py", "libxslt_wrap.h",
- "xsltgenerator.py"]
+ "xsltgenerator.py"]
if missing("libxml2-py.c") or missing("libxml2.py"):
try:
- try:
- import xmlgenerator
- except:
- import generator
+ try:
+ import xmlgenerator
+ except:
+ import generator
except:
- print("failed to find and generate stubs for libxml2, aborting ...")
- print(sys.exc_info()[0], sys.exc_info()[1])
- sys.exit(1)
+ print("failed to find and generate stubs for libxml2, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ sys.exit(1)
head = open("libxml.py", "r")
generated = open("libxml2class.py", "r")
@@ -116,7 +116,7 @@
else:
result.write(line)
for line in generated.readlines():
- result.write(line)
+ result.write(line)
head.close()
generated.close()
result.close()
@@ -126,39 +126,39 @@
if missing("xsltgenerator.py") or missing("libxslt-api.xml"):
print("libxslt stub generator not found, libxslt not built")
else:
- try:
- import xsltgenerator
- except:
- print("failed to generate stubs for libxslt, aborting ...")
- print(sys.exc_info()[0], sys.exc_info()[1])
- else:
- head = open("libxsl.py", "r")
- generated = open("libxsltclass.py", "r")
- result = open("libxslt.py", "w")
- for line in head.readlines():
+ try:
+ import xsltgenerator
+ except:
+ print("failed to generate stubs for libxslt, aborting ...")
+ print(sys.exc_info()[0], sys.exc_info()[1])
+ else:
+ head = open("libxsl.py", "r")
+ generated = open("libxsltclass.py", "r")
+ result = open("libxslt.py", "w")
+ for line in head.readlines():
if WITHDLLS:
result.write(altImport(line))
else:
result.write(line)
- for line in generated.readlines():
- result.write(line)
- head.close()
- generated.close()
- result.close()
- with_xslt=1
+ for line in generated.readlines():
+ result.write(line)
+ head.close()
+ generated.close()
+ result.close()
+ with_xslt=1
else:
with_xslt=1
if with_xslt == 1:
xslt_includes=""
for dir in includes_dir:
- if not missing(dir + "/libxslt/xsltconfig.h"):
- xslt_includes=dir + "/libxslt"
- break;
+ if not missing(dir + "/libxslt/xsltconfig.h"):
+ xslt_includes=dir + "/libxslt"
+ break;
if xslt_includes == "":
- print("failed to find headers for libxslt: update includes_dir")
- with_xslt = 0
+ print("failed to find headers for libxslt: update includes_dir")
+ with_xslt = 0
descr = "libxml2 package"
@@ -198,7 +198,7 @@
libraries=libs, define_macros=macros)]
if with_xslt == 1:
extens.append(Extension('libxsltmod', xslt_c_files, include_dirs=includes,
- library_dirs=libdirs,
+ library_dirs=libdirs,
libraries=libs, define_macros=macros))
if missing("MANIFEST"):
@@ -208,8 +208,8 @@
for file in xml_files:
manifest.write(file + "\n")
if with_xslt == 1:
- for file in xslt_files:
- manifest.write(file + "\n")
+ for file in xslt_files:
+ manifest.write(file + "\n")
manifest.close()
if WITHDLLS:

View File

@ -48,8 +48,8 @@ include/libxml2/libxml/xmlwriter.h
include/libxml2/libxml/xpath.h
include/libxml2/libxml/xpathInternals.h
include/libxml2/libxml/xpointer.h
lib/cmake/libxml2/libxml2-config.cmake
lib/libxml2.a
lib/libxml2.la
lib/libxml2.so
lib/libxml2.so.2
lib/libxml2.so.%%LIBVERSION%%
@ -60,5 +60,3 @@ man/man1/xml2-config.1.gz
man/man1/xmlcatalog.1.gz
man/man1/xmllint.1.gz
man/man3/libxml.3.gz
@dirrm include/libxml2/libxml
@dirrm include/libxml2

View File

@ -16,7 +16,7 @@ DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
USE_GNOME+= libxml2
USE_PYTHON= 2
USES+= python:2
USE_PYDISTUTILS=yes
PYDISTUTILS_EGGINFO= libxml2_python-${PORTVERSION}-py${PYTHON_VER}.egg-info

View File

@ -16,8 +16,9 @@ DESCR= ${.CURDIR}/pkg-descr
PLIST= ${.CURDIR}/pkg-plist
USE_GNOME+= libxml2
USE_PYTHON= 3
USES= python:3
USE_PYDISTUTILS=yes
#USE_PYTHON= distutils:3
PYDISTUTILS_EGGINFO= libxml2_python-${PORTVERSION}-py${PYTHON_VER}.egg-info
PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//}