couchdb-pkg icon indicating copy to clipboard operation
couchdb-pkg copied to clipboard

Nouveau Debian package depends on Java 11

Open martiell opened this issue 1 year ago • 0 comments

The debian package for Nouveau declares a dependency on default-jre-headless. In turn this depends on a specific version of the JRE that the user may not want to install. For example, in Ubuntu Jammy, default-jre-headless depends on openjdk-11-jre-headless.

Expected Behavior

User can decide which version of Java to use with Nouveau, and does not need to install the specific version required by default-jre-headless.

Current Behavior

Installing couchdb-nouveau will also install default-jre-headless, and a specific Java version determined by the operating system.

Possible Solution

One option:

  1. Remove default-jre-headless from the Depends line in debian/control.in. The java11-runtime-headless dependency remains a virtual dependency provided by Java 11 or any subsequent version.
  2. Remove, or comment out, JAVA_HOME=/usr/lib/jvm/default-java from couchdb-nouveau.default. This path is provided by default-jre-headless.
  3. In couchdb-nouveau.service, change exec ${JAVA_HOME}/bin/java to exec ${JAVA_HOME:-/usr}/bin/java. This will still allow JAVA_HOME to be configured in /etc/default/couchdb-nouveau, but will default to /usr/bin/java if it is not set (which in turn will use whatever update-alternatives) has picked.

Another option:

  1. Remove default-jre-headless from the Depends line in debian/control.in.
  2. Replace JAVA_HOME in couchdb-nouveau.default with JAVA, and make it default to /usr/bin/java
  3. In couchdb-nouveau.service, change exec ${JAVA_HOME}/bin/java to exec ${JAVA}. This allows the java executable to be selected. As nouveau does not invoke any other Java tooling, it should not be necessary to set JAVA_HOME additionally.

Steps to Reproduce (for bugs)

  1. Build packages for 3.4.0 RC4
  2. Try to install couchdb and couchdb-nouveau

Context

I'd like to install couchdb-nouveau without requiring the version of Java depended on by default-jre-headless

Your Environment

  • Version used: 3.4.0-RC4
  • Browser Name and version: n/a
  • Operating System and version (desktop or mobile): Ubuntu Jammy
  • Link to your project: n/a

martiell avatar Sep 18 '24 07:09 martiell