[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2024-03-23 Thread Marek Szuba
commit: cdd08394168c0219a13d51cf2f12b991c07509bc
Author: Marek Szuba  gentoo  org>
AuthorDate: Sat Mar 23 17:10:42 2024 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Sat Mar 23 17:12:26 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdd08394

net-p2p/syncthing: add 1.27.4

Closes: https://bugs.gentoo.org/927343
Signed-off-by: Marek Szuba  gentoo.org>

 net-p2p/syncthing/Manifest |   1 +
 .../files/syncthing-1.27.4-tests_race.patch|  24 +
 net-p2p/syncthing/syncthing-1.27.4.ebuild  | 113 +
 3 files changed, 138 insertions(+)

diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index 6eccaa287843..be04ced4cd13 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -1 +1,2 @@
 DIST syncthing-1.27.2.tar.gz 14967954 BLAKE2B 
8f033e18679f7accc3d461566da88fa45b2e1c8dc1b1b5ace2732e3987d82e8d458c42dc3571f7d1199cf35667be72fcf81b65efa9cd2dac65297bc86b03e284
 SHA512 
6b6bd57268b32b5db2377cf813229de978e26de606ac3bf2b515ddb35fd8131fafdb88abbfac1cb7d0f443224538cca7a6eba64f4bd737135f5a1c98e76439f9
+DIST syncthing-1.27.4.tar.gz 15085218 BLAKE2B 
25a87551f9c1af2b30076fb439a93a26335c63290f1192d2bc040d526fc9b3c2948103db84dd5fcb16d67810b228e23aa3f1e6f9e9a79dbdb75b983ff4376064
 SHA512 
fc28ca066adeccd10281a6ccd50c336942bfbbdaedd954028cc2ee40c09ad85ef0a7fcfe733d3045d6979dd22cddd2fa5979d605440ebe3d2fd90c7f911c3c73

diff --git a/net-p2p/syncthing/files/syncthing-1.27.4-tests_race.patch 
b/net-p2p/syncthing/files/syncthing-1.27.4-tests_race.patch
new file mode 100644
index ..1c83a03ec00f
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-1.27.4-tests_race.patch
@@ -0,0 +1,24 @@
+--- a/build.go
 b/build.go
+@@ -34,7 +34,6 @@
+   "time"
+ 
+   _ "github.com/syncthing/syncthing/lib/automaxprocs"
+-  buildpkg "github.com/syncthing/syncthing/lib/build"
+ )
+ 
+ var (
+@@ -416,13 +415,6 @@
+   }
+   args = append(args, "-timeout", timeout)
+ 
+-  if runtime.GOARCH == "amd64" {
+-  switch runtime.GOOS {
+-  case buildpkg.Darwin, buildpkg.Linux, buildpkg.FreeBSD: // , 
"windows": # See https://github.com/golang/go/issues/27089
+-  args = append(args, "-race")
+-  }
+-  }
+-
+   if coverage {
+   args = append(args, "-covermode", "atomic", "-coverprofile", 
"coverage.txt", "-coverpkg", strings.Join(pkgs, ","))
+   }

diff --git a/net-p2p/syncthing/syncthing-1.27.4.ebuild 
b/net-p2p/syncthing/syncthing-1.27.4.ebuild
new file mode 100644
index ..b3b0c4165490
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-1.27.4.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop go-module systemd xdg-utils
+
+DESCRIPTION="Open Source Continuous File Synchronization"
+HOMEPAGE="https://syncthing.net;
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${PN}-source-v${PV}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0 Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~x86"
+IUSE="selinux tools"
+
+RDEPEND="acct-group/syncthing
+   acct-user/syncthing
+   tools? ( >=acct-user/stdiscosrv-1
+   >=acct-user/strelaysrv-1 )
+   selinux? ( sec-policy/selinux-syncthing )"
+BDEPEND=">=dev-lang/go-1.20.0"
+
+DOCS=( README.md AUTHORS CONTRIBUTING.md )
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.3.4-TestIssue5063_timeout.patch
+   "${FILESDIR}"/${PN}-1.18.4-tool_users.patch
+   "${FILESDIR}"/${PN}-1.27.4-tests_race.patch
+)
+
+S="${WORKDIR}"/${PN}
+
+src_prepare() {
+   # Bug #679280
+   xdg_environment_reset
+
+   default
+   sed -i \
+   's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/stdiscosrv|' \
+   cmd/stdiscosrv/etc/linux-systemd/stdiscosrv.service \
+   || die
+   sed -i \
+   's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \
+   cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \
+   || die
+}
+
+src_compile() {
+   GOARCH= go run build.go -version "v${PV}" -no-upgrade -build-out=bin/ \
+   ${GOARCH:+-goarch="${GOARCH}"} \
+   build $(usex tools "all" "") || die "build failed"
+}
+
+src_test() {
+   go run build.go test || die "test failed"
+}
+
+src_install() {
+   local icon_size
+
+   doman man/*.[157]
+   einstalldocs
+
+   dobin bin/syncthing
+
+   domenu etc/linux-desktop/*.desktop
+   for icon_size in 32 64 128 256 512; do
+   newicon -s ${icon_size} assets/logo-${icon_size}.png ${PN}.png
+   done
+   newicon -s scalable assets/logo-only.svg ${PN}.svg
+
+   if use tools; then
+   exeinto /usr/libexec/syncthing
+   local exe
+   for exe in bin/* ; do
+ 

[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2023-03-08 Thread Marek Szuba
commit: 258b078422e2aad516119787da45a8c2d8c0aa78
Author: Marek Szuba  gentoo  org>
AuthorDate: Wed Mar  8 11:32:23 2023 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Wed Mar  8 13:22:31 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=258b0784

net-p2p/syncthing: add 1.23.2, drop 1.23.0

Signed-off-by: Marek Szuba  gentoo.org>

 net-p2p/syncthing/Manifest |  4 ++--
 .../files/syncthing-1.23.2-tests_race.patch| 25 ++
 ...thing-1.23.0.ebuild => syncthing-1.23.2.ebuild} |  2 +-
 3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index 7da9131d05eb..e57788d6ba60 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -2,5 +2,5 @@ DIST syncthing-1.21.0-deps.tar.xz 96707392 BLAKE2B 
3cbf6d98758a453f16717ec974cb1
 DIST syncthing-1.21.0.tar.gz 6319691 BLAKE2B 
390a06ff41ed1b023941d958d8112f9c503c296cc47a5bb6d6baa55d81f6cbd431c725cc6493b041a96734e56c9a267c6a3b4c564b67ab320cd7f9d46e173320
 SHA512 
ad613da2c3aaa4792703e69dde0ab3ace3a92f20b968a2d7c02d6ec3b6ce2d53a6c3d6b64c41c58ca8296bf722e689cd8ca34c05fd0dd32d8005d31b5f860d58
 DIST syncthing-1.22.2-deps.tar.xz 101162440 BLAKE2B 
74e846b191ca7aefdaca4784d2c4c3ed3d412695820dff2280c13c8c2c498a746b54210ca3bbc310fbd8693c8dedbab5bf51078ff01e345bd0ced54559b76106
 SHA512 
b9e23e1d50bc27ffab1e66f08a67b910fa3c869e514f68c17cae73d717f4a0452b93ad7d0a6ec475f4e1055a6d4d85bcd8e7f85692a6088baa96e2af710739c0
 DIST syncthing-1.22.2.tar.gz 6339424 BLAKE2B 
69a6350a5166af8cd670090b440fb9b932a6d1169fc649588277d90aff305604302bc368b61f542252b06b5212c1c094f720e39c1be6f8375fc7e8f8d2f7bdef
 SHA512 
5b724beb139ec2701222cf77c540cb3f4525db3b1102ccc9ac55829dda668e7fe4b962c7263fbe6bc4efa813d0e783486a7b329f903ded1cef47be585c1e8787
-DIST syncthing-1.23.0-deps.tar.xz 101340488 BLAKE2B 
00dc20c5b2aee91bb84a9014ac7ff38828aa8faa396a3567dbb3469409f22566a36bf50a6dc20ddd38803e3f0a1d7229a1e685328cc4a6e4285a808f29f14eb8
 SHA512 
2fcdc7dd29c75d2f1ee0e385f2d1728021acd32e06f7e48013ba54615b4793ae033e1f05e607925618b095388bb48b78f14561e5866a285a9e7e7659c26caff1
-DIST syncthing-1.23.0.tar.gz 6342650 BLAKE2B 
165b7bceb88a5ba8443b1393c50b28c6c4dbc7cdd74383ff7718d5594050703e2f6bd66c41c00cd7bf35fe54ff85c9837fb9f59c578eb71acb588b078faa074d
 SHA512 
b0122923ad3ed4cc50aafe89bb94e13b44998483db0b1df795e05ff17bcbc029a17ed3af187b615154cf88d4c964cb5bdb84e25b6f5548ccf29545b6d2a1cd4f
+DIST syncthing-1.23.2-deps.tar.xz 101786324 BLAKE2B 
5ab47ce288ece8ef53a14f3769650ba945c4b0cb8c314964694690c4d6b34c4161ccd256deae1a29bd97f0441610810dbb9af6dd9b90786c709a03adb1a6f511
 SHA512 
94fb5031ce471af2ed462d83bdfff8c290df8e83917e09c5571ef1e585fe3a9c4d4b4119b529b5af974be58b7e92c1e07c17fe9810d0d9c011323f344f37f83e
+DIST syncthing-1.23.2.tar.gz 6529048 BLAKE2B 
cda30a17000c5cf59b90d68148c0b375c36145e3d497409c49060cddcee794951bd72e8d0f97be7b66cb5c595c2d7232b64b06df2d9a37a48e02d614367cf8c0
 SHA512 
3f182aad9714d299205a0379d32121adb018d5d7fb31f199a108f1a6b7822452e1b10a27c05516d232004469a1f20f086465fbbc163f10ed9375273a8b90ff9d

diff --git a/net-p2p/syncthing/files/syncthing-1.23.2-tests_race.patch 
b/net-p2p/syncthing/files/syncthing-1.23.2-tests_race.patch
new file mode 100644
index ..8d9e6819d101
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-1.23.2-tests_race.patch
@@ -0,0 +1,25 @@
+--- a/build.go
 b/build.go
+@@ -32,8 +32,6 @@
+   "strings"
+   "text/template"
+   "time"
+-
+-  buildpkg "github.com/syncthing/syncthing/lib/build"
+ )
+ 
+ var (
+@@ -409,13 +409,6 @@
+   }
+   args = append(args, "-timeout", timeout)
+ 
+-  if runtime.GOARCH == "amd64" {
+-  switch runtime.GOOS {
+-  case buildpkg.Darwin, buildpkg.Linux, buildpkg.FreeBSD: // , 
"windows": # See https://github.com/golang/go/issues/27089
+-  args = append(args, "-race")
+-  }
+-  }
+-
+   if coverage {
+   args = append(args, "-covermode", "atomic", "-coverprofile", 
"coverage.txt", "-coverpkg", strings.Join(pkgs, ","))
+   }

diff --git a/net-p2p/syncthing/syncthing-1.23.0.ebuild 
b/net-p2p/syncthing/syncthing-1.23.2.ebuild
similarity index 98%
rename from net-p2p/syncthing/syncthing-1.23.0.ebuild
rename to net-p2p/syncthing/syncthing-1.23.2.ebuild
index 9284130b9c50..b0131fe7f83f 100644
--- a/net-p2p/syncthing/syncthing-1.23.0.ebuild
+++ b/net-p2p/syncthing/syncthing-1.23.2.ebuild
@@ -20,13 +20,13 @@ RDEPEND="acct-group/syncthing
tools? ( >=acct-user/stdiscosrv-1
>=acct-user/strelaysrv-1 )
selinux? ( sec-policy/selinux-syncthing )"
-BDEPEND="

[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2022-01-18 Thread Marek Szuba
commit: e921bbd70d0b628442f5ae1dc2d2abe0440b8cd2
Author: Marek Szuba  gentoo  org>
AuthorDate: Tue Jan 18 15:52:56 2022 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Tue Jan 18 16:40:32 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e921bbd7

net-p2p/syncthing: drop 1.18.4

Signed-off-by: Marek Szuba  gentoo.org>

 net-p2p/syncthing/Manifest |   1 -
 net-p2p/syncthing/files/stdiscosrv.initd   |  30 -
 net-p2p/syncthing/files/stdiscosrv.service |  17 -
 net-p2p/syncthing/files/strelaysrv.initd   |  30 -
 net-p2p/syncthing/files/syncthing.initd|  34 --
 net-p2p/syncthing/syncthing-1.18.4.ebuild  | 883 -
 6 files changed, 995 deletions(-)

diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest
index 834d4526781d..2b4de885a223 100644
--- a/net-p2p/syncthing/Manifest
+++ b/net-p2p/syncthing/Manifest
@@ -776,6 +776,5 @@ DIST rsc.io%2Fquote%2Fv3%2F@v%2Fv3.1.0.mod 55 BLAKE2B 
f1f0ba35f0ffd200ed37c06b20
 DIST rsc.io%2Fsampler%2F@v%2Fv1.3.0.mod 88 BLAKE2B 
c2ac3c9619e396db470c9951dfc11cdacccd56ae09b3b353015ee7e5fbb023df288dbf48d81b44c309241d1ea89a2e0ee42ee1d17e536fcfa531aaee0e651ab7
 SHA512 
2137507eb25fbae419605e0cd6bca4cfa584110eebc276cd759a4dcb6f97e52928e5b2d9b276e76bcabcec3bbfc2c42f97fa29f54695d27fb00f9423e1638863
 DIST sourcegraph.com%2Fsourcegraph%2Fgo-diff%2F@v%2Fv0.5.0.mod 288 BLAKE2B 
e8f361d08bba5f5689a0e8b51dc17f11fe893c1fb3c0b671d323c6f66448d0c73d26b64586ce2236cc91f44839eba5ebf2a858b04aa85b5bde847c5956b0a519
 SHA512 
ef74b50cb01b861dc25c1a1ee276cebb64a383a31f4acf3f78db0e1b5fa907c6ecb9a88e4819d4aa7d5fccced97b574c12e147c36677a8d4e5f73b55d04c
 DIST 
sourcegraph.com%2Fsqs%2Fpbtypes%2F@v%2Fv0.0.0-20180604144634-d3ebe8f20ae4.mod 
35 BLAKE2B 
ff9ae0413ef6833c8d2f6ea3938e675256d2c44e38b31cee5223b7a1bcd3ef38515337ef388a155b171bc18d2f5153bef2ad0b0cf06b7c3d01145e5a13338aa7
 SHA512 
4316ef9aa90178d1f45938d1c81e6e0ab0618eeae3337bdf1bb2509d05c7b0e22e42fc2f86cc5d2a6fb1fdefc50ac68acc030e1d2cce8277314bbc2cc101c262
-DIST syncthing-1.18.4.tar.gz 6168557 BLAKE2B 
b1abb649f406ca010b956c0dfd8920b6d7d6297433a93a2d27d09f2fbcd0220a32f8237fde1d301199749af162f6f29dfb3caa177839841f155c79acec9b4799
 SHA512 
176ff8f40c0d6644b8f81583e09e9f8a411548772ffdbbd70fcca20371511a8faa4311d23c7bd3815f0205c00b9b7284846fce3183ffbca6bb9460e6aef7f0d8
 DIST syncthing-1.18.5.tar.gz 6168905 BLAKE2B 
4555351e6bad90cf3fde76971bc500f47f628ed1690f843d7404f47a20bcd4570c8aa7791ebe26c1abfe21550b18e1dc3a6354b98223589e27f8424ab5784bd4
 SHA512 
10968cdbc7357909bc34e2d82691c2a905c66ef5874eeb93e3b9c9a454df0122551feaf454b916e1ca3363a87f0699628a08f44ab1edecd8fb7d1fa78ef87af5
 DIST syncthing-1.18.6.tar.gz 6168847 BLAKE2B 
1f5c962bf78c0628eee07bdd2655810deedb7ba75148cffc4d612ed6032b5d6719af9fc09b8980e3326198967681b8741abde131f277b0098b48c0768288e565
 SHA512 
81bdb08b2297a53e155b39258fb07ac85f528ab67d8a456399684d396e86f2bdf9a26a531448e1227aa1aefbeefa76906a8d841b71617a4aaf2b70b3db63160a

diff --git a/net-p2p/syncthing/files/stdiscosrv.initd 
b/net-p2p/syncthing/files/stdiscosrv.initd
deleted file mode 100644
index 333b980897b3..
--- a/net-p2p/syncthing/files/stdiscosrv.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-SD_USER=stdiscosrv
-SD_GROUP=stdiscosrv
-SD_HOMEDIR=/var/lib/stdiscosrv
-SD_LOGFILE=/var/log/syncthing/stdiscosrv.log
-
-
-description="Discovery service for syncthing"
-command="/usr/libexec/syncthing/stdiscosrv"
-command_args="${SD_OPTS}"
-pidfile="/run/stdiscosrv.pid"
-start_stop_daemon_args="--background
-  --user ${SD_USER}
-  --group ${SD_GROUP}
-  --chdir \"${SD_HOMEDIR}\"
-  --make-pidfile
-  --stdout \"${SD_LOGFILE}\"
-  --stderr \"${SD_LOGFILE}\"
-  "
-
-depend() {
-  need net
-}
-
-start_pre() {
-  checkpath -q -d -o ${SD_USER}:${SD_GROUP} ${SD_HOMEDIR}
-  checkpath -q -f -o ${SD_USER}:${SD_GROUP} ${SD_LOGFILE}
-}

diff --git a/net-p2p/syncthing/files/stdiscosrv.service 
b/net-p2p/syncthing/files/stdiscosrv.service
deleted file mode 100644
index 4011c7d4c5bd..
--- a/net-p2p/syncthing/files/stdiscosrv.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Syncthing discovery server
-After=network.target
-
-[Service]
-User=stdiscosrv
-Group=stdiscosrv
-ExecStart=/usr/libexec/syncthing/stdiscosrv
-WorkingDirectory=/var/lib/stdiscosrv
-
-PrivateTmp=true
-ProtectSystem=full
-ProtectHome=true
-NoNewPrivileges=true
-
-[Install]
-WantedBy=multi-user.target

diff --git a/net-p2p/syncthing/files/strelaysrv.initd 
b/net-p2p/syncthing/files/strelaysrv.initd
deleted file mode 100644
index 7eb77be26fda..
--- a/net-p2p/syncthing/files/strelaysrv.initd
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-SR_USER=strelaysrv
-SR_GROUP=strelaysrv
-SR_HOMEDIR=/var/lib/strelaysrv

[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2022-01-18 Thread Marek Szuba
commit: 4c317ff343d33abac8337fc9e4175a5034264860
Author: Alexandra Parker  gmail  com>
AuthorDate: Thu Jan 13 18:48:39 2022 +
Commit: Marek Szuba  gentoo  org>
CommitDate: Tue Jan 18 16:40:37 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c317ff3

net-p2p/syncthing: support cross compilation (take 2)

now with support for USE=tools

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Alexandra Parker  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23778
Signed-off-by: Marek Szuba  gentoo.org>

 .../files/syncthing-1.18.6-build-out.patch | 30 ++
 net-p2p/syncthing/syncthing-1.18.6.ebuild  |  6 +++--
 2 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/net-p2p/syncthing/files/syncthing-1.18.6-build-out.patch 
b/net-p2p/syncthing/files/syncthing-1.18.6-build-out.patch
new file mode 100644
index ..20dc63dca2f5
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-1.18.6-build-out.patch
@@ -0,0 +1,30 @@
+diff --git a/build.go b/build.go
+index c2e1059398..7888c834d2 100644
+--- a/build.go
 b/build.go
+@@ -47,6 +47,7 @@ var (
+   cc string
+   runstring
+   benchRun   string
++  buildOut   string
+   debugBinarybool
+   coverage   bool
+   long   bool
+@@ -374,6 +375,7 @@ func parseFlags() {
+   flag.StringVar(, "run", "", "Specify which tests to run")
+   flag.StringVar(, "bench", "", "Specify which benchmarks to 
run")
+   flag.BoolVar(, "with-next-gen-gui", withNextGenGUI, 
"Also build 'newgui'")
++  flag.StringVar(, "build-out", "", "Set the '-o' value for 'go 
build'")
+   flag.Parse()
+ }
+ 
+@@ -506,6 +508,9 @@ func build(target target, tags []string) {
+   }
+ 
+   args := []string{"build", "-v"}
++  if buildOut != "" {
++  args = append(args, "-o", buildOut)
++  }
+   args = appendParameters(args, tags, target.buildPkgs...)
+   runPrint(goCmd, args...)
+ }

diff --git a/net-p2p/syncthing/syncthing-1.18.6.ebuild 
b/net-p2p/syncthing/syncthing-1.18.6.ebuild
index 60872181cf9e..e7512849c254 100644
--- a/net-p2p/syncthing/syncthing-1.18.6.ebuild
+++ b/net-p2p/syncthing/syncthing-1.18.6.ebuild
@@ -807,6 +807,7 @@ DOCS=( README.md AUTHORS CONTRIBUTING.md )
 PATCHES=(
"${FILESDIR}"/${PN}-1.3.4-TestIssue5063_timeout.patch
"${FILESDIR}"/${PN}-1.18.4-tool_users.patch
+   "${FILESDIR}"/${PN}-1.18.6-build-out.patch
 )
 
 src_prepare() {
@@ -828,8 +829,9 @@ src_prepare() {
 }
 
 src_compile() {
-   go run build.go -version "v${PV}" -no-upgrade install \
-   $(usex tools "all" "") || die "build failed"
+   GOARCH= go run build.go -version "v${PV}" -no-upgrade -build-out=bin/ \
+   ${GOARCH:+-goarch="${GOARCH}"} \
+   build $(usex tools "all" "") || die "build failed"
 }
 
 src_test() {



[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2016-06-24 Thread Dirkjan Ochtman
commit: 7deebb7157b1b7713488676ad049926f6aaf7217
Author: Dirkjan Ochtman  gentoo  org>
AuthorDate: Fri Jun 24 20:04:51 2016 +
Commit: Dirkjan Ochtman  gentoo  org>
CommitDate: Fri Jun 24 20:04:51 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7deebb71

net-p2p/syncthing: add tools flag

Thanks to Alexey Korepanov for implementing this.

Package-Manager: portage-2.2.28

 net-p2p/syncthing/files/relaysrv.systemd.patch |  13 +++
 net-p2p/syncthing/files/syncthing-relaysrv.confd   |   3 +
 net-p2p/syncthing/files/syncthing-relaysrv.initd   |  30 ++
 .../syncthing/files/syncthing-relaysrv.logrotate   |   6 ++
 net-p2p/syncthing/files/syncthing.logrotate|   5 +-
 net-p2p/syncthing/metadata.xml |   5 +
 net-p2p/syncthing/syncthing-0.13.7-r1.ebuild   | 108 +
 7 files changed, 166 insertions(+), 4 deletions(-)

diff --git a/net-p2p/syncthing/files/relaysrv.systemd.patch 
b/net-p2p/syncthing/files/relaysrv.systemd.patch
new file mode 100644
index 000..2cff1dc
--- /dev/null
+++ b/net-p2p/syncthing/files/relaysrv.systemd.patch
@@ -0,0 +1,13 @@
+diff --git 
src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service
 
src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service
+index b9d3173..7f8e2c0 100644
+--- 
src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service
 
src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service
+@@ -5,7 +5,7 @@ After=network.target
+ [Service]
+ User=syncthing-relaysrv
+ Group=syncthing-relaysrv
+-ExecStart=/usr/bin/relaysrv
++ExecStart=/usr/libexec/syncthing/relaysrv
+ WorkingDirectory=/var/lib/syncthing-relaysrv
+ 
+ PrivateTmp=true

diff --git a/net-p2p/syncthing/files/syncthing-relaysrv.confd 
b/net-p2p/syncthing/files/syncthing-relaysrv.confd
new file mode 100644
index 000..2effc39
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-relaysrv.confd
@@ -0,0 +1,3 @@
+# Options to pass to relaysrv
+# see relaysrv --help for more information
+SR_OPTS=

diff --git a/net-p2p/syncthing/files/syncthing-relaysrv.initd 
b/net-p2p/syncthing/files/syncthing-relaysrv.initd
new file mode 100644
index 000..860c5f3
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-relaysrv.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+SR_USER=syncthing-relaysrv
+SR_GROUP=syncthing-relaysrv
+SR_HOMEDIR=/var/lib/syncthing-relaysrv
+SR_LOGFILE=/var/log/syncthing/relaysrv.log
+
+
+description="Relay service for syncthing"
+command="/usr/libexec/syncthing/relaysrv"
+command_args="${SR_OPTS}"
+pidfile="/run/relaysrv.pid"
+start_stop_daemon_args="--background
+  --user ${SR_USER}
+  --group ${SR_GROUP}
+  --chdir \"${SR_HOMEDIR}\"
+  --make-pidfile
+  --stdout \"${SR_LOGFILE}\"
+  --stderr \"${SR_LOGFILE}\" 
+  "
+
+depend() {
+  need net
+}
+
+start_pre() {
+  checkpath -q -d -o ${SR_USER}:${SR_GROUP} ${SR_HOMEDIR}
+  checkpath -q -f -o ${SR_USER}:${SR_GROUP} ${SR_LOGFILE}
+}

diff --git a/net-p2p/syncthing/files/syncthing-relaysrv.logrotate 
b/net-p2p/syncthing/files/syncthing-relaysrv.logrotate
new file mode 100644
index 000..f168cbf
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing-relaysrv.logrotate
@@ -0,0 +1,6 @@
+/var/log/syncthing/relaysrv.log {
+missingok
+notifempty
+sharedscripts
+copytruncate
+}

diff --git a/net-p2p/syncthing/files/syncthing.logrotate 
b/net-p2p/syncthing/files/syncthing.logrotate
index 37c4320..11310e3 100644
--- a/net-p2p/syncthing/files/syncthing.logrotate
+++ b/net-p2p/syncthing/files/syncthing.logrotate
@@ -2,8 +2,5 @@
 missingok
 notifempty
 sharedscripts
-postrotate
-kill -0 $( /dev/null 2>&1 || true
-endscript
+copytruncate
 }

diff --git a/net-p2p/syncthing/metadata.xml b/net-p2p/syncthing/metadata.xml
index 78bfd30..df7f002 100644
--- a/net-p2p/syncthing/metadata.xml
+++ b/net-p2p/syncthing/metadata.xml
@@ -18,6 +18,11 @@
  Syncthing replaces proprietary sync and cloud services with something 
open, trustworthy and decentralized.
  Your data is your data alone and you deserve to choose where it is 
stored, if it is shared with some third party and how it's transmitted over the 
Internet.
   
+  
+   
+ Install discosrv, relaysrv and other tools to /usr/libexec/synsthing/.
+   
+  
   
 syncthing/syncthing
 https://github.com/syncthing/syncthing/issues

diff --git a/net-p2p/syncthing/syncthing-0.13.7-r1.ebuild 
b/net-p2p/syncthing/syncthing-0.13.7-r1.ebuild
new file mode 100644
index 000..fdc4011
--- /dev/null
+++ b/net-p2p/syncthing/syncthing-0.13.7-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+

[gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/files/, net-p2p/syncthing/

2016-02-17 Thread Dirkjan Ochtman
commit: c7c80deec9e3adf001a7a47dafada47afef3ff04
Author: Louis Sautier  gmail  com>
AuthorDate: Wed Feb 17 14:01:29 2016 +
Commit: Dirkjan Ochtman  gentoo  org>
CommitDate: Wed Feb 17 20:33:20 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7c80dee

net-p2p/syncthing: add init script, man, logrotate

Package-Manager: portage-2.2.27

 net-p2p/syncthing/files/syncthing.confd | 24 
 net-p2p/syncthing/files/syncthing.initd | 34 +
 net-p2p/syncthing/files/syncthing.logrotate |  9 
 net-p2p/syncthing/syncthing-0.12.19.ebuild  | 16 --
 4 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/net-p2p/syncthing/files/syncthing.confd 
b/net-p2p/syncthing/files/syncthing.confd
new file mode 100644
index 000..da3ac4d
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.confd
@@ -0,0 +1,24 @@
+# /etc/conf.d/syncthing: config file for /etc/init.d/syncthing
+
+# User and group as which to run
+#SYNCTHING_USER="syncthing"
+#SYNCTHING_GROUP="syncthing"
+
+# Configuration directory
+#SYNCTHING_HOMEDIR="/var/lib/syncthing"
+
+# Log file location
+#SYNCTHING_LOGFILE="/var/log/syncthing/syncthing.log"
+
+# umask used to create files
+# The default allows group access
+#SYNCTHING_UMASK=007
+
+# I/O nice level of syncthing
+#SYNCTHING_IONICE="0"
+
+# Nice level of syncthing
+#SYNCTHING_NICE="0"
+
+# Extra options for syncthing
+#SYNCTHING_OPTS=""

diff --git a/net-p2p/syncthing/files/syncthing.initd 
b/net-p2p/syncthing/files/syncthing.initd
new file mode 100755
index 000..2acaf34
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2016 Gentoo Foundation
+# 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}
+SYNCTHING_LOGFILE=${SYNCTHING_LOGFILE:-/var/log/syncthing/syncthing.log}
+SYNCTHING_UMASK=${SYNCTHING_UMASK:-007}
+SYNCTHING_IONICE=${SYNCTHING_IONICE:-0}
+SYNCTHING_NICE=${SYNCTHING_NICE:-0}
+
+description="Syncthing is an open, trustworthy and decentralized cloud storage 
system"
+command="/usr/bin/syncthing"
+command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"
+pidfile="/run/syncthing.pid"
+start_stop_daemon_args="--background \
+  --user ${SYNCTHING_USER} \
+  --group ${SYNCTHING_GROUP} \
+  --umask ${SYNCTHING_UMASK} \
+  --make-pidfile \
+  --ionice ${SYNCTHING_IONICE} \
+  --nicelevel ${SYNCTHING_NICE} \
+  --stdout ${SYNCTHING_LOGFILE} \
+  --stderr ${SYNCTHING_LOGFILE}"
+
+depend() {
+  need localmount 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/files/syncthing.logrotate 
b/net-p2p/syncthing/files/syncthing.logrotate
new file mode 100644
index 000..37c4320
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.logrotate
@@ -0,0 +1,9 @@
+/var/log/syncthing/syncthing.log {
+missingok
+notifempty
+sharedscripts
+postrotate
+kill -0 $( /dev/null 2>&1 || true
+endscript
+}

diff --git a/net-p2p/syncthing/syncthing-0.12.19.ebuild 
b/net-p2p/syncthing/syncthing-0.12.19.ebuild
index 0766431..5f22a11 100644
--- a/net-p2p/syncthing/syncthing-0.12.19.ebuild
+++ b/net-p2p/syncthing/syncthing-0.12.19.ebuild
@@ -7,7 +7,7 @@ EAPI=5
 EGO_PN="github.com/syncthing/syncthing"
 EGIT_COMMIT=v${PV}
 
-inherit golang-vcs-snapshot systemd
+inherit golang-vcs-snapshot systemd user
 
 DESCRIPTION="Syncthing is an open, trustworthy and decentralized cloud storage 
system"
 HOMEPAGE="http://syncthing.net;
@@ -21,6 +21,11 @@ IUSE=""
 DEPEND=""
 RDEPEND=""
 
+pkg_setup() {
+   enewgroup ${PN}
+   enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+}
+
 src_compile() {
export GOPATH="${S}:$(get_golibdir_gopath)"
cd src/${EGO_PN}
@@ -34,8 +39,15 @@ src_test() {
 
 src_install() {
cd src/${EGO_PN}
+   doman man/*.[157] || die
dobin bin/*
-   dodoc README.md AUTHORS  CONTRIBUTING.md
+   dodoc README.md AUTHORS CONTRIBUTING.md
systemd_dounit 
"${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service
systemd_douserunit 
"${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service
+   newconfd "${FILESDIR}/${PN}.confd" ${PN}
+   newinitd "${FILESDIR}/${PN}.initd" ${PN}
+   keepdir /var/{lib,log}/${PN}
+   fowners ${PN}:${PN} /var/{lib,log}/${PN}
+   insinto /etc/logrotate.d
+   newins "${FILESDIR}/${PN}.logrotate" ${PN}
 }