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 1131615806E for ; Sun, 14 May 2023 02:31:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02DE4E07F9; Sun, 14 May 2023 02:31:35 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 C9C37E0636 for ; Sun, 14 May 2023 02:31:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 B2DF7340EEB for ; Sun, 14 May 2023 02:31:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 159BDA6D for ; Sun, 14 May 2023 02:31:32 +0000 (UTC) From: "Anna Vyalkova" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anna Vyalkova" Message-ID: <1684031481.31af51e4bf339fb907f84dc80695dde8b5dcba1a.cybertailor@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-im/mastoposter/, net-im/mastoposter/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-im/mastoposter/files/mastoposter.initd net-im/mastoposter/files/mastoposter.service net-im/mastoposter/mastoposter-0.1-r1.ebuild net-im/mastoposter/mastoposter-0.1.ebuild X-VCS-Directories: net-im/mastoposter/ net-im/mastoposter/files/ X-VCS-Committer: cybertailor X-VCS-Committer-Name: Anna Vyalkova X-VCS-Revision: 31af51e4bf339fb907f84dc80695dde8b5dcba1a X-VCS-Branch: dev Date: Sun, 14 May 2023 02:31:32 +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: 2d8ae11b-e3e8-4927-a1b5-47a3b290f1f4 X-Archives-Hash: e631103f011158540346a186926c7bd8 commit: 31af51e4bf339fb907f84dc80695dde8b5dcba1a Author: Anna (cybertailor) Vyalkova sysrq in> AuthorDate: Sun May 14 02:31:21 2023 +0000 Commit: Anna Vyalkova sysrq in> CommitDate: Sun May 14 02:31:21 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=31af51e4 net-im/mastoposter: don't run as root Signed-off-by: Anna (cybertailor) Vyalkova sysrq.in> net-im/mastoposter/files/mastoposter.initd | 5 +++++ net-im/mastoposter/files/mastoposter.service | 2 ++ .../{mastoposter-0.1.ebuild => mastoposter-0.1-r1.ebuild} | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/net-im/mastoposter/files/mastoposter.initd b/net-im/mastoposter/files/mastoposter.initd index 0057cddc4..6e3621287 100644 --- a/net-im/mastoposter/files/mastoposter.initd +++ b/net-im/mastoposter/files/mastoposter.initd @@ -6,6 +6,7 @@ command="/usr/bin/mastoposter" command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}" +command_user="mastoposter:mastoposter" command_background=1 pidfile="/run/${RC_SVCNAME}.pid" output_log="/var/log/${RC_SVCNAME}.log" @@ -14,3 +15,7 @@ error_log="${output_log}" depend() { need net } + +start_pre() { + checkpath -fo "${command_user}" "${output_log}" +} diff --git a/net-im/mastoposter/files/mastoposter.service b/net-im/mastoposter/files/mastoposter.service index 095626e7b..89401ca32 100644 --- a/net-im/mastoposter/files/mastoposter.service +++ b/net-im/mastoposter/files/mastoposter.service @@ -5,6 +5,8 @@ Wants=network-online.target [Service] Type=simple +User=mastoposter +Group=mastoposter ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini Restart=always RestartSec=5 diff --git a/net-im/mastoposter/mastoposter-0.1.ebuild b/net-im/mastoposter/mastoposter-0.1-r1.ebuild similarity index 92% rename from net-im/mastoposter/mastoposter-0.1.ebuild rename to net-im/mastoposter/mastoposter-0.1-r1.ebuild index c490eae74..0544f4130 100644 --- a/net-im/mastoposter/mastoposter-0.1.ebuild +++ b/net-im/mastoposter/mastoposter-0.1-r1.ebuild @@ -18,6 +18,7 @@ SLOT="0" KEYWORDS="~amd64" RDEPEND=" + acct-user/mastoposter dev-python/beautifulsoup4[${PYTHON_USEDEP}] dev-python/emoji[${PYTHON_USEDEP}] dev-python/httpx[${PYTHON_USEDEP}] @@ -33,6 +34,6 @@ src_install() { newconfd "${FILESDIR}"/mastoposter.confd mastoposter insinto /etc/mastoposter - insopts --mode 600 + insopts --mode=600 --owner=${PN} --group=${PN} doins config.ini }