commit:     44e09a3ecaba2b00a9e84e65f3be9b680624011f
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Tue Sep  9 12:41:28 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  9 23:18:31 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44e09a3e

net-p2p/syncthing: fix system init script with single-dash long options.

Bug: https://bugs.gentoo.org/962604
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43727
Closes: https://github.com/gentoo/gentoo/pull/43727
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-p2p/syncthing/files/syncthing.initd-r4         | 28 ++++++++++++++++++++++
 ...hing-2.0.8.ebuild => syncthing-2.0.8-r1.ebuild} |  2 +-
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/net-p2p/syncthing/files/syncthing.initd-r4 
b/net-p2p/syncthing/files/syncthing.initd-r4
new file mode 100644
index 000000000000..907ab6b21d7f
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.initd-r4
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+SYNCTHING_USER=${SYNCTHING_USER:-syncthing}
+SYNCTHING_GROUP=${SYNCTHING_GROUP:-syncthing}
+SYNCTHING_HOMEDIR=${SYNCTHING_HOMEDIR:-/var/lib/syncthing/.config/syncthing}
+SYNCTHING_LOGFILE=${SYNCTHING_LOGFILE:-/var/log/syncthing/syncthing.log}
+SYNCTHING_GUI_ADDRESS=${SYNCTHING_GUI_ADDRESS:-http://127.0.0.1:8384}
+
+description="Syncthing is an open, trustworthy and decentralized cloud storage 
system"
+command="/usr/bin/syncthing"
+command_args="--no-browser --home=${SYNCTHING_HOMEDIR} 
--gui-address=${SYNCTHING_GUI_ADDRESS} ${SYNCTHING_OPTS}"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background="yes"
+command_user="${SYNCTHING_USER}:${SYNCTHING_GROUP}"
+output_log="\"${SYNCTHING_LOGFILE}\""
+error_log="\"${SYNCTHING_LOGFILE}\""
+
+depend() {
+       need localmount
+       after net
+}
+
+start_pre() {
+       checkpath -q -d -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} 
${SYNCTHING_HOMEDIR}
+       checkpath -q -f -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} 
${SYNCTHING_LOGFILE}
+}

diff --git a/net-p2p/syncthing/syncthing-2.0.8.ebuild 
b/net-p2p/syncthing/syncthing-2.0.8-r1.ebuild
similarity index 98%
rename from net-p2p/syncthing/syncthing-2.0.8.ebuild
rename to net-p2p/syncthing/syncthing-2.0.8-r1.ebuild
index d5d454aee45a..ba325f993600 100644
--- a/net-p2p/syncthing/syncthing-2.0.8.ebuild
+++ b/net-p2p/syncthing/syncthing-2.0.8-r1.ebuild
@@ -88,7 +88,7 @@ src_install() {
        systemd_dounit etc/linux-systemd/system/${PN}@.service
        systemd_douserunit etc/linux-systemd/user/${PN}.service
        newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN}
-       newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
+       newinitd "${FILESDIR}"/${PN}.initd-r4 ${PN}
        exeinto /etc/user/init.d
        newexe "${FILESDIR}"/syncthing.initd-user syncthing
 

Reply via email to