Motivation

ojdkbuild edited this page Oct 21, 2018 · 2 revisions

Preface

OpenJDK is an open-source reference implementation of Java SE led by Oracle. ojdkbuild project provides a portable build environment (and a set of binaries built with it) for Windows x86_64.

Linux and binary compatibility

Application binary interface (ABI) compatibility allows to build executable binaries in one environment and execute them in other environments.

In GNU/Linux, kernel provides strong ABI compatibility guaranties. Linux user-space uses different approach, when ABI has weaker compatibility (specially-defined compatibility for some widely used user-space libraries, like ZLib or OpenSSL, and no particular compatibility for majority of the libraries). Instead Linux user-space pays more attention to source compatibility, when all user-space components are expected to be built from source for some specific version of Linux distribution.

This situation with ABI in Linux forces software vendors to choose a way, how their software is going to use third-party libraries:

  1. linux package way: use system libraries from Linux package repositories; this requires to re-build the software for every major version of Linux distribution; at the same time it shifts the burden of maintaining third-party libraries onto Linux distro maintainers and also allows end-users to update their local third-party libraries (e.g. with security fixes) themselves

  2. portable binary way: integrate all the third-party libraries into their software and use as minimal dependencies from Linux user-space as possible; this way the chosen versions of third-party libraries are usually placed in-tree into the project repository and then maintained as a part of this project

OpenJDK and third-party libraries

Upstream OpenJDK project has chosen the "portable binary" variant. OpenJDK dependencies are not numerous (if we won't count dependencies for OpenJFX). OpenJDK 8 keeps in-tree source code for zlib, giflib, libpng, libjpeg and parts of NSS (for elliptic cryptography) libraries.

All these libraries are built during the build of OpenJDK itself and bundled as parts of OpenJDK distribution.

Besides the libraries, OpenJDK also bundles with it some resources, that are usually exist in operating system in some form - timezone data files and a set of root certificate authorities (for TLS networking).

OpenJDK packages in Linux

In popular Linux distributions (RHEL/CentOS, Ubuntu and some others) OpenJDK packages are not based directly on upstream OpenJDK sources. For OpenJDK 6 and 7 they were based on IcedTea source code. For OpenJDK 8 package upstream source code is used, but it is adjusted with local patches (that may be quite numerous).

These adjustments, besides other things, are added to better integrate OpenJDK into the Linux user-space environment. In-tree dependency libraries and bundled resources are not used on Linux - system libraries and resources are used instead. To integrate OpenJDK with system libraries, Linux packages maintainers are effectively undoing the upstream work that integrated these libraries in-tree. Resulting OpenJDK packages are much less portable than upstream OpenJDK builds, because they depend on ABI of system libraries. But that is not a problem for OpenJDK packages, because they are integral parts of OS and are rebuilt from source for newer distro versions the same way as any other Linux package.

OpenJDK on Linux and behavioral differences

While local Linux patches to OpenJDK are usually quite subtle and not visible to end-users, sometimes end-user-visible changes are necessary. For example font subsystem configuration, security options (set of allowed crypto-algorithms), timezone data, set of too certificate authorities - all of these things are managed OS-wide in Linux OpenJDK packages. These settings and resources may be different from the ones bundled with upstream OpenJDK.

Sometimes behavioral differences are necessary for non-technical reasons, for example, elliptic cryptography implementation in OpenJDK on Linux uses system NSS library and supports a narrow set of elliptic curves for legal reasons.

Besides that, Linux packages may include bugfixes "ahead of time" - the ones that are developed upstream, but targeted for the following upstream releases.

Windows builds

ojdkbuild project has a goal to build Windows x86_64 binaries of OpenJDK that are as close in behaviour to Linux OpenJDK packages as possible. CentOS 7 is an official place where the source packages (SRPMs) of Red Hat Enterprise Linux are available publicly.

Following the Linux packages build process, ojdkbuild imports OpenJDK 8 sources (and its dependencies) from CentOS and then build these sources for Windows. Every release (that happen ones in three months after every Oracle CPU), ojdkbuild source tree is updated from CentOS 7 sources importing recent patches and updating dependency libraries and resources.

ojdkbuild binaries are going to be updated as long as they are updated in RHEL/CentOS. Some details about the security patches handling in ojdkbuild.

Besides that, ojdkbuild tries to provide an installer of OpenJDK that can be used as a "drop-in" replacement for Oracle Java 8. Historically Oracle Java 8 installer included a number of additional components that are perceived by end-users as integral parts of Java 8:

  1. JavaFX: a full build of OpenJFX 8 (including WebKit runtime) is included with ojdkbuild MSI installer

  2. WebStart and browser plugin: these components are not open-source, instead ojdkbuild MSI installer includes a build of IcedTea-Web - an open-source implementation of WebStart technology

  3. Flight Recorder functionality in JVM and Mission Control tool: these features were open-sources by Oracle recently, but open source versions are not compatible with OpenJDK 8; both Flight Recorder (that is now a part of upstream OpenJDK 11+) and Mission Controls are going to be included into OpenJDK 11 ojdkbuild MSI installers

Note, that these additional components are not based on CentOS (except IcedTea-Web, they are not available in RHEL).

Relation to Red Hat

ojdkbuild is not an official or semi-official project of Red Hat Inc. It is a community project sponsored by Red Hat. Red Hat provides Windows builds of OpenJDK for its customers and these builds are based on ojdkbuild. Red Hat does not provide customer support for ojdkbuild binaries published on GitHub - Red Hat binaries are published on developers.redhat.com and access.redhat.com.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.