Compare commits

...

No commits in common. 'c9' and 'cs10' have entirely different histories.
c9 ... cs10

2
.gitignore vendored

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

@ -1 +1 @@
b5d934e54b8864f09c683ca8666147c101faeb69 SOURCES/Xerces-J-src.2.12.1.tar.gz
b7ebe99072b076160b5b4c8b5d8444fc94bfb911 SOURCES/Xerces-J-src.2.12.2.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);
}
}

@ -46,24 +46,27 @@ public class XJavac extends Javac {
* @exception BuildException if the compilation has problems.
*/
public void execute() throws BuildException {
if(isJDK14OrHigher()) {
Properties props = null;
try {
props = System.getProperties();
} catch (Exception e) {
throw new BuildException("unable to determine java vendor because could not access system properties!");
}
String currBCP = (String)props.get("sun.boot.class.path"); // this property is absent / null with JDK 9 & above
if(isJDK14OrHigher() && !(currBCP == null)) {
// maybe the right one; check vendor:
// by checking system properties:
Properties props = null;
try {
props = System.getProperties();
} catch (Exception e) {
throw new BuildException("unable to determine java vendor because could not access system properties!");
}
// by checking system properties:
// this is supposed to be provided by all JVM's from time immemorial
String vendor = ((String)props.get("java.vendor")).toUpperCase(Locale.ENGLISH);
if (vendor.indexOf("IBM") >= 0) {
// we're on an IBM 1.4 or higher; fiddle with the bootclasspath.
setBootclasspath(createIBMJDKBootclasspath());
}
// need to do special things for Sun too and also
// need to do special things for Sun/Oracle too and also
// for Apple, HP, FreeBSD, SableVM, Kaffe and Blackdown: a Linux port of Sun Java
else if( (vendor.indexOf("SUN") >= 0) ||
(vendor.indexOf("ORACLE") >= 0) ||
(vendor.indexOf("BLACKDOWN") >= 0) ||
(vendor.indexOf("APPLE") >= 0) ||
(vendor.indexOf("HEWLETT-PACKARD") >= 0) ||
@ -75,8 +78,7 @@ public class XJavac extends Javac {
// we must use the classpath
Path bcp = createBootclasspath();
Path clPath = getClasspath();
bcp.append(clPath);
String currBCP = (String)props.get("sun.boot.class.path");
bcp.append(clPath);
Path currBCPath = new Path(null);
currBCPath.createPathElement().setPath(currBCP);
bcp.append(currBCPath);
@ -94,10 +96,16 @@ public class XJavac extends Javac {
Path bcp = createBootclasspath();
String javaHome = System.getProperty("java.home");
StringBuffer bcpMember = new StringBuffer();
bcpMember.append(javaHome).append("/lib/charsets.jar:");
bcpMember.append(javaHome).append("/bin/default/jclSC170/vm.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/ppc/default/jclSC170/vm.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/charsets.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/core.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/math.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/vm.jar:");
bcp.createPathElement().setPath(bcpMember.toString());
bcpMember.replace(javaHome.length(), bcpMember.length(), "/lib/java.util.jar:");

@ -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.*'

@ -1,14 +1,14 @@
%define __requires_exclude system.bundle
Name: xerces-j2
Version: 2.12.1
Release: 8%{?dist}
Version: 2.12.2
Release: 14%{?dist}
Summary: Java XML parser
# Most of the source is ASL 2.0
# W3C licensed files:
# src/org/apache/xerces/dom3/as
# src/org/w3c/dom/html/HTMLDOMImplementation.java
License: ASL 2.0 and W3C
License: Apache-2.0 AND W3C
URL: http://xerces.apache.org/xerces2-j/
%global cvs_version %(tr . _ <<< %{version})
@ -20,6 +20,10 @@ 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,10 +32,8 @@ 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
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
BuildRequires: javapackages-local
BuildRequires: ant
@ -48,14 +50,6 @@ Requires: javapackages-tools
Provides: jaxp_parser_impl = 1.4
Provides: %{name}-scripts = %{version}-%{release}
Obsoletes: %{name}-scripts < 2.11.0-6
# This documentation is provided by xml-commons-apis
Obsoletes: %{name}-javadoc-apis < %{version}-%{release}
# http://mail-archives.apache.org/mod_mbox/xerces-j-dev/201008.mbox/%3COF8D7E2F83.0271A181-ON8525777F.00528302-8525777F.0054BBE0@ca.ibm.com%3E
Obsoletes: %{name}-manual < %{version}-%{release}
%description
Welcome to the future! Xerces2 is the next generation of high performance,
fully compliant XML parsers in the Apache Xerces family. This new version of
@ -86,12 +80,6 @@ APIs are in use.
%package javadoc
Summary: Javadocs for %{name}
# Consolidating all javadocs into one package
Obsoletes: %{name}-javadoc-impl < %{version}-%{release}
Obsoletes: %{name}-javadoc-xs < %{version}-%{release}
Obsoletes: %{name}-javadoc-xni < %{version}-%{release}
Obsoletes: %{name}-javadoc-other < %{version}-%{release}
%description javadoc
This package contains the API documentation for %{name}.
@ -103,15 +91,14 @@ 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
%patch1 -p0
# Copy the custom ant task 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
@ -129,17 +116,17 @@ 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
%{_jvmdir}/java-11-openjdk/bin/jar cmf /dev/null serializer.jar
%jar cmf /dev/null serializer.jar
ln -sf $(build-classpath xml-commons-apis) xml-apis.jar
ln -sf $(build-classpath xml-commons-resolver) resolver.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 \
%ant -Djavac.source=1.8 -Djavac.target=1.8 \
-Dbuild.compiler=modern \
clean jars javadocs
@ -156,7 +143,7 @@ mkdir -p %{buildroot}%{_javadocdir}/%{name}/xni
mkdir -p %{buildroot}%{_javadocdir}/%{name}/other
cp -pr build/docs/javadocs/xerces2/* %{buildroot}%{_javadocdir}/%{name}/impl
cp -pr build/docs/javadocs/api/* %{buildroot}%{_javadocdir}/%{name}/xs
cp -pr build/docs/javadocs/xs/* %{buildroot}%{_javadocdir}/%{name}/xs
cp -pr build/docs/javadocs/xni/* %{buildroot}%{_javadocdir}/%{name}/xni
cp -pr build/docs/javadocs/other/* %{buildroot}%{_javadocdir}/%{name}/other
@ -170,15 +157,10 @@ install -p -m 644 %{SOURCE11} %{buildroot}%{_mandir}/man1
install -p -m 644 %{SOURCE12} %{buildroot}%{_mandir}/man1
# demo
install -pD -T build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
install -d -m 755 %{buildroot}%{_datadir}/%{name}/
install -p -m 644 build/xercesSamples.jar %{buildroot}%{_datadir}/%{name}/%{name}-samples.jar
cp -pr data %{buildroot}%{_datadir}/%{name}
%post
# alternatives support 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
%files -f .mfiles
%doc LICENSE NOTICE README
%{_bindir}/*
@ -191,22 +173,61 @@ 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 Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.12.2-14
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue Nov 19 2024 Marián Konček <mkoncek@redhat.com> - 2.12.1-7
- Rebuild with regenerated Requires on Java
* Mon Aug 05 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-13
- Remove BR on java-devel
* 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
* Thu Aug 01 2024 Troy Dawson <tdawson@redhat.com> - 2.12.2-12
- Bump release for Aug 2024 java mass rebuild
* Mon Jun 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.1-5
- Remove dependency on xalan-j2
- Resolves: rhbz#1977007
* Tue Jul 30 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-11
- Remove post scriptlet for alternatives
* Tue Jul 30 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-10
- Fix incorrect permissions of xerces-j2-samples.jar
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.12.2-9
- Bump release for June 2024 mass rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* 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 Sep 01 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-7
- Convert License tag to SPDX format
* Mon Aug 14 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2.12.2-6
- Build with default Java
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Apr 27 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-2
- Workaround build issue with RPM 4.18
* Thu Apr 21 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.2-1
- Update to upstream version 2.12.2
- Resolves: CVE-2022-23437
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 2.12.1-7
- Rebuilt for java-17-openjdk as system jdk
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.12.1-4
- Remove dependency on xalan-j2
* Fri Mar 12 2021 Mat Booth <mat.booth@redhat.com> - 2.12.1-3
- Update OSGi metadata, use import-package instead of require-bundle

Loading…
Cancel
Save