Implement new Java bindings and fix ant-manual license
Resolves: RHEL-68742 Resolves: RHEL-68743 Resolves: RHEL-68744 Resolves: RHEL-68745 Resolves: RHEL-69519 Resolves: RHEL-62179
This commit is contained in:
parent
5e39beae04
commit
d1963671eb
@ -1,5 +1,5 @@
|
|||||||
--- build.xml~ 2021-05-17 12:32:48.406394876 +0200
|
--- ant/build.xml~ 2021-05-17 12:32:48.406394876 +0200
|
||||||
+++ build.xml 2021-05-17 12:32:39.990389601 +0200
|
+++ ant/build.xml 2021-05-17 12:32:39.990389601 +0200
|
||||||
@@ -145,8 +145,6 @@
|
@@ -145,8 +145,6 @@
|
||||||
-->
|
-->
|
||||||
<pathelement location="${src.junit}"/>
|
<pathelement location="${src.junit}"/>
|
||||||
|
151
ant.spec
151
ant.spec
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
|
|
||||||
|
%global java_arches aarch64 ppc64le s390x x86_64
|
||||||
%global ant_home %{_datadir}/ant
|
%global ant_home %{_datadir}/ant
|
||||||
|
|
||||||
Name: ant
|
Name: ant
|
||||||
@ -40,14 +41,14 @@ Summary(it): Tool per la compilazione di programmi java
|
|||||||
Summary(fr): Outil de compilation pour java
|
Summary(fr): Outil de compilation pour java
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://ant.apache.org/
|
URL: https://ant.apache.org/
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{java_arches} noarch
|
||||||
|
|
||||||
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.bz2
|
Source0: https://www.apache.org/dist/ant/source/apache-ant-%{version}-src.tar.bz2
|
||||||
Source2: apache-ant-1.8.ant.conf
|
Source2: apache-ant-1.8.ant.conf
|
||||||
# manpage
|
# manpage
|
||||||
Source3: ant.asciidoc
|
Source3: ant.asciidoc
|
||||||
|
|
||||||
BuildArch: noarch
|
|
||||||
ExclusiveArch: aarch64 ppc64le s390x x86_64 noarch
|
|
||||||
|
|
||||||
Patch0: %{name}-build.xml.patch
|
Patch0: %{name}-build.xml.patch
|
||||||
Patch1: %{name}-openjdk-jpeg-cmyk.patch
|
Patch1: %{name}-openjdk-jpeg-cmyk.patch
|
||||||
Patch2: 0001-Disable-SecurityManager-for-Java-18.patch
|
Patch2: 0001-Disable-SecurityManager-for-Java-18.patch
|
||||||
@ -59,7 +60,6 @@ BuildRequires: javapackages-local
|
|||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
BuildRequires: javapackages-bootstrap
|
BuildRequires: javapackages-bootstrap
|
||||||
%else
|
%else
|
||||||
BuildRequires: java-devel >= 1:1.8.0
|
|
||||||
BuildRequires: ant >= 1.10.2
|
BuildRequires: ant >= 1.10.2
|
||||||
BuildRequires: ant-junit
|
BuildRequires: ant-junit
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ BuildRequires: junit5
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Requires: %{name}-lib = %{version}-%{release}
|
Requires: %{name}-lib = %{version}-%{release}
|
||||||
Requires: %{name}-jdk-binding = %{version}-%{release}
|
Requires: %{name}-jdk-binding
|
||||||
Suggests: %{name}-openjdk17 = %{version}-%{release}
|
Suggests: %{name}-openjdk17 = %{version}-%{release}
|
||||||
|
|
||||||
# Require full javapackages-tools since the ant script uses
|
# Require full javapackages-tools since the ant script uses
|
||||||
@ -303,6 +303,8 @@ Optional xz tasks for %{name}.
|
|||||||
|
|
||||||
%package manual
|
%package manual
|
||||||
Summary: Manual for %{name}
|
Summary: Manual for %{name}
|
||||||
|
# tutorial-tasks-filesets-properties.zip contains ASL 1.1 files
|
||||||
|
License: ASL 2.0 and ASL 1.1
|
||||||
|
|
||||||
%description manual
|
%description manual
|
||||||
Documentation for %{name}.
|
Documentation for %{name}.
|
||||||
@ -324,61 +326,93 @@ Javadoc pour %{name}.
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if !0%{?specpartsdir:1}
|
||||||
|
|
||||||
%package openjdk8
|
%package openjdk8
|
||||||
Summary: OpenJDK 8 binding for Ant
|
Summary: OpenJDK 8 binding for Ant
|
||||||
RemovePathPostfixes: -openjdk8
|
Provides: ant-jdk-binding = %{version}-%{release}
|
||||||
Provides: ant-jdk-binding = %{version}-%{release}
|
Requires: java-1.8.0-openjdk-headless
|
||||||
Requires: ant = %{version}-%{release}
|
Recommends: java-1.8.0-openjdk-devel
|
||||||
Requires: java-1.8.0-openjdk-headless
|
Requires: javapackages-tools >= 6.4.0
|
||||||
Recommends: java-1.8.0-openjdk-devel
|
Requires(meta): ant = %{version}-%{release}
|
||||||
Conflicts: ant-jdk-binding
|
|
||||||
|
|
||||||
%description openjdk8
|
%description openjdk8
|
||||||
Configures Ant to run with OpenJDK 8.
|
Configures Ant to run with OpenJDK 8.
|
||||||
|
|
||||||
|
%files openjdk8
|
||||||
|
%ghost %{_jpbindingdir}/ant.conf
|
||||||
|
%dir %{_jpbindingdir}/ant.conf.d
|
||||||
|
%{_jpbindingdir}/ant.conf.d/openjdk8
|
||||||
|
|
||||||
%package openjdk11
|
%package openjdk11
|
||||||
Summary: OpenJDK 11 binding for Ant
|
Summary: OpenJDK 11 binding for Ant
|
||||||
RemovePathPostfixes: -openjdk11
|
Provides: ant-jdk-binding = %{version}-%{release}
|
||||||
Provides: ant-jdk-binding = %{version}-%{release}
|
Requires: java-11-openjdk-headless
|
||||||
Requires: ant = %{version}-%{release}
|
Recommends: java-11-openjdk-devel
|
||||||
Requires: java-11-openjdk-headless
|
Requires: javapackages-tools >= 6.4.0
|
||||||
Recommends: java-11-openjdk-devel
|
Requires(meta): ant = %{version}-%{release}
|
||||||
Conflicts: ant-jdk-binding
|
|
||||||
|
|
||||||
%description openjdk11
|
%description openjdk11
|
||||||
Configures Ant to run with OpenJDK 11.
|
Configures Ant to run with OpenJDK 11.
|
||||||
|
|
||||||
|
%files openjdk11
|
||||||
|
%ghost %{_jpbindingdir}/ant.conf
|
||||||
|
%dir %{_jpbindingdir}/ant.conf.d
|
||||||
|
%{_jpbindingdir}/ant.conf.d/openjdk11
|
||||||
|
|
||||||
%package openjdk17
|
%package openjdk17
|
||||||
Summary: OpenJDK 17 binding for Ant
|
Summary: OpenJDK 17 binding for Ant
|
||||||
RemovePathPostfixes: -openjdk17
|
Provides: ant-jdk-binding = %{version}-%{release}
|
||||||
Provides: ant-jdk-binding = %{version}-%{release}
|
Requires: java-17-openjdk-headless
|
||||||
Requires: ant = %{version}-%{release}
|
Recommends: java-17-openjdk-devel
|
||||||
Requires: java-17-openjdk-headless
|
Requires: javapackages-tools >= 6.4.0
|
||||||
Recommends: java-17-openjdk-devel
|
Requires(meta): ant = %{version}-%{release}
|
||||||
Conflicts: ant-jdk-binding
|
|
||||||
|
|
||||||
%description openjdk17
|
%description openjdk17
|
||||||
Configures Ant to run with OpenJDK 17.
|
Configures Ant to run with OpenJDK 17.
|
||||||
|
|
||||||
|
%files openjdk17
|
||||||
|
%ghost %{_jpbindingdir}/ant.conf
|
||||||
|
%dir %{_jpbindingdir}/ant.conf.d
|
||||||
|
%{_jpbindingdir}/ant.conf.d/openjdk17
|
||||||
|
|
||||||
%package openjdk21
|
%package openjdk21
|
||||||
Summary: OpenJDK 21 binding for Ant
|
Summary: OpenJDK 21 binding for Ant
|
||||||
RemovePathPostfixes: -openjdk21
|
Provides: ant-jdk-binding = %{version}-%{release}
|
||||||
Provides: ant-jdk-binding = %{version}-%{release}
|
Requires: java-21-openjdk-headless
|
||||||
Requires: ant = %{version}-%{release}
|
Recommends: java-21-openjdk-devel
|
||||||
Requires: java-21-openjdk-headless
|
Requires: javapackages-tools >= 6.4.0
|
||||||
Recommends: java-21-openjdk-devel
|
Requires(meta): ant = %{version}-%{release}
|
||||||
Conflicts: ant-jdk-binding
|
|
||||||
|
|
||||||
%description openjdk21
|
%description openjdk21
|
||||||
Configures Ant to run with OpenJDK 21.
|
Configures Ant to run with OpenJDK 21.
|
||||||
|
|
||||||
|
%files openjdk21
|
||||||
|
%ghost %{_jpbindingdir}/ant.conf
|
||||||
|
%dir %{_jpbindingdir}/ant.conf.d
|
||||||
|
%{_jpbindingdir}/ant.conf.d/openjdk21
|
||||||
|
|
||||||
|
%package unbound
|
||||||
|
Summary: Unbound binding for Ant
|
||||||
|
Provides: ant-jdk-binding = %{version}-%{release}
|
||||||
|
Requires: javapackages-tools >= 6.4.0
|
||||||
|
Requires(meta): ant = %{version}-%{release}
|
||||||
|
|
||||||
|
%description unbound
|
||||||
|
Configures Ant to run with Java discovered using JAVA_HOME and PATH
|
||||||
|
environment variables.
|
||||||
|
|
||||||
|
%files unbound
|
||||||
|
%ghost %{_jpbindingdir}/ant.conf
|
||||||
|
%dir %{_jpbindingdir}/ant.conf.d
|
||||||
|
%{_jpbindingdir}/ant.conf.d/unbound
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n apache-ant-%{version}
|
%autosetup -p1 -n apache-ant-%{version}
|
||||||
%patch -P 0 -p0
|
|
||||||
%patch -P 1 -p1
|
|
||||||
%patch -P 2 -p1
|
|
||||||
|
|
||||||
# clean jar files
|
# clean jar files
|
||||||
find . -name "*.jar" | xargs -t rm
|
find . -name "*.jar" | xargs -t rm
|
||||||
@ -516,8 +550,17 @@ cp -p src/script/antRun $RPM_BUILD_ROOT%{ant_home}/bin/
|
|||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
|
||||||
cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
|
cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
|
||||||
|
|
||||||
# JDK bindings for ant.conf
|
# OPT_JAR_LIST fragments
|
||||||
install -d -m 755 $RPM_BUILD_ROOT%{_javaconfdir}/
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d
|
||||||
|
echo "junit hamcrest/core ant/ant-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit
|
||||||
|
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
|
||||||
|
|
||||||
|
# JDK bindings
|
||||||
|
%if !0%{?specpartsdir:1}
|
||||||
|
export RPM_SPECPARTS_DIR=/tmp
|
||||||
|
%endif
|
||||||
|
install -d -m 755 %{buildroot}%{_javaconfdir}/
|
||||||
|
ln -sf %{_jpbindingdir}/ant.conf %{buildroot}%{_javaconfdir}/ant.conf
|
||||||
## For Java 1.8 prefer jvm
|
## For Java 1.8 prefer jvm
|
||||||
echo '
|
echo '
|
||||||
if [ -d %{_jvmlibdir}/java-1.8.0-openjdk ]; then
|
if [ -d %{_jvmlibdir}/java-1.8.0-openjdk ]; then
|
||||||
@ -525,15 +568,16 @@ if [ -d %{_jvmlibdir}/java-1.8.0-openjdk ]; then
|
|||||||
else
|
else
|
||||||
JAVA_HOME=%{_jvmlibdir}/jre-1.8.0-openjdk
|
JAVA_HOME=%{_jvmlibdir}/jre-1.8.0-openjdk
|
||||||
fi
|
fi
|
||||||
' >$RPM_BUILD_ROOT%{_javaconfdir}/ant.conf-openjdk8
|
' >%{buildroot}%{_javaconfdir}/ant-openjdk8.conf
|
||||||
echo 'JAVA_HOME=%{_jvmlibdir}/jre-11-openjdk' >$RPM_BUILD_ROOT%{_javaconfdir}/ant.conf-openjdk11
|
echo 'JAVA_HOME=%{_jvmdir}/jre-11-openjdk' > %{buildroot}%{_javaconfdir}/ant-openjdk11.conf
|
||||||
echo 'JAVA_HOME=%{_jvmlibdir}/jre-17-openjdk' >$RPM_BUILD_ROOT%{_javaconfdir}/ant.conf-openjdk17
|
echo 'JAVA_HOME=%{_jvmdir}/jre-17-openjdk' > %{buildroot}%{_javaconfdir}/ant-openjdk17.conf
|
||||||
echo 'JAVA_HOME=%{_jvmlibdir}/jre-21-openjdk' >$RPM_BUILD_ROOT%{_javaconfdir}/ant.conf-openjdk21
|
echo 'JAVA_HOME=%{_jvmdir}/jre-21-openjdk' > %{buildroot}%{_javaconfdir}/ant-openjdk21.conf
|
||||||
|
%jp_binding --verbose --variant openjdk8 --ghost ant.conf --target %{_javaconfdir}/ant-openjdk8.conf --provides %{name}-jdk-binding --requires java-1.8.0-openjdk-headless --recommends java-1.8.0-openjdk-devel
|
||||||
# OPT_JAR_LIST fragments
|
%jp_binding --verbose --variant openjdk11 --ghost ant.conf --target %{_javaconfdir}/ant-openjdk11.conf --provides %{name}-jdk-binding --requires java-11-openjdk-headless --recommends java-11-openjdk-devel
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d
|
%jp_binding --verbose --variant openjdk17 --ghost ant.conf --target %{_javaconfdir}/ant-openjdk17.conf --provides %{name}-jdk-binding --requires java-17-openjdk-headless --recommends java-17-openjdk-devel
|
||||||
echo "junit hamcrest/core ant/ant-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit
|
%jp_binding --verbose --variant openjdk21 --ghost ant.conf --target %{_javaconfdir}/ant-openjdk21.conf --provides %{name}-jdk-binding --requires java-21-openjdk-headless --recommends java-21-openjdk-devel
|
||||||
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
|
touch %{buildroot}%{_javaconfdir}/ant-unbound.conf
|
||||||
|
%jp_binding --verbose --variant unbound --ghost ant.conf --target %{_javaconfdir}/ant-unbound.conf --provides %{name}-jdk-binding
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without bootstrap}
|
||||||
|
|
||||||
@ -577,6 +621,7 @@ LC_ALL=C.UTF-8 %{ant} -Doffline=true test
|
|||||||
%files
|
%files
|
||||||
%doc KEYS README WHATSNEW
|
%doc KEYS README WHATSNEW
|
||||||
%license LICENSE NOTICE
|
%license LICENSE NOTICE
|
||||||
|
%config %{_javaconfdir}/%{name}*.conf
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||||
%attr(0755,root,root) %{_bindir}/ant
|
%attr(0755,root,root) %{_bindir}/ant
|
||||||
%dir %{ant_home}/bin
|
%dir %{ant_home}/bin
|
||||||
@ -699,21 +744,13 @@ LC_ALL=C.UTF-8 %{ant} -Doffline=true test
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files openjdk8
|
|
||||||
%config %{_javaconfdir}/%{name}.conf-openjdk8
|
|
||||||
|
|
||||||
%files openjdk11
|
|
||||||
%config %{_javaconfdir}/%{name}.conf-openjdk11
|
|
||||||
|
|
||||||
%files openjdk17
|
|
||||||
%config %{_javaconfdir}/%{name}.conf-openjdk17
|
|
||||||
|
|
||||||
%files openjdk21
|
|
||||||
%config %{_javaconfdir}/%{name}.conf-openjdk21
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 12 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.9-14
|
||||||
|
- Implement new Java bindings and fix ant-manual license
|
||||||
|
- Resolves: RHEL-68742, RHEL-68743, RHEL-68744, RHEL-68745, RHEL-69519
|
||||||
|
|
||||||
* Sun Nov 24 2024 Marián Konček <mkoncek@redhat.com> - 1.10.9-14
|
* Sun Nov 24 2024 Marián Konček <mkoncek@redhat.com> - 1.10.9-14
|
||||||
- Fix test declarations
|
- Fix test declarations
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ else
|
|||||||
|
|
||||||
# ANT_HOME for rpm layout
|
# ANT_HOME for rpm layout
|
||||||
ANT_HOME=/usr/share/ant
|
ANT_HOME=/usr/share/ant
|
||||||
|
|
||||||
if [ -z "$JAVA_HOME" ] ; then
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
. /etc/java/ant.conf
|
. /etc/java/ant.conf
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user