From dc6314135e4a96d7f6e270bb95b1aeb3888382b1 Mon Sep 17 00:00:00 2001 From: Hadrien Dussuel Date: Mon, 8 Sep 2025 21:46:11 +0200 Subject: [PATCH] syncthing 2.0.8 --- metadata/md5-cache/net-p2p/syncthing-2.0.8 | 14 +++ net-p2p/syncthing/Manifest | 1 + net-p2p/syncthing/syncthing-2.0.8.ebuild | 110 +++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 metadata/md5-cache/net-p2p/syncthing-2.0.8 create mode 100644 net-p2p/syncthing/syncthing-2.0.8.ebuild diff --git a/metadata/md5-cache/net-p2p/syncthing-2.0.8 b/metadata/md5-cache/net-p2p/syncthing-2.0.8 new file mode 100644 index 0000000..f5f62c2 --- /dev/null +++ b/metadata/md5-cache/net-p2p/syncthing-2.0.8 @@ -0,0 +1,14 @@ +BDEPEND=>=dev-lang/go-1.21.0 >=dev-lang/go-1.20:= app-arch/unzip virtual/pkgconfig +DEFINED_PHASES=compile install postinst postrm prepare test unpack +DESCRIPTION=Open Source Continuous File Synchronization +EAPI=8 +HOMEPAGE=https://syncthing.net https://github.com/syncthing/syncthing +INHERIT=desktop go-module systemd xdg-utils +IUSE=selinux tools +KEYWORDS=amd64 arm arm64 ~loong ppc64 ~riscv x86 +LICENSE=MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT Unlicense +RDEPEND=acct-group/syncthing acct-user/syncthing tools? ( >=acct-user/stdiscosrv-1 >=acct-user/strelaysrv-1 ) selinux? ( sec-policy/selinux-syncthing ) +SLOT=0 +SRC_URI=https://github.com/syncthing/syncthing/releases/download/v2.0.8/syncthing-source-v2.0.8.tar.gz +_eclasses_=desktop 3a72ffe0d8e1dd73af3a1c8c15a59fed multiprocessing 1e32df7deee68372153dca65f4a7c21f toolchain-funcs a0b29008c671a362b505f96fa80ce9c0 flag-o-matic a7afe42e95fb46ce9691605acfb24672 go-env 0e2babf96e7d0b045fc07ad199eb2399 go-module d96f2a2fd6d8fbad6d94516bf238f885 systemd a964c0cbe818b5729da1dbfcee5be861 xdg-utils 42869b3c8d86a70ef3cf75165a395e09 +_md5_=3887522c848938cdb0cf9141a240b3b3 diff --git a/net-p2p/syncthing/Manifest b/net-p2p/syncthing/Manifest index d5ca264..a4eac77 100644 --- a/net-p2p/syncthing/Manifest +++ b/net-p2p/syncthing/Manifest @@ -1,2 +1,3 @@ DIST syncthing-source-v2.0.5.tar.gz 62659547 BLAKE2B 27867445d2dccc21a363b203ced17515d7189f7c2f07e3e2617af28edb1299bf8f73f8a1c95f5e11887bc326ee791027df01d00cdbe42d617931c8aca29afaf1 SHA512 0e489bd409d52fca08221ac3d016125961b4c1d37e5de9db7be2e3703c78d12a436c61a3c6ca66891de5f53f5e22542308563fee88a5fa432ede5ed47321b113 DIST syncthing-source-v2.0.7.tar.gz 62661923 BLAKE2B 006eba7bbc21e1ed017b4254a40c0215852f46ca3d18a74a47786a080d551da0cbff7d57152f321b0d42ea64a0ad5a233082bcd5b7cfc72fa3ef47ea74fd8bd1 SHA512 229073618f3fff364ba7c5432b7ac6e6bfa19628ded89dbf7b515ab4069a48c6cd91c6d53369a8159b27797d8a1ff1d2150d63f5cf25c45097c9c99cf52b6de3 +DIST syncthing-source-v2.0.8.tar.gz 62666559 BLAKE2B b980705b97f79447c7ec1eb811b8d426b1790d6f5c44bd5cfff260959ed186b197dc6f5b7627948e1dcb302417c77fb4c18748548bf9af38f5b7446f131c1375 SHA512 c8139c7ff3b1067db789c395ed8f78fdba38d731f9e2760d10eb5c0288bdfc3f9b05311b0852881f79ccb33fa1ac6ac609820bbf1ab89f83fcc09f11842bfb23 diff --git a/net-p2p/syncthing/syncthing-2.0.8.ebuild b/net-p2p/syncthing/syncthing-2.0.8.ebuild new file mode 100644 index 0000000..428f516 --- /dev/null +++ b/net-p2p/syncthing/syncthing-2.0.8.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2025 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 https://github.com/syncthing/syncthing" +SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${PN}-source-v${PV}.tar.gz" +S="${WORKDIR}"/${PN} + +LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT Unlicense" +SLOT="0" +KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv 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.21.0" + +DOCS=( AUTHORS {GOALS,README}.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.3.4-TestIssue5063_timeout.patch + "${FILESDIR}"/${PN}-1.18.4-tool_users.patch + "${FILESDIR}"/${PN}-1.29.5-remove_race_in_tests.patch #955442 +) + +src_prepare() { + # Bug #679280 + xdg_environment_reset + + default + + local srv + for srv in st{disco,relay}srv; do + sed -i \ + 's|^ExecStart=.*|ExecStart=/usr/libexec/${PN}/${srv}|' \ + cmd/${srv}/etc/linux-systemd/${srv}.service || die + done; +} + +src_compile() { + GOARCH= CGO_ENABLED=1 go run build.go -version "v${PV}" -no-upgrade -build-out=bin/ \ + ${GOARCH:+-goarch="${GOARCH}"} \ + build $(usev tools all) || die "build failed" +} + +src_test() { + go run build.go test || die "test failed" +} + +src_install() { + dobin bin/${PN} + + doman man/*.[157] + einstalldocs + + domenu etc/linux-desktop/${PN}-{start,ui}.desktop + local -i icon_size + 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 + + systemd_dounit etc/linux-systemd/system/${PN}@.service + systemd_douserunit etc/linux-systemd/user/${PN}.service + newconfd "${FILESDIR}"/${PN}.confd ${PN} + newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN} + + keepdir /var/log/${PN} + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + insinto /etc/ufw/applications.d + doins etc/firewall-ufw/${PN} + + if use tools; then + exeinto /usr/libexec/${PN} + insinto /etc/logrotate.d + + local srv + for srv in st{disco,relay}srv; do + doexe bin/${srv} + systemd_dounit cmd/${srv}/etc/linux-systemd/${srv}.service + newconfd "${FILESDIR}"/${srv}.confd ${srv} + newinitd "${FILESDIR}"/${srv}.initd-r1 ${srv} + + newins "${FILESDIR}"/${srv}.logrotate ${srv} + done + fi +} + +pkg_postinst() { + xdg_desktop_database_update + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_desktop_database_update + xdg_icon_cache_update +}