1 |
commit: 13313ab032baba1aeaf30022adfc105b76333b74 |
2 |
Author: Louis Sautier <sautier.louis <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Dec 2 00:04:30 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 4 00:50:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13313ab0 |
7 |
|
8 |
net-p2p/syncthing: version bump to 0.14.13. |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/2979 |
12 |
|
13 |
net-p2p/syncthing/Manifest | 1 + |
14 |
net-p2p/syncthing/syncthing-0.14.13.ebuild | 122 +++++++++++++++++++++++++++++ |
15 |
2 files changed, 123 insertions(+) |
16 |
|
17 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
18 |
index 812f601..e3524be 100644 |
19 |
--- a/net-p2p/syncthing/Manifest |
20 |
+++ b/net-p2p/syncthing/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST syncthing-0.14.10.tar.gz 6439231 SHA256 abd0695f12a4bc1dbb9ac1c5f3a9caf7b20e3c2cdeee9ab3859d66df98070dce SHA512 69f9d7ab3b3df663604d0da272d35abcf47553ae7e0b825d22385a3331848621597d35c6bd4b9591231c1160d9fb2c8d368fb9845f0d2e80aef7833acb829b7a WHIRLPOOL bf63ee69f889ed54f5bded339224a131ef2aa9781df4cbfbfb7d279fe83c9268c9ca350ccbaa3f8509d46297e05754f2454d854d96966ef366340bc05fef29cd |
23 |
DIST syncthing-0.14.12.tar.gz 6464612 SHA256 0778785636e2c095f8f6cd353a206e0e1b1db37c40a4c79156a08eaaffcff81f SHA512 89e6bc7ae351da8904cb8d84af912f6864a66ad509dedbc74cda9ba2eaa5035f0e5123d76402070ca3251fde3caeb94eb25897cef23152265651a9478835bc9d WHIRLPOOL 66a96998d1aec638de770dc5fb424a46aa13d84e86a8584e7b41b2014ac3c1df2627eaf2faf42ddca11b0b9cf54cc676609a2483b307c7e8242f2ab8e37d5998 |
24 |
+DIST syncthing-0.14.13.tar.gz 6468568 SHA256 13bce8afff0814817a0d70cdd4deddcdb2fa46494561976ad75e238a0ffbdb47 SHA512 24f7f46e965df962a3759b1fdad15bded4b2b3c81a9a266798570b9686c3aad40a7ba99507ad5955ee2a5f1ed5224a8ba89b20459c65ca5f5338f2958d42fcf8 WHIRLPOOL 73d971209b1d6548b43e3209a019030278cafa69cf2e7b17ac442c3c3639c6867f0fd22ebcf96bf9fa4e071f9e053d75909b9d77684966837bba12ac3fafa7b1 |
25 |
DIST syncthing-0.14.6.tar.gz 6390369 SHA256 481d9e88db0c3b3e9b0c796fa6dbb62447f0da69022c77f0065370873b0909ff SHA512 2a6d7dda6f014b1fce75d3199afdde517344524356e3881bb3cac035adc53dae3401260f072099a60d31394279e386c1d0e661fe21a5df0f1bf6b9808017ba34 WHIRLPOOL e24ce88d5448d4f599a3de52c049d5eed3531d7072b9dbf731ec684e648b580f02b559e0b72f441b4bc41aeb8500e7e78cc2379aeb029b35c7b91bb7e411970e |
26 |
DIST syncthing-0.14.9.tar.gz 6431103 SHA256 c04350e66a88ec027daa0d72f9fea5815ac73dc8543c271fe2fa0b53657c5502 SHA512 19d4e6ab9ad76c16e4406914b125626c9bec1d76b1ce28e776e357dd78cee1e0a4117346927376ab8292a0c6ba4843bc32c04abdf25bae9e6010343306873079 WHIRLPOOL 879c5eae5aade78e596fdd1f4f1da595a9c48e2b521fc0a9616af5721a7d3dd117d392fe654650bc0d9ca613a395e689ffbbe47c4b76a16a4bfccf8e621d145b |
27 |
|
28 |
diff --git a/net-p2p/syncthing/syncthing-0.14.13.ebuild b/net-p2p/syncthing/syncthing-0.14.13.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000..14832b5 |
31 |
--- /dev/null |
32 |
+++ b/net-p2p/syncthing/syncthing-0.14.13.ebuild |
33 |
@@ -0,0 +1,122 @@ |
34 |
+# Copyright 1999-2016 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+# $Id$ |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+EGO_PN="github.com/${PN}/${PN}" |
41 |
+ |
42 |
+inherit golang-vcs-snapshot systemd user versionator |
43 |
+ |
44 |
+DESCRIPTION="Open Source Continuous File Synchronization" |
45 |
+HOMEPAGE="https://syncthing.net" |
46 |
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
47 |
+ |
48 |
+LICENSE="MPL-2.0" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~x86 ~arm" |
51 |
+IUSE="tools" |
52 |
+ |
53 |
+DEPEND="tools? ( >=dev-lang/go-1.7.1:= )" |
54 |
+ |
55 |
+DOCS=(README.md AUTHORS CONTRIBUTING.md) |
56 |
+ |
57 |
+pkg_setup() { |
58 |
+ enewgroup ${PN} |
59 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
60 |
+ |
61 |
+ if use tools ; then |
62 |
+ # separate user for the relay server |
63 |
+ enewgroup strelaysrv |
64 |
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv |
65 |
+ # and his home folder |
66 |
+ keepdir /var/lib/strelaysrv |
67 |
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv |
68 |
+ fi |
69 |
+} |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ sed -i \ |
74 |
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \ |
75 |
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ |
76 |
+ || die |
77 |
+} |
78 |
+ |
79 |
+src_compile() { |
80 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
81 |
+ cd src/${EGO_PN} || die |
82 |
+ # If we pass "build" to build.go, it builds only syncthing itself, and |
83 |
+ # places the binary in the root folder. If we do not pass "build", all the |
84 |
+ # tools are built, and all binaries are placed in folder ./bin. |
85 |
+ go run build.go -version "v${PV}" -no-upgrade $(usex tools "" "build") \ |
86 |
+ || die "build failed" |
87 |
+} |
88 |
+ |
89 |
+src_test() { |
90 |
+ cd src/${EGO_PN} || die |
91 |
+ go run build.go test || die "test failed" |
92 |
+} |
93 |
+ |
94 |
+src_install() { |
95 |
+ pushd src/${EGO_PN} >& /dev/null || die |
96 |
+ doman man/*.[157] |
97 |
+ einstalldocs |
98 |
+ |
99 |
+ if use tools ; then |
100 |
+ dobin bin/syncthing |
101 |
+ exeinto /usr/libexec/syncthing |
102 |
+ local exe |
103 |
+ for exe in bin/* ; do |
104 |
+ [[ "${exe}" == "bin/syncthing" ]] || doexe "${exe}" |
105 |
+ done |
106 |
+ else |
107 |
+ dobin syncthing |
108 |
+ fi |
109 |
+ popd >& /dev/null || die |
110 |
+ |
111 |
+ # openrc and systemd service files |
112 |
+ systemd_dounit src/${EGO_PN}/etc/linux-systemd/system/${PN}{@,-resume}.service |
113 |
+ systemd_douserunit src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
114 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
115 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
116 |
+ |
117 |
+ keepdir /var/{lib,log}/${PN} |
118 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
119 |
+ insinto /etc/logrotate.d |
120 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
121 |
+ |
122 |
+ if use tools ; then |
123 |
+ # openrc and systemd service files |
124 |
+ systemd_dounit src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service |
125 |
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv |
126 |
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv |
127 |
+ |
128 |
+ insinto /etc/logrotate.d |
129 |
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv |
130 |
+ fi |
131 |
+} |
132 |
+ |
133 |
+pkg_postinst() { |
134 |
+ local v |
135 |
+ for v in ${REPLACING_VERSIONS}; do |
136 |
+ if [[ $(get_version_component_range 2) -gt \ |
137 |
+ $(get_version_component_range 2 ${v}) ]]; then |
138 |
+ ewarn "Version ${PV} is not protocol-compatible with version" \ |
139 |
+ "0.$(($(get_version_component_range 2) - 1)).x or lower." |
140 |
+ ewarn "Make sure all your devices are running at least version" \ |
141 |
+ "0.$(get_version_component_range 2).0." |
142 |
+ fi |
143 |
+ done |
144 |
+ |
145 |
+ # check if user syncthing-relaysrv exists |
146 |
+ # if yes, warn that it has been moved to strelaysrv |
147 |
+ if [[ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]]; then |
148 |
+ ewarn |
149 |
+ ewarn "The user and group for the relay server have been changed" |
150 |
+ ewarn "from syncthing-relaysrv to strelaysrv" |
151 |
+ ewarn "The old user and group are not deleted automatically. Delete them by running:" |
152 |
+ ewarn " userdel -r syncthing-relaysrv" |
153 |
+ ewarn " groupdel syncthing-relaysrv" |
154 |
+ fi |
155 |
+} |