Skip to content

Added headless jre capability - #1308

Merged
steelhead31 merged 21 commits into
adoptium:masterfrom
judovana:optionalHeadlessPackage
Feb 11, 2026
Merged

Added headless jre capability#1308
steelhead31 merged 21 commits into
adoptium:masterfrom
judovana:optionalHeadlessPackage

Conversation

@judovana

@judovana judovana commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Code for #917 (comment)

The PR itself is still not yet considered "ok", many testing ahead and many things to agree, but serves as example of both jre and jre-headless from one specfile:

rpmbuild -bb temurin-21-jre.spec
...
 rpm -q --requires .../rpmbuild/RPMS/x86_64/temurin-21-jre-21.0.9.0.0.10-1.x86_64.rpm 
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/alternatives
alsa-lib(x86-64)
ca-certificates
dejavu-sans-fonts
fontconfig(x86-64)
glibc(x86-64)
libX11(x86-64)
libXext(x86-64)
libXi(x86-64)
libXrender(x86-64)
libXtst(x86-64)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
zlib(x86-64)
rpmbuild -bb temurin-21-jre.spec --without headfull
...
 rpm -q --requires .../rpmbuild/RPMS/x86_64/temurin-21-jre-headless-21.0.9.0.0.10-1.x86_64.rpm
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/alternatives
ca-certificates
glibc(x86-64)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
zlib(x86-64)

I think many of the X dependencies are not necessary, as they should be autogenerated, but am not going to touch those:). Also note the name - something to confirm.

I'm not sure with alsa-libs and dejavu-sans-fonts but am sure with fontconfig dependence. For alsa and dejavu, they shoudl be probably suggests in newer RPMs, but as also older rpm without suggests/recommends is supported, then I think it would be better to leave them out. its easy to install them on top, but hard to remove if they are hard-coded.

I'm also not sure, how to init another pipeline. I would probably parametrize https://github.com/adoptium/installer/blob/master/linux/jre/redhat/src/main/packaging/build.sh to eb able to produce both headfull and --without headfull or enhance it so it produce both right away, rather then add any duplicates. Any hints or help on the "how this should be consumed", welcomed.

Also I guess I should be editing the https://github.com/adoptium/installer/tree/master/linux_new/jre/rhel/src/main/packaging and not this one.. But am not sure

@@ -1,13 +1,16 @@
%global upstream_version 21.0.5+11
%global upstream_version 21.0.9+10

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be there, but api did not yield the 5+11 for me today.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems odd that this isn't already at the latest...

@jiekang

jiekang commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Please link the pull request to the issue as described by the guide here:
https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue

Thank you!

@jiekang

jiekang commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

Also, the Linux installers are undergoing a rewrite where spec files are being generated on demand rather than individually maintained under the "linux_new" folder.

See:
https://github.com/adoptium/installer/tree/master/linux_new
https://github.com/adoptium/installer/blob/master/linux_new/generate_spec.py
https://github.com/adoptium/installer/tree/master/linux_new/jdk/rhel/src/main/packaging/temurin/25

I expect your changes will need to be done there. But it's nice to see how simple the spec macros are in order to add a headless package. I would add that as a comment to this PR so reviewer's can reference it.

@judovana

judovana commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

resolves #917

@judovana

judovana commented Jan 2, 2026

Copy link
Copy Markdown
Contributor Author

Also, the Linux installers are undergoing a rewrite where spec files are being generated on demand rather than individually maintained under the "linux_new" folder.

See: https://github.com/adoptium/installer/tree/master/linux_new https://github.com/adoptium/installer/blob/master/linux_new/generate_spec.py https://github.com/adoptium/installer/tree/master/linux_new/jdk/rhel/src/main/packaging/temurin/25

I expect your changes will need to be done there. But it's nice to see how simple the spec macros are in order to add a headless package. I would add that as a comment to this PR so reviewer's can reference it.

hi! yes, I noted the j2 "specfiles". But there are still one specfile per jdk and while reading all that related .sh and .gradle, I have not grabbed which one is actually used (see the last paragraph of summary). So modyfing directly the "old" spec was more direct. And as you write - the change is nicely visible.

@jiekang
jiekang requested a review from steelhead31 January 5, 2026 13:15

@steelhead31 steelhead31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is functionality we want in the temurin releases, we'll need to update the version specific templates in the linux_new folder. If we definitely want this, Im happy to do these changes on this PR ahead of the january release cycle!

@judovana

judovana commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

If this is functionality we want in the temurin releases, we'll need to update the version specific templates in the linux_new folder. If we definitely want this, Im happy to do these changes on this PR ahead of the january release cycle!

Can you plsae drop how to test the j2 changes? Also There is quite a lot to decide (I had moved the "decission" non technical discussion back #917 (comment) , before I noticed this comment)

I will mgrate it to j2 in menatime, as the chages are moreover identical.

@steelhead31

Copy link
Copy Markdown
Contributor

If this is functionality we want in the temurin releases, we'll need to update the version specific templates in the linux_new folder. If we definitely want this, Im happy to do these changes on this PR ahead of the january release cycle!

Can you plsae drop how to test the j2 changes? Also There is quite a lot to decide (I had moved the "decission" non technical discussion back #917 (comment) , before I noticed this comment)

I will mgrate it to j2 in menatime, as the chages are moreover identical.

To test this I create a test jenkins job, and amend the jenkinsfile so that it doesnt push packages to artifactory..

https://ci.adoptium.net/job/build-scripts/job/release/job/sfr-build-linux-package-modular/

Once all the changes are in, Im happy to run the above job against your fork/branch, theres a few changes needed to the jenkins file.. ( https://github.com/adoptium/installer/blob/master/linux_new/Jenkinsfile ) to comment out the jfrog upload..

Line 192

// jf 'rt u ${FILENAME} deb/pool/main/t/temurin-${RELNUM}/ --target-props=${DISTROLIST}deb.component=main;deb.architecture=${BUILDARCH} --flat=true'
Line 204

// jf 'rt u **/build/ospackage/${FILENAME} apk/alpine/main/${BUILDARCH}/ --flat=true'

Line 215

// jf 'rt u ${FILENAME} ${PACKAGEDIR}/ --flat=true'

And these too..

Lines 991 - 993

//                  build job: 'publish_linux_pkg_src', parameters: [
//                      string(name: 'TAG', value: params.TAG),
//                      string(name: 'FILENAME', value: ArchiveFileName)
somethi

Let me know if you want me to help test, the job in question is restricted in jenkins, but I've already got the above set up, would just need the changes above, and a small change in jenkins to point to your branch

@judovana

judovana commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

I will mgrate it to j2 in menatime, as the chages are moreover identical.

To test this I create a test jenkins job, and amend the jenkinsfile so that it doesnt push packages to artifactory..

...

Let me know if you want me to help test, the job in question is restricted in jenkins, but I've already got the above set up, would just need the changes above, and a small change in jenkins to point to your branch

Yes, I will need help. I got lost already on " create a test jenkins job," :((( Will change the PR to aim the j2 files.
The j2 files do not have jdk8 - so "old" jdk8 specifies shold be affected?

Thanx a lot for all the hints!

@steelhead31

Copy link
Copy Markdown
Contributor

The JDK8 specfile templates(j2) should be here.. https://github.com/adoptium/installer/tree/master/linux_new/jre/rhel/src/main/packaging/temurin/8

If you make the template changes, I'll make the changes to the jenkinsfile on your branch for testing to build the headless packages, and then run some builds for jenkins.

Are these changes just for the RHEL based RPMs, or do the SLES ones require the same changes ?

@judovana

judovana commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

The JDK8 specfile templates(j2) should be here.. https://github.com/adoptium/installer/tree/master/linux_new/jre/rhel/src/main/packaging/temurin/8

:face_palm:

If you make the template changes, I'll make the changes to the jenkinsfile on your branch for testing to build the headless packages, and then run some builds for jenkins.

yyy. Will give you note. TYVM!

Are these changes just for the RHEL based RPMs, or do the SLES ones require the same changes ?

Hmm. Good question. I was not thinking about suse for now. Although they should be easily adjsuted, I would wait with it for some seen interest, or at least as another changeset. I was actually wondering why there are two sets (rhel/suse) of specfiles... Note that the change is also applicable for debian and others. But would really wait untill there is some interest (unless it is provided as feature). If SLES is not suse, please correct me :)

Comment thread linux/jre/redhat/src/main/packaging/temurin/21/temurin-21-jre.spec Outdated
@@ -1,13 +1,16 @@
%global upstream_version 21.0.5+11
%global upstream_version 21.0.9+10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems odd that this isn't already at the latest...

@judovana

judovana commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

seems odd that this isn't already at the latest...

Thats becasue I edited unused .spec. The .j2 files should be edited instead. Will do once PMC accept it (or not do, once tey decline it)

@steelhead31

Copy link
Copy Markdown
Contributor

@judovana this has been discussed and agreed with the PMC, if you'd like to update the specfiles in this branch, im happy to contribute the jenkins changes, and build some test packages using my test jobs in jenkins, assuming everything goes ok we can then plan implementing it :)

@judovana

judovana commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

@judovana this has been discussed and agreed with the PMC, if you'd like to update the specfiles in this branch, im happy to contribute the jenkins changes, and build some test packages using my test jobs in jenkins, assuming everything goes ok we can then plan implementing it :)

@steelhead31 Ok, moved the change to j2 file. Can you please ride your magic wheels? If we would be ok with the change, will spread it to 25,26,17,11 and 8.

I had added also an clumsy attempt to build jre and jre-headless in loop. WDYT? I feel slightly losst. Anything tried/advised will be highly appreciated.

@steelhead31

Copy link
Copy Markdown
Contributor

@judovana I'd remove the loop to build jre & jre-headless, I can handle this in the jenkinsfile for the automated production process :) .. I'll make some changes this afternoon and update you later

@steelhead31

Copy link
Copy Markdown
Contributor

In fact, I've already almost allowed for this in my jenkinsfile..

def packageTypes = ['jdk', 'jre']
now becomes
def packageTypes = ['jdk', 'jre', 'jre-headless']

@judovana

judovana commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

Cool! Sure! ty!

@judovana

judovana commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

Reverted. Once you are ready, please show me how the jre-headless evolve to --without headful later. Am extremely curios. TYVM

@steelhead31

Copy link
Copy Markdown
Contributor

Reverted. Once you are ready, please show me how the jre-headless evolve to --without headful later. Am extremely curios. TYVM

Thanks, I will do.. Im just evaluating where the best place to make the change is.. I suspect its actually going to be in the gradle, but once I've done a bit of investigating, I'll let you know.. Ive just contributed the change to prevent anything getting uploaded to anywhere it shouldnt, and I'll test that.. then have a look at which bit of the build needs tweaking

Comment thread linux_new/jre/rhel/src/main/packaging/build.sh
Comment thread linux_new/jre/rhel/src/main/packaging/build.sh
Comment thread linux_new/jre/rhel/src/main/packaging/temurin/21/temurin-21-jre.template.j2 Outdated
Comment thread linux_new/jre/rhel/src/main/packaging/temurin/21/temurin-21-jre.template.j2 Outdated
Comment thread linux_new/jre/rhel/src/main/packaging/temurin/21/temurin-21-jre.template.j2 Outdated
Comment thread linux_new/jre/rhel/src/main/packaging/build.sh Outdated
Comment thread linux_new/jre/rhel/src/main/packaging/build.sh Outdated
Comment thread linux_new/jre/rhel/src/main/packaging/build.sh Outdated
Comment thread linux_new/Jenkinsfile
@judovana

Copy link
Copy Markdown
Contributor Author

@steelhead31 I had removed also policytool, which is gui application. It should not cause any troubles, but am looking forward for testing bits.

@steelhead31

Copy link
Copy Markdown
Contributor

I'll produce a couple of versions with this change, and let you have them later today

steelhead31 and others added 9 commits February 5, 2026 09:33
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
%{name} is missing several audio and GUI libraries, and many dependencies.
-The package is sufficient for most server operations and for experienced admins.
-to get full functionality, use full JRE or SKD
+The package is sufficient for most server based Java workloads
+and for experienced admins. To get full functionality, use full JRE or JDK.
@judovana
judovana force-pushed the optionalHeadlessPackage branch from d36a1a8 to 3e1d058 Compare February 5, 2026 08:40
@judovana

judovana commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

@karianna @steelhead31 Thanks! Rebased. If all the checks passes, and your review passes, it seems to be good to go.

@steelhead31 steelhead31 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!, based on the volume of testing we've carried out.. Im happy to merge this ahead of the upcoming release cycles in March/April.

@judovana

judovana commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! Looking forward to see it in action (and am just imagining what avalanche of troubles it will start O:) )

@judovana

judovana commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

@steelhead31

Copy link
Copy Markdown
Contributor

btw the hunk of

 echo "Disabled Uploads For Testing"

https://github.com/adoptium/installer/pull/1308/changes#diff-6b814d76bb7841eca9df868e074766d7e41088aadf2be7590628ea642a66e8ce still exists.

Fixed!

@karianna

karianna commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

/thaw

@github-actions
github-actions Bot dismissed their stale review February 7, 2026 22:29

Pull Request unblocked - code freeze is over.

Comment thread linux_new/jre/rhel/src/main/packaging/temurin/11/temurin-11-jre.template.j2 Outdated
@karianna

karianna commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

OK, final set of nitpicks and an important question at the top

@judovana
judovana requested a review from karianna February 9, 2026 11:53
@karianna

Copy link
Copy Markdown
Contributor

Not sure if further documentation, blogging etc will need to be added on top of this change?

@steelhead31

Copy link
Copy Markdown
Contributor

I'll certainly be adding comments to both the March(JDK26) and April release blogs, I'll also include updates to the installation guides at the same time.. I've created and planned #1345 to cover this work

@steelhead31
steelhead31 merged commit 4ce09ae into adoptium:master Feb 11, 2026
6 checks passed
@judovana

Copy link
Copy Markdown
Contributor Author

Awesome. Thanx for all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants