From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE53413832E for ; Thu, 11 Aug 2016 17:48:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CA3C21C091; Thu, 11 Aug 2016 17:48:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A04C21C091 for ; Thu, 11 Aug 2016 17:48:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5FCD8340BF6 for ; Thu, 11 Aug 2016 17:48:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ADD087CB for ; Thu, 11 Aug 2016 17:48:01 +0000 (UTC) From: "Dirkjan Ochtman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Dirkjan Ochtman" Message-ID: <1470937666.655c43047f020c0823139d8d0b9489179c9b1ddf.djc@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-p2p/syncthing/Manifest net-p2p/syncthing/syncthing-0.14.4.ebuild X-VCS-Directories: net-p2p/syncthing/ X-VCS-Committer: djc X-VCS-Committer-Name: Dirkjan Ochtman X-VCS-Revision: 655c43047f020c0823139d8d0b9489179c9b1ddf X-VCS-Branch: master Date: Thu, 11 Aug 2016 17:48:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2cc92969-1826-4f2f-8cf4-ee00a68e9444 X-Archives-Hash: 0c612dc52a7c8cf899209c11e580abe7 commit: 655c43047f020c0823139d8d0b9489179c9b1ddf Author: Louis Sautier gmail com> AuthorDate: Wed Aug 10 12:48:29 2016 +0000 Commit: Dirkjan Ochtman gentoo org> CommitDate: Thu Aug 11 17:47:46 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=655c4304 net-p2p/syncthing: bump to 0.14.4 Package-Manager: portage-2.3.0 net-p2p/syncthing/Manifest | 1 + net-p2p/syncthing/syncthing-0.14.4.ebuild | 122 ++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest index aa0ba62..b059d96 100644 --- a/net-p2p/syncthing/Manifest +++ b/net-p2p/syncthing/Manifest @@ -2,3 +2,4 @@ DIST syncthing-0.13.10.tar.gz 4292039 SHA256 a86c7948afabc6e7b07f217d5200fb1e36c DIST syncthing-0.13.9.tar.gz 4334897 SHA256 1b0a00ddbcbc88d8310741a2b0853266fe1980c427aa415ed6faa9f03dd52912 SHA512 07939eb068b417a8dc0ad4a868e5b5fd22ff14297e0b77d0d08fc14631d3ffe957da3ad4a745a4f37bae4a3bed8ac98a859037273b040a8abc88f7d5a67dc871 WHIRLPOOL 264a17f553a7d56a792f4949560dfc4eefbfab6c3dedd07e0ada5ec02d7ed97d2c196aa4a770630b6a3bb02879a9b462ddd5f95d58217f45874ff162206cf6d7 DIST syncthing-0.14.0.tar.gz 6368723 SHA256 bfa25ee766be4fb53c98df9aad99f57e562715280ed73445abe15ce2a713588e SHA512 68202cdd1db1c7cee77345e9c4786b4b3c97f69fb13df0b7450e40a2eacea75315324998a5e8286968cc5d462276dd75d4622f12038753734a09aae6ade6ac9e WHIRLPOOL 37da9eaff26f16fbafc30b1aa0b90b129832b85fc5cb95995a7d9570cbcdec40307b4d10a6547fbd6252bcd83b19a9a23fd9c618012eea4bf53cf89cbb8bc20a DIST syncthing-0.14.3.tar.gz 6380761 SHA256 1c7ce74db4bf780463c04ed3d5677296ad2bb347f3e35fe4229eb26893a6604a SHA512 f9586013253ad031e1940e73f01f8ca398820e9ffeef0978fcd51079c535c04957c0be1314ecc635251ae06300c6b4141077ac5c3c8e7e9741d58e4545a7f3ba WHIRLPOOL b226642a41b8288ecd50eff5013a0c7b92e3f73dba85726f7bbbd529c0b6caeff85954205fcc7faf00bb9b5d18ff0809b93ddf7d0d4553815b3627bd2eb71c30 +DIST syncthing-0.14.4.tar.gz 6387191 SHA256 5c29e2d3de4c35cf917df801c50a195f1cea612a31879c28a8474ce923c23551 SHA512 0540d1e58b67d13401ecff4988897d185b04ca44f360c68cc52a2be8e70661cd6b84d6eae2b8f56e5a0f590efd9a8462f477f0492e5903992102a6c66bd3534e WHIRLPOOL 4d5502c8e1d1577cc7223c88a7e364b853d7a2e469d9cdbbc01de98dd679fad61d3278ee8ff444acc10fec83bd460fce086b4ef47b2c0db17f7f0ec6f1377f90 diff --git a/net-p2p/syncthing/syncthing-0.14.4.ebuild b/net-p2p/syncthing/syncthing-0.14.4.ebuild new file mode 100644 index 0000000..e18e316 --- /dev/null +++ b/net-p2p/syncthing/syncthing-0.14.4.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +EGO_PN="github.com/${PN}/${PN}" + +inherit golang-vcs-snapshot systemd user versionator + +DESCRIPTION="Open Source Continuous File Synchronization" +HOMEPAGE="https://syncthing.net" +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~arm" +IUSE="tools" + +DOCS="README.md AUTHORS CONTRIBUTING.md" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} + + if use tools ; then + # separate user for the relay server + enewgroup strelaysrv + enewuser strelaysrv -1 -1 /var/lib/strelaysrv strelaysrv + # and his home folder + keepdir /var/lib/strelaysrv + fowners strelaysrv:strelaysrv /var/lib/strelaysrv + fi +} + +src_prepare() { + default + sed -i \ + 's|^ExecStart=.*|ExecStart=/usr/libexec/syncthing/strelaysrv|' \ + src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service \ + || die +} + +src_compile() { + export GOPATH="${S}:$(get_golibdir_gopath)" + cd src/${EGO_PN} || die + # If we pass "build" to build.go, it builds only syncthing itself, and + # places the binary in the root folder. If we do not pass "build", all the + # tools are built, and all binaries are placed in folder ./bin. + ST_BUILD="build" + if use tools ; then + ST_BUILD="" + fi + go run build.go -version "v${PV}" -no-upgrade ${ST_BUILD} || die "build failed" +} + +src_test() { + cd src/${EGO_PN} || die + go run build.go test || die "test failed" +} + +src_install() { + cd src/${EGO_PN} || die + doman man/*.[157] + einstalldocs + + if use tools ; then + dobin bin/syncthing + exeinto /usr/libexec/syncthing + for exe in bin/* ; do + [ "${exe}" = "bin/syncthing" ] || doexe "${exe}" + done + else + dobin syncthing + fi + + # openrc and systemd service files + systemd_dounit "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}@.service \ + "${S}"/src/${EGO_PN}/etc/linux-systemd/system/${PN}-resume.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} + + if use tools ; then + # openrc and systemd service files + systemd_dounit "${S}"/src/${EGO_PN}/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service + newconfd "${FILESDIR}/strelaysrv.confd" strelaysrv + newinitd "${FILESDIR}/strelaysrv.initd" strelaysrv + + insinto /etc/logrotate.d + newins "${FILESDIR}/strelaysrv.logrotate" strelaysrv + fi +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if [[ $(get_version_component_range 2) -gt \ + $(get_version_component_range 2 ${v}) ]]; then + ewarn "Version ${PV} is not protocol-compatible with version" \ + "0.$(($(get_version_component_range 2) - 1)).x or lower." + ewarn "Make sure all your devices are running at least version" \ + "0.$(get_version_component_range 2).0." + fi + done + + # check if user syncthing-relaysrv exists + # if yes, warn that it has been moved to strelaysrv + if [ -n "$(egetent passwd syncthing-relaysrv 2>/dev/null)" ]; then + ewarn + ewarn "The user and group for the relay server have been changed" + ewarn "from syncthing-relaysrv to strelaysrv" + ewarn "The old user and group are not deleted automatically. Delete them by running:" + ewarn " userdel -r syncthing-relaysrv" + ewarn " groupdel syncthing-relaysrv" + fi +}