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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7F01B158086 for ; Thu, 9 Dec 2021 12:03:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F2B92BC04A; Thu, 9 Dec 2021 12:03:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 95D2B2BC01D for ; Thu, 9 Dec 2021 12:03:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 74A72343223 for ; Thu, 9 Dec 2021 12:03:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AAFCA21E for ; Thu, 9 Dec 2021 12:03:24 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1639051395.4714d7ba8615baaa039fe1e6524e43452be89ac3.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: acct-user/strelaysrv/ X-VCS-Repository: repo/gentoo X-VCS-Files: acct-user/strelaysrv/strelaysrv-1.ebuild X-VCS-Directories: acct-user/strelaysrv/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: 4714d7ba8615baaa039fe1e6524e43452be89ac3 X-VCS-Branch: master Date: Thu, 9 Dec 2021 12:03:24 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 710eb3e4-1bef-455c-b30f-650c9c32f932 X-Archives-Hash: 86e1e44eae41abfd810989d8957a54ef commit: 4714d7ba8615baaa039fe1e6524e43452be89ac3 Author: Marek Szuba gentoo org> AuthorDate: Mon Dec 6 16:42:37 2021 +0000 Commit: Marek Szuba gentoo org> CommitDate: Thu Dec 9 12:03:15 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4714d7ba acct-user/strelaysrv: new home directory and main group To reflect upstream changes to their init scripts and systemd units, apart from the user name itself - that would be more annoying to fix. Signed-off-by: Marek Szuba gentoo.org> acct-user/strelaysrv/strelaysrv-1.ebuild | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/acct-user/strelaysrv/strelaysrv-1.ebuild b/acct-user/strelaysrv/strelaysrv-1.ebuild new file mode 100644 index 000000000000..c4b804d8160c --- /dev/null +++ b/acct-user/strelaysrv/strelaysrv-1.ebuild @@ -0,0 +1,27 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit acct-user + +DESCRIPTION="User for the Syncthing relay server" +ACCT_USER_ID=496 +ACCT_USER_HOME=/var/lib/syncthing-relaysrv +ACCT_USER_HOME_PERMS=0770 +ACCT_USER_GROUPS=( syncthing ) + +acct-user_add_deps + +pkg_postinst() { + if [[ -n "${REPLACING_VERSIONS}" ]]; then + local rver + for rver in ${REPLACING_VERSIONS} ; do + if ver_test "${rver}" -lt 1; then + ewarn "The home directory of this user has changed to /var/lib/syncthing-relaysrv" + ewarn "If you have any files in /var/lib/${PN}, move them to the new location by hand" + break + fi + done + fi +}