On Thu, 28 May 2026 00:34:49 GMT, Mikael Vidstedt <[email protected]> wrote:

> ### Background (from JBS)
> 
> The devkit creation makefiles under make/devkit have been more or less 
> untouched since they were first introduced. While they have served us well 
> there are some key challenges which are slowly becoming more urgent to 
> address.
> 
> One such issue relates to the logic for creating the sysroot. Currently, it 
> is implemented using wget with a set of pattern to download packages directly 
> from the upstream yum repo. One problem with this is that it will download 
> all packages which happen to match the pattern, no matter if those packages 
> are actually needed or not. More problematically though, using wget like this 
> does not (necessarily) work for more recent linux distribution 
> versions/repositories.
> 
> The dnf tool is the native solution for downloading packages, including 
> dependencies etc.
> 
> The sysroot logic could also benefit from being split out into its own file, 
> making the fairly involved Tools.gmk slightly less complex.
> 
> A secondary goal of this cleanup is to make it possible to reuse the logic 
> (especially the sysroot logic) for creating devkit equivalents for building 
> project Detroit.
> 
> ### About the change
> 
> The goal of this change was, initially, to change the sysroot logic to use 
> dnf. In making the required changes I relatively quickly I realized that the 
> Tools.gmk file was long overdue for cleanup. I chose to split out the sysroot 
> logic to a separate file but couldn't resist making some fairly significant, 
> (_mostly_) cosmetic changes to Tools.gmk while at it, moving it closer to the 
> general style of the JDK build system. That said, a lot of the logic in 
> Tools.gmk remains "old-style" even after this change.
> 
> Some specific things worth highlighting:
> 
> - I've tried to adjust formatting to closer match the JDK build system style, 
> but I'm sure there are places/cases where it's off.
> - I updated versions and URLs to reflect the latest reality, and adjusted the 
> documentation in Makefile accordingly.
> - To avoid having to call the Sysroot.gmk file twice (first to download 
> packages and then to create the actual sysroot) I updated the logic to not 
> depend on parse time globing. Specifically, what used to be `RPM_FILE_LIST` 
> is now handled in the recipe instead.
> - I fixed some missing dependencies which were most likely not actual 
> problems, unless running with parallelism (which is not needed - Tools.gmk 
> sets BUILDPAR where relevant). Even with these fixes parallelism is unlikely 
> to work well.
> - I dropped some packages which no longer exist (assuming ...

Do we need to update building.md?

> You can for example create and use a devkit with GCC 7.3 and a Fedora 12 
> sysroot environment (with glibc 2.11) on Ubuntu 14.04

This sentence can be read we can make devkit for Fedora 12 on Ubuntu 14.04. 
(each versions is too old now!)

This PR completely depends on `dnf`, but it wouldn't be provided by Ubuntu.
building.md does not clarify the OS which is a builder of devkit. I guess it is 
different from `BASE_OS` because `BASE_OS` means sysroot.

Actually I could make devkit for OEL6 on Rocky Linux 9, but it couldn't with 
this change because `baseos` repository does not exist on it.

-------------

Changes requested by ysuenaga (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/31303#pullrequestreview-4386027387

Reply via email to