Bug 1189084

Summary: All jds shipped in rhel or fedora have 'priority' restricted by comment, and not by automated check in prep
Product: Red Hat Enterprise Linux 7 Reporter: jiri vanek <jvanek>
Component: java-1.8.0-openjdkAssignee: jiri vanek <jvanek>
Status: CLOSED CURRENTRELEASE QA Contact: OpenJDK QA <java-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dbhole, jfabriko, jochen.wiedmann, jvanek, lzachar, omajid, sbaiduzh, thoger, zzambers
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: 2015-04-23 16:35:16 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:

Description jiri vanek 2015-02-04 12:20:52 UTC
Always, when any part of java version changed from single digit to two digits, issues with priority rise.

It was fixed by comment like eg:
#TODO when major version will jump over 9, change 1700 to 170
%define priority    1700%{priority_major_version}%{priority_minor_version}

Anyway, this is not enough. during *every* (single to two numbers) release this is violated, and I think the jdks priority length slipped  out of synchronization again across various jdks.

fix is, to enhance %prep by:
prioritylength=`expr length %{priority}`
if [ $prioritylength -ne 9 ] ... with some nice outputs and exits

eg:
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -118,7 +118,6 @@
 %global aarch64_updatever 40
 %global aarch64_buildver b12
 %global aarch64_changesetid aarch64-1263
-# priority must be 6 digits in total
 %global priority        18000%{updatever}
 %global javaver         1.8.0
 
@@ -951,6 +950,11 @@ if [ %{include_debug_build} -eq 0 -a  %{include_normal_build} -eq 0 ] ; then
   echo "you have disabled both include_debug_build and include_debug_build. no go."
   exit 13
 fi
+prioritylength=`expr length %{priority}`
+if [ $prioritylength -ne 9      ] ; then
+ echo "priority must be 9 digits in total, violated"
+ exit 14
+fi
 %setup -q -c -n %{uniquesuffix ""} -T -a 0
 %ifarch %{aarch64}
 pushd jdk8


Which will successfully halt built if priority slips.

This bug should be tracking bug for:
rhel5
 java-1.7.0-openjdk
 java-1.7.0-oracle
 java-1.7.0-ibm
 java-1.6.0-openjdk
 java-1.6.0-oracle
 java-1.6.0-ibm
 java-1.5.0-ibm
rhel6
 java-1.8.0-openjdk
 java-1.8.0-oracle
 java-1.8.0-ibm
 java-1.7.0-openjdk
 java-1.7.0-oracle
 java-1.7.1-ibm
 java-1.6.0-openjdk
 java-1.6.0-oracle
 java-1.6.0-ibm
 java-1.5.0-ibm
rhel7
 java-1.8.0-openjdk
 java-1.8.0-oracle
 java-1.8.0-ibm
 java-1.7.0-openjdk
 java-1.7.0-oracle
 java-1.7.1-ibm
 java-1.6.0-openjdk
 java-1.6.0-oracle
 java-1.6.0-ibm

And fedoras 21,22
 java-1.8.0-openjdk
And fedoras 20
 java-1.7.0-openjdk




Few more errors like this, and we will run out of integer space...

Comment 2 jiri vanek 2015-02-13 09:10:57 UTC
The check test is now pushed to f21-f23 openjdk8, with test on *7*

As oracles', openjdks' and ibms' jdks each have priority based on different and differently growing numbers (SR+FP for ibm, icedtea foe openjdk<8, u for openjdk>7, u+b for Oracle) The idea of gruping them (so they will be moreover competitive only among themselves) :
ibm - length of 7
oracle - lenght of 8
openjdk - length of 9

Thoughts?

Comment 3 jfabriko 2015-03-13 08:48:53 UTC
Current priorities table:

	f20	f21	f22	rawhide	rhel5	rhel6.5	rhel6.6	rhel7.0	rhel7.1
(openjdk 6)
	na	na	na	na	5	5	5	5	5	
(openjdk 7)
	6	na	na	na	6	6	6	6	6
(opendjk 8)
	7	7	7	7	na	6	6	6	6
(oracle 6)
	na	na	na	na	6	6	6	6	6
(oracle 7)
	na	na	na	na	6	6	6	6	6
(oracle 8)
	na	na	na	na	na	N	6	N	6
(ibm 5)
	na	na	na	na	6	6	6	na	na
(ibm 6)
	na	na	na	na	6	6	6	6	N
(ibm 7)
	na	na	na	na	6	6	6	6	na
(ibm 7.1)
	na	na	na	na	N	N	6	6	6

Legend: na - package is not live, N - no repositories, number = the current number of digits for priority.

Plan - synchronize priorities in all ibm javas to 6 digits, oracle javas to 7 digits, openjdk to 8 digits - alreday done by jvanek on fedora 20 21, 22, 23 for openjdk 8.

Comment 5 jiri vanek 2015-04-07 16:21:49 UTC
hi Jana,

I have pushed the check to jdk7:
	f20	f21	f22	rawhide	rhel5	rhel6.5	rhel6.6	rhel7.0	rhel7.1
(openjdk 7)
	6	na	na	na	6	6	6	*7*	*7*

And will do the same for 8
(opendjk 8)
	7	7	7	7	na	6	6	*7*	*7*

Please, add the checks to to proprietary jdks Well, and keep them all on 6...

Comment 6 jiri vanek 2015-04-15 13:13:01 UTC
also


I have pushed the check to jdk7:
  rhel6.7		rhel7.2
  6	        	*7*

And will do the same for 8
  6		        *7*

Comment 7 jfabriko 2015-04-20 07:16:55 UTC
Packages with proprietary Oracle jdk have all priority 6 digits long:
-jdk 8 on rhel 6.6,6.7,7.1,7.2
-jdk 7 on rhel 5.11,6.6,6.7,7.1,7.2
-jdk 6 on rhel 5.11,6.6,6.7,7.1,7.2

Comment 8 jfabriko 2015-04-20 07:18:42 UTC
(In reply to jfabriko from comment #7)
> Packages with proprietary Oracle jdk have all priority 6 digits long:
> -jdk 8 on rhel 6.6,6.7,7.1,7.2
> -jdk 7 on rhel 5.11,6.6,6.7,7.1,7.2
> -jdk 6 on rhel 5.11,6.6,6.7,7.1,7.2

+the priority length check included

Comment 9 jiri vanek 2015-04-29 14:25:46 UTC
(In reply to jiri vanek from comment #6)
> also
> 
> 
> I have pushed the check to jdk7:
>   rhel6.7		rhel7.2
>   6	        	*7*
> 
> And will do the same for 8
>   6		        *7*

 
 And will do the same for 8
   6.6 6.7	        7.1 7.2
   7		        *7*

Comment 12 jiri vanek 2018-12-06 10:22:38 UTC
For openjdk11, there will be need of bump to 8, otherwise 11 will not beat 18, which was used for 1.8.0