Skip to content
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

Please let the Debian package depend on headless JDK #3761

Closed
jmillikin-stripe opened this issue Sep 19, 2017 · 5 comments
Closed

Please let the Debian package depend on headless JDK #3761

jmillikin-stripe opened this issue Sep 19, 2017 · 5 comments
Labels
category: misc > misc P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request

Comments

@jmillikin-stripe
Copy link
Contributor

jmillikin-stripe commented Sep 19, 2017

The official Bazel packages for Debian/Ubuntu depend on java8-sdk, which usually resolves to openjdk-8-jdk. This is the full JDK including graphical toolkits, and it's fairly bulky when working within a Docker container:

$ apt-get install --no-install-recommends openjdk-8-jdk
[...]
Need to get 72.8 MB of archives.
After this operation, 384 MB of additional disk space will be used.

Since Bazel doesn't have a graphical component, it would be nice if it depended on java8-sdk-headless, which is less than half as big:

$ apt-get install --no-install-recommends openjdk-8-jdk-headless
[...]
Need to get 39.8 MB of archives.
After this operation, 155 MB of additional disk space will be used.
@jmillikin-stripe jmillikin-stripe changed the title Please let the Debian package depend on headless JDK (or JRE) Please let the Debian package depend on headless JDK Sep 19, 2017
@laszlocsomor
Copy link
Contributor

Sounds like a good idea! @philwo , @aehlig : WDYT?

@laszlocsomor laszlocsomor added category: misc > misc P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request labels Sep 19, 2017
@philwo
Copy link
Member

philwo commented Sep 20, 2017

@jmillikin-stripe Considering that java8-jdk-headless doesn't exist, should we then change the dependency list from:

google-jdk | java8-jdk | java8-sdk | oracle-java8-installer

into:

google-jdk | java8-sdk-headless | oracle-java8-installer

?

The java8-sdk-headless package seems to exist and do the job for Debian and Ubuntu:
https://packages.debian.org/sid/java8-sdk-headless
https://packages.ubuntu.com/zesty/java8-sdk-headless

Not sure why we even had the java8-jdk one in there.

@jmillikin-stripe
Copy link
Contributor Author

jmillikin-stripe commented Sep 20, 2017

java8-jdk exists in Debian: https://packages.debian.org/sid/java8-jdk

I'm slightly nervous about changing/removing virtual packages, because they can be mapped to different things on different systems. I think a safe, minimally-intrusive change would be to change the dep to:

google-jdk | java8-sdk-headless | java8-jdk | java8-sdk | oracle-java8-installer

That should prioritize the headless version if available, without breaking any existing dependency resolution on Dpkg-based non-Debian systems.

@jmillikin-stripe
Copy link
Contributor Author

Gentle ping.

I could send a PR for this if you want, but someone in the Bazel side would still need to handle updating the Debian packages and such.

@jmillikin-stripe
Copy link
Contributor Author

Note for future readers: the Debian package deps are duplicated, and need to be updated in both debian/control and debian/BUILD. See #4686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: misc > misc P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request
Projects
None yet
Development

No branches or pull requests

3 participants