apache / couchdb-pkg

Apache CouchDB Packaging support files
https://github.com/apache/couchdb-pkg
Apache License 2.0
29 stars 30 forks source link

RPM support for nouveau #147

Closed nickva closed 2 months ago

nickva commented 2 months ago

This is a simple version that goes along with the release artifacts file setup mostly, just adds a systemd unit file for nouveau.

Nouveau config setting can be automatically enabled during the rpm install using COUCHDB_NOUVEAU_ENABLE=true.

For instance:

COUCHDB_NOUVEAU_ENABLE=true COUCHDB_COOKIE=c00kie dnf install couchdb*.rpm

Java dependency is declared as a Suggests:.... This is the weakest form of dependency declaration. It won't automatically bring in java 21.

In the next minor version it may become a Recommends: which is one level higher and will automatically install it.

If nouveau config is enabled during the RPM install, user is then urged to install java (suggestion via dnf but they may install their own from any vendor) and to enable the systemd unit to auto-start after boot.

CouchDB service also works this way: it has to be enabled explicitly. This part didn't change:

systemctl enable couchdb systemctl enable couchdb-nouveau

This lets a user choose to start just CouchDB on a server, just Nouveau, or both CouchDB and Noveau.

In addition, since we're updating the RPM package, remove some of deprecated/redundant settings needed for old CentOS-es:

nickva commented 2 months ago

When enabling nouveau with the environmental variable the successful install should look something like:

Running transaction
  Preparing        :                                                                                                                  1/1 
  Running scriptlet: couchdb-3.3.3.913eefe-1.el9.x86_64                                                                               1/1 
  Installing       : couchdb-3.3.3.913eefe-1.el9.x86_64                                                                               1/1 
  Running scriptlet: couchdb-3.3.3.913eefe-1.el9.x86_64                                                                               1/1 
Using defined COUCHDB_COOKIE value.
Enabling nouveau in /opt/couchdb/etc/default.d/10-nouveau.ini
 * Make sure to install java version 11+ (dnf install java-21-openjdk-headless)
 * Enable couchdb-nouveau systemd unit

  Verifying        : couchdb-3.3.3.913eefe-1.el9.x86_64                                                                               1/1 

Installed:
  couchdb-3.3.3.913eefe-1.el9.x86_64