Bug 669686

Summary: Package postgresql-jdbc fails to build in RHEL-5
Product: Red Hat Enterprise Linux 5 Reporter: Ondrej Vasik <ovasik>
Component: postgresql-jdbcAssignee: Pavel Raiskup <praiskup>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 5.8CC: databases-maint, hhorak, ovasik, praiskup
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-07 13:51:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ondrej Vasik 2011-01-14 12:03:48 UTC
Description of problem:

Due to rebase of the gettext in RHEL-5.6 to the version 0.17(http://bugzilla.redhat.com/523713) we started rebuilds of all packages which do depend on gettext.
Your package now fails to build from SRPM in brew. Please check the error and try to find the fix to prevent delays in build of the future security advisories. The fail seems to be unrelated to the gettext rebase.

https://brewweb.devel.redhat.com/taskinfo?taskID=3025893

Total time: 0 seconds
.................... done.
................... done.
........................... done.
....................... done.
..................... done.
.................................. done.
..................... done.
...................... done.
..................... done.
........................ done.
.......................... done.
........................................... done.
+ ant
Buildfile: build.xml
all:
prepare:
    [mkdir] Created dir: /builddir/build/BUILD/postgresql-jdbc-8.1.407/build
    [mkdir] Created dir: /builddir/build/BUILD/postgresql-jdbc-8.1.407/jars
check_versions:
BUILD FAILED
/builddir/build/BUILD/postgresql-jdbc-8.1.407/build.xml:83: The following error occurred while executing this line:
/builddir/build/BUILD/postgresql-jdbc-8.1.407/build.xml:57: Building with JDK 1.6 not supported.
Total time: 0 seconds
error: Bad exit status from /var/tmp/rpm-tmp.72379 (%build)
RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.72379 (%build)
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/postgresql-jdbc.spec']
Traceback (most recent call last):

Comment 1 Tom Lane 2011-01-14 23:21:16 UTC
According to Deepak Bhole, the problem is that JDK 1.6 is now the default on RHEL-5.  postgresql-jdbc 8.1 will only build against JDK 1.4 or 1.5; and that's not something easily fixed because a transition from JDBC3 to JDBC4 is involved.  Short of rebasing to postgresql-jdbc 8.2 or later, we would need to work around it by forcing use of an older java-devel version, like this:

diff -u -r1.9 postgresql-jdbc.spec
--- postgresql-jdbc.spec	16 Aug 2006 21:56:22 -0000	1.9
+++ postgresql-jdbc.spec	14 Jan 2011 21:02:14 -0000
@@ -55,6 +55,7 @@
 BuildRequires:  ant-junit >= 0:1.6.2
 BuildRequires:  junit >= 0:3.7
 BuildRequires:	findutils gettext
+BuildRequires:  java-devel < 1:1.6.0
 %if %{gcj_support}
 BuildRequires:	gcc-java
 Requires(post): /usr/bin/rebuild-gcj-db

He further recommends this:

@@ -84,6 +85,9 @@
 export OPT_JAR_LIST="ant/ant-junit junit"
 export CLASSPATH=
 sh update-translations.sh
+
+export JAVA_HOME=/usr/lib/jvm/java-gcj/
+export PATH=$JAVA_HOME/bin:$PATH
 ant
 
 %install

to ensure gcj is used even if the system's "alternatives" configuration tries to select non-gcj build.

I'm not planning to do anything about this right now, but this will be a must-fix if we ever turn the package.

Comment 2 Tom Lane 2013-03-19 15:08:45 UTC
Since RHEL-5 has now entered production phase 2, postgresql-jdbc is only going to get rebuilt if a security bug or other critical bug turns up, which now seems unlikely.  I'm leaving this bug open, since it will be a blocker if that does happen, but the odds are good it will never be fixed.

Comment 3 RHEL Program Management 2013-05-01 06:41:31 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2014-03-07 13:44:00 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 5 Ondrej Vasik 2014-03-07 13:51:02 UTC
Let's close that WONTFIX, this will need to be fixed in the unlikely scenario of postgresql-jdbc RHEL-5 update anyway.