From 458f7471ef5b916336e2f4ce05cdf774f34bb4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Mon, 19 Feb 2024 15:36:44 +0100 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 dom4j revision 8a19b5a5e756bb5dca272fb8a854ce9e --- .gitattributes | 23 ++ 0001-no-jaxen-dom4.patch | 713 +++++++++++++++++++++++++++++++++++++++ _multibuild | 3 + _service | 15 + dom4j-2.1.4.pom | 77 +++++ dom4j-2.1.4.tar.xz | 3 + dom4j-build.xml | 117 +++++++ dom4j.changes | 201 +++++++++++ dom4j.spec | 149 ++++++++ 9 files changed, 1301 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-no-jaxen-dom4.patch create mode 100644 _multibuild create mode 100644 _service create mode 100644 dom4j-2.1.4.pom create mode 100644 dom4j-2.1.4.tar.xz create mode 100644 dom4j-build.xml create mode 100644 dom4j.changes create mode 100644 dom4j.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/0001-no-jaxen-dom4.patch b/0001-no-jaxen-dom4.patch new file mode 100644 index 0000000..5f444ac --- /dev/null +++ b/0001-no-jaxen-dom4.patch @@ -0,0 +1,713 @@ +From b494798add23c21d68b1dd54e8929095396516bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fridrich=20=C5=A0trba?= +Date: Wed, 23 Aug 2023 20:33:23 +0200 +Subject: [PATCH] no-jaxen-dom4 + +--- + src/main/java/org/dom4j/DocumentFactory.java | 22 +- + src/main/java/org/dom4j/DocumentHelper.java | 16 - + .../java/org/dom4j/tree/AbstractNode.java | 4 - + .../org/dom4j/util/ProxyDocumentFactory.java | 4 - + .../java/org/dom4j/xpath/DefaultXPath.java | 409 ------------------ + .../java/org/dom4j/xpath/XPathPattern.java | 164 ------- + 6 files changed, 2 insertions(+), 617 deletions(-) + delete mode 100644 src/main/java/org/dom4j/xpath/DefaultXPath.java + delete mode 100644 src/main/java/org/dom4j/xpath/XPathPattern.java + +diff --git a/src/main/java/org/dom4j/DocumentFactory.java b/src/main/java/org/dom4j/DocumentFactory.java +index 9aaaa11..fa2bbb8 100644 +--- a/src/main/java/org/dom4j/DocumentFactory.java ++++ b/src/main/java/org/dom4j/DocumentFactory.java +@@ -27,8 +27,6 @@ import org.dom4j.tree.DefaultText; + import org.dom4j.tree.QNameCache; + import org.dom4j.util.SimpleSingleton; + import org.dom4j.util.SingletonStrategy; +-import org.dom4j.xpath.DefaultXPath; +-import org.dom4j.xpath.XPathPattern; + import org.jaxen.VariableContext; + + /** +@@ -219,7 +217,7 @@ public class DocumentFactory implements Serializable { + */ + public XPath createXPath(String xpathExpression) + throws InvalidXPathException { +- DefaultXPath xpath = new DefaultXPath(xpathExpression); ++ XPath xpath = createXPath(xpathExpression); + + if (xpathNamespaceURIs != null) { + xpath.setNamespaceURIs(xpathNamespaceURIs); +@@ -291,22 +289,6 @@ public class DocumentFactory implements Serializable { + // return new DefaultXPath( xpathFilterExpression ); + } + +- /** +- *

+- * createPattern parses the given XPath expression to create +- * an XSLT style {@link Pattern}instance which can then be used in an XSLT +- * processing model. +- *

+- * +- * @param xpathPattern +- * is the XPath pattern expression to create +- * +- * @return a new Pattern instance +- */ +- public Pattern createPattern(String xpathPattern) { +- return new XPathPattern(xpathPattern); +- } +- + // Properties + // ------------------------------------------------------------------------- + +@@ -445,4 +427,4 @@ public class DocumentFactory implements Serializable { + * POSSIBILITY OF SUCH DAMAGE. + * + * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. +- */ +\ No newline at end of file ++ */ +diff --git a/src/main/java/org/dom4j/DocumentHelper.java b/src/main/java/org/dom4j/DocumentHelper.java +index 865a51a..040770c 100644 +--- a/src/main/java/org/dom4j/DocumentHelper.java ++++ b/src/main/java/org/dom4j/DocumentHelper.java +@@ -160,22 +160,6 @@ public final class DocumentHelper { + return getDocumentFactory().createXPathFilter(xpathFilterExpression); + } + +- /** +- *

+- * createPattern parses the given XPath expression to create +- * an XSLT style {@link Pattern}instance which can then be used in an XSLT +- * processing model. +- *

+- * +- * @param xpathPattern +- * is the XPath pattern expression to create +- * +- * @return a new Pattern instance +- */ +- public static Pattern createPattern(String xpathPattern) { +- return getDocumentFactory().createPattern(xpathPattern); +- } +- + /** + *

+ * selectNodes performs the given XPath expression on the +diff --git a/src/main/java/org/dom4j/tree/AbstractNode.java b/src/main/java/org/dom4j/tree/AbstractNode.java +index 3957c29..e8b14c7 100644 +--- a/src/main/java/org/dom4j/tree/AbstractNode.java ++++ b/src/main/java/org/dom4j/tree/AbstractNode.java +@@ -206,10 +206,6 @@ public abstract class AbstractNode implements Node, Cloneable, Serializable { + return getDocumentFactory().createXPathFilter(patternText); + } + +- public Pattern createPattern(String patternText) { +- return getDocumentFactory().createPattern(patternText); +- } +- + public Node asXPathResult(Element parent) { + if (supportsParent()) { + return this; +diff --git a/src/main/java/org/dom4j/util/ProxyDocumentFactory.java b/src/main/java/org/dom4j/util/ProxyDocumentFactory.java +index 65624be..8bf7e57 100644 +--- a/src/main/java/org/dom4j/util/ProxyDocumentFactory.java ++++ b/src/main/java/org/dom4j/util/ProxyDocumentFactory.java +@@ -146,10 +146,6 @@ public abstract class ProxyDocumentFactory { + return proxy.createXPathFilter(xpathFilterExpression); + } + +- public Pattern createPattern(String xpathPattern) { +- return proxy.createPattern(xpathPattern); +- } +- + // Implementation methods + // ------------------------------------------------------------------------- + protected DocumentFactory getProxy() { +diff --git a/src/main/java/org/dom4j/xpath/DefaultXPath.java b/src/main/java/org/dom4j/xpath/DefaultXPath.java +deleted file mode 100644 +index f81eec5..0000000 +--- a/src/main/java/org/dom4j/xpath/DefaultXPath.java ++++ /dev/null +@@ -1,409 +0,0 @@ +-/* +- * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. +- * +- * This software is open source. +- * See the bottom of this file for the licence. +- */ +- +-package org.dom4j.xpath; +- +-import java.io.Serializable; +-import java.util.Collections; +-import java.util.Comparator; +-import java.util.HashMap; +-import java.util.HashSet; +-import java.util.Iterator; +-import java.util.List; +-import java.util.Map; +- +-import org.dom4j.InvalidXPathException; +-import org.dom4j.Node; +-import org.dom4j.NodeFilter; +-import org.dom4j.XPathException; +- +-import org.jaxen.FunctionContext; +-import org.jaxen.JaxenException; +-import org.jaxen.NamespaceContext; +-import org.jaxen.SimpleNamespaceContext; +-import org.jaxen.VariableContext; +-import org.jaxen.XPath; +-import org.jaxen.dom4j.Dom4jXPath; +- +-/** +- *

+- * Default implementation of {@link org.dom4j.XPath}which uses the Jaxen project. +- *

+- * +- * @author bob mcwhirter +- * @author James Strachan +- */ +-public class DefaultXPath implements org.dom4j.XPath, NodeFilter, Serializable { +- private String text; +- +- private XPath xpath; +- +- private NamespaceContext namespaceContext; +- +- /** +- * Construct an XPath +- * +- * @param text +- * DOCUMENT ME! +- * +- * @throws InvalidXPathException +- * DOCUMENT ME! +- */ +- public DefaultXPath(String text) throws InvalidXPathException { +- this.text = text; +- this.xpath = parse(text); +- } +- +- public String toString() { +- return "[XPath: " + xpath + "]"; +- } +- +- // XPath interface +- +- /** +- * Retrieve the textual XPath string used to initialize this Object +- * +- * @return The XPath string +- */ +- public String getText() { +- return text; +- } +- +- public FunctionContext getFunctionContext() { +- return xpath.getFunctionContext(); +- } +- +- public void setFunctionContext(FunctionContext functionContext) { +- xpath.setFunctionContext(functionContext); +- } +- +- public NamespaceContext getNamespaceContext() { +- return namespaceContext; +- } +- +- public void setNamespaceURIs(Map map) { +- setNamespaceContext(new SimpleNamespaceContext(map)); +- } +- +- public void setNamespaceContext(NamespaceContext namespaceContext) { +- this.namespaceContext = namespaceContext; +- xpath.setNamespaceContext(namespaceContext); +- } +- +- public VariableContext getVariableContext() { +- return xpath.getVariableContext(); +- } +- +- public void setVariableContext(VariableContext variableContext) { +- xpath.setVariableContext(variableContext); +- } +- +- public Object evaluate(Object context) { +- try { +- setNSContext(context); +- +- List answer = xpath.selectNodes(context); +- +- if ((answer != null) && (answer.size() == 1)) { +- return answer.get(0); +- } +- +- return answer; +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return null; +- } +- } +- +- public Object selectObject(Object context) { +- return evaluate(context); +- } +- +- public List selectNodes(Object context) { +- try { +- setNSContext(context); +- +- return (List) xpath.selectNodes(context); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return Collections.emptyList(); +- } +- } +- +- public List selectNodes(Object context, org.dom4j.XPath sortXPath) { +- List answer = selectNodes(context); +- sortXPath.sort(answer); +- +- return answer; +- } +- +- public List selectNodes(Object context, org.dom4j.XPath sortXPath, +- boolean distinct) { +- List answer = selectNodes(context); +- sortXPath.sort(answer, distinct); +- +- return answer; +- } +- +- public Node selectSingleNode(Object context) { +- try { +- setNSContext(context); +- +- Object answer = xpath.selectSingleNode(context); +- +- if (answer instanceof Node) { +- return (Node) answer; +- } +- +- if (answer == null) { +- return null; +- } +- +- throw new XPathException("The result of the XPath expression is " +- + "not a Node. It was: " + answer + " of type: " +- + answer.getClass().getName()); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return null; +- } +- } +- +- public String valueOf(Object context) { +- try { +- setNSContext(context); +- +- return xpath.stringValueOf(context); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return ""; +- } +- } +- +- public Number numberValueOf(Object context) { +- try { +- setNSContext(context); +- +- return xpath.numberValueOf(context); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return null; +- } +- } +- +- public boolean booleanValueOf(Object context) { +- try { +- setNSContext(context); +- +- return xpath.booleanValueOf(context); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return false; +- } +- } +- +- /** +- *

+- * sort sorts the given List of Nodes using this XPath +- * expression as a {@link Comparator}. +- *

+- * +- * @param list +- * is the list of Nodes to sort +- */ +- public void sort(List list) { +- sort(list, false); +- } +- +- /** +- *

+- * sort sorts the given List of Nodes using this XPath +- * expression as a {@link Comparator}and optionally removing duplicates. +- *

+- * +- * @param list +- * is the list of Nodes to sort +- * @param distinct +- * if true then duplicate values (using the sortXPath for +- * comparisions) will be removed from the List +- */ +- public void sort(List list, boolean distinct) { +- if ((list != null) && !list.isEmpty()) { +- int size = list.size(); +- HashMap sortValues = new HashMap(size); +- +- for (Node node : list) { +- Object expression = getCompareValue(node); +- sortValues.put(node, expression); +- } +- +- sort(list, sortValues); +- +- if (distinct) { +- removeDuplicates(list, sortValues); +- } +- } +- } +- +- public boolean matches(Node node) { +- try { +- setNSContext(node); +- +- List answer = xpath.selectNodes(node); +- +- if ((answer != null) && (answer.size() > 0)) { +- Object item = answer.get(0); +- +- if (item instanceof Boolean) { +- return (Boolean) item; +- } +- +- return answer.contains(node); +- } +- +- return false; +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return false; +- } +- } +- +- /** +- * Sorts the list based on the sortValues for each node +- * +- * @param list +- * DOCUMENT ME! +- * @param sortValues +- * DOCUMENT ME! +- */ +- protected void sort(List list, final Map sortValues) { +- Collections.sort(list, new Comparator() { +- public int compare(Node n1, Node n2) { +- Object o1 = sortValues.get(n1); +- Object o2 = sortValues.get(n2); +- +- if (o1 == o2) { +- return 0; +- } else if (o1 instanceof Comparable) { +- Comparable c1 = (Comparable) o1; +- +- return c1.compareTo(o2); +- } else if (o1 == null) { +- return 1; +- } else if (o2 == null) { +- return -1; +- } else { +- return o1.equals(o2) ? 0 : (-1); +- } +- } +- }); +- } +- +- // Implementation methods +- +- /** +- * Removes items from the list which have duplicate values +- * +- * @param list +- * DOCUMENT ME! +- * @param sortValues +- * DOCUMENT ME! +- */ +- protected void removeDuplicates(List list, Map sortValues) { +- // remove distinct +- HashSet distinctValues = new HashSet(); +- +- for (Iterator iter = list.iterator(); iter.hasNext();) { +- Node node = iter.next(); +- Object value = sortValues.get(node); +- +- if (distinctValues.contains(value)) { +- iter.remove(); +- } else { +- distinctValues.add(value); +- } +- } +- } +- +- /** +- * DOCUMENT ME! +- * +- * @param node +- * DOCUMENT ME! +- * +- * @return the node expression used for sorting comparisons +- */ +- protected Object getCompareValue(Node node) { +- return valueOf(node); +- } +- +- protected static XPath parse(String text) { +- try { +- return new Dom4jXPath(text); +- } catch (JaxenException e) { +- throw new InvalidXPathException(text, e.getMessage()); +- } catch (RuntimeException e) { +- } +- +- throw new InvalidXPathException(text); +- } +- +- protected void setNSContext(Object context) { +- if (namespaceContext == null) { +- xpath.setNamespaceContext(DefaultNamespaceContext.create(context)); +- } +- } +- +- protected void handleJaxenException(JaxenException exception) +- throws XPathException { +- throw new XPathException(text, exception); +- } +-} +- +-/* +- * Redistribution and use of this software and associated documentation +- * ("Software"), with or without modification, are permitted provided that the +- * following conditions are met: +- * +- * 1. Redistributions of source code must retain copyright statements and +- * notices. Redistributions must also contain a copy of this document. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, +- * this list of conditions and the following disclaimer in the documentation +- * and/or other materials provided with the distribution. +- * +- * 3. The name "DOM4J" must not be used to endorse or promote products derived +- * from this Software without prior written permission of MetaStuff, Ltd. For +- * written permission, please contact dom4j-info@metastuff.com. +- * +- * 4. Products derived from this Software may not be called "DOM4J" nor may +- * "DOM4J" appear in their names without prior written permission of MetaStuff, +- * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd. +- * +- * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org +- * +- * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND +- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- * +- * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. +- */ +diff --git a/src/main/java/org/dom4j/xpath/XPathPattern.java b/src/main/java/org/dom4j/xpath/XPathPattern.java +deleted file mode 100644 +index 65d656b..0000000 +--- a/src/main/java/org/dom4j/xpath/XPathPattern.java ++++ /dev/null +@@ -1,164 +0,0 @@ +-/* +- * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. +- * +- * This software is open source. +- * See the bottom of this file for the licence. +- */ +- +-package org.dom4j.xpath; +- +-import java.util.ArrayList; +-import java.util.Collections; +- +-import org.dom4j.InvalidXPathException; +-import org.dom4j.Node; +-import org.dom4j.XPathException; +- +-import org.jaxen.Context; +-import org.jaxen.ContextSupport; +-import org.jaxen.JaxenException; +-import org.jaxen.SimpleNamespaceContext; +-import org.jaxen.SimpleVariableContext; +-import org.jaxen.VariableContext; +-import org.jaxen.XPathFunctionContext; +-import org.jaxen.dom4j.DocumentNavigator; +-import org.jaxen.pattern.Pattern; +-import org.jaxen.pattern.PatternParser; +-import org.jaxen.saxpath.SAXPathException; +- +-/** +- *

+- * XPathPattern is an implementation of Pattern which uses an +- * XPath xpath. +- *

+- * +- * @author James Strachan +- * @version $Revision: 1.18 $ +- */ +-public class XPathPattern implements org.dom4j.rule.Pattern { +- private String text; +- +- private Pattern pattern; +- +- private Context context; +- +- public XPathPattern(Pattern pattern) { +- this.pattern = pattern; +- this.text = pattern.getText(); +- this.context = new Context(getContextSupport()); +- } +- +- public XPathPattern(String text) { +- this.text = text; +- this.context = new Context(getContextSupport()); +- +- try { +- this.pattern = PatternParser.parse(text); +- } catch (SAXPathException e) { +- throw new InvalidXPathException(text, e.getMessage()); +- } catch (RuntimeException e) { +- throw new InvalidXPathException(text); +- } +- } +- +- public boolean matches(Node node) { +- try { +- context.setNodeSet(Collections.singletonList(node)); +- +- return pattern.matches(node, context); +- } catch (JaxenException e) { +- handleJaxenException(e); +- +- return false; +- } +- } +- +- public String getText() { +- return text; +- } +- +- public double getPriority() { +- return pattern.getPriority(); +- } +- +- public org.dom4j.rule.Pattern[] getUnionPatterns() { +- Pattern[] patterns = pattern.getUnionPatterns(); +- +- if (patterns != null) { +- int size = patterns.length; +- XPathPattern[] answer = new XPathPattern[size]; +- +- for (int i = 0; i < size; i++) { +- answer[i] = new XPathPattern(patterns[i]); +- } +- +- return answer; +- } +- +- return null; +- } +- +- public short getMatchType() { +- return pattern.getMatchType(); +- } +- +- public String getMatchesNodeName() { +- return pattern.getMatchesNodeName(); +- } +- +- public void setVariableContext(VariableContext variableContext) { +- context.getContextSupport().setVariableContext(variableContext); +- } +- +- public String toString() { +- return "[XPathPattern: text: " + text + " Pattern: " + pattern + "]"; +- } +- +- protected ContextSupport getContextSupport() { +- return new ContextSupport(new SimpleNamespaceContext(), +- XPathFunctionContext.getInstance(), +- new SimpleVariableContext(), DocumentNavigator.getInstance()); +- } +- +- protected void handleJaxenException(JaxenException exception) +- throws XPathException { +- throw new XPathException(text, exception); +- } +-} +- +-/* +- * Redistribution and use of this software and associated documentation +- * ("Software"), with or without modification, are permitted provided that the +- * following conditions are met: +- * +- * 1. Redistributions of source code must retain copyright statements and +- * notices. Redistributions must also contain a copy of this document. +- * +- * 2. Redistributions in binary form must reproduce the above copyright notice, +- * this list of conditions and the following disclaimer in the documentation +- * and/or other materials provided with the distribution. +- * +- * 3. The name "DOM4J" must not be used to endorse or promote products derived +- * from this Software without prior written permission of MetaStuff, Ltd. For +- * written permission, please contact dom4j-info@metastuff.com. +- * +- * 4. Products derived from this Software may not be called "DOM4J" nor may +- * "DOM4J" appear in their names without prior written permission of MetaStuff, +- * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd. +- * +- * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org +- * +- * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND +- * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- * +- * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. +- */ +-- +2.41.0 + diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..a0fe1b4 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + bootstrap + diff --git a/_service b/_service new file mode 100644 index 0000000..6b21bc0 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + git + https://github.com/dom4j/dom4j.git + version-2.1.4 + version-* + @PARENT_TAG@ + version-(.*) + + + *.tar + xz + + + diff --git a/dom4j-2.1.4.pom b/dom4j-2.1.4.pom new file mode 100644 index 0000000..5636f3e --- /dev/null +++ b/dom4j-2.1.4.pom @@ -0,0 +1,77 @@ + + + + + + + + 4.0.0 + org.dom4j + dom4j + 2.1.4 + dom4j + flexible XML framework for Java + http://dom4j.github.io/ + + + Plexus + https://github.com/dom4j/dom4j/blob/master/LICENSE + + + + + Filip Jirsák + filip@jirsak.org + https://github.com/FilipJirsak + + + + scm:git:git@github.com:dom4j/dom4j.git + scm:git:git@github.com:dom4j/dom4j.git + git@github.com:dom4j/dom4j.git + + + + jaxen + jaxen + 1.1.6 + runtime + true + + + javax.xml.stream + stax-api + 1.0-2 + runtime + true + + + net.java.dev.msv + xsdlib + 2013.6.1 + runtime + true + + + javax.xml.bind + jaxb-api + 2.2.12 + runtime + true + + + pull-parser + pull-parser + 2.1.10 + runtime + true + + + xpp3 + xpp3 + 1.1.4c + runtime + true + + + diff --git a/dom4j-2.1.4.tar.xz b/dom4j-2.1.4.tar.xz new file mode 100644 index 0000000..7d7f651 --- /dev/null +++ b/dom4j-2.1.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:442ba06cc110721084312dec9ed41d00d2741362b37f1e6d89a595a79ff9a262 +size 397532 diff --git a/dom4j-build.xml b/dom4j-build.xml new file mode 100644 index 0000000..50045be --- /dev/null +++ b/dom4j-build.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dom4j.changes b/dom4j.changes new file mode 100644 index 0000000..931b2c5 --- /dev/null +++ b/dom4j.changes @@ -0,0 +1,201 @@ +------------------------------------------------------------------- +Thu Feb 15 06:06:58 UTC 2024 - Fridrich Strba + +- The license is actually Plexus + +------------------------------------------------------------------- +Thu Nov 2 11:40:16 UTC 2023 - Anton Shvetz + +- JPMS: Add the Automatic-Module-Name attribute to the manifest. + +------------------------------------------------------------------- +Thu Aug 24 10:08:25 UTC 2023 - Fridrich Strba + +- Make a separate flavour for a minimal dom4j-bootstrap package + used to build jaxen and full dom4j +- Added patch: + * 0001-no-jaxen-dom4.patch + * for the bootstrap package, patch out the code that requires + jaxen with dom4j support to build + +------------------------------------------------------------------- +Thu Aug 24 04:59:20 UTC 2023 - Fridrich Strba + +- Upgrade to upstream version 2.1.4 + * Improvements and potentially breaking changes + + Added new factory method + org.dom4j.io.SAXReader.createDefault(). It has more secure + defaults than new SAXReader(), which uses system + XMLReaderFactory.createXMLReader() or + SAXParserFactory.newInstance().newSAXParser(). + + If you use some optional dependency of dom4j (for example + Jaxen, xsdlib etc.), you need to specify an explicit + dependency on it in your project. They are no longer marked as + a mandatory transitive dependency by dom4j. + + Following SAX parser features are disabled by default in + DocumentHelper.parse() for security reasons (they were enabled + in previous versions): + ° http://xml.org/sax/properties/external-general-entities + ° http://xml.org/sax/properties/external-parameter-entities + * Other changes: + + updated pull-parser version + + Reuse the writeAttribute method in writeAttributes + + support build on OS with non-UTF8 as default charset + + Gradle: add an automatic module name + + Use Correct License Name "Plexus" + + Possible vulnerability of DocumentHelper.parseText() to XML + injection + + CVS directories left in the source tree + + XMLWriter does not escape supplementary unicode characters + correctly + + writer.writeOpen(x) doesn't write namespaces + + concurrency problem with QNameCache + + all dependencies are optional + + SAXReader: hardcoded namespace features + + validate QNames + + StringIndexOutOfBoundsException in + XMLWriter.writeElementContent() + + TreeNode has grown some generics + + QName serialization fix + + DocumentException initialize with nested exception + + Accidentally occurring error in a multi-threaded test + + compatibility with W3C DOM Level 3 + + use Java generics +- Removed patches: + * dom4j-1.6.1-bug1618750.patch + * dom4j-CVE-2018-1000632.patch + * dom4j-CVE-2020-10683.patch + * dom4j-enable-stax-datatypes.patch + * dom4j-javadoc.patch + * dom4j-sourcetarget.patch + + not needed with this version + +------------------------------------------------------------------- +Mon Jul 24 19:38:26 UTC 2023 - Fridrich Strba + +- Do not depend on jtidy, since it is not used during build + +------------------------------------------------------------------- +Wed Mar 30 09:56:14 UTC 2022 - Fridrich Strba + +- Build against the standalone JavaEE modules unconditionally + +------------------------------------------------------------------- +Mon Mar 28 13:50:07 UTC 2022 - Fridrich Strba + +- Add alias to the new artifact coordinates org.dom4j:dom4j +- Simplify the spec file a bit + +------------------------------------------------------------------- +Thu Mar 17 15:40:13 UTC 2022 - Fridrich Strba + +- Add jaxb-api dependency for relevant distribution versions so that + we can build with JDKs that do not include the JavaEE modules + +------------------------------------------------------------------- +Fri Apr 17 12:04:59 UTC 2020 - Pedro Monreal Gonzalez + +- Security fix: [bsc#1169760, CVE-2020-10683] + * External Entity vulnerability in default SAX parser + * Add dom4j-CVE-2020-10683.patch + +------------------------------------------------------------------- +Fri Jan 25 11:10:16 UTC 2019 - Cédric Bosdonnat + +- Build STAXEventReader, STAXEventWriter and the data types. + [bsc#1123158] + * Added patch dom4j-enable-stax-datatypes.patch + +------------------------------------------------------------------- +Tue Sep 18 10:31:28 UTC 2018 - pmonrealgonzalez@suse.com + +- Security fix: [bsc#1105443, CVE-2018-1000632] + * Version prior to version 2.1.1 contains a CWE-91: XML + Injectionvulnerability in Class: Element. Methods: addElement, + addAttribute that canresult in an attacker tampering with XML + documents through. + * Added dom4j-CVE-2018-1000632.patch + +------------------------------------------------------------------- +Tue Jul 10 12:41:17 UTC 2018 - fstrba@suse.com + +- Added patch: + * dom4j-javadoc.patch + + Don't load urls while building javadoc in environment without + connectivity + +------------------------------------------------------------------- +Wed May 16 11:56:27 UTC 2018 - fstrba@suse.com + +- Modified patch: + * dom4j-sourcetarget.patch + + Build with source and target 8 to prepare for a possible + removal of 1.6 compatibility + +------------------------------------------------------------------- +Fri Sep 8 05:47:14 UTC 2017 - fstrba@suse.com + +- Added patch: + * dom4j-sourcetarget.patch + + Use java source and target level 1.6 in order to allow + building with jdk9 + +------------------------------------------------------------------- +Fri May 19 09:03:12 UTC 2017 - mpluskal@suse.com + +- Update dependencies + +------------------------------------------------------------------- +Wed Mar 18 09:46:06 UTC 2015 - tchvatal@suse.com + +- Fix build with new javapackages-tools + +------------------------------------------------------------------- +Tue Jul 8 10:43:35 UTC 2014 - tchvatal@suse.com + +- Do not depend on ant-trax and run spec-cleaner. + +------------------------------------------------------------------- +Mon Sep 9 11:05:39 UTC 2013 - tchvatal@suse.com + +- Move from jpackage-utils to javapackage-tools + +------------------------------------------------------------------- +Wed Aug 28 13:57:11 UTC 2013 - mvyskocil@suse.com + +- use add_maven_depmap from javapackages-tools +- drop repolib part (never built) +- drop pointless jarjar +- unversioned javadoc + +------------------------------------------------------------------- +Fri Mar 23 08:50:16 UTC 2012 - cfarrell@suse.com + +- license update: Apache-1.1 + SPDX + +------------------------------------------------------------------- +Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile + (cf. packaging guidelines) + +------------------------------------------------------------------- +Wed May 20 11:39:13 CEST 2009 - mvyskocil@suse.cz + +- 'fixed bnc#501764: removed clover.license from source tarball' + +------------------------------------------------------------------- +Mon May 18 15:04:56 CEST 2009 - mvyskocil@suse.cz + +- Removed documentation of ConcurrentReaderHashMap (bnc#504663) + * dom4j-1.6.1/docs/clover/org/dom4j/tree/ConcurrentReaderHashMap.html + * dom4j-1.6.1/docs/xref/org/dom4j/tree/ConcurrentReaderHashMap.html + +------------------------------------------------------------------- +Thu May 14 11:06:10 CEST 2009 - mvyskocil@suse.cz + +- Initial SUSE packaging: + * spec script and jarjar build support was taken from jpackage.org 5.0 + * Source of dom4j and build.xml comes from Debian unstable, as there don't need + proprietary msv from sun (bnc#430592) diff --git a/dom4j.spec b/dom4j.spec new file mode 100644 index 0000000..4531a64 --- /dev/null +++ b/dom4j.spec @@ -0,0 +1,149 @@ +# +# spec file for package dom4j +# +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2000-2007, JPackage Project +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global base_name dom4j +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "bootstrap" +%bcond_without bootstrap +%else +%bcond_with bootstrap +%endif +Version: 2.1.4 +Release: 0 +Summary: Open Source XML framework for Java +License: Plexus +URL: https://dom4j.github.io/ +Source0: %{base_name}-%{version}.tar.xz +Source1: https://repo1.maven.org/maven2/org/%{base_name}/%{base_name}/%{version}/%{base_name}-%{version}.pom +Source2: %{base_name}-build.xml +Patch0: 0001-no-jaxen-dom4.patch +BuildRequires: ant +BuildRequires: fdupes +BuildRequires: glassfish-jaxb-api +BuildRequires: javapackages-local >= 6 +Obsoletes: %{base_name}-manual < %{version} +BuildArch: noarch +%if %{with bootstrap} +Name: %{base_name}-bootstrap +%else +Name: %{base_name} +%endif +%if %{without bootstrap} +BuildRequires: fdupes +BuildRequires: jaxen +Conflicts: %{base_name}-bootstrap +Obsoletes: %{base_name}-bootstrap +%else +BuildRequires: jaxen-bootstrap +Conflicts: %{base_name} +%endif + +%description +dom4j is an Open Source XML framework for Java. dom4j allows you to read, +write, navigate, create and modify XML documents. dom4j integrates with +DOM and SAX and is seamlessly integrated with full XPath support. + +%if %{without bootstrap} +%package demo +Summary: Open Source XML framework for Java - demo +Group: Development/Libraries/Java +Requires: %{base_name} = %{version} + +%description demo +dom4j is an Open Source XML framework for Java. dom4j allows you to read, +write, navigate, create and modify XML documents. dom4j integrates with +DOM and SAX and is seamlessly integrated with full XPath support. + +%package javadoc +Summary: Javadoc for %{base_name} + +%description javadoc +Javadoc for %{base_name}. +%endif + +%prep +%setup -q -n %{base_name}-%{version} +%if %{with bootstrap} +%patch0 -p1 +%endif + +cp %{SOURCE1} pom.xml +cp %{SOURCE2} build.xml + +# Remove xpp2 support +rm -r src/main/java/org/dom4j/xpp +rm src/main/java/org/dom4j/io/XPPReader.java + +# Remove datatype code which depends on msv +rm -r src/main/java/org/dom4j/datatype +%pom_remove_dep net.java.dev.msv:xsdlib + +# Remove xpp3 support +rm src/main/java/org/dom4j/io/XPP3Reader.java +%pom_remove_dep xpp3:xpp3 +%pom_remove_dep pull-parser:pull-parser +%pom_remove_dep javax.xml.stream:stax-api + +%build +mkdir -p lib +build-jar-repository -s lib jaxen glassfish-jaxb-api +%{ant} jar javadoc + +%install + +# jar +install -dm 0755 %{buildroot}%{_javadir} +install -pm 0644 target/%{base_name}-%{version}.jar %{buildroot}%{_javadir}/%{base_name}.jar + +%if %{without bootstrap} +# pom +install -dm 0755 %{buildroot}%{_mavenpomdir} +%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{base_name}.pom +%add_maven_depmap %{base_name}.pom %{base_name}.jar -a %{base_name}:%{base_name} + +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{base_name} +cp -r target/site/apidocs %{buildroot}%{_javadocdir}/%{base_name} +%fdupes -s %{buildroot}%{_javadocdir} + +# demo +install -dm 0755 %{buildroot}%{_datadir}/%{base_name}/src +cp -pr xml %{buildroot}%{_datadir}/%{base_name} +cp -pr src/example %{buildroot}%{_datadir}/%{base_name}/src +%fdupes -s %{buildroot}%{_datadir}/%{base_name} + +%files -f .mfiles +%license LICENSE +%doc README.md + +%files demo +%{_datadir}/%{base_name} + +%files javadoc +%license LICENSE +%{_javadocdir}/%{base_name} + +%else + +%files +%{_javadir}/%{base_name}.jar + +%endif + +%changelog