1 |
commit: 5ff7b4dd3ec48e960617e39a20a1893690082c4a |
2 |
Author: Vladimir Pavljuchenkov (SpiderX) <spiderx <AT> spiderx <DOT> dp <DOT> ua> |
3 |
AuthorDate: Sun Oct 7 09:12:22 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 14 10:45:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ff7b4dd |
7 |
|
8 |
net-p2p/resilio-sync: version bump to 2.6.1, improve init |
9 |
|
10 |
Signed-off-by: Vladimir Pavljuchenkov <spiderx <AT> spiderx.dp.ua> |
11 |
Package-Manager: Portage-2.3.49, Repoman-2.3.11 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/10092 |
13 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
14 |
|
15 |
net-p2p/resilio-sync/Manifest | 2 + |
16 |
net-p2p/resilio-sync/files/resilio-sync-user.initd | 4 +- |
17 |
.../resilio-sync/files/resilio-sync-user.service | 2 +- |
18 |
net-p2p/resilio-sync/files/resilio-sync.confd | 4 +- |
19 |
net-p2p/resilio-sync/files/resilio-sync.initd | 7 +- |
20 |
net-p2p/resilio-sync/files/resilio-sync.service | 8 ++- |
21 |
net-p2p/resilio-sync/metadata.xml | 4 +- |
22 |
net-p2p/resilio-sync/resilio-sync-2.6.1.ebuild | 74 ++++++++++++++++++++++ |
23 |
8 files changed, 91 insertions(+), 14 deletions(-) |
24 |
|
25 |
diff --git a/net-p2p/resilio-sync/Manifest b/net-p2p/resilio-sync/Manifest |
26 |
index 5f5375975bd..91a4a133ffd 100644 |
27 |
--- a/net-p2p/resilio-sync/Manifest |
28 |
+++ b/net-p2p/resilio-sync/Manifest |
29 |
@@ -1,2 +1,4 @@ |
30 |
DIST resilio-sync_2.5.12-1_amd64.deb 10466894 BLAKE2B d9125bfe49738db3a2cab0d66cad9fed2ae712ee613ccd104bc1d8764bd072b082f71fc0102b15d52f791b592d88ffa4f03892e7e4088e3bf4a847b6c15b4296 SHA512 bafc8dbce182253d585185e5d0a27f0a8ca18f768bba65c348752cc089e0e690c8c1848a71cb1b125c67d2c265cbbf13e98d7c99289b0bb0268d43d3e38454d3 |
31 |
DIST resilio-sync_2.5.12-1_i386.deb 10334238 BLAKE2B 447baf18db1f6c47a6a2518f9ba6a27b0d9a7092cc41d63958a66be6492cab3868a0ecae9faadfa91cfc5f777e1289cb62017519a0994b93ae448042de9b32d3 SHA512 bb46498070f6aa0e3debee839f50a9292116bd5f9105fe75c65d11f9f3199e6e5b8f828b34b364e7f3cb896bf88fd37a255289c68158df7414acf809e4701b32 |
32 |
+DIST resilio-sync_2.6.1-1_amd64.deb 11576892 BLAKE2B 710bd96b91be84bc7210d8efe0d8954a33be878fc948694e7a1c62e7b53b5ac94133a16b89c4872e18798bc03f3508c7c130d4d56a3480c35d30edff5589ef3a SHA512 a37d73a621a740f57b4f2824cc2a3178f365ccc8180a0e814480dde8d1b74b9d54da4e07bd18c89cc6a93c12b526f8a43e08165d3c2f0fdc913e1f38e46eb183 |
33 |
+DIST resilio-sync_2.6.1-1_i386.deb 11465194 BLAKE2B b56e01f79c5beec6a5ebd09724bebd1ce8c6d44eac694cd7fb89dc44823ccba22531b14e241fdd985ae63e6e0f177021becb593923eac8ac0183629e533ac72d SHA512 84676c3fe5fcee484bcd58c6496aba0d2e3c86c339adb90b8b3cef28ae46d7b6f28c5fd0371a2cfe612ab8b3658eca2b9b2f6cfc9caa70aaff95946942a5c749 |
34 |
|
35 |
diff --git a/net-p2p/resilio-sync/files/resilio-sync-user.initd b/net-p2p/resilio-sync/files/resilio-sync-user.initd |
36 |
index efcaa2d7778..6772f6dc14d 100644 |
37 |
--- a/net-p2p/resilio-sync/files/resilio-sync-user.initd |
38 |
+++ b/net-p2p/resilio-sync/files/resilio-sync-user.initd |
39 |
@@ -1,5 +1,5 @@ |
40 |
#!/sbin/openrc-run |
41 |
-# Copyright 1999-2018 Gentoo Foundation |
42 |
+# Copyright 1999-2018 Gentoo Authors |
43 |
# Distributed under the terms of the GNU General Public License v2 |
44 |
|
45 |
USER="${RC_SVCNAME##*.}" |
46 |
@@ -8,7 +8,7 @@ name="Resilio Sync for $USER" |
47 |
description="Resilio Sync" |
48 |
command_user="${USER:-rslsync}:${GROUP:-rslsync}" |
49 |
pidfile="${PIDFILE:-/home/$USER/.config/resilio-sync/resilio-sync.pid}" |
50 |
-config=${CONFIG:-/home/$USER/.config/resilio-sync/config.json} |
51 |
+config="${CONFIG:-/home/$USER/.config/resilio-sync/config.json}" |
52 |
command_args="--config $config ${OPTS}" |
53 |
start_stop_daemon_args="-q" |
54 |
retry="10" |
55 |
|
56 |
diff --git a/net-p2p/resilio-sync/files/resilio-sync-user.service b/net-p2p/resilio-sync/files/resilio-sync-user.service |
57 |
index 6c82440ac67..bb57c738b6d 100644 |
58 |
--- a/net-p2p/resilio-sync/files/resilio-sync-user.service |
59 |
+++ b/net-p2p/resilio-sync/files/resilio-sync-user.service |
60 |
@@ -1,6 +1,6 @@ |
61 |
[Unit] |
62 |
Description=Resilio Sync service |
63 |
-Documentation=http://help.getsync.com/ |
64 |
+Documentation=https://help.resilio.com |
65 |
After=network.target network-online.target |
66 |
|
67 |
[Service] |
68 |
|
69 |
diff --git a/net-p2p/resilio-sync/files/resilio-sync.confd b/net-p2p/resilio-sync/files/resilio-sync.confd |
70 |
index 08c4255fe29..7d8e9ea27cf 100644 |
71 |
--- a/net-p2p/resilio-sync/files/resilio-sync.confd |
72 |
+++ b/net-p2p/resilio-sync/files/resilio-sync.confd |
73 |
@@ -5,8 +5,8 @@ |
74 |
OPTS="--log /var/log/resilio-sync/resilio-sync.log" |
75 |
|
76 |
# User and group daemon runs as |
77 |
-USER="rslsync" |
78 |
-GROUP="rslsync" |
79 |
+RSLSYNC_USER="rslsync" |
80 |
+RSLSYNC_GROUP="rslsync" |
81 |
|
82 |
# Resilio Sync config file |
83 |
#CONFIG="/etc/resilio-sync/config.json" |
84 |
|
85 |
diff --git a/net-p2p/resilio-sync/files/resilio-sync.initd b/net-p2p/resilio-sync/files/resilio-sync.initd |
86 |
index 3e64f108e18..8a7263446a5 100644 |
87 |
--- a/net-p2p/resilio-sync/files/resilio-sync.initd |
88 |
+++ b/net-p2p/resilio-sync/files/resilio-sync.initd |
89 |
@@ -1,18 +1,17 @@ |
90 |
#!/sbin/openrc-run |
91 |
-# Copyright 1999-2018 Gentoo Foundation |
92 |
+# Copyright 1999-2018 Gentoo Authors |
93 |
# Distributed under the terms of the GNU General Public License v2 |
94 |
|
95 |
command="/usr/bin/rslsync" |
96 |
name="Resilio Sync" |
97 |
description="Resilio Sync" |
98 |
-command_user="${USER:-rslsync}:${GROUP:-rslsync}" |
99 |
+command_user="${RSLSYNC_USER:-rslsync}:${RSLSYNC_GROUP:-rslsync}" |
100 |
pidfile="/run/resilio-sync/resilio-sync.pid" |
101 |
-config=${CONFIG:-/etc/resilio-sync/config.json} |
102 |
+config="${CONFIG:-/etc/resilio-sync/config.json}" |
103 |
command_args="--config $config ${OPTS}" |
104 |
start_stop_daemon_args="-q" |
105 |
retry="10" |
106 |
|
107 |
depend() { |
108 |
need net |
109 |
- provide resilio-sync |
110 |
} |
111 |
|
112 |
diff --git a/net-p2p/resilio-sync/files/resilio-sync.service b/net-p2p/resilio-sync/files/resilio-sync.service |
113 |
index 32f24a95aa8..1f1a0b95bc7 100644 |
114 |
--- a/net-p2p/resilio-sync/files/resilio-sync.service |
115 |
+++ b/net-p2p/resilio-sync/files/resilio-sync.service |
116 |
@@ -1,15 +1,17 @@ |
117 |
[Unit] |
118 |
Description=Resilio Sync service |
119 |
-Documentation=http://help.getsync.com/ |
120 |
+Documentation=https://help.resilio.com |
121 |
After=network.target network-online.target |
122 |
|
123 |
[Service] |
124 |
Type=forking |
125 |
-User=rslsync |
126 |
-Group=rslsync |
127 |
UMask=0002 |
128 |
Restart=on-failure |
129 |
PermissionsStartOnly=true |
130 |
+ |
131 |
+User=rslsync |
132 |
+Group=rslsync |
133 |
+ |
134 |
PIDFile=/var/run/resilio-sync/resilio-sync.pid |
135 |
ExecStart=/usr/bin/rslsync --config /etc/resilio-sync/config.json |
136 |
|
137 |
|
138 |
diff --git a/net-p2p/resilio-sync/metadata.xml b/net-p2p/resilio-sync/metadata.xml |
139 |
index 35827ed4235..1e9a6697329 100644 |
140 |
--- a/net-p2p/resilio-sync/metadata.xml |
141 |
+++ b/net-p2p/resilio-sync/metadata.xml |
142 |
@@ -18,7 +18,7 @@ |
143 |
<flag name="pax_kernel">Use paxctl to mark binaries</flag> |
144 |
</use> |
145 |
<upstream> |
146 |
- <doc>https://help.getsync.com/</doc> |
147 |
- <bugs-to>https://help.getsync.com/hc/en-us/requests/new?ticket_form_id=91563</bugs-to> |
148 |
+ <doc>https://help.resilio.com/</doc> |
149 |
+ <bugs-to>https://help.resilio.com/hc/en-us/requests/new?ticket_form_id=91563</bugs-to> |
150 |
</upstream> |
151 |
</pkgmetadata> |
152 |
|
153 |
diff --git a/net-p2p/resilio-sync/resilio-sync-2.6.1.ebuild b/net-p2p/resilio-sync/resilio-sync-2.6.1.ebuild |
154 |
new file mode 100644 |
155 |
index 00000000000..f4738e0d4d9 |
156 |
--- /dev/null |
157 |
+++ b/net-p2p/resilio-sync/resilio-sync-2.6.1.ebuild |
158 |
@@ -0,0 +1,74 @@ |
159 |
+# Copyright 1999-2018 Gentoo Authors |
160 |
+# Distributed under the terms of the GNU General Public License v2 |
161 |
+ |
162 |
+EAPI=6 |
163 |
+ |
164 |
+inherit pax-utils readme.gentoo-r1 systemd tmpfiles unpacker user |
165 |
+ |
166 |
+QA_PREBUILT="usr/bin/rslsync" |
167 |
+BASE_URI="http://linux-packages.resilio.com/${PN}/deb/pool/non-free/r/${PN}/${PN}_${PV}-1_@arch@.deb" |
168 |
+ |
169 |
+DESCRIPTION="Resilient, fast and scalable file synchronization tool" |
170 |
+HOMEPAGE="https://resilio.com/" |
171 |
+SRC_URI="amd64? ( ${BASE_URI/@arch@/amd64} ) |
172 |
+ x86? ( ${BASE_URI/@arch@/i386} )" |
173 |
+ |
174 |
+LICENSE="all-rights-reserved" |
175 |
+SLOT="0" |
176 |
+KEYWORDS="~amd64 ~x86" |
177 |
+IUSE="pax_kernel" |
178 |
+RESTRICT="bindist mirror" |
179 |
+ |
180 |
+S="${WORKDIR}" |
181 |
+ |
182 |
+DOC_CONTENTS="You may need to review /etc/resilio-sync/config.json\\n |
183 |
+Default metadata path is /var/lib/resilio-sync/.sync\\n |
184 |
+Default web-gui URL is http://localhost:8888/\\n\\n" |
185 |
+ |
186 |
+pkg_setup() { |
187 |
+ enewgroup rslsync |
188 |
+ enewuser rslsync -1 -1 /var/lib/resilio-sync rslsync |
189 |
+} |
190 |
+ |
191 |
+src_unpack() { |
192 |
+ unpacker_src_unpack |
193 |
+ |
194 |
+ unpack usr/share/man/man1/resilio-sync.1.gz |
195 |
+} |
196 |
+ |
197 |
+src_install() { |
198 |
+ dobin usr/bin/rslsync |
199 |
+ use pax_kernel && pax-mark m "${ED%/}"/usr/bin/rslsync |
200 |
+ |
201 |
+ doman resilio-sync.1 |
202 |
+ |
203 |
+ newinitd "${FILESDIR}"/resilio-sync.initd resilio-sync |
204 |
+ newconfd "${FILESDIR}"/resilio-sync.confd resilio-sync |
205 |
+ newinitd "${FILESDIR}"/resilio-sync-user.initd resilio-sync-user |
206 |
+ newconfd "${FILESDIR}"/resilio-sync-user.confd resilio-sync-user |
207 |
+ systemd_dounit "${FILESDIR}"/resilio-sync.service |
208 |
+ systemd_douserunit "${FILESDIR}"/resilio-sync-user.service |
209 |
+ newtmpfiles "${FILESDIR}"/resilio-sync.tmpfile resilio-sync.conf |
210 |
+ |
211 |
+ readme.gentoo_create_doc |
212 |
+ |
213 |
+ # Generate sample config, uncomment config directives and change values |
214 |
+ insopts -orslsync -grslsync -m0644 |
215 |
+ insinto /etc/resilio-sync |
216 |
+ newins - config.json < <("${ED%/}"/usr/bin/rslsync --dump-sample-config | \ |
217 |
+ sed \ |
218 |
+ -e "/storage_path/s|//| |g" \ |
219 |
+ -e "/pid_file/s|//| |g" \ |
220 |
+ -e "/storage_path/s|/home/user/.sync|/var/lib/resilio-sync/.sync|g" \ |
221 |
+ -e "/pid_file/s|resilio/resilio|resilio-sync/resilio-sync|g" \ |
222 |
+ || die "sed failed for config.json" ) |
223 |
+ |
224 |
+ diropts -orslsync -grslsync -m0700 |
225 |
+ keepdir /etc/resilio-sync /var/lib/resilio-sync/ \ |
226 |
+ /var/lib/resilio-sync/.sync /var/log/resilio-sync |
227 |
+} |
228 |
+ |
229 |
+pkg_postinst() { |
230 |
+ tmpfiles_process resilio-sync.conf |
231 |
+ readme.gentoo_print_elog |
232 |
+} |