javapackages-bootstrap/javapackages-bootstrap.spec

385 lines
14 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$
2023-10-25 12:22:03 +00:00
# Generated list of bundled packages
%global __local_generator_provides cat %{_builddir}/%{buildsubdir}/bundled-provides.txt
%global __local_generator_path ^%{metadataPath}/.*$
2023-03-06 12:31:50 +00:00
%global debug_package %{nil}
2021-11-02 14:23:59 +00:00
%global javaHomePath %{_jvmdir}/java-17-openjdk
%global mavenHomePath %{_datadir}/%{name}
%global metadataPath %{mavenHomePath}/maven-metadata
2023-03-06 12:31:50 +00:00
%global artifactsPath %{_jnidir}
2021-04-10 15:39:38 +00:00
%global launchersPath %{_libexecdir}/%{name}
2022-05-13 11:24:33 +00:00
#global git_hash ...
#global git_short_hash %(echo %{git_hash} | cut -b -7)
2020-11-30 16:23:38 +00:00
Name: javapackages-bootstrap
2023-12-11 14:02:22 +00:00
Version: 1.14.0
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
2023-12-11 14:02:22 +00:00
License: Apache-1.1 AND Apache-2.0 AND (Apache-2.0 OR EPL-2.0) AND (Apache-2.0 OR LGPL-2.0-or-later) AND BSD-2-Clause AND BSD-3-Clause AND CC-BY-2.5 AND CC0-1.0 AND CPL-1.0 AND EPL-1.0 AND EPL-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND LicenseRef-Fedora-Public-Domain AND MIT AND Plexus AND SMLNJ AND Saxpath AND xpp
2020-11-30 16:23:38 +00:00
URL: https://github.com/fedora-java/javapackages-bootstrap
2023-03-06 12:31:50 +00:00
ExclusiveArch: %{java_arches}
2020-11-30 16:23:38 +00:00
2022-05-13 11:24:33 +00:00
Source0: https://github.com/fedora-java/javapackages-bootstrap/releases/download/%{version}/javapackages-bootstrap-%{version}.tar.xz
#Source0: https://github.com/fedora-java/javapackages-bootstrap/archive/%{git_short_hash}.tar.gz
2020-11-30 16:23:38 +00:00
# License breakdown
Source1: javapackages-bootstrap-PACKAGE-LICENSING
2023-10-25 12:22:03 +00:00
Source2: generate-bundled-provides.sh
2020-11-30 16:23:38 +00:00
# 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
2023-03-27 07:29:08 +00:00
Source1002: aopalliance.tar.xz
Source1003: apache-pom.tar.xz
Source1004: apiguardian.tar.xz
Source1005: asm.tar.xz
Source1006: assertj-core.tar.xz
Source1007: bnd.tar.xz
Source1008: build-helper-maven-plugin.tar.xz
Source1009: byte-buddy.tar.xz
Source1010: cdi.tar.xz
Source1011: cglib.tar.xz
Source1012: common-annotations-api.tar.xz
Source1013: commons-beanutils.tar.xz
Source1014: commons-cli.tar.xz
Source1015: commons-codec.tar.xz
Source1016: commons-collections.tar.xz
Source1017: commons-compress.tar.xz
Source1018: commons-io.tar.xz
Source1019: commons-jxpath.tar.xz
Source1020: commons-lang.tar.xz
Source1021: commons-logging.tar.xz
Source1022: commons-parent-pom.tar.xz
Source1023: cup.tar.xz
2023-08-10 12:10:19 +00:00
Source1024: disruptor.tar.xz
Source1025: easymock.tar.xz
Source1026: extra-enforcer-rules.tar.xz
Source1027: felix-parent-pom.tar.xz
Source1028: felix-utils.tar.xz
Source1029: fusesource-pom.tar.xz
Source1030: guava.tar.xz
Source1031: guice.tar.xz
Source1032: hamcrest.tar.xz
Source1033: httpcomponents-client.tar.xz
Source1034: httpcomponents-core.tar.xz
Source1035: httpcomponents-parent-pom.tar.xz
Source1036: injection-api.tar.xz
Source1037: jaf-api.tar.xz
Source1038: jansi.tar.xz
2023-08-25 13:03:29 +00:00
Source1039: javacc-maven-plugin.tar.xz
Source1040: javacc.tar.xz
2023-12-11 14:02:22 +00:00
Source1041: javaparser.tar.xz
Source1042: jcommander.tar.xz
Source1043: jctools.tar.xz
Source1044: jdom.tar.xz
Source1045: jdom2.tar.xz
Source1046: jflex.tar.xz
Source1047: jsoup.tar.xz
Source1048: jsr-305.tar.xz
Source1049: junit4.tar.xz
Source1050: junit5.tar.xz
Source1051: log4j.tar.xz
Source1052: mail-api.tar.xz
Source1053: maven-antrun-plugin.tar.xz
Source1054: maven-apache-resources.tar.xz
Source1055: maven-archiver.tar.xz
Source1056: maven-artifact-transfer.tar.xz
Source1057: maven-assembly-plugin.tar.xz
Source1058: maven-bundle-plugin.tar.xz
Source1059: maven-common-artifact-filters.tar.xz
Source1060: maven-compiler-plugin.tar.xz
Source1061: maven-dependency-analyzer.tar.xz
Source1062: maven-dependency-plugin.tar.xz
Source1063: maven-dependency-tree.tar.xz
Source1064: maven-enforcer.tar.xz
Source1065: maven-file-management.tar.xz
Source1066: maven-filtering.tar.xz
Source1067: maven-jar-plugin.tar.xz
Source1068: maven-parent-pom.tar.xz
Source1069: maven-plugin-testing.tar.xz
Source1070: maven-plugin-tools.tar.xz
Source1071: maven-remote-resources-plugin.tar.xz
Source1072: maven-resolver.tar.xz
Source1073: maven-resources-plugin.tar.xz
Source1074: maven-shared-incremental.tar.xz
Source1075: maven-shared-io.tar.xz
Source1076: maven-shared-utils.tar.xz
Source1077: maven-source-plugin.tar.xz
Source1078: maven-surefire.tar.xz
Source1079: maven-verifier.tar.xz
Source1080: maven-wagon.tar.xz
Source1081: maven.tar.xz
Source1082: mockito.tar.xz
Source1083: modello.tar.xz
Source1084: moditect.tar.xz
Source1085: modulemaker-maven-plugin.tar.xz
Source1086: mojo-parent-pom.tar.xz
Source1087: objenesis.tar.xz
Source1088: opentest4j.tar.xz
Source1089: osgi-annotation.tar.xz
Source1090: osgi-cmpn.tar.xz
Source1091: osgi-core.tar.xz
Source1092: plexus-archiver.tar.xz
Source1093: plexus-build-api.tar.xz
Source1094: plexus-cipher.tar.xz
Source1095: plexus-classworlds.tar.xz
Source1096: plexus-compiler.tar.xz
Source1097: plexus-components-pom.tar.xz
Source1098: plexus-containers.tar.xz
Source1099: plexus-interpolation.tar.xz
Source1100: plexus-io.tar.xz
Source1101: plexus-languages.tar.xz
Source1102: plexus-pom.tar.xz
Source1103: plexus-resources.tar.xz
Source1104: plexus-sec-dispatcher.tar.xz
Source1105: plexus-utils.tar.xz
Source1106: qdox.tar.xz
Source1107: servlet-api.tar.xz
Source1108: sisu-inject.tar.xz
Source1109: sisu-mojos.tar.xz
Source1110: sisu-plexus.tar.xz
Source1111: slf4j.tar.xz
Source1112: testng.tar.xz
Source1113: univocity-parsers.tar.xz
Source1114: velocity-engine.tar.xz
Source1115: xbean.tar.xz
Source1116: xmlunit.tar.xz
Source1117: xmvn-generator.tar.xz
Source1118: xmvn.tar.xz
Source1119: xz-java.tar.xz
2023-08-25 13:03:29 +00:00
2020-11-30 16:23:38 +00:00
BuildRequires: byaccj
2023-03-06 12:31:50 +00:00
BuildRequires: gcc
2021-11-02 14:23:59 +00:00
BuildRequires: java-17-openjdk-devel
2023-03-06 12:31:50 +00:00
BuildRequires: jurand
BuildRequires: rpm-devel
2023-10-25 12:22:03 +00:00
BuildRequires: rpm-local-generator-support
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
2023-03-06 12:31:50 +00:00
Requires: lujavrite%{?_isa}
2020-11-30 16:23:38 +00:00
2022-06-14 06:12:52 +00:00
Requires: javapackages-common
2020-11-30 16:23:38 +00:00
%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
2022-05-13 11:24:33 +00:00
%setup -q
2023-10-25 12:22:03 +00:00
# Dynamically generate bundled Provides
%{SOURCE2} >bundled-provides.txt
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
2023-10-25 12:22:03 +00:00
other_sources=$(echo %{sources} | cut -d' ' -f4-)
2020-11-30 16:23:38 +00:00
2022-10-19 10:03:04 +00:00
for source in ${other_sources}; do
2020-11-30 16:23:38 +00:00
tar -xf "${source}"
done
2022-10-19 10:03:04 +00:00
for patch_path in patches/*/*; do
2020-11-30 16:23:38 +00:00
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.UTF-8
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
2023-03-06 12:31:50 +00:00
install -D -p -m 644 downstream/xmvn-generator/src/main/lua/xmvn-generator.lua %{buildroot}%{_rpmluadir}/%{name}-generator.lua
install -D -p -m 644 downstream/xmvn-generator/src/main/rpm/macros.xmvngen %{buildroot}%{_rpmmacrodir}/macros.jpbgen
install -D -p -m 644 downstream/xmvn-generator/src/main/rpm/macros.xmvngenhook %{buildroot}%{_sysconfdir}/rpm/macros.jpbgenhook
install -D -p -m 644 downstream/xmvn-generator/src/main/rpm/xmvngen.attr %{buildroot}%{_fileattrsdir}/jpbgen.attr
echo '
%%__xmvngen_debug 1
%%__xmvngen_libjvm %{javaHomePath}/lib/server/libjvm.so
%%__xmvngen_classpath %{artifactsPath}/%{name}/xmvn-generator.jar:%{artifactsPath}/%{name}/asm.jar:%{artifactsPath}/%{name}/commons-compress.jar
%%__xmvngen_provides_generators org.fedoraproject.xmvn.generator.jpms.JPMSGeneratorFactory
%%__xmvngen_requires_generators %%{nil}
%%__xmvngen_post_install_hooks org.fedoraproject.xmvn.generator.transformer.TransformerHookFactory
%%jpb_env PATH=/usr/libexec/javapackages-bootstrap:$PATH
' >%{buildroot}%{_rpmmacrodir}/macros.jpbgen
sed -i s/xmvn-generator/%{name}-generator/ %{buildroot}%{_sysconfdir}/rpm/macros.jpbgenhook
sed -i s/xmvn-generator/%{name}-generator/ %{buildroot}%{_fileattrsdir}/jpbgen.attr
sed -i s/_xmvngen_/_jpbgen_/ %{buildroot}%{_fileattrsdir}/jpbgen.attr
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}/*
2023-03-06 12:31:50 +00:00
%{_rpmluadir}/*
%{_rpmmacrodir}/*
%{_fileattrsdir}/*
%{_sysconfdir}/rpm/*
2020-11-30 16:23:38 +00:00
%license %{_licensedir}/%{name}
%doc README.md
%doc AUTHORS
%changelog
2023-12-11 14:02:22 +00:00
* Mon Dec 11 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.14.0-1
- Update to upstream version 1.14.0
2023-10-25 12:22:03 +00:00
* Wed Oct 25 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.13.0-3
- Dynamically generate bundled Provides
* Fri Sep 01 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.13.0-2
- Convert License tag to SPDX format
2023-08-25 13:03:29 +00:00
* Fri Aug 25 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.13.0-1
- Update to upstream version 1.13.0
* Mon Aug 21 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.12.0-1
- Update to upstream version 1.12.0
2023-08-17 11:53:13 +00:00
* Thu Aug 17 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.11.0-2
- Update to upstream version 1.11.0
2023-08-10 12:10:19 +00:00
* Thu Aug 10 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.0-1
- Update to upstream version 1.10.0
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
2023-03-31 18:12:16 +00:00
* Fri Mar 31 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9.0-2
- Rebuild with no changes
2023-03-27 07:29:08 +00:00
* Mon Mar 27 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.9.0-1
- Update to upstream version 1.9.0
2023-03-20 08:15:42 +00:00
* Mon Mar 20 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.1-1
- Update to upstream version 1.8.1
2023-03-06 12:31:50 +00:00
* Fri Mar 17 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.8.0-1
- Update to upstream version 1.8.0
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2022-08-31 12:40:57 +00:00
* Wed Oct 19 2022 Marian Koncek <mkoncek@redhat.com> - 1.7.2-1
- Update to upstream version 1.7.2
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-06-22 06:32:21 +00:00
* Wed Jun 22 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.1-1
- Update to upstream version 1.7.1
2022-06-14 06:12:52 +00:00
* Tue Jun 14 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.0-3
- Add openjdk8 toolchain subpackage
* Mon Jun 06 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.0-2
- Drop build-requires on javapackages-generators
2022-05-13 11:24:33 +00:00
* Fri May 13 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.7.0-1
- Update to upstream version 1.7.0
2022-05-05 11:42:40 +00:00
* Thu May 05 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20220505.git4f9a68a-2
- Fix dangling toolchains.xml symlink
2022-05-05 04:35:11 +00:00
* Thu May 05 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20220505.git4f9a68a-1
- Update to latest upstream snapshot
2022-04-28 05:17:04 +00:00
* Fri Apr 29 2022 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.0^20220429.git1cfada9-1
- Update to latest upstream snapshot
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1.5.0^20220105.git9f283b7-3
- Rebuilt for java-17-openjdk as system jdk
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0^20220105.git9f283b7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
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