This is an automated email from the ASF dual-hosted git repository. rnewson pushed a commit to branch nouveau in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git
commit caf41d52a2eb09439f51b593f1e1efac6a1d7572 Author: Robert Newson <[email protected]> AuthorDate: Thu Dec 7 17:46:24 2023 +0000 WIP Nouveau package --- debian/conf/nouveau.yaml | 28 ++++++++++++++++++++++++++ debian/control.in | 11 +++++++++++ debian/couchdb-nouveau.dirs | 3 +++ debian/couchdb-nouveau.install | 3 +++ debian/couchdb-nouveau.postrm | 45 ++++++++++++++++++++++++++++++++++++++++++ debian/couchdb-nouveau.service | 28 ++++++++++++++++++++++++++ 6 files changed, 118 insertions(+) diff --git a/debian/conf/nouveau.yaml b/debian/conf/nouveau.yaml new file mode 100644 index 0000000..7d90063 --- /dev/null +++ b/debian/conf/nouveau.yaml @@ -0,0 +1,28 @@ +maxIndexesOpen: 5000 +commitIntervalSeconds: 30 +idleSeconds: 60 +rootDir: /var/opt/couchdb-nouveau/indexes + +logging: + level: INFO + +server: + applicationConnectors: + - type: http + bindHost: 127.0.0.1 + port: 5987 + useDateHeader: false + gzip: + includedMethods: + - GET + - POST + requestLog: + appenders: + - type: file + archive: true + archivedFileCount: 5 + archivedLogFilenamePattern: /var/opt/couchdb-nouveau/log/nouveau-%d.log + currentLogFilename: /var/opt/couchdb-nouveau/log/nouveau.log + immediateFlush: false + maxFileSize: 10MB + queueSize: 512 diff --git a/debian/control.in b/debian/control.in index bfd5074..326382f 100644 --- a/debian/control.in +++ b/debian/control.in @@ -37,6 +37,7 @@ Depends: adduser, ${misc:Depends} Replaces: couchdb-bin, couchdb-common +Suggests: couchdb-nouveau Breaks: couchdb-bin, couchdb-common Description: RESTful document oriented database @@ -56,3 +57,13 @@ Description: RESTful document oriented database standalone node or part of a cluster, and associated other parameters as necessary. It adds the systemd / init job and other items needed for a system-wide CouchDB instance that is started at boot. + +Package: couchdb-nouveau +Architecture: any +Depends: java11-runtime-headless +Description: Nouveau is a modern replacement for dreyfus/clouseau + Nouveau is a modern replacement for dreyfus/clouseau built on DropWizard, + Java 11+ and Lucene 9. + . + Nouveau transforms Apache CouchDB databases into Apache Lucene indexes at + the shard level and then merges the results together. diff --git a/debian/couchdb-nouveau.dirs b/debian/couchdb-nouveau.dirs new file mode 100644 index 0000000..71c9ec4 --- /dev/null +++ b/debian/couchdb-nouveau.dirs @@ -0,0 +1,3 @@ +etc/opt/couchdb-nouveau +opt/couchdb-nouveau +var/opt/couchdb-nouveau diff --git a/debian/couchdb-nouveau.install b/debian/couchdb-nouveau.install new file mode 100755 index 0000000..56d7884 --- /dev/null +++ b/debian/couchdb-nouveau.install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec +rel/couchdb/nouveau => /opt/couchdb-nouveau +debian/conf/nouveau.yaml /etc/opt/couchdb-nouveau/ diff --git a/debian/couchdb-nouveau.postrm b/debian/couchdb-nouveau.postrm new file mode 100644 index 0000000..f6cc35a --- /dev/null +++ b/debian/couchdb-nouveau.postrm @@ -0,0 +1,45 @@ +#!/bin/sh -e +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +. /usr/share/debconf/confmodule + +case $1 in + purge) + if test -d "/opt/couchdb-nouveau"; then + rm -rf "/opt/couchdb-nouveau" + fi + + db_input high couchdb-nouveau/postrm_remove_indexes || true + db_go || true + db_get couchdb-nouveau/postrm_remove_indexes || true + + if [ "$RET" = "true" ]; then + if test -d "/var/opt/couchdb-nouveau"; then + rm -rf "/var/opt/couchdb-nouveau" + fi + + # If we didn't delete the data, we should + # keep the uid and gid too. + if getent passwd couchdb-nouveau > /dev/null; then + deluser couchdb-nouveau >/dev/null 2>&1 + fi + if getent group couchdb-nouveau > /dev/null; then + delgroup couchdb-nouveau >/dev/null 2>&1 + fi + fi + + #db_reset nouveau/? + ;; +esac + +#DEBHELPER# diff --git a/debian/couchdb-nouveau.service b/debian/couchdb-nouveau.service new file mode 100644 index 0000000..ebbde33 --- /dev/null +++ b/debian/couchdb-nouveau.service @@ -0,0 +1,28 @@ +[Unit] +After=network-online.target +Description=Apache CouchDB - Nouveau +Wants=network-online.target + +[Service] + +# Configuration +RuntimeDirectory=nouveau + +# Lifecycle +ExecStart=/opt/couchdb-nouveau/bin/nouveau server /etc/opt/couchdb-nouveau/nouveau.yaml +LimitNOFILE=infinity +Restart=on-failure + +# Security +Group=nouveau +NoNewPrivileges=true +ProtectHome=yes +ProtectSystem=strict +ReadWritePaths=/var/opt/couchdb-nouveau/ +SystemCallErrorNumber=EPERM +SystemCallFilter=@system-service +User=nouveau + +[Install] +WantedBy=multi-user.target +
