Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master binary grimoire by Vlad Glagolev (4c51b610def9ed50962ddc054dfdcdc06f57f149)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master binary grimoire by Vlad Glagolev (4c51b610def9ed50962ddc054dfdcdc06f57f149)
  • Date: Tue, 6 Sep 2022 00:02:07 +0000

GIT changes to master binary grimoire by Vlad Glagolev
<stealth AT sourcemage.org>:

ChangeLog | 3 ++
accounts | 1
bin-net/syncthing-bin/BUILD | 2 -
bin-net/syncthing-bin/DEPENDS | 2 +
bin-net/syncthing-bin/DETAILS | 1
bin-net/syncthing-bin/FINAL | 5 ++++
bin-net/syncthing-bin/HISTORY | 4 +++
bin-net/syncthing-bin/INSTALL | 8 +++++-
bin-net/syncthing-bin/init.d/syncthing | 33
++++++++++++++++++++++++++++
bin-net/syncthing-bin/init.d/syncthing.conf | 3 ++
groups | 1
11 files changed, 61 insertions(+), 2 deletions(-)

New commits:
commit 4c51b610def9ed50962ddc054dfdcdc06f57f149
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

syncthing-bin: add init framework

commit 472e7042b12b5d29aa5b82d51a213a3c181f9349
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

added account data for syncthing-bin

diff --git a/ChangeLog b/ChangeLog
index 338a8a5..4817a46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2022-09-05 Vlad Glagolev <stealth AT sourcemage.org>
+ * accounts, groups: added account data for syncthing-bin
+
2022-09-04 Vlad Glagolev <stealth AT sourcemage.org>
* bin-net/syncthing-bin: new spell, open decentralized
synchronization utility

diff --git a/accounts b/accounts
index e9c98d0..c2ec0b6 100755
--- a/accounts
+++ b/accounts
@@ -9,3 +9,4 @@ consul:217:217
consul-template:218:218
vault:219:219
boundary:220:220
+syncthing:230:230
diff --git a/bin-net/syncthing-bin/BUILD b/bin-net/syncthing-bin/BUILD
index 27ba77d..2932a63 100755
--- a/bin-net/syncthing-bin/BUILD
+++ b/bin-net/syncthing-bin/BUILD
@@ -1 +1 @@
-true
+create_account syncthing /var/lib/syncthing
diff --git a/bin-net/syncthing-bin/DEPENDS b/bin-net/syncthing-bin/DEPENDS
new file mode 100755
index 0000000..355760d
--- /dev/null
+++ b/bin-net/syncthing-bin/DEPENDS
@@ -0,0 +1,2 @@
+# for syslog logging
+depends util-linux
diff --git a/bin-net/syncthing-bin/DETAILS b/bin-net/syncthing-bin/DETAILS
index 8fe682e..cdb3813 100755
--- a/bin-net/syncthing-bin/DETAILS
+++ b/bin-net/syncthing-bin/DETAILS
@@ -1,6 +1,7 @@
SPELL=syncthing-bin
SPELLX=${SPELL/-bin/}
VERSION=1.20.4
+ PATCHLEVEL=1
if [[ "${SMGL_COMPAT_ARCHS[1]}" == "x86_64" || "${SMGL_COMPAT_ARCHS[1]}" ==
"em64t" ]]; then
ARCH=amd64

SOURCE_HASH=sha256:ce577b08236c14ce4e3f2f589791b2521086bdd2ce952800847f0acd1b753dbe:UPSTREAM_HASH
diff --git a/bin-net/syncthing-bin/FINAL b/bin-net/syncthing-bin/FINAL
index 4b6a086..a05a270 100755
--- a/bin-net/syncthing-bin/FINAL
+++ b/bin-net/syncthing-bin/FINAL
@@ -1,3 +1,8 @@
+# binaries require /lib64
+if [ ! -d "${INSTALL_ROOT}/lib64" ]; then
+ ln -vsf "${TRACK_ROOT}/lib" "${INSTALL_ROOT}/lib64"
+fi &&
+
message "${MESSAGE_COLOR}You also want to consider the following:\n"
message "# Increase maximum receive socket buffer size to 2MiB for QUIC
connections"
message "# see
https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size";
diff --git a/bin-net/syncthing-bin/HISTORY b/bin-net/syncthing-bin/HISTORY
index f458ab2..25022be 100644
--- a/bin-net/syncthing-bin/HISTORY
+++ b/bin-net/syncthing-bin/HISTORY
@@ -1,2 +1,6 @@
+2022-09-05 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * BUILD, INSTALL, init.d: added init framework
+
2022-09-04 Vlad Glagolev <stealth AT sourcemage.org>
* DETAILS, BUILD, INSTALL, FINAL: created spell, version 1.20.4
diff --git a/bin-net/syncthing-bin/INSTALL b/bin-net/syncthing-bin/INSTALL
index 8c97ae8..e9a1c81 100755
--- a/bin-net/syncthing-bin/INSTALL
+++ b/bin-net/syncthing-bin/INSTALL
@@ -1 +1,7 @@
-install -vm 755 syncthing "${INSTALL_ROOT}/usr/bin/syncthing"
+install -vm 755 syncthing "${INSTALL_ROOT}/usr/bin/syncthing" &&
+
+local home_dir="${INSTALL_ROOT}/var/lib/${SPELLX}" &&
+
+if [ ! -d "${home_dir}" ]; then
+ install -vm 750 -o syncthing -g syncthing -d "${home_dir}"
+fi
diff --git a/bin-net/syncthing-bin/init.d/syncthing
b/bin-net/syncthing-bin/init.d/syncthing
new file mode 100755
index 0000000..81f7d26
--- /dev/null
+++ b/bin-net/syncthing-bin/init.d/syncthing
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+. /etc/sysconfig/syncthing
+
+PROGRAM=/usr/bin/syncthing
+ARGS="--no-browser --no-default-folder --no-restart --logflags=0
--home=/var/lib/syncthing $SYNCTHING_ARGS"
+RUNLEVEL=3
+NEEDS="+network"
+
+start() {
+ echo "Starting $NAME..."
+
+ TIMEOUT=3
+
+ su syncthing -s /bin/sh -c "set -o pipefail; $PROGRAM $ARGS 2>&1 | logger
-ip daemon.info -t syncthing" &
+ ppid=$!
+
+ sleep $TIMEOUT && pgrep -P $ppid > /dev/null || wait $ppid
+
+ evaluate_retval
+}
+
+stop() {
+ echo "Stopping $NAME..."
+
+ killproc "syncthing serve"
+}
+
+reload() {
+ _restart
+}
+
+. /etc/init.d/smgl_init
diff --git a/bin-net/syncthing-bin/init.d/syncthing.conf
b/bin-net/syncthing-bin/init.d/syncthing.conf
new file mode 100644
index 0000000..ee08705
--- /dev/null
+++ b/bin-net/syncthing-bin/init.d/syncthing.conf
@@ -0,0 +1,3 @@
+# For the arguments and description see ``syncthing serve --help''
+
+SYNCTHING_ARGS=""
diff --git a/groups b/groups
index 7417606..ae5c9fd 100755
--- a/groups
+++ b/groups
@@ -6,3 +6,4 @@ consul:217:
consul-template:218:
vault:219:
boundary:220:
+syncthing:230:



  • [SM-Commit] GIT changes to master binary grimoire by Vlad Glagolev (4c51b610def9ed50962ddc054dfdcdc06f57f149), Vlad Glagolev, 09/05/2022

Archive powered by MHonArc 2.6.24.

Top of Page