summaryrefslogtreecommitdiff
path: root/source/ap/itstool
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/ap/itstool
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/ap/itstool')
-rw-r--r--source/ap/itstool/itstool-2.0.4-segfault-1.patch55
-rwxr-xr-xsource/ap/itstool/itstool.SlackBuild30
-rw-r--r--source/ap/itstool/slack-desc2
3 files changed, 78 insertions, 9 deletions
diff --git a/source/ap/itstool/itstool-2.0.4-segfault-1.patch b/source/ap/itstool/itstool-2.0.4-segfault-1.patch
new file mode 100644
index 00000000..05e21cb7
--- /dev/null
+++ b/source/ap/itstool/itstool-2.0.4-segfault-1.patch
@@ -0,0 +1,55 @@
+Submitted by: DJ Lucas (dj_AT_linuxfromscratch_DOT_org)
+Date: 2017-10-26
+Initial Package Version: 2.0.4
+Upstream Status: Comitted
+Origin: https://github.com/itstool/itstool/commit/9b84c007a73e8275ca45762f1bfa3ab7c3a852e2
+Description: Fixes memory exhaustion when freeing XML docs.
+
+
+diff -Naur a/itstool.in b/itstool.in
+--- a/itstool.in
++++ a/itstool.in
+@@ -477,6 +477,7 @@ class Document (object):
+ if load_dtd:
+ ctxt.loadSubset(1)
+ if keep_entities:
++ ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1043,6 +1044,7 @@ class Document (object):
+ if self._load_dtd:
+ ctxt.loadSubset(1)
+ if self._keep_entities:
++ ctxt.loadSubset(1)
+ ctxt.ctxtUseOptions(libxml2.XML_PARSE_DTDLOAD)
+ ctxt.replaceEntities(0)
+ else:
+@@ -1069,7 +1071,9 @@ class Document (object):
+ ph_node = msg.get_placeholder(child.name).node
+ if self.has_child_elements(ph_node):
+ self.merge_translations(translations, None, ph_node, strict=strict)
+- child.replaceNode(ph_node)
++ newnode = ph_node.copyNode(1)
++ newnode.setTreeDoc(self._doc)
++ child.replaceNode(newnode)
+ else:
+ repl = self.get_translated(ph_node, translations, strict=strict, lang=lang)
+ child.replaceNode(repl)
+@@ -1084,10 +1088,15 @@ class Document (object):
+ (lang + ' ') if lang is not None else '',
+ msgstr.encode('utf-8')))
+ self._xml_err = ''
++ ctxt.doc().freeDoc()
+ return node
+ retnode = node.copyNode(2)
++ retnode.setTreeDoc(self._doc)
+ for child in xml_child_iter(trnode):
+- retnode.addChild(child.copyNode(1))
++ newnode = child.copyNode(1)
++ newnode.setTreeDoc(self._doc)
++ retnode.addChild(newnode)
++
+ ctxt.doc().freeDoc()
+ return retnode
+
diff --git a/source/ap/itstool/itstool.SlackBuild b/source/ap/itstool/itstool.SlackBuild
index b42609eb..650e3144 100755
--- a/source/ap/itstool/itstool.SlackBuild
+++ b/source/ap/itstool/itstool.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,29 +20,38 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=itstool
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -68,6 +77,11 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix segfault with version 2.0.4
+# http://www.linuxfromscratch.org/patches/blfs/svn/itstool-2.0.4-segfault-1.patch
+xzcat $CWD/itstool-2.0.4-segfault-1.patch.xz | patch --verbose -p1 || exit 1
+
+# Configure:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/ap/itstool/slack-desc b/source/ap/itstool/slack-desc
index 3a2bec74..3da4bfaf 100644
--- a/source/ap/itstool/slack-desc
+++ b/source/ap/itstool/slack-desc
@@ -2,7 +2,7 @@
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
-# You must make exactly 11 lines for the formatting to be correct. It's also
+# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|