-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoCD 24.1.0 forced package dependency on OpenJDK17 JRE makes it difficult to BYO JRE #12791
Comments
Hiya - yeah, this is/was intentional, to resolve #11354. GoCD for a long time bundled its own JRE (Temurin) but it did so incorrectly, bundling an x64 JRE with an arch independent package. You'll notice the package no longer has a
Can you explain what this means? Why is it purged and unable to be installed? Which distro is this? If you have some unusual setup and want to bring your own JRE you can presumably install the deb directly with dpkg and tell it to ignore the dependency? We could also consider moving to optional/recommended/weak dependencies but I'm not really seeing the use case here just yet, would like to understand more whether there is a strong reason to avoid this 'clash'. |
Hi, one possible solution could be to depend on |
I'm working on converting them to weak/recommended dependencies. We considered depending on the virtual packages but they seemed to consider a higher version number as compatible whereas i want it to be strict as it takes time to validate GoCD against new Java LTS releases and some repos have non-LTS releases (e.g Temurin) which GoCD is strictly not validated against. However thinking again, maybe we can express that with a specific constraint on the virtual packages (i.e =17 if we don't want 21 to be used?) If you know more about deb packaging than me ideas are welcome. I'll link a PR soon for changing to recommended which is easier to opt out of without dpkg hijinx in any case. |
Debian also does not seem to have the 'alternatives' stuff that rpms do - which makes it easy to find the installed location of the JVM which we need to find to configure GoCD correctly - hopefully using relatively simple scripting. |
Not sure if this is the best way. After all java is required...
Indeed versioning of the virtual packages is somewhat problematic. To be precise: There is no explicit versioning, just the package name. However in this case it should work as
Wouldn't rely on this although I'm tinkering occasionally with this for a few years. :-D |
Debian actually has an alternatives system. E.g. looks like this on my system:
More information: https://wiki.debian.org/DebianAlternatives As far as I understand, it works similar to the RPM system (which seems to be a fork/rewrite of the deb system). |
Yeah sorry, I should have articulated better. What I meant was that the alternatives system doesn’t create symlinks like |
Thanks for the clarification. Actually the Debian alternatives system supports this. Unfortunately the openjdk package does not provide an appropriate config for the alternatives system. |
Hmm, it doesn't seem to matter too much, as even on RH-like distros, for example, the Temurin RPMs satisfy the virtual packages
I guess so, however it depends on whether users can reasonably expect to use a JRE tarballed and installed outside the package system; without having to dig into I am OK following up #12792 by adding a hard dependency to a virtual package with something like this untested hackish thing)
It works the way you describe on RH, but not for the standard Debian virtuals: With Adoptium and standard repos:
You can similarly see this at https://debian.pkgs.org/11/debian-main-amd64/openjdk-11-jre-headless_11.0.22+7-1~deb11u1_amd64.deb.html |
Despite what this looks like, if
... it doesn't seem to consider I am confused! :-) |
Hi @tewfik-ghariani - do you have any opinion/preference on what would be the desirable state here? Is an optional dep you can |
Hi @chadlwilson, yes I believe changing the dependency from forced to optional is a reasonable approach ^^ |
Issue Type
Summary
go-server
package v24.1.0 has now a forced dependency on openjdk-17-jre-headlessPrevious versions had no explicit dependencies and we have been using it with a "Temurin" installation
Environment
Basic environment details
23.5.0 (18179-7702b283accd1f90f014f0087aa2e9bd8baf4a97)
at the moment17.0.11
Linux 6.1.0-21-amd64
Not relevant
Steps to Reproduce
This shows the list of dependencies of the
go-server
package, it wasn't relying on any specific jdk/jreThis specific package depends on
ca-certificates-java
which is purged in our setup due to old java versions, thus breaking the go-server unitExpected Results
No explicit dependency on JDK/JRE should be set
Possible Fix
Users can install the JDK of their choice
The text was updated successfully, but these errors were encountered: