Accepting request 656912 from Java:packages

Build against the generic xml-apis/xml-resolver providers

OBS-URL: https://build.opensuse.org/request/show/656912
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ant?expand=0&rev=73
This commit is contained in:
Dominique Leuenberger 2018-12-14 19:44:16 +00:00 committed by Git OBS Bridge
commit ac94c5e923
7 changed files with 86 additions and 45 deletions

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Dec 10 08:22:18 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Don't build against a particular xml-apis/xml-resolver provider,
but against the generic virtual provider. This allows easier
bootstrapping.
- Added patch:
* apache-ant-xml-apis.patch
+ look for the xml-apis.jar and xml-resolver.jar when composing
classpath; they are symlinks provided by several packages.
-------------------------------------------------------------------
Mon Nov 26 08:07:13 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@ -43,14 +43,12 @@ Patch3: reproducible-build-date.patch
Patch4: ant-python3.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.patch
Patch6: apache-ant-xml-apis.patch
BuildRequires: antlr-bootstrap
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: unzip
BuildRequires: xml-commons-apis-bootstrap
#BuildRequires: xerces-j2-bootstrap
#!BuildIgnore: xerces-j2-bootstrap
BuildRequires: xml-apis
BuildArch: noarch
# Needed for maven conversions
%if !%{with bootstrap}
@ -63,7 +61,7 @@ BuildRequires: junit
%endif
%if %{with antlr}
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-apis
%endif
%if 0%{?suse_version} > 1320
BuildRequires: strip-nondeterminism
@ -72,8 +70,8 @@ BuildRequires: strip-nondeterminism
Requires: java-devel >= 1.8
Requires: javapackages-tools
Requires: jaxp_parser_impl
Requires: xml-commons-apis
Requires: xml-commons-resolver
Requires: xml-apis
Requires: xml-resolver
Obsoletes: apache-ant < %{version}
Provides: apache-ant = %{version}
Obsoletes: ant-nodeps < %{version}
@ -162,8 +160,8 @@ This package contains optional apache bsf tasks for Apache Ant.
Summary: Optional apache resolver tasks for ant
License: Apache-2.0
Group: Development/Tools/Building
BuildRequires: xml-commons-resolver
Requires: xml-commons-resolver
BuildRequires: xml-resolver
Requires: xml-resolver
%requires_eq ant
%description -n ant-apache-resolver
@ -344,6 +342,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
# clean jar files
find . -name "*.jar" -print -delete
@ -362,7 +361,7 @@ build-jar-repository -s -p lib/optional junit4
%endif
%if %{with antlr}
# we need to build junit in antlr, but we remove it later
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-jaxp-1.3-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-commons-resolver
build-jar-repository -s -p lib/optional xerces-j2 xml-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver
%endif
# Fix file-not-utf8 rpmlint warning
@ -455,7 +454,7 @@ do
[ $jarname == ant-bootstrap ] && continue
#install pom
install -m 644 src%{_sysconfdir}/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
install -m 644 src/etc/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
if [ $jarname == ant-launcher ]; then
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -a ant:ant-launcher
elif [ $jarname == ant ]; then
@ -475,14 +474,14 @@ rm -f src/script/*.bat
rm -f src/script/*.cmd
# XSLs
cp -p src%{_sysconfdir}/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
rm -f %{buildroot}%{ant_home}%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames,junit-frames,junit-noframes}.xsl
%endif
%if %{with junit}
cp -p src%{_sysconfdir}/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with antlr}
cp -p src%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with bootstrap}
@ -513,7 +512,7 @@ echo "junit4 ant/ant-junit4" > %{buildroot}%{_sysconfdir}/ant.d/junit4
%if %{with antlr}
echo "antlr ant/ant-antlr" > %{buildroot}%{_sysconfdir}/ant.d/antlr
echo "bsf ant/ant-apache-bsf" > %{buildroot}%{_sysconfdir}/ant.d/apache-bsf
echo "xml-commons-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "xml-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "jakarta-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
echo "jakarta-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Dec 10 08:22:18 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Don't build against a particular xml-apis/xml-resolver provider,
but against the generic virtual provider. This allows easier
bootstrapping.
- Added patch:
* apache-ant-xml-apis.patch
+ look for the xml-apis.jar and xml-resolver.jar when composing
classpath; they are symlinks provided by several packages.
-------------------------------------------------------------------
Mon Nov 26 08:07:13 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@ -43,14 +43,12 @@ Patch3: reproducible-build-date.patch
Patch4: ant-python3.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.patch
Patch6: apache-ant-xml-apis.patch
BuildRequires: antlr-bootstrap
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: unzip
BuildRequires: xml-commons-apis-bootstrap
#BuildRequires: xerces-j2-bootstrap
#!BuildIgnore: xerces-j2-bootstrap
BuildRequires: xml-apis
BuildArch: noarch
# Needed for maven conversions
%if !%{with bootstrap}
@ -63,7 +61,7 @@ BuildRequires: junit
%endif
%if %{with antlr}
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-apis
%endif
%if 0%{?suse_version} > 1320
BuildRequires: strip-nondeterminism
@ -72,8 +70,8 @@ BuildRequires: strip-nondeterminism
Requires: java-devel >= 1.8
Requires: javapackages-tools
Requires: jaxp_parser_impl
Requires: xml-commons-apis
Requires: xml-commons-resolver
Requires: xml-apis
Requires: xml-resolver
Obsoletes: apache-ant < %{version}
Provides: apache-ant = %{version}
Obsoletes: ant-nodeps < %{version}
@ -162,8 +160,8 @@ This package contains optional apache bsf tasks for Apache Ant.
Summary: Optional apache resolver tasks for ant
License: Apache-2.0
Group: Development/Tools/Building
BuildRequires: xml-commons-resolver
Requires: xml-commons-resolver
BuildRequires: xml-resolver
Requires: xml-resolver
%requires_eq ant
%description -n ant-apache-resolver
@ -344,6 +342,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
# clean jar files
find . -name "*.jar" -print -delete
@ -362,7 +361,7 @@ build-jar-repository -s -p lib/optional junit4
%endif
%if %{with antlr}
# we need to build junit in antlr, but we remove it later
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-jaxp-1.3-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-commons-resolver
build-jar-repository -s -p lib/optional xerces-j2 xml-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver
%endif
# Fix file-not-utf8 rpmlint warning
@ -455,7 +454,7 @@ do
[ $jarname == ant-bootstrap ] && continue
#install pom
install -m 644 src%{_sysconfdir}/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
install -m 644 src/etc/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
if [ $jarname == ant-launcher ]; then
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -a ant:ant-launcher
elif [ $jarname == ant ]; then
@ -475,14 +474,14 @@ rm -f src/script/*.bat
rm -f src/script/*.cmd
# XSLs
cp -p src%{_sysconfdir}/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
rm -f %{buildroot}%{ant_home}%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames,junit-frames,junit-noframes}.xsl
%endif
%if %{with junit}
cp -p src%{_sysconfdir}/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with antlr}
cp -p src%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with bootstrap}
@ -513,7 +512,7 @@ echo "junit4 ant/ant-junit4" > %{buildroot}%{_sysconfdir}/ant.d/junit4
%if %{with antlr}
echo "antlr ant/ant-antlr" > %{buildroot}%{_sysconfdir}/ant.d/antlr
echo "bsf ant/ant-apache-bsf" > %{buildroot}%{_sysconfdir}/ant.d/apache-bsf
echo "xml-commons-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "xml-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "jakarta-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
echo "jakarta-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Dec 10 08:22:18 UTC 2018 - Fridrich Strba <fstrba@suse.com>
- Don't build against a particular xml-apis/xml-resolver provider,
but against the generic virtual provider. This allows easier
bootstrapping.
- Added patch:
* apache-ant-xml-apis.patch
+ look for the xml-apis.jar and xml-resolver.jar when composing
classpath; they are symlinks provided by several packages.
-------------------------------------------------------------------
Mon Nov 26 08:07:13 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

@ -42,14 +42,12 @@ Patch3: reproducible-build-date.patch
Patch4: ant-python3.patch
# PATCH-FEATURE-OPENSUSE reproducible-build-manifest.patch -- have fixed "Created-by" in manifest
Patch5: reproducible-build-manifest.patch
Patch6: apache-ant-xml-apis.patch
BuildRequires: antlr-bootstrap
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: unzip
BuildRequires: xml-commons-apis-bootstrap
#BuildRequires: xerces-j2-bootstrap
#!BuildIgnore: xerces-j2-bootstrap
BuildRequires: xml-apis
BuildArch: noarch
# Needed for maven conversions
%if !%{with bootstrap}
@ -62,7 +60,7 @@ BuildRequires: junit
%endif
%if %{with antlr}
BuildRequires: xerces-j2
BuildRequires: xml-commons-apis
BuildRequires: xml-apis
%endif
%if 0%{?suse_version} > 1320
BuildRequires: strip-nondeterminism
@ -71,8 +69,8 @@ BuildRequires: strip-nondeterminism
Requires: java-devel >= 1.8
Requires: javapackages-tools
Requires: jaxp_parser_impl
Requires: xml-commons-apis
Requires: xml-commons-resolver
Requires: xml-apis
Requires: xml-resolver
Obsoletes: apache-ant < %{version}
Provides: apache-ant = %{version}
Obsoletes: ant-nodeps < %{version}
@ -161,8 +159,8 @@ This package contains optional apache bsf tasks for Apache Ant.
Summary: Optional apache resolver tasks for ant
License: Apache-2.0
Group: Development/Tools/Building
BuildRequires: xml-commons-resolver
Requires: xml-commons-resolver
BuildRequires: xml-resolver
Requires: xml-resolver
%requires_eq ant
%description -n ant-apache-resolver
@ -343,6 +341,7 @@ find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
# clean jar files
find . -name "*.jar" -print -delete
@ -361,7 +360,7 @@ build-jar-repository -s -p lib/optional junit4
%endif
%if %{with antlr}
# we need to build junit in antlr, but we remove it later
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-jaxp-1.3-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-commons-resolver
build-jar-repository -s -p lib/optional xerces-j2 xml-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver
%endif
# Fix file-not-utf8 rpmlint warning
@ -454,7 +453,7 @@ do
[ $jarname == ant-bootstrap ] && continue
#install pom
install -m 644 src%{_sysconfdir}/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
install -m 644 src/etc/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
if [ $jarname == ant-launcher ]; then
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -a ant:ant-launcher
elif [ $jarname == ant ]; then
@ -474,14 +473,14 @@ rm -f src/script/*.bat
rm -f src/script/*.cmd
# XSLs
cp -p src%{_sysconfdir}/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/*.xsl %{buildroot}%{ant_home}%{_sysconfdir}
rm -f %{buildroot}%{ant_home}%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames,junit-frames,junit-noframes}.xsl
%endif
%if %{with junit}
cp -p src%{_sysconfdir}/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with antlr}
cp -p src%{_sysconfdir}/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
cp -p src/etc/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}%{_sysconfdir}
%endif
%if %{with bootstrap}
@ -512,7 +511,7 @@ echo "junit4 ant/ant-junit4" > %{buildroot}%{_sysconfdir}/ant.d/junit4
%if %{with antlr}
echo "antlr ant/ant-antlr" > %{buildroot}%{_sysconfdir}/ant.d/antlr
echo "bsf ant/ant-apache-bsf" > %{buildroot}%{_sysconfdir}/ant.d/apache-bsf
echo "xml-commons-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "xml-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
echo "jakarta-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
echo "jakarta-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel

11
apache-ant-xml-apis.patch Normal file
View File

@ -0,0 +1,11 @@
--- apache-ant-1.10.5/src/script/ant 2018-07-10 06:50:31.000000000 +0200
+++ apache-ant-1.10.5/src/script/ant 2018-12-10 09:12:59.451126724 +0100
@@ -206,7 +206,7 @@
# request optional jars and their dependencies via the OPT_JAR_LIST
# variable
if $rpm_mode && [ -x /usr/bin/build-classpath ]; then
- LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
+ LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-apis)"
# If no optional jars have been specified then build the default list
if [ -z "$OPT_JAR_LIST" ]; then