Compare commits

...

No commits in common. 'c9' and 'c8-beta-stream-10.6' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/Xerces-J-src.2.12.1.tar.gz
SOURCES/Xerces-J-src.2.11.0.tar.gz

@ -1 +1 @@
b5d934e54b8864f09c683ca8666147c101faeb69 SOURCES/Xerces-J-src.2.12.1.tar.gz
c57f0251ce9246c6026aa9f92241f37108f7141f SOURCES/Xerces-J-src.2.11.0.tar.gz

@ -0,0 +1,131 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xerces.util;
import java.util.Map;
import com.sun.javadoc.Tag;
import com.sun.tools.doclets.Taglet;
/**
* This class provides support for a 'xerces.experimental' tag
* in javadoc comments. The tag creates a warning in the generated
* html for users.
*
* @author Ankit Pasricha, IBM
*/
public class ExperimentalTaglet implements Taglet {
private static final String NAME = "xerces.experimental";
private static final String HEADER = "EXPERIMENTAL:";
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inConstructor()
*/
public boolean inConstructor() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inField()
*/
public boolean inField() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inMethod()
*/
public boolean inMethod() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inOverview()
*/
public boolean inOverview() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inPackage()
*/
public boolean inPackage() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inType()
*/
public boolean inType() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#isInlineTag()
*/
public boolean isInlineTag() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#getName()
*/
public String getName() {
return NAME;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#toString(com.sun.javadoc.Tag)
*/
public String toString(Tag arg0) {
return "<DT><H1 style=\"font-size:150%\">" + HEADER + "</H1><DD>"
+ "This class should not be considered stable. It is likely to be altered or replaced in the future.<br/>"
+ "<I>" + arg0.text() + "</I></DD>\n";
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#toString(com.sun.javadoc.Tag[])
*/
public String toString(Tag[] tags) {
if (tags.length == 0) {
return null;
}
String result = "\n<DT><H1 style=\"font-size:150%\">" + HEADER + "</H1><DD>";
result += "This class should not be considered stable. It is likely to be altered or replaced in the future.";
result += "<I>";
for (int i = 0; i < tags.length; i++) {
result += "<br/>";
result += tags[i].text();
}
return result + "</I></DD>\n";
}
/**
* Register this Taglet.
* @param tagletMap the map to register this tag to.
*/
public static void register(Map tagletMap) {
ExperimentalTaglet tag = new ExperimentalTaglet();
Taglet t = (Taglet) tagletMap.get(tag.getName());
if (t != null) {
tagletMap.remove(tag.getName());
}
tagletMap.put(tag.getName(), tag);
}
}

@ -0,0 +1,131 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.xerces.util;
import java.util.Map;
import com.sun.javadoc.Tag;
import com.sun.tools.doclets.Taglet;
/**
* This class provides support for a 'xerces.internal' tag
* in javadoc comments. The tag creates a warning in the generated
* html for users.
*
* @author Ankit Pasricha, IBM
*/
public class InternalTaglet implements Taglet {
private static final String NAME = "xerces.internal";
private static final String HEADER = "INTERNAL:";
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inConstructor()
*/
public boolean inConstructor() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inField()
*/
public boolean inField() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inMethod()
*/
public boolean inMethod() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inOverview()
*/
public boolean inOverview() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inPackage()
*/
public boolean inPackage() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#inType()
*/
public boolean inType() {
return true;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#isInlineTag()
*/
public boolean isInlineTag() {
return false;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#getName()
*/
public String getName() {
return NAME;
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#toString(com.sun.javadoc.Tag)
*/
public String toString(Tag arg0) {
return "<DT><H1 style=\"font-size:110%\">" + HEADER + "</H1><DD>"
+ "Usage of this class is not supported. It may be altered or removed at any time.<br/>"
+ "<I>" + arg0.text() + "</I></DD>\n";
}
/* (non-Javadoc)
* @see com.sun.tools.doclets.Taglet#toString(com.sun.javadoc.Tag[])
*/
public String toString(Tag[] tags) {
if (tags.length == 0) {
return null;
}
String result = "\n<DT><H1 style=\"font-size:110%\">" + HEADER + "</H1><DD>";
result += "Usage of this class is not supported. It may be altered or removed at any time.";
result += "<I>";
for (int i = 0; i < tags.length; i++) {
result += "<br/>";
result += tags[i].text();
}
return result + "</I></DD>\n";
}
/**
* Register this Taglet.
* @param tagletMap the map to register this tag to.
*/
public static void register(Map tagletMap) {
InternalTaglet tag = new InternalTaglet();
Taglet t = (Taglet) tagletMap.get(tag.getName());
if (t != null) {
tagletMap.remove(tag.getName());
}
tagletMap.put(tag.getName(), tag);
}
}

@ -0,0 +1,47 @@
--- src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:25:06 1499505
+++ src/org/apache/xerces/impl/XMLScanner.java 2013/07/03 18:29:43 1499506
@@ -542,7 +542,7 @@
// document is until we scan the encoding declaration
// you cannot reliably read any characters outside
// of the ASCII range here. -- mrglavas
- String name = fEntityScanner.scanName();
+ String name = scanPseudoAttributeName();
XMLEntityManager.print(fEntityManager.getCurrentEntity());
if (name == null) {
reportFatalError("PseudoAttrNameExpected", null);
@@ -599,6 +599,35 @@
} // scanPseudoAttribute(XMLString):String
/**
+ * Scans the name of a pseudo attribute. The only legal names
+ * in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'.
+ *
+ * @return the name of the pseudo attribute or <code>null</code>
+ * if a legal pseudo attribute name could not be scanned.
+ */
+ private String scanPseudoAttributeName() throws IOException, XNIException {
+ final int ch = fEntityScanner.peekChar();
+ switch (ch) {
+ case 'v':
+ if (fEntityScanner.skipString(fVersionSymbol)) {
+ return fVersionSymbol;
+ }
+ break;
+ case 'e':
+ if (fEntityScanner.skipString(fEncodingSymbol)) {
+ return fEncodingSymbol;
+ }
+ break;
+ case 's':
+ if (fEntityScanner.skipString(fStandaloneSymbol)) {
+ return fStandaloneSymbol;
+ }
+ break;
+ }
+ return null;
+ } // scanPseudoAttributeName()
+
+ /**
* Scans a processing instruction.
* <p>
* <pre>

@ -39,7 +39,7 @@
<!-- substitute tokens as needed -->
<replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
token="@@VERSION@@" value="${parser.Name} ${parser.Version}"/>
@@ -1232,30 +1207,6 @@
@@ -1231,30 +1206,6 @@
<!-- HACK: Remove reference to XML11Configurable from SAX parser -->
<replace file="${build.dir}/src/org/apache/xerces/parsers/AbstractSAXParser.java"
token="return (fConfiguration instanceof XML11Configurable);" value="return false;"/>

@ -0,0 +1,20 @@
#!/bin/sh
#
# Xerces-J2 constants script
# JPackage Project (http://www.jpackage.org/)
# $Id: xerces-j2-constants.sh,v 1.3 2005/05/26 14:21:22 gbenson Exp $
# Source functions library
. /usr/share/java-utils/java-functions
# Configuration
MAIN_CLASS=org.apache.xerces.impl.Constants
# Set parameters
set_jvm
export CLASSPATH=$(build-classpath xerces-j2)
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

File diff suppressed because one or more lines are too long

@ -1,12 +0,0 @@
diff -up ./build.xml.fix2 ./build.xml
--- ./build.xml.fix2 2020-06-24 14:11:03.342338406 -0400
+++ ./build.xml 2020-06-24 14:14:03.000100028 -0400
@@ -447,7 +447,7 @@ Authors:
author='true' version='true'
windowtitle='XML Standard API' doctitle='XML Standard API'
bottom='${copyright}'
- additionalparam='${additional.param}'
+ additionalparam='--patch-module jdk.xml.dom=${build.src}/org/w3c/dom/html ${additional.param}'
/>
<mkdir dir='${build.dir}/docs/javadocs/xni'/>
<javadoc packagenames='org.apache.xerces.xni.*'

@ -0,0 +1,20 @@
#!/bin/sh
#
# Xerces-J2 version script
# JPackage Project (http://www.jpackage.org/)
# $Id: xerces-j2-version.sh,v 1.3 2005/05/26 14:21:22 gbenson Exp $
# Source functions library
. /usr/share/java-utils/java-functions
# Configuration
MAIN_CLASS=org.apache.xerces.impl.Version
# Set parameters
set_jvm
export CLASSPATH=$(build-classpath xerces-j2)
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS
# Let's start
run "$@"

@ -1,8 +1,10 @@
%global cvs_version 2_11_0
%define __requires_exclude system.bundle
Name: xerces-j2
Version: 2.12.1
Release: 8%{?dist}
Version: 2.11.0
Release: 34%{?dist}
Summary: Java XML parser
# Most of the source is ASL 2.0
# W3C licensed files:
@ -11,15 +13,19 @@ Summary: Java XML parser
License: ASL 2.0 and W3C
URL: http://xerces.apache.org/xerces2-j/
%global cvs_version %(tr . _ <<< %{version})
Source0: http://mirror.ox.ac.uk/sites/rsync.apache.org/xerces/j/source/Xerces-J-src.%{version}.tar.gz
Source1: %{name}-version.sh
Source2: %{name}-constants.sh
Source11: %{name}-version.1
Source12: %{name}-constants.1
# Custom javac ant task used by the build
Source3: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_%{cvs_version}/tools/src/XJavac.java
# Custom doclet tags used in javadocs
Source5: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_%{cvs_version}/tools/src/ExperimentalTaglet.java
Source6: https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_%{cvs_version}/tools/src/InternalTaglet.java
Source7: %{name}-pom.xml
# Patch the build so that it doesn't try to use bundled xml-commons source
@ -28,17 +34,20 @@ Patch0: %{name}-build.patch
# Patch the manifest so that it includes OSGi stuff
Patch1: %{name}-manifest.patch
# Patch build.xml to patch modules as needed during javadoc generation
Patch2: %{name}-modulefix.patch
# Backported fix from upstream http://svn.apache.org/viewvc?view=revision&revision=1499506
# See https://bugzilla.redhat.com/show_bug.cgi?id=1140031
Patch2: xerces-j2-CVE-2013-4002.patch
BuildArch: noarch
BuildRequires: javapackages-local
BuildRequires: ant
BuildRequires: apache-parent
BuildRequires: xalan-j2 >= 2.7.1
BuildRequires: xml-commons-apis >= 1.4.01
BuildRequires: xml-commons-resolver >= 1.2
Requires: xalan-j2 >= 2.7.1
Requires: xml-commons-apis >= 1.4.01
Requires: xml-commons-resolver >= 1.2
# Explicit javapackages-tools requires since scripts use
@ -103,24 +112,22 @@ Requires: %{name} = %{version}-%{release}
%{summary}.
%prep
%setup -n xerces-%{cvs_version}
%patch -P 0 -p0
%patch -P 1 -p0
%patch -P 2 -p0
%setup -q -n xerces-%{cvs_version}
%patch0 -p0 -b .orig
%patch1 -p0 -b .orig
%patch2 -p0 -b .orig
# Copy the custom ant task into place
# Copy the custom ant tasks into place
mkdir -p tools/org/apache/xerces/util
mkdir -p tools/bin
cp -a %{SOURCE3} tools/org/apache/xerces/util
cp -a %{SOURCE3} %{SOURCE5} %{SOURCE6} tools/org/apache/xerces/util
# Make sure upstream hasn't sneaked in any jars we don't know about
find . \( -name '*.class' -o -name '*.jar' \) -delete
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
sed -i 's/\r//' LICENSE README NOTICE
# Disable javadoc linting
sed -i -e "s|additionalparam='|additionalparam='-Xdoclint:none |" build.xml
# legacy aliases for compatability
%mvn_alias : xerces:xerces xerces:xmlParserAPIs apache:xerces-j2
%mvn_file : %{name} jaxp_parser_impl
@ -129,17 +136,22 @@ sed -i -e "s|additionalparam='|additionalparam='-Xdoclint:none |" build.xml
pushd tools
# Build custom ant tasks
%{_jvmdir}/java-11-openjdk/bin/javac -classpath $(build-classpath ant) org/apache/xerces/util/XJavac.java
%{_jvmdir}/java-11-openjdk/bin/jar cf bin/xjavac.jar org/apache/xerces/util/XJavac.class
javac -classpath $(build-classpath ant) org/apache/xerces/util/XJavac.java
jar cf bin/xjavac.jar org/apache/xerces/util/XJavac.class
# Build custom doc taglets
javac -classpath /usr/lib/jvm/java/lib/tools.jar org/apache/xerces/util/*Taglet.java
jar cf bin/xerces2taglets.jar org/apache/xerces/util/*Taglet.class
%{_jvmdir}/java-11-openjdk/bin/jar cmf /dev/null serializer.jar
ln -sf $(build-classpath xalan-j2-serializer) serializer.jar
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
ln -sf $(build-classpath xml-commons-resolver) resolver.jar
ln -sf $(build-classpath xerces-j2) x.jar
popd
# Build everything
export ANT_OPTS="-Xmx512m -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
ant -Djavac.source=1.8 -Djavac.target=1.8 \
export ANT_OPTS="-Xmx256m -Djava.endorsed.dirs=$(pwd)/tools -Djava.awt.headless=true -Dbuild.sysclasspath=first -Ddisconnected=true"
ant -Djavac.source=1.5 -Djavac.target=1.5 \
-Dbuild.compiler=modern \
clean jars javadocs
@ -161,8 +173,8 @@ cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}/xni
cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}/other
# scripts
%jpackage_script org.apache.xerces.impl.Version "" "" %{name} %{name}-version 1
%jpackage_script org.apache.xerces.impl.Constants "" "" %{name} %{name}-constants 1
install -pD -m755 -T %{SOURCE1} %{buildroot}%{_bindir}/%{name}-version
install -pD -m755 -T %{SOURCE2} %{buildroot}%{_bindir}/%{name}-constants
# manual pages
install -d -m 755 %{buildroot}%{_mandir}/man1
@ -174,7 +186,7 @@ install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-s
cp -pr data %{buildroot}%{_datadir}/%{name}
%post
# alternatives support removed in f26
# alternatives suppoort removed in f26
update-alternatives --remove jaxp_parser_impl %{_javadir}/%{name}.jar >/dev/null 2>&1 || :
# it deletes the link, set it up again
ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar
@ -191,69 +203,6 @@ ln -sf %{name}.jar %{_javadir}/jaxp_parser_impl.jar
%{_datadir}/%{name}
%changelog
* Thu Nov 21 2024 Marián Konček <mkoncek@redhat.com> - 2.12.1-8
- Fix patch usage
* Tue Nov 19 2024 Marián Konček <mkoncek@redhat.com> - 2.12.1-7
- Rebuild with regenerated Requires on Java
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.12.1-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Mon Jun 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.1-5
- Remove dependency on xalan-j2
- Resolves: rhbz#1977007
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.12.1-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Mar 12 2021 Mat Booth <mat.booth@redhat.com> - 2.12.1-3
- Update OSGi metadata, use import-package instead of require-bundle
in order to avoid some tricky OSGi breakage on Java 11
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Sep 14 2020 Jerry James <loganjerry@gmail.com> - 2.12.1-1
- Version 2.12.1
- Drop upstreamed getcontentdocument patch
- Drop no longer used taglet sources
- Verify the source tarball
- Compute cvs_version so it doesn't have to be updated in sync with Version
- Build with JDK 11
- Generate the scripts with jpackage_script
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 14 2020 Mat Booth <mat.booth@redhat.com> - 2.12.0-8
- Peg to Java 8 due to use of 'com.sun.tools.doclets.Taglet' that was removed in
Java 11
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 2.12.0-7
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Wed Jun 24 2020 Mat Booth <mat.booth@redhat.com> - 2.12.0-6
- Turn off javadoc linting
* Wed Jun 24 2020 Jeff Johnston <jjohnstn@redhat.com> - 2.12.0-5
- Change to build using Java 11
- Fix some impl classes that require getContentDocument() method
- Add a patch-module option for Javadoc generation
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Nov 19 2018 Marian Koncek <mkoncek@redhat.com> - 2.12.0-1
- Update to upstream version 2.12.0
* Fri Aug 03 2018 Michael Simacek <msimacek@redhat.com> - 2.11.0-34
- Fix license tag to include W3C

Loading…
Cancel
Save