Sync from SUSE:ALP:Source:Standard:1.0 jdom2 revision f59c483a7e8623509d804278e06f4c92

This commit is contained in:
Adrian Schröter 2024-02-19 15:41:29 +01:00
commit 1605ab94f1
6 changed files with 294 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

119
0001-Adapt-build.patch Normal file
View File

@ -0,0 +1,119 @@
From cf7e676edc7ab9d4b8b130ca4d8ecbd291995dea Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 20 Apr 2020 09:29:12 +0200
Subject: [PATCH] Adapt build
---
build.xml | 61 +++----------------------------------------------------
1 file changed, 3 insertions(+), 58 deletions(-)
diff --git a/build.xml b/build.xml
index ed632c2..d80abff 100644
--- a/build.xml
+++ b/build.xml
@@ -112,17 +112,7 @@ For instructions on how to build JDOM, please view the README.txt file.
<!-- Compilation class path -->
<path id="base.class.path">
- <pathelement location="${jaxen.jar}" />
- <pathelement location="${parser.jar}" />
- <pathelement location="${xmlapi.jar}" />
- <pathelement location="${junit.jar}" />
- <pathelement location="${isorelax.jar}" />
- <pathelement location="${xalan.jar}" />
- <pathelement location="${xalanser.jar}" />
- <!-- normally these stax jars will not be found -->
- <!-- this is used for testing Java5 (the test sets stax.dir) -->
- <pathelement location="${stax.dir}/jsr173_1.0_api.jar" />
- <pathelement location="${stax.dir}/sjsxp.jar" />
+ <fileset dir="${lib.dir}" includes="*.jar" />
</path>
<path id="core.class.path">
@@ -296,7 +286,7 @@ For instructions on how to build JDOM, please view the README.txt file.
<!-- =================================================================== -->
<!-- Creates the jars -->
<!-- =================================================================== -->
- <target name="jars" depends="compile, javadoc"
+ <target name="jars" depends="compile.core, javadoc"
description="Builds the Jars">
<fixcrlf srcdir="." includes="**/*.bat" excludes="build*.*" eol="crlf"/>
<fixcrlf srcdir="." includes="**/*.sh" excludes="build*.*" eol="lf"/>
@@ -316,27 +306,6 @@ For instructions on how to build JDOM, please view the README.txt file.
<fileset dir="${core.build}" includes="**/*.class" />
<fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
</jar>
- <jar jarfile="${package}/${jarbase}-contrib.jar" >
- <fileset dir="${contrib.build}" includes="**/*" />
- <fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
- </jar>
- <jar jarfile="${package}/${jarbase}-junit.jar" >
- <fileset dir="${junit.build}" includes="**/*" />
- <fileset dir="${metainf.build}" excludes="**/MANIFEST.MF" />
- </jar>
- <jar destfile="${package}/${jarbase}-javadoc.jar"
- basedir="${build.javadocs}" includes="**/*" />
-
- <jar jarfile="${package}/${jarbase}-sources.jar" >
- <fileset dir="${core.src}" includes="**/*" />
- </jar>
- <jar jarfile="${package}/${jarbase}-junit-sources.jar" >
- <fileset dir="${junit.src}" includes="**/*" />
- </jar>
- <jar jarfile="${package}/${jarbase}-contrib-sources.jar" >
- <fileset dir="${contrib.src}" includes="**/*" />
- </jar>
-
</target>
<target name="androidtests" depends="jars">
@@ -505,7 +474,7 @@ For instructions on how to build JDOM, please view the README.txt file.
<delete dir="${mavendir}" includes="**/*" failonerror="false"/>
</target>
- <target name="maven" depends="maven.clean, package"
+ <target name="maven" depends="maven.clean, jars"
description="Prepares Maven bundle to load on to Sonatype Nexus for Maven-Central">
<mkdir dir="${mavendir}" />
<mkdir dir="${mavendir}/core" />
@@ -517,8 +486,6 @@ For instructions on how to build JDOM, please view the README.txt file.
<!-- copy the build jar -->
<copy tofile="${mavendir}/core/${mavenbase}.jar" file="${package}/${jarbase}.jar"/>
- <copy tofile="${mavendir}/core/${mavenbase}-javadoc.jar" file="${package}/${jarbase}-javadoc.jar"/>
- <copy tofile="${mavendir}/core/${mavenbase}-sources.jar" file="${package}/${jarbase}-sources.jar"/>
<!-- load the license in to the ${license} property -->
<loadfile property="license" srcfile="LICENSE.txt" />
@@ -532,28 +499,6 @@ For instructions on how to build JDOM, please view the README.txt file.
<filter token="license" value="${license}" />
</filterset>
</copy>
-
- <exec dir="${mavendir}/core" executable="${gpg}">
- <arg value="-abv"/>
- <arg value="${mavenbase}.pom"/>
- </exec>
- <exec dir="${mavendir}/core" executable="${gpg}">
- <arg value="-abv"/>
- <arg value="${mavenbase}.jar"/>
- </exec>
- <exec dir="${mavendir}/core" executable="${gpg}">
- <arg value="-abv"/>
- <arg value="${mavenbase}-sources.jar"/>
- </exec>
- <exec dir="${mavendir}/core" executable="${gpg}">
- <arg value="-abv"/>
- <arg value="${mavenbase}-javadoc.jar"/>
- </exec>
-
- <jar destfile="${mavendir}/${mavenbase}-maven-bundle.jar"
- basedir="${mavendir}/core"
- includes="${mavenbase}*" excludes="*maven-bundle*" />
-
</target>
</project>
--
2.37.2

17
_service Normal file
View File

@ -0,0 +1,17 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/hunterhacker/jdom.git</param>
<param name="revision">JDOM-2.0.6.1</param>
<param name="match-tag">JDOM-*</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">JDOM-(.*)</param>
<param name="exclude">lib/*</param>
<param name="exclude">*/lib</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

BIN
jdom-2.0.6.1.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

43
jdom2.changes Normal file
View File

@ -0,0 +1,43 @@
-------------------------------------------------------------------
Wed Aug 23 14:59:34 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Drop unused *-junit and *-contrib artifacts
- Reduce drastically dependencies
- Modified patch:
* 0001-Adapt-build.patch
+ drop junit and contrib jars
-------------------------------------------------------------------
Tue Jan 18 07:47:46 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to 2.0.6.1
* Upstream release to fix CVE-2021-33813
- Removed patch:
* jdom2-CVE-2021-33813.patch
+ integrated upstream
- Modified patch:
* 0001-Adapt-build.patch
+ rebase to changed context
-------------------------------------------------------------------
Thu Jun 17 09:17:40 UTC 2021 - Pedro Monreal <pmonreal@suse.com>
- Security fix: [bsc#1187446, CVE-2021-33813]
* XXE issue in SAXBuilder can cause a denial of service via
a crafted HTTP request
- Add jdom2-CVE-2021-33813.patch
-------------------------------------------------------------------
Tue Oct 1 12:07:53 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Remove unnecessary dependency on log4j
-------------------------------------------------------------------
Wed Feb 13 12:18:12 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Trim filler wording from description.
-------------------------------------------------------------------
Sat Feb 9 06:29:42 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of jdom2 version 2.0.6

89
jdom2.spec Normal file
View File

@ -0,0 +1,89 @@
#
# spec file for package jdom2
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
Name: jdom2
Version: 2.0.6.1
Release: 0
Summary: Java manipulation of XML
License: Saxpath
Group: Development/Libraries/Java
URL: http://www.jdom.org/
Source0: jdom-%{version}.tar.xz
Patch0: 0001-Adapt-build.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildArch: noarch
%description
JDOM is a Java-oriented object model which models XML documents.
It provides a Java-centric means of generating and manipulating
XML documents. While JDOM inter-operates well with existing
standards such as the Simple API for XML (SAX) and the Document
Object Model (DOM), it is not an abstraction layer or
enhancement to those APIs. Rather, it provides a means of
reading and writing XML data.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n jdom-%{version}
%patch0 -p1
sed -i 's/\r//' LICENSE.txt
# Unable to run coverage: use log4j12 but switch to log4j 2.x
sed -i.coverage "s|coverage, jars|jars|" build.xml
# XPath functionality is not needed
rm -rf core/src/java/org/jdom2/xpath/
sed -i '/import org.jdom2.xpath.XPathFactory/d' core/src/java/org/jdom2/JDOMConstants.java
%build
mkdir -p lib
%{ant} -Dversion=%{version} -Dcompile.target=8 -Dcompile.source=8 -Dj2se.apidoc=%{_javadocdir}/java maven
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 build/package/jdom-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 build/maven/core/%{name}-%{version}.pom %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr build/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes %{buildroot}%{_javadocdir}
%files -f .mfiles
%doc CHANGES.txt COMMITTERS.txt README.md TODO.txt
%license LICENSE.txt
%files javadoc
%{_javadocdir}/%{name}
%changelog