javapackages-bootstrap/javapackages-bootstrap.spec

394 lines
15 KiB
RPMSpec
Raw Normal View History

2020-11-30 16:23:38 +00:00
# Exclude automatically generated requires on java interpreter which is not
# owned by any package
2021-11-02 14:23:59 +00:00
%global __requires_exclude ^%{_jvmdir}/java
2020-11-30 16:23:38 +00:00
# Don't run OSGi dependency generators on private (bundled) JARs
%global __requires_exclude_from \\.jar$
%global __provides_exclude_from \\.jar$
2021-11-02 14:23:59 +00:00
%global javaHomePath %{_jvmdir}/java-17-openjdk
%global mavenHomePath %{_datadir}/%{name}
%global metadataPath %{mavenHomePath}/maven-metadata
%global artifactsPath %{_javadir}
2021-04-10 15:39:38 +00:00
%global launchersPath %{_libexecdir}/%{name}
2022-01-05 15:00:16 +00:00
%global git_hash 9f283b765ec39228d038f5ab63dcc72cf548cb7d
%global git_short_hash %(echo %{git_hash} | cut -b -7)
2020-11-30 16:23:38 +00:00
Name: javapackages-bootstrap
2022-01-05 15:00:16 +00:00
Version: 1.5.0^20220105.git%{git_short_hash}
Release: 1%{?dist}
2020-11-30 16:23:38 +00:00
Summary: A means of bootstrapping Java Packages Tools
# For detailed info see the file javapackages-bootstrap-PACKAGE-LICENSING
License: ASL 2.0 and ASL 1.1 and (ASL 2.0 or EPL-2.0) and (EPL-2.0 or GPLv2 with exceptions) and MIT and BSD with advertising and BSD and EPL-1.0 and EPL-2.0 and CDDL-1.0 and xpp and CC0 and Public Domain
URL: https://github.com/fedora-java/javapackages-bootstrap
BuildArch: noarch
# Source0: https://github.com/fedora-java/javapackages-bootstrap/releases/download/%{version}/javapackages-bootstrap-%{version}.tar.xz
2022-01-05 15:00:16 +00:00
Source0: https://github.com/mkoncek/javapackages-bootstrap/archive/%{git_short_hash}.tar.gz
2020-11-30 16:23:38 +00:00
# License breakdown
Source1: javapackages-bootstrap-PACKAGE-LICENSING
# To obtain the following sources:
2020-12-03 14:34:45 +00:00
# tar -xf ${name}-${version}.tar.xz
# pushd ${name}-${version}
2020-11-30 16:23:38 +00:00
# ./downstream.sh clone
# ./downstream.sh prep
# ./downstream.sh archive
# The results are in the archive directory
Source1001: ant.tar.xz
2021-10-20 09:42:11 +00:00
Source1002: apache-pom.tar.xz
2020-11-30 16:23:38 +00:00
Source1003: apiguardian.tar.xz
Source1004: asm.tar.xz
Source1005: assertj-core.tar.xz
Source1006: bnd.tar.xz
Source1007: build-helper-maven-plugin.tar.xz
Source1008: byte-buddy.tar.xz
Source1009: cdi.tar.xz
Source1010: cglib.tar.xz
Source1011: common-annotations-api.tar.xz
Source1012: commons-beanutils.tar.xz
Source1013: commons-cli.tar.xz
Source1014: commons-codec.tar.xz
Source1015: commons-collections.tar.xz
Source1016: commons-compress.tar.xz
Source1017: commons-io.tar.xz
Source1018: commons-jxpath.tar.xz
Source1019: commons-lang.tar.xz
Source1020: commons-logging.tar.xz
Source1021: commons-parent-pom.tar.xz
Source1022: cup.tar.xz
Source1023: easymock.tar.xz
Source1024: felix-parent-pom.tar.xz
Source1025: felix-utils.tar.xz
Source1026: fusesource-pom.tar.xz
Source1027: guava.tar.xz
Source1028: guice.tar.xz
Source1029: hamcrest.tar.xz
Source1030: httpcomponents-client.tar.xz
Source1031: httpcomponents-core.tar.xz
Source1032: httpcomponents-parent-pom.tar.xz
Source1033: injection-api.tar.xz
Source1034: jansi.tar.xz
Source1035: jcommander.tar.xz
Source1036: jdom.tar.xz
Source1037: jdom2.tar.xz
Source1038: jflex.tar.xz
Source1039: jsoup.tar.xz
Source1040: jsr-305.tar.xz
Source1041: junit4.tar.xz
Source1042: junit5.tar.xz
Source1043: maven-antrun-plugin.tar.xz
Source1044: maven-archiver.tar.xz
Source1045: maven-artifact-transfer.tar.xz
Source1046: maven-assembly-plugin.tar.xz
Source1047: maven-bundle-plugin.tar.xz
Source1048: maven-common-artifact-filters.tar.xz
Source1049: maven-compiler-plugin.tar.xz
Source1050: maven-dependency-analyzer.tar.xz
Source1051: maven-dependency-plugin.tar.xz
Source1052: maven-dependency-tree.tar.xz
Source1053: maven-enforcer.tar.xz
Source1054: maven-file-management.tar.xz
Source1055: maven-filtering.tar.xz
Source1056: maven-jar-plugin.tar.xz
Source1057: maven-parent-pom.tar.xz
Source1058: maven-plugin-testing.tar.xz
Source1059: maven-plugin-tools.tar.xz
Source1060: maven-remote-resources-plugin.tar.xz
Source1061: maven-resolver.tar.xz
Source1062: maven-resources-plugin.tar.xz
Source1063: maven-resources.tar.xz
Source1064: maven-shared-incremental.tar.xz
Source1065: maven-shared-io.tar.xz
Source1066: maven-shared-utils.tar.xz
Source1067: maven-source-plugin.tar.xz
Source1068: maven-surefire.tar.xz
Source1069: maven-verifier.tar.xz
Source1070: maven-wagon.tar.xz
Source1071: maven.tar.xz
Source1072: mockito.tar.xz
Source1073: modello.tar.xz
Source1074: mojo-parent-pom.tar.xz
Source1075: munge-maven-plugin.tar.xz
Source1076: objenesis.tar.xz
Source1077: opentest4j.tar.xz
Source1078: osgi-annotation.tar.xz
Source1079: osgi-cmpn.tar.xz
Source1080: osgi-core.tar.xz
Source1081: oss-parent-pom.tar.xz
Source1082: plexus-archiver.tar.xz
2021-10-20 09:42:11 +00:00
Source1083: plexus-build-api.tar.xz
Source1084: plexus-cipher.tar.xz
Source1085: plexus-classworlds.tar.xz
Source1086: plexus-compiler.tar.xz
Source1087: plexus-components-pom.tar.xz
Source1088: plexus-containers.tar.xz
Source1089: plexus-interpolation.tar.xz
Source1090: plexus-io.tar.xz
Source1091: plexus-languages.tar.xz
Source1092: plexus-pom.tar.xz
Source1093: plexus-resources.tar.xz
Source1094: plexus-sec-dispatcher.tar.xz
Source1095: plexus-utils.tar.xz
Source1096: qdox.tar.xz
Source1097: servlet-api.tar.xz
2020-11-30 16:23:38 +00:00
Source1098: sisu-inject.tar.xz
Source1099: sisu-mojos.tar.xz
Source1100: sisu-plexus.tar.xz
Source1101: slf4j.tar.xz
Source1102: testng.tar.xz
Source1103: univocity-parsers.tar.xz
Source1104: velocity-engine.tar.xz
Source1105: xbean.tar.xz
Source1106: xmlunit.tar.xz
Source1107: xmvn.tar.xz
Source1108: xz-java.tar.xz
2021-11-02 14:23:59 +00:00
Patch0: 0001-Bind-to-OpenJDK-17-for-runtime.patch
2020-12-16 11:18:39 +00:00
2022-01-05 15:00:16 +00:00
Provides: bundled(ant) = 1.10.12
2021-11-02 19:32:59 +00:00
Provides: bundled(apache-parent) = 23
2021-10-20 09:42:11 +00:00
Provides: bundled(apiguardian) = 1.1.2
Provides: bundled(objectweb-asm) = 9.2
2021-11-02 19:32:59 +00:00
Provides: bundled(assertj-core) = 3.19.0
2021-02-08 11:53:40 +00:00
Provides: bundled(aqute-bnd) = 5.2.0
2020-11-30 16:23:38 +00:00
Provides: bundled(maven-plugin-build-helper) = 3.2.0
2022-01-05 15:00:16 +00:00
Provides: bundled(byte-buddy) = 1.11.22
2020-11-30 16:23:38 +00:00
Provides: bundled(cdi-api) = 2.0.2
Provides: bundled(cglib) = 3.3.0
Provides: bundled(jakarta-annotations) = 1.3.5
Provides: bundled(apache-commons-beanutils) = 1.9.4
Provides: bundled(apache-commons-cli) = 1.4
Provides: bundled(apache-commons-codec) = 1.15
Provides: bundled(apache-commons-collections) = 3.2.2
Provides: bundled(apache-commons-compress) = 1.20
2021-10-20 09:42:11 +00:00
Provides: bundled(apache-commons-io) = 2.11.0
2020-11-30 16:23:38 +00:00
Provides: bundled(apache-commons-jxpath) = 1.3
2021-10-20 09:42:11 +00:00
Provides: bundled(apache-commons-lang3) = 3.12.0
2020-11-30 16:23:38 +00:00
Provides: bundled(apache-commons-logging) = 1.2
Provides: bundled(apache-commons-parent) = 52
Provides: bundled(java_cup) = 0.11b
2021-10-20 09:42:11 +00:00
Provides: bundled(easymock) = 4.3
2020-11-30 16:23:38 +00:00
Provides: bundled(felix-parent) = 7
2021-10-20 09:42:11 +00:00
Provides: bundled(felix-utils) = 1.11.8
2020-11-30 16:23:38 +00:00
Provides: bundled(fusesource-pom) = 1.12
2021-10-20 09:42:11 +00:00
Provides: bundled(guava) = 31.0.1
2020-11-30 16:23:38 +00:00
Provides: bundled(google-guice) = 4.2.3
Provides: bundled(hamcrest) = 2.2
Provides: bundled(httpcomponents-client) = 4.5.11
Provides: bundled(httpcomponents-core) = 4.4.13
Provides: bundled(httpcomponents-project) = 12
Provides: bundled(atinject) = 1.0.3
2021-10-20 09:42:11 +00:00
Provides: bundled(jansi) = 2.3.3
Provides: bundled(beust-jcommander) = 1.81
2020-11-30 16:23:38 +00:00
Provides: bundled(jdom) = 1.1.3
Provides: bundled(jdom2) = 2.0.6
Provides: bundled(jflex) = 1.7.0
Provides: bundled(jsoup) = 1.13.1
Provides: bundled(jsr-305) = 3.0.2
2021-02-08 11:53:40 +00:00
Provides: bundled(junit) = 4.13.1
2021-10-20 09:42:11 +00:00
Provides: bundled(junit5) = 5.8.1
2020-11-30 16:23:38 +00:00
Provides: bundled(maven-antrun-plugin) = 3.0.0
2021-02-08 11:53:40 +00:00
Provides: bundled(maven-archiver) = 3.5.1
Provides: bundled(maven-artifact-transfer) = 0.13.1
2020-11-30 16:23:38 +00:00
Provides: bundled(maven-assembly-plugin) = 3.3.0
Provides: bundled(maven-plugin-bundle) = 5.1.1
Provides: bundled(maven-common-artifact-filters) = 3.1.0
Provides: bundled(maven-compiler-plugin) = 3.8.1
Provides: bundled(maven-dependency-analyzer) = 1.11.3
Provides: bundled(maven-dependency-plugin) = 3.1.2
Provides: bundled(maven-dependency-tree) = 3.0.1
Provides: bundled(maven-enforcer) = 3.0.0~M2
Provides: bundled(maven-file-management) = 3.0.0
Provides: bundled(maven-filtering) = 3.2.0
Provides: bundled(maven-jar-plugin) = 3.2.0
Provides: bundled(maven-parent) = 34
Provides: bundled(maven-plugin-testing) = 3.3.0
Provides: bundled(maven-plugin-tools) = 3.6.0
Provides: bundled(maven-remote-resources-plugin) = 1.7.0
2022-01-05 15:00:16 +00:00
Provides: bundled(maven-resolver) = 1.7.2
2020-11-30 16:23:38 +00:00
Provides: bundled(maven-resources-plugin) = 3.2.0
Provides: bundled(maven-resources) = 1.4
Provides: bundled(maven-shared-incremental) = 1.1
Provides: bundled(maven-shared-io) = 3.0.0
2021-10-20 09:42:11 +00:00
Provides: bundled(maven-shared-utils) = 3.3.4
2020-11-30 16:23:38 +00:00
Provides: bundled(maven-source-plugin) = 3.2.1
Provides: bundled(maven-surefire) = 3.0.0~M3
Provides: bundled(maven-verifier) = 1.7.2
2021-10-20 09:42:11 +00:00
Provides: bundled(maven-wagon) = 3.4.3
2022-01-05 15:00:16 +00:00
Provides: bundled(maven) = 3.8.4
2021-02-08 11:53:40 +00:00
Provides: bundled(mockito) = 3.7.13
2020-11-30 16:23:38 +00:00
Provides: bundled(modello) = 1.11
2021-02-08 11:53:40 +00:00
Provides: bundled(mojo-parent) = 60
2020-11-30 16:23:38 +00:00
Provides: bundled(munge-maven-plugin) = 1.0
Provides: bundled(objenesis) = 3.1
Provides: bundled(opentest4j) = 1.2.0
2021-10-20 09:42:11 +00:00
Provides: bundled(osgi-annotation) = 8.0.1
2020-11-30 16:23:38 +00:00
Provides: bundled(osgi-compendium) = 7.0.0
2021-02-08 11:53:40 +00:00
Provides: bundled(osgi-core) = 8.0.0
2020-11-30 16:23:38 +00:00
Provides: bundled(sonatype-oss-parent) = 7
2021-10-20 09:42:11 +00:00
Provides: bundled(plexus-archiver) = 4.2.5
Provides: bundled(plexus-build-api) = 0.0.7
Provides: bundled(plexus-cipher) = 2.0
2020-11-30 16:23:38 +00:00
Provides: bundled(plexus-classworlds) = 2.6.0
Provides: bundled(plexus-compiler) = 2.8.8
2021-11-02 19:32:59 +00:00
Provides: bundled(plexus-components-pom) = 6.4
2020-11-30 16:23:38 +00:00
Provides: bundled(plexus-containers) = 2.1.0
Provides: bundled(plexus-interpolation) = 1.26
Provides: bundled(plexus-io) = 3.2.0
2021-10-20 09:42:11 +00:00
Provides: bundled(plexus-languages) = 1.1.0
2021-11-02 19:32:59 +00:00
Provides: bundled(plexus-pom) = 7
2020-11-30 16:23:38 +00:00
Provides: bundled(plexus-resources) = 1.1.0
2021-10-20 09:42:11 +00:00
Provides: bundled(plexus-sec-dispatcher) = 2.0
Provides: bundled(plexus-utils) = 3.4.1
2020-11-30 16:23:38 +00:00
Provides: bundled(qdox) = 2.0.0
Provides: bundled(jakarta-servlet) = 4.0.3
Provides: bundled(sisu) = 0.3.4
2021-10-20 09:42:11 +00:00
Provides: bundled(sisu-mojos) = 0.3.5
2020-11-30 16:23:38 +00:00
Provides: bundled(sisu-plexus) = 0.3.4
Provides: bundled(slf4j) = 1.7.30
2022-01-05 15:00:16 +00:00
Provides: bundled(testng) = 7.4.0
2021-02-08 11:53:40 +00:00
Provides: bundled(univocity-parsers) = 2.9.1
2020-11-30 16:23:38 +00:00
Provides: bundled(velocity) = 1.7
2021-02-08 11:53:40 +00:00
Provides: bundled(xbean) = 4.18
Provides: bundled(xmlunit) = 2.8.2
2021-10-20 09:42:11 +00:00
Provides: bundled(xmvn) = 4.0.0
2020-11-30 16:23:38 +00:00
Provides: bundled(xz-java) = 1.8
BuildRequires: byaccj
2021-11-02 14:23:59 +00:00
BuildRequires: java-17-openjdk-devel
BuildRequires: javapackages-generators
2020-11-30 16:23:38 +00:00
Requires: bash
Requires: coreutils
2021-11-02 14:23:59 +00:00
Requires: java-17-openjdk-devel
2020-11-30 16:23:38 +00:00
Requires: procps-ng
%description
In a nutshell, Java Packages Bootstrap (JPB) is a standalone build of all Java
software packages that are required for Java Packages Tools (JPT) to work.
In order to achieve reliable and reproducible builds of Java packages while
meeting Fedora policy that requires everything to be built from source, without
using prebuilt binary artifacts, it is necessary to build the packages in a
well-defined, acyclic order. Dependency cycles between packages are the biggest
obstacle to achieving this goal and JPT is the biggest offender -- it requires
more than a hundred of Java packages, all of which in turn build-require JPT.
JPB comes with a solution to this problem -- it builds everything that JPT needs
to work, without reliance on any Java software other than OpenJDK. JPT can
depend on JPB for everything, without depending on any other Java packages. For
example, JPB contains embedded version of XMvn, removing dependency of JPT on
XMvn, allowing JPT to be used before one builds XMvn package.
%prep
echo %{git_hash}
echo %{git_short_hash}
%setup -q -n %{name}-%{git_hash}
2020-11-30 16:23:38 +00:00
# leave out the first source as it has already been extracted
2020-12-03 12:59:28 +00:00
# leave out licensing breakdown file
other_sources=$(echo %{sources} | cut -d' ' -f3-)
2020-11-30 16:23:38 +00:00
for source in ${other_sources}
do
tar -xf "${source}"
done
2020-12-16 11:18:39 +00:00
%patch0 -p1
2020-11-30 16:23:38 +00:00
for patch_path in patches/*/*
do
package_name="$(echo ${patch_path} | cut -f2 -d/)"
patch_name="$(echo ${patch_path} | cut -f3 -d/)"
pushd "downstream/${package_name}"
2022-01-05 15:00:16 +00:00
# Unify line endings
find . -name '*.java' -exec sed -i 's/\r//' {} +
sed 's/\r//' "../../patches/${package_name}/${patch_name}" | patch -p1
2020-11-30 16:23:38 +00:00
popd
done
%build
export LC_ALL=C.utf8
2021-11-02 14:23:59 +00:00
JAVA_HOME=%{javaHomePath} ./mbi.sh build -parallel
2020-11-30 16:23:38 +00:00
%install
2021-11-02 14:23:59 +00:00
JAVA_HOME=%{javaHomePath} ./mbi.sh dist \
-javaCmdPath=%{javaHomePath}/bin/java \
-basePackageName=%{name} \
2020-11-30 16:23:38 +00:00
-installRoot=%{buildroot} \
-mavenHomePath=%{mavenHomePath} \
-metadataPath=%{metadataPath} \
-artifactsPath=%{artifactsPath} \
-launchersPath=%{launchersPath} \
2020-12-03 12:59:28 +00:00
-licensesPath=%{_licensedir}/%{name} \
2020-11-30 16:23:38 +00:00
# fix permissions
for f in mvn mvnDebug mvnyjp
do
chmod +x "%{buildroot}%{mavenHomePath}/bin/${f}"
2020-11-30 16:23:38 +00:00
done
2020-11-30 17:44:51 +00:00
# Use toolchains.xml provided by javapackages-tools
2021-04-10 15:39:38 +00:00
ln -sf %{_datadir}/xmvn/conf/toolchains.xml %{buildroot}%{mavenHomePath}/conf/toolchains.xml
install -d -m 755 %{buildroot}%{_rpmmacrodir}
echo '%%jpb_env PATH=/usr/libexec/javapackages-bootstrap:$PATH' >%{buildroot}%{_rpmmacrodir}/macros.%{name}
2020-11-30 17:44:51 +00:00
2020-12-03 14:08:33 +00:00
%check
%{buildroot}%{launchersPath}/xmvn --version
2020-11-30 16:23:38 +00:00
%files
%{mavenHomePath}
%{metadataPath}/*
%{artifactsPath}/*
%{launchersPath}/*
2021-04-10 15:39:38 +00:00
%{_rpmmacrodir}
2020-11-30 16:23:38 +00:00
%license %{_licensedir}/%{name}
%doc README.md
%doc AUTHORS
%changelog
2022-01-05 15:00:16 +00:00
* Wed Jan 05 2022 Marian Koncek <mkoncek@redhat.com> - 1.5.0^20220105.git9f283b7-1
- Update to latest upstream snapshot
2021-11-02 14:23:59 +00:00
* Wed Nov 03 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20211102.gitd76c032-2
- Build with OpenJDK 17
2021-11-02 19:32:59 +00:00
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20211102.gitd76c032-1
- Update to latest upstream snapshot
2021-10-20 09:42:11 +00:00
* Thu Oct 28 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20211028.git2daa95f-1
- Update to latest upstream snapshot
* Fri Oct 15 2021 Marian Koncek <mkoncek@redhat.com> - 1.5.0~20211015.1e296d5-1
- Update to upstream snapshot 1e296d550d91f89f383e42ceeb0856b97214b51a
2021-06-28 13:33:58 +00:00
* Mon Jul 26 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0-1
- Update to upstream version 1.5.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2021-03-18 15:47:41 +00:00
* Thu Mar 18 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.4.0-1
- Update to upstream version 1.4.0
2021-02-08 11:53:40 +00:00
* Mon Feb 08 2021 Marian Koncek <mkoncek@redhat.com> - 1.3.0-1
- Update to upstream version 1.3.0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2020-12-16 11:18:39 +00:00
* Wed Dec 16 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-1
- Update to upstream version 1.2.0
2020-12-03 12:59:28 +00:00
* Thu Dec 3 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.1.0-1
- Update to upstream version 1.1.0
2020-11-30 16:23:38 +00:00
* Wed Nov 25 2020 Marian Koncek <mkoncek@redhat.com> - 1.0.0-1
- Initial commit