1 |
commit: 14847206a11cc44ccc873fdecb7793e6b9771524 |
2 |
Author: Sergiy Borodych <Sergiy.Borodych <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jul 27 12:40:16 2016 +0000 |
4 |
Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 29 14:51:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14847206 |
7 |
|
8 |
net-p2p/syncthing: bump to 0.14.3 |
9 |
|
10 |
net-p2p/syncthing/Manifest | 1 + |
11 |
net-p2p/syncthing/syncthing-0.14.3.ebuild | 122 ++++++++++++++++++++++++++++++ |
12 |
2 files changed, 123 insertions(+) |
13 |
|
14 |
diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest |
15 |
index b6b1719..aa0ba62 100644 |
16 |
--- a/net-p2p/syncthing/Manifest |
17 |
+++ b/net-p2p/syncthing/Manifest |
18 |
@@ -1,3 +1,4 @@ |
19 |
DIST syncthing-0.13.10.tar.gz 4292039 SHA256 a86c7948afabc6e7b07f217d5200fb1e36cde5bb13373d99cc67d5dc991ce3be SHA512 199c38644a7e5d43777ca2e497d5304d8e77485d21aeed9a00efc74dd98bfb0c473dd0bf3230b8e1e9742315915419f198bb8d0a9b294d2f6fe918b6e0175812 WHIRLPOOL a6f82ce032455e78122b9958ddab885b187bd7d46e1a00ca64f855d1ad6e3c25538b8304318ce7fba7753bd1ee17a91325a774ed27d8f1bcb635915937742b96 |
20 |
DIST syncthing-0.13.9.tar.gz 4334897 SHA256 1b0a00ddbcbc88d8310741a2b0853266fe1980c427aa415ed6faa9f03dd52912 SHA512 07939eb068b417a8dc0ad4a868e5b5fd22ff14297e0b77d0d08fc14631d3ffe957da3ad4a745a4f37bae4a3bed8ac98a859037273b040a8abc88f7d5a67dc871 WHIRLPOOL 264a17f553a7d56a792f4949560dfc4eefbfab6c3dedd07e0ada5ec02d7ed97d2c196aa4a770630b6a3bb02879a9b462ddd5f95d58217f45874ff162206cf6d7 |
21 |
DIST syncthing-0.14.0.tar.gz 6368723 SHA256 bfa25ee766be4fb53c98df9aad99f57e562715280ed73445abe15ce2a713588e SHA512 68202cdd1db1c7cee77345e9c4786b4b3c97f69fb13df0b7450e40a2eacea75315324998a5e8286968cc5d462276dd75d4622f12038753734a09aae6ade6ac9e WHIRLPOOL 37da9eaff26f16fbafc30b1aa0b90b129832b85fc5cb95995a7d9570cbcdec40307b4d10a6547fbd6252bcd83b19a9a23fd9c618012eea4bf53cf89cbb8bc20a |
22 |
+DIST syncthing-0.14.3.tar.gz 6380761 SHA256 1c7ce74db4bf780463c04ed3d5677296ad2bb347f3e35fe4229eb26893a6604a SHA512 f9586013253ad031e1940e73f01f8ca398820e9ffeef0978fcd51079c535c04957c0be1314ecc635251ae06300c6b4141077ac5c3c8e7e9741d58e4545a7f3ba WHIRLPOOL b226642a41b8288ecd50eff5013a0c7b92e3f73dba85726f7bbbd529c0b6caeff85954205fcc7faf00bb9b5d18ff0809b93ddf7d0d4553815b3627bd2eb71c30 |
23 |
|
24 |
diff --git a/net-p2p/syncthing/syncthing-0.14.3.ebuild b/net-p2p/syncthing/syncthing-0.14.3.ebuild |
25 |
new file mode 100644 |
26 |
index 0000000..6b30bdc |
27 |
--- /dev/null |
28 |
+++ b/net-p2p/syncthing/syncthing-0.14.3.ebuild |
29 |
@@ -0,0 +1,122 @@ |
30 |
+# Copyright 1999-2016 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+EGO_PN="github.com/syncthing/syncthing" |
37 |
+EGIT_COMMIT=v${PV} |
38 |
+ |
39 |
+inherit golang-vcs-snapshot systemd user versionator |
40 |
+ |
41 |
+DESCRIPTION="Open Source Continuous File Synchronization" |
42 |
+HOMEPAGE="https://syncthing.net" |
43 |
+SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="MPL-2.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~x86 ~arm" |
48 |
+IUSE="tools" |
49 |
+ |
50 |
+DOCS="README.md AUTHORS CONTRIBUTING.md" |
51 |
+ |
52 |
+pkg_setup() { |
53 |
+ enewgroup ${PN} |
54 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
55 |
+ |
56 |
+ if use tools ; then |
57 |
+ # separate user for the relay server |
58 |
+ enewgroup strelaysrv |
59 |
+ enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv |
60 |
+ # and his home folder |
61 |
+ keepdir /var/lib/strelaysrv |
62 |
+ fowners strelaysrv:strelaysrv /var/lib/strelaysrv |
63 |
+ fi |
64 |
+} |
65 |
+ |
66 |
+src_prepare() { |
67 |
+ default |
68 |
+ sed -i \ |
69 |
+ 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \ |
70 |
+ src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ |
71 |
+ || die |
72 |
+} |
73 |
+ |
74 |
+src_compile() { |
75 |
+ export GOPATH="${S}:$(get_golibdir_gopath)" |
76 |
+ cd src/${EGO_PN} || die |
77 |
+ # If we pass "build" to build.go, it builds only syncthing itself, and |
78 |
+ # places the binary in the root folder. If we do not pass "build", all the |
79 |
+ # tools are built, and all binaries are placed in folder ./bin. |
80 |
+ ST_BUILD="build" |
81 |
+ if use tools ; then |
82 |
+ ST_BUILD="" |
83 |
+ fi |
84 |
+ go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build failed" |
85 |
+} |
86 |
+ |
87 |
+src_test() { |
88 |
+ cd src/${EGO_PN} || die |
89 |
+ go run build.go test || die "test failed" |
90 |
+} |
91 |
+ |
92 |
+src_install() { |
93 |
+ cd src/${EGO_PN} || die |
94 |
+ doman man/*.[157] |
95 |
+ |
96 |
+ if use tools ; then |
97 |
+ dobin bin/syncthing |
98 |
+ exeinto /usr/libexec/syncthing |
99 |
+ for exe in bin/* ; do |
100 |
+ [ "${exe}" = "bin/syncthing" ] || doexe "${exe}" |
101 |
+ done |
102 |
+ else |
103 |
+ dobin syncthing |
104 |
+ fi |
105 |
+ |
106 |
+ # openrc and systemd service files |
107 |
+ systemd_dounit "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \ |
108 |
+ "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.service |
109 |
+ systemd_douserunit "${S}"/src/${EGO_PN}/etc/linux-systemd/user/${PN}.service |
110 |
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} |
111 |
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} |
112 |
+ |
113 |
+ keepdir /var/{lib,log}/${PN} |
114 |
+ fowners ${PN}:${PN} /var/{lib,log}/${PN} |
115 |
+ insinto /etc/logrotate.d |
116 |
+ newins "${FILESDIR}/${PN}.logrotate" ${PN} |
117 |
+ |
118 |
+ if use tools ; then |
119 |
+ # openrc and systemd service files |
120 |
+ systemd_dounit "${S}"/src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service |
121 |
+ newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv |
122 |
+ newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv |
123 |
+ |
124 |
+ insinto /etc/logrotate.d |
125 |
+ newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv |
126 |
+ fi |
127 |
+} |
128 |
+ |
129 |
+pkg_postinst() { |
130 |
+ local v |
131 |
+ for v in ${REPLACING_VERSIONS}; do |
132 |
+ if [[ $(get_version_component_range 2) -gt \ |
133 |
+ $(get_version_component_range 2 ${v}) ]]; then |
134 |
+ ewarn "Version ${PV} is not protocol-compatible with version" \ |
135 |
+ "0.$(($(get_version_component_range 2) - 1)).x or lower." |
136 |
+ ewarn "Make sure all your devices are running at least version" \ |
137 |
+ "0.$(get_version_component_range 2).0." |
138 |
+ fi |
139 |
+ done |
140 |
+ |
141 |
+ # check if user syncthing-relaysrv exists |
142 |
+ # if yes, warn that it has been moved to strelaysrv |
143 |
+ if [ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]; then |
144 |
+ ewarn |
145 |
+ ewarn "The user and group for the relay server have been changed" |
146 |
+ ewarn "from syncthing-relaysrv to strelaysrv" |
147 |
+ ewarn "The old user and group are not deleted automatically. Delete them by running:" |
148 |
+ ewarn " userdel -r syncthing-relaysrv" |
149 |
+ ewarn " groupdel syncthing-relaysrv" |
150 |
+ fi |
151 |
+} |