[arch-commits] Commit in syncthing/trunk (PKGBUILD syncthing-relaysrv.service)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Tue Jul 19 20:57:57 UTC 2016


    Date: Tuesday, July 19, 2016 @ 20:57:56
  Author: bpiotrowski
Revision: 183319

upgpkg: syncthing 0.14.0-1

new upstream release

Added:
  syncthing/trunk/syncthing-relaysrv.service
Modified:
  syncthing/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   17 +++++++----------
 syncthing-relaysrv.service |   17 +++++++++++++++++
 2 files changed, 24 insertions(+), 10 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-07-19 20:46:07 UTC (rev 183318)
+++ PKGBUILD	2016-07-19 20:57:56 UTC (rev 183319)
@@ -16,19 +16,16 @@
 options=('!strip')
 source=(https://github.com/syncthing/syncthing/releases/download/v$pkgver/syncthing-source-v${pkgver}.tar.gz{,.asc}
         syncthing-relaysrv.sysusers
-        syncthing-relaysrv.tmpfiles)
+        syncthing-relaysrv.tmpfiles
+        syncthing-relaysrv.service)
 validpgpkeys=('37C84554E7E0A261E4F76E1ED26E6ED000654A3E') # Syncthing Release Management
 sha256sums=('ee112dfcea1263515364557c3432c50bb526fa4a3aa0a822d1d1a1671c9ad699'
             'SKIP'
             '6ab96a5949e223d315d49663734ad27b70c72469c691a61ac198cb7794cb5eaa'
-            'f899998985f2d374af57f17ef6362c37a305467858195b74d1c1def71d97273f')
+            'f899998985f2d374af57f17ef6362c37a305467858195b74d1c1def71d97273f'
+            '7c2fbc9608d81f8080f8a9102b867a52a050b61f426a0c182ccc1cb5815e4981')
 
 prepare() {
-  cd "${srcdir}/${pkgbase}/cmd/relaysrv"
-  sed -i -e 's|/usr/bin/relaysrv|/usr/bin/syncthing-relaysrv|' \
-    etc/linux-systemd/syncthing-relaysrv.service
-
-  cd "${srcdir}"
   install -d "src/github.com/syncthing"
   mv "${pkgbase}" "src/github.com/syncthing/${pkgbase}"
 }
@@ -37,7 +34,7 @@
   export GOPATH="${srcdir}" GOROOT_FINAL="/usr/bin"
   cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
   go run build.go -no-upgrade -version v${pkgver} build
-  go run build.go -no-upgrade -version v${pkgver} build relaysrv
+  go run build.go -no-upgrade -version v${pkgver} build strelaysrv
 }
 
 check() {
@@ -83,9 +80,9 @@
   install=${pkgname}.install
 
   cd "${srcdir}/src/github.com/syncthing/${pkgbase}"
-  install -Dm755 relaysrv "${pkgdir}"/usr/bin/${pkgname}
+  install -Dm755 strelaysrv "${pkgdir}"/usr/bin/${pkgname}
 
-  install -Dm644 cmd/relaysrv/etc/linux-systemd/${pkgname}.service \
+  install -Dm644 "${srcdir}"/${pkgname}.service \
     "${pkgdir}"/usr/lib/systemd/system/${pkgname}.service
   install -Dm644 "${srcdir}/${pkgname}.tmpfiles" \
     "$pkgdir/usr/lib/tmpfiles.d/${pkgname}.conf"

Added: syncthing-relaysrv.service
===================================================================
--- syncthing-relaysrv.service	                        (rev 0)
+++ syncthing-relaysrv.service	2016-07-19 20:57:56 UTC (rev 183319)
@@ -0,0 +1,17 @@
+[Unit]
+Description=Syncthing relay server
+After=network.target
+
+[Service]
+User=syncthing-relaysrv
+Group=syncthing-relaysrv
+ExecStart=/usr/bin/syncthing-relaysrv
+WorkingDirectory=/var/lib/syncthing-relaysrv
+
+PrivateTmp=true
+ProtectSystem=full
+ProtectHome=true
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target



More information about the arch-commits mailing list