summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2023-01-19 18:57:57 +0300
committerZac Medico <zmedico@gentoo.org>2023-01-19 23:10:20 -0800
commitbaecf6809f8c5569d74d816b26c997d4f0fc0726 (patch)
tree0fbc7327e870413d54a14e2f2bac1628c222f254 /dev-db/etcd/files
parentdev-lang/spidermonkey: add 102.7.0 (diff)
downloadgentoo-baecf6809f8c5569d74d816b26c997d4f0fc0726.tar.gz
gentoo-baecf6809f8c5569d74d816b26c997d4f0fc0726.tar.bz2
gentoo-baecf6809f8c5569d74d816b26c997d4f0fc0726.zip
dev-db/etcd: fixes to package
Update to EAPI8. Update init.d/conf.d files to use correct options and new config file, update tmpfiles.d configuration. Closes: https://bugs.gentoo.org/891397 Closes: https://bugs.gentoo.org/829695 Closes: https://bugs.gentoo.org/766015 Closes: https://github.com/gentoo/gentoo/pull/29172 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'dev-db/etcd/files')
-rw-r--r--dev-db/etcd/files/etcd.confd-r11
-rw-r--r--dev-db/etcd/files/etcd.initd-r127
-rw-r--r--dev-db/etcd/files/etcd.service-r117
-rw-r--r--dev-db/etcd/files/etcd.tmpfiles.d.conf2
4 files changed, 46 insertions, 1 deletions
diff --git a/dev-db/etcd/files/etcd.confd-r1 b/dev-db/etcd/files/etcd.confd-r1
new file mode 100644
index 000000000000..c7913d259409
--- /dev/null
+++ b/dev-db/etcd/files/etcd.confd-r1
@@ -0,0 +1 @@
+ETCD_OPTS="--config-file=/etc/etcd/etcd.conf.yml"
diff --git a/dev-db/etcd/files/etcd.initd-r1 b/dev-db/etcd/files/etcd.initd-r1
new file mode 100644
index 000000000000..f38b977a7568
--- /dev/null
+++ b/dev-db/etcd/files/etcd.initd-r1
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/run/${RC_SVCNAME}.pid
+LOGPATH=/var/log/${RC_SVCNAME}
+command_user=${RC_SVCNAME}
+command=/usr/bin/etcd
+command_args="${ETCD_OPTS}"
+command_background=true
+start_stop_daemon_args="
+ -1 ${LOGPATH}/${RC_SVCNAME}.log
+ -2 ${LOGPATH}/${RC_SVCNAME}.err"
+
+depend() {
+ need net
+ need localmount
+ after bootmisc
+}
+
+start() {
+ if [ ! -d "${LOGPATH}" ] ; then
+ mkdir -p "${LOGPATH}"
+ chown "${command_user}:${command_user}" "${LOGPATH}"
+ fi
+ default_start
+}
diff --git a/dev-db/etcd/files/etcd.service-r1 b/dev-db/etcd/files/etcd.service-r1
new file mode 100644
index 000000000000..e3b701551510
--- /dev/null
+++ b/dev-db/etcd/files/etcd.service-r1
@@ -0,0 +1,17 @@
+[Unit]
+Description=etcd key-value store
+Documentation=https://github.com/etcd-io/etcd
+After=network-online.target local-fs.target remote-fs.target time-sync.target
+Wants=network-online.target local-fs.target remote-fs.target time-sync.target
+
+[Service]
+User=etcd
+Type=notify
+Environment="ETCD_OPTS=--config-file /etc/etcd/etcd.conf.yml"
+ExecStart=/usr/bin/etcd $ETCD_OPTS
+Restart=always
+RestartSec=10s
+LimitNOFILE=40000
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/etcd/files/etcd.tmpfiles.d.conf b/dev-db/etcd/files/etcd.tmpfiles.d.conf
index b93ac987f287..67a720ae29cf 100644
--- a/dev-db/etcd/files/etcd.tmpfiles.d.conf
+++ b/dev-db/etcd/files/etcd.tmpfiles.d.conf
@@ -1,2 +1,2 @@
d /var/lib/etcd 0700 etcd etcd - -
-d /var/run/etcd 0755 etcd etcd - -
+d /run/etcd 0755 etcd etcd - -