From cf8b7d84b97f79e64b6a7d2c61aeb4228a74edf9 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Sun, 19 Jan 2025 02:10:17 +0000 Subject: [PATCH] Sync the copy of the portable & devkit specfiles with the latest update - Include the latest devkit patches Related: RHEL-73562 --- ...e-systemtap-sdt-devel-on-s390x-ppc64.patch | 38 ++++++++++++++++ ...date-repository-on-RHEL-rather-than-.patch | 33 ++++++++++++++ java-21-openjdk-portable.specfile | 45 +++++++++++++------ java-21-openjdk.spec | 12 ++++- openjdk-devkit.specfile | 28 +++++++++--- 5 files changed, 134 insertions(+), 22 deletions(-) create mode 100644 0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch create mode 100644 0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch diff --git a/0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch b/0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch new file mode 100644 index 0000000..240dcad --- /dev/null +++ b/0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch @@ -0,0 +1,38 @@ +From 2617c050a909265444b32063b2d271eca42dcaa6 Mon Sep 17 00:00:00 2001 +From: Andrew Hughes +Date: Fri, 17 Jan 2025 21:11:01 +0000 +Subject: [PATCH] Tools.gmk: Exclude systemtap-sdt-devel on s390x & ppc64* + +There is no DTrace support on s390x (JDK-8305174) and ppc64 +(JDK-8304867) so we don't need the RPMs. They also cause issues with +static linkage of libstdc++.a on s390x. It fails with 'error: +relocation refers to local symbol "" [9], which is defined in a +discarded section'. + +Resolves: OPENJDK-3070 +--- + make/devkit/Tools.gmk | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk +index 57d48ec5114..07928f69ceb 100644 +--- a/make/devkit/Tools.gmk ++++ b/make/devkit/Tools.gmk +@@ -219,9 +219,13 @@ RPM_LIST := \ + zlib zlib-devel \ + libffi libffi-devel \ + fontconfig fontconfig-devel \ +- systemtap-sdt-devel \ + # + ++# Only include SystemTap on supported architectures ++ifeq ($(filter ppc64 ppc64le s390x, $(ARCH)), ) ++ RPM_LIST += systemtap-sdt-devel ++endif ++ + ########################################################################################## + # Define common directories and files + +-- +2.45.2 + diff --git a/0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch b/0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch new file mode 100644 index 0000000..28ba831 --- /dev/null +++ b/0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch @@ -0,0 +1,33 @@ +From 9766818f55726cea630b432f09cce8f9c17c014d Mon Sep 17 00:00:00 2001 +From: Andrew Hughes +Date: Fri, 17 Jan 2025 21:27:58 +0000 +Subject: [PATCH] Tools.gmk: Use update repository on RHEL rather than GA + +It looks like we were using 7.6 & 7.9 GA repositories rather than +the latest updates. + +Resolves: OPENJDK-3589 +--- + make/devkit/Tools.gmk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk +index 07928f69ceb..5b39560ab11 100644 +--- a/make/devkit/Tools.gmk ++++ b/make/devkit/Tools.gmk +@@ -64,10 +64,10 @@ ifeq ($(BASE_OS), OL) + endif + else ifeq ($(BASE_OS), RHEL) + ifeq ($(ARCH), aarch64) +- BASE_URL := https://download.eng.brq.redhat.com/rhel-7/rel-eng/RHEL-7/latest-RHEL-ALT-7/compose/Server/$(ARCH)/os/Packages/ ++ BASE_URL := https://download.eng.brq.redhat.com/rhel-7/rel-eng/updates/RHEL-ALT-7/latest-RHEL-ALT-7/compose/Server/$(ARCH)/os/Packages/ + LINUX_VERSION := RHEL7.6 + else +- BASE_URL := https://download.eng.brq.redhat.com/rhel-7/rel-eng/RHEL-7/latest-RHEL-7/compose/Server/$(ARCH)/os/Packages/ ++ BASE_URL := https://download.eng.brq.redhat.com/rhel-7/rel-eng/updates/RHEL-7/latest-RHEL-7/compose/Server/$(ARCH)/os/Packages/ + LINUX_VERSION := RHEL7.9 + endif + else ifeq ($(BASE_OS), Fedora) +-- +2.45.2 + diff --git a/java-21-openjdk-portable.specfile b/java-21-openjdk-portable.specfile index 93a5b8b..1d56ee3 100644 --- a/java-21-openjdk-portable.specfile +++ b/java-21-openjdk-portable.specfile @@ -24,8 +24,7 @@ # Enable static library builds by default. %bcond_without staticlibs # Build a fresh libjvm.so for use in a copy of the bootstrap JDK -# Turned off until 21.0.5+1 or higher is in the buildroot -%bcond_with fresh_libjvm +%bcond_without fresh_libjvm # Build with system libraries %bcond_with system_libs @@ -160,7 +159,10 @@ # Architecture on which we run Java only tests %global jdk_test_arch x86_64 # Set of architectures for which we have a devkit +# Only used on RHEL +%if 0%{?centos} == 0 %global devkit_arches %{aarch64} %{ppc64le} s390x x86_64 +%endif # By default, we build a slowdebug build during main build on JIT architectures %if %{with slowdebug} @@ -323,7 +325,7 @@ # New Version-String scheme-style defines %global featurever 21 %global interimver 0 -%global updatever 5 +%global updatever 6 %global patchver 0 # buildjdkver is usually same as %%{featurever}, # but in time of bootstrap of next jdk, it is featurever-1, @@ -387,8 +389,8 @@ %global origin_nice OpenJDK %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup -%global buildver 11 -%global rpmrelease 2 +%global buildver 7 +%global rpmrelease 1 #%%global tagsuffix %%{nil} # Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit %if %is_system_jdk @@ -697,7 +699,7 @@ BuildRequires: devtoolset-%{dtsversion}-gcc BuildRequires: devtoolset-%{dtsversion}-gcc-c++ %else %ifarch %{devkit_arches} -BuildRequires: %{devkit_name} >= 1.0-8 +BuildRequires: %{devkit_name} >= 1.0-9 %else # Earlier versions have a bug in tree vectorization on PPC BuildRequires: gcc >= 4.8.3-8 @@ -914,6 +916,7 @@ The %{origin_nice} %{featurever} miscellany. %prep echo "Preparing %{oj_vendor_version}" +echo "System is RHEL=%{?rhel}%{!?rhel:0}, CentOS=%{?centos}%{!?centos:0}, EPEL=%{?epel}%{!?epel:0}, Fedora=%{?fedora}%{!?fedora:0}" # Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-( %if 0%{?stapinstall:1} @@ -1038,7 +1041,11 @@ done source ${DEVKIT_ROOT}/devkit.info echo "Installed ${DEVKIT_NAME} devkit" %else - echo "No devkit for %{_target_cpu}"; +%if 0%{?centos} > 0 + echo "No devkit for CentOS %{?centos}" +%else + echo "No devkit for %{_target_cpu} on RHEL %{?rhel}"; +%endif %endif %build @@ -1076,7 +1083,10 @@ EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming %ifarch %{devkit_arches} # Remove annobin plugin reference which isn't available in the devkit EXTRA_CFLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1||')" -EXTRA_CPP_FLAGS="$(echo ${EXTRA_CFLAGS} | sed -e 's|-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1||')" +EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1||')" +# Force DWARF 4 for compatibility +EXTRA_CFLAGS="${EXTRA_CFLAGS} -gdwarf-4" +EXTRA_CPP_FLAGS="${EXTRA_CPP_FLAGS} -gdwarf-4" %endif export EXTRA_CFLAGS EXTRA_CPP_FLAGS @@ -1138,11 +1148,6 @@ function buildjdk() { local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name} local top_dir_abs_build_path=$(pwd)/${outputdir} -%ifarch s390x - # devkit libstdc++.a fails with "error: relocation refers - # to local symbol "" [9], which is defined in a discarded section - libc_link_opt="dynamic"; -%else # This must be set using the global, so that the # static libraries still use a dynamic stdc++lib if [ "x%{link_type}" = "xbundled" ] ; then @@ -1150,7 +1155,6 @@ function buildjdk() { else libc_link_opt="dynamic"; fi -%endif echo "Using output directory: ${outputdir}"; echo "Checking build JDK ${buildjdk} is operational..." @@ -1931,6 +1935,19 @@ done %endif %changelog +* Sat Jan 11 2025 Andrew Hughes - 1:21.0.6.0.7-1 +- Update to jdk-21.0.6+7 (GA) +- Update release notes to 21.0.6+7 +- Build with DWARF 4 debuginfo for compatibility with older toolchains +- Check for CentOS being defined to determine use of devkit +- Bump devkit requirement to 1.0-9 to bring in updated sysroot +- Drop workaround of building s390x with dynamic libstdc++ +- Turn on fresh_libjvm now 21.0.5 with JDK-8329088 is released +- ** This tarball is embargoed until 2025-01-21 @ 1pm PT. ** +- Resolves: OPENJDK-3556 +- Resolves: OPENJDK-3590 +- Related: OPENJDK-3070 + * Thu Nov 28 2024 Andrew Hughes - 1:21.0.5.0.11-2 - Bump devkit requirement to 1.0-8 to bring in the gcc with --enable-linker-build-id - Related: OPENJDK-3068 diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index c7b0022..6543857 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -1375,8 +1375,12 @@ Source25: 0003-Log-devkit-build-to-stdout.patch Source26: 0004-devkit-Remove-.comment-sections-from-sysroot-objects.patch # Configure binutils with --enable-deterministic-archives Source27: 0005-Tools.gmk-Configure-binutils-with-enable-determinist.patch -# Configure gcc with --enable-linker-build-id +# Configure gcc with --enable-linker-build-id (OPENJDK-3068) Source28: 0006-Tools.gmk-Add-enable-linker-build-id-to-gcc-build.patch +# Exclude systemtap-sdt-devel on s390x & ppc64* (OPENJDK-3070) +Source29: 0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch +# Use update repository on RHEL rather than GA (OPENJDK-3589) +Source30: 0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch # Setup variables to reference correct sources %global releasezip %{_jvmdir}/%{name}-%{version}-%{prelease}.portable.unstripped.jdk.%{_arch}.tar.xz @@ -1848,6 +1852,7 @@ The %{origin_nice} %{featurever} API documentation compressed in a single archiv %prep echo "Preparing %{oj_vendor_version}" +echo "System is RHEL=%{?rhel}%{!?rhel:0}, CentOS=%{?centos}%{!?centos:0}, EPEL=%{?epel}%{!?epel:0}, Fedora=%{?fedora}%{!?fedora:0}" # Using the echo macro breaks rpmdev-bumpspec, as it parses the first line of stdout :-( %if 0%{?stapinstall:1} @@ -2210,7 +2215,8 @@ mv ${jdk_image}/NEWS ${commondocdir} # Copy portable and devkit specfiles and README.md cp -a %{SOURCE19} %{SOURCE20} %{SOURCE22} ${commondocdir} # Copy devkit patches -cp -a %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} %{SOURCE27} %{SOURCE28} ${commondocdir} +cp -a %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26} \ + %{SOURCE27} %{SOURCE28} %{SOURCE29} %{SOURCE30} ${commondocdir} # Install the jdk mkdir -p $RPM_BUILD_ROOT%{_jvmdir} @@ -2558,6 +2564,8 @@ cjc.mainProgram(args) * Sat Jan 18 2025 Andrew Hughes - 1:21.0.6.0.7-1 - Update to jdk-21.0.6+7 (GA) - Update release notes to 21.0.6+7 +- Sync the copy of the portable & devkit specfiles with the latest update +- Include the latest devkit patches - ** This tarball is embargoed until 2025-01-21 @ 1pm PT. ** - Resolves: RHEL-73562 diff --git a/openjdk-devkit.specfile b/openjdk-devkit.specfile index 525243a..ffb09c1 100644 --- a/openjdk-devkit.specfile +++ b/openjdk-devkit.specfile @@ -40,9 +40,12 @@ ExcludeArch: %{ix86} %global eaprefix 0. %endif +# Date devkit RPMs were download +%global rpm_download_date 20250117 + Name: openjdk-devkit Version: 1.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 URL: http://openjdk.java.net/ Summary: OpenJDK Devkit @@ -50,10 +53,10 @@ Summary: OpenJDK Devkit # The source tarball, generated using generate_source_tarball.sh Source0: https://openjdk-sources.osci.io/openjdk%{featurever}/open%{vcstag}%{ea_designator_zip}.tar.xz # The buildroot RPMs for each architecture -Source1: devkit-rpms-aarch64.tar.xz -Source2: devkit-rpms-ppc64le.tar.xz -Source3: devkit-rpms-s390x.tar.xz -Source4: devkit-rpms-x86_64.tar.xz +Source1: devkit-rpms-aarch64-%{rpm_download_date}.tar.xz +Source2: devkit-rpms-ppc64le-%{rpm_download_date}.tar.xz +Source3: devkit-rpms-s390x-%{rpm_download_date}.tar.xz +Source4: devkit-rpms-x86_64-%{rpm_download_date}.tar.xz # Toolchain sources Source5: binutils-2.39.tar.gz Source6: gcc-11.3.0.tar.xz @@ -74,8 +77,12 @@ Patch2: 0003-Log-devkit-build-to-stdout.patch Patch3: 0004-devkit-Remove-.comment-sections-from-sysroot-objects.patch # Configure binutils with --enable-deterministic-archives Patch4: 0005-Tools.gmk-Configure-binutils-with-enable-determinist.patch -# Configure gcc with --enable-linker-build-id +# Configure gcc with --enable-linker-build-id (OPENJDK-3068) Patch5: 0006-Tools.gmk-Add-enable-linker-build-id-to-gcc-build.patch +# Exclude systemtap-sdt-devel on s390x & ppc64* (OPENJDK-3070) +Patch6: 0007-Tools.gmk-Exclude-systemtap-sdt-devel-on-s390x-ppc64.patch +# Use update repository on RHEL rather than GA (OPENJDK-3589) +Patch7: 0008-Tools.gmk-Use-update-repository-on-RHEL-rather-than-.patch BuildRequires: make autoconf automake libtool gcc gcc-c++ wget glibc-devel texinfo tar bison @@ -121,6 +128,8 @@ pushd jdk-* %patch -P3 -p1 %patch -P4 -p1 %patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 popd mkdir -p devkit/download @@ -184,6 +193,13 @@ cp -p devkit-product/result/*.tar.gz %{buildroot}%{_datadir}/%{name}/ %{_datadir}/%{name} %changelog +* Fri Jan 17 2025 Andrew Hughes - 1.0-9 +- Update devkit RPMs to latest updates +- Exclude SystemTap RPMs from s390x and ppc64le +- Add a date stamp to the RPM bundles +- Resolves: OPENJDK-3070 += Resolves: OPENJDK-3589 + * Wed Nov 27 2024 Andrew Hughes - 1.0-8 - Add --enable-linker-build-id to gcc build - Resolves: OPENJDK-3068