Bug 1308687

Summary: Build Dependency Cleanup
Product: Red Hat Enterprise Linux 7 Reporter: Andrew John Hughes <ahughes>
Component: java-1.6.0-openjdkAssignee: Andrew John Hughes <ahughes>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: dbhole, jvanek
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: java-1.6.0-openjdk-1.6.0.38-1.13.10.3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 22:59:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew John Hughes 2016-02-15 18:06:47 UTC
The RHEL 7 java-1.6.0-openjdk spec file contains a number of dated build dependencies which are no longer required and can cause problems when porting to newer systems (see bug 1190137).

A scratch build [0] was successful with the following changes applied:

@@ -224,17 +226,15 @@ BuildRequires: libXt-devel
 BuildRequires: libXtst-devel
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
-BuildRequires: wget
-BuildRequires: xalan-j2
-BuildRequires: xerces-j2
 BuildRequires: xorg-x11-proto-devel
-BuildRequires: mercurial
 BuildRequires: ant
 BuildRequires: libXinerama-devel
 BuildRequires: rhino
-BuildRequires: redhat-lsb
+# Provides lsb_release for generating identification
+BuildRequires: redhat-lsb-core
 %if %{gcjbootstrap}
 BuildRequires: java-1.5.0-gcj-devel
+BuildRequires: libxslt
 %else
 BuildRequires: java6-1.6.0-devel
 %endif

xalan & xerces are no longer used. They were needed at one point for builds with gcj, but this has no longer since been changed upstream to use xsltproc from libxslt. Either way, a gcj build is not possible on RHEL 7 as there is no gcj.

The build shouldn't be downloading from other sources, so mercurial and wget are not required.

The wget removal required a backport of http://icedtea.classpath.org//hg/icedtea6?cmd=changeset;node=e9935e163815 and the addition of --disable-downloading to the configure line:

@@ -385,7 +386,7 @@ export CFLAGS="$CFLAGS -mieee"
 ./autogen.sh
 ./configure %{icedteaopt} --with-openjdk-src-zip=%{SOURCE1} \
   --with-pkgversion=rhel-%{release}-%{_arch} --enable-pulse-java \
-  --with-abs-install-dir=%{_jvmdir}/%{sdkdir} \
+  --with-abs-install-dir=%{_jvmdir}/%{sdkdir} --disable-downloading \
   --with-rhino --with-parallel-jobs=$NUM_PROC --disable-lcms2
 
This is a good idea anyway as it ensures the build won't download its own OpenJDK tarball and is forced to use the one in the RPM sources or fail.

[0] https://brewweb.devel.redhat.com/taskinfo?taskID=10494363

Comment 5 errata-xmlrpc 2016-11-03 22:59:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2148.html