From upstream OpenJDK to RPMs on your machine

Over the past few years, I have been asked on and off as to what the process is for the RPMs that get into Red Hat Enterprise Linux and Fedora repositories. Over those years, the answer has evolved as we attempt to better the process. As it stands right now, there is a difference between how OpenJDK6, OpenJDK7 and OpenJDK8 (preview in Fedora 19) end up into RPMs. This post will shed some light into what those processes are.

This was the first (well, technically second, if you count the brief period when IcedTea7 was in Fedora before OpenJDK6) OpenJDK based JDK that was introduced in Fedora and RHEL.

OpenJDK6 has been EOLd by Oracle as of February 2013, and Red Hat has taken over maintainer-ship since. Since the goal of Fedora is to have the latest and greatest, we allowed OpenJDK6 in Fedora to EOL after Fedora 16 in favour of OpenJDK7. Enterprises however have much longer cycles and we continue to ship and support OpenJDK6 in RHEL-5 and RHEL-6 today.

OpenJDK6 in Fedora and RHEL has always been provided via a project named IcedTea. IcedTea was started by Red Hat to address build and binary plug issues that were in the initial version of OpenJDK. The purpose of IcedTea was to provide build scaffolding that made it easy to build OpenJDK, to provide open-source replacements for binary plugs, and to provide fixes that couldn’t otherwise make it into upstream OpenJDK.

The process for shipping new OpenJDK6 releases in Fedora and RHEL hasn’t really changed over the years and it is as follows:

  1. Upstream OpenJDK6 creates a release tag and an accompanying tarball
  2. We create an IcedTea update that utilizes this new tarball
  3. We tag, build and test the new IcedTea, ensuring that it passes the TCK and a host of other tests
  4. Once we have made sure that it meets our requirements for release, it is shipped

By the time OpenJDK7 rolled around, we (Red Hat) realized that the OpenJDK -> IcedTea -> Fedora/RHEL cycle was unsuitable for the long term, as it created increased turnaround time, removed the motivation to push things upstream, and in general, disrupted the usual Open Source working model.

We decided that we needed to move to using upstream OpenJDK directly in our RPMs. However when we made this decision, OpenJDK7 was close to release, and was unable to absorb the large number of patches from IcedTea. We decided on a stop-gap solution — we created our own OpenJDK7 forest (IcedTea-OpenJDK forest) that inherited from upstream OpenJDK7. To this we added some important patches (uncommon arch support, system library support, etc.). This forest build is what we currently ship in Fedora and RHEL. The process is as follows:

  1. Upstream OpenJDK7 creates a branch/tag for each release
  2. We merge all changes up to the desired point from the OpenJDK7 forest into IcedTea-OpenJDK7 forest
  3. We tag, build and test the new IcedTea-OpenJDK7 forest, ensuring that it passes the TCK and a host of other tests
  4. Once we have made sure that it meets our requirements for release, it is shipped

Continuing with our goal of moving away from IcedTea, we decided to switch to pure upstream OpenJDK8 for our RPMs. As OpenJDK8 is still in development, it has given us a chance to merge relevant fixes from the IcedTea-OpenJDK7 into upstream OpenJDK8. The OpenJDK8 RPMs in Fedora 19 are currently from the upstream forest and the process is as follows:

  1. Upstream OpenJDK8 forest creates various milestone tags
  2. We check out from that tag, build it, and run whatever smoke tests we can
  3. Once we have made sure that it meets our requirements for release, it is shipped in Fedora 19

With all of the above releases, there has always been a set of patches specific to the Fedora/RHEL RPMs. These patches are likely to always be there as they generally do Fedora/RHEL specific things (e.g. wiring in usability support in accordance with what is in Fedora/RHEL).

So there you have it. We went from OpenJDK6 -> IcedTea6 -> RPM to OpenJDK7 -> IcedTea-OpenJDK7 forest -> RPM to OpenJDK8 -> RPM. We intend to pull directly from upstream for future OpenJDK releases as well.

Currently, we fully support the following releases:

  • OpenJDK6 in Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6
  • OpenJDK7 in Red Hat Enterprise Linux 5, Red Hat Enterprise Linux 6, Fedora 17, Fedora 18 and Fedora 19
  • OpenJDK8 will be available as a tech preview in Fedora 19

We attempt to stay up-to-date for all releases, especially in case of security fixes where we aim for a very fast release time. Sometimes you may notice a discrepancy in terms of the release numbers for our releases and Oracle JDK releases. In case of OpenJDK6, that mismatch is confusing.  For Oracle JDK7, Oracle sometimes adds patches to the JDK that are usually specific to their customers or are applicable only to Windows. We (Red Hat) do not ship those patches as we either don’t have immediate access or they are not applicable to our users. Nonetheless, the difference is generally very minor. The latest Fedora and RHEL RPMs are still very close to the latest Oracle JDK releases despite what the release numbers may imply.

Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.



Leave a Reply