* [gentoo-commits] repo/proj/guru:dev commit in: net-im/mastoposter/, net-im/mastoposter/files/
@ 2023-05-10 2:07 Anna Vyalkova
0 siblings, 0 replies; 2+ messages in thread
From: Anna Vyalkova @ 2023-05-10 2:07 UTC (permalink / raw
To: gentoo-commits
commit: 75d79c8c37bbf4a90156030018a5e4d5dc76717c
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Wed May 10 02:07:33 2023 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
CommitDate: Wed May 10 02:07:33 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=75d79c8c
net-im/mastoposter: new package, add 0.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
net-im/mastoposter/Manifest | 1 +
net-im/mastoposter/files/mastoposter.confd | 2 ++
net-im/mastoposter/files/mastoposter.initd | 16 ++++++++++++
net-im/mastoposter/files/mastoposter.service | 15 +++++++++++
net-im/mastoposter/mastoposter-0.1.ebuild | 38 ++++++++++++++++++++++++++++
net-im/mastoposter/metadata.xml | 12 +++++++++
6 files changed, 84 insertions(+)
diff --git a/net-im/mastoposter/Manifest b/net-im/mastoposter/Manifest
new file mode 100644
index 000000000..e32696a75
--- /dev/null
+++ b/net-im/mastoposter/Manifest
@@ -0,0 +1 @@
+DIST mastoposter-0.1.tar.gz 36352 BLAKE2B e0710ce461f3d2b21ea7e3aee0e698a9db90523f9ab598868b602f028951251e6ac69cca9f1dfe9b6a66432a8c0f01d32871327b4e064eed2c3b530ae3c4c153 SHA512 77d834503e25f41b4c92ef2538ee8b3a1143d4927e5f96c0ce53d3a3f5c4a004f05c3392d43d8c4af187fc91a044ccec22f9083ccffb31ba5902f254723577ec
diff --git a/net-im/mastoposter/files/mastoposter.confd b/net-im/mastoposter/files/mastoposter.confd
new file mode 100644
index 000000000..1458da339
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.confd
@@ -0,0 +1,2 @@
+# Configuration file
+#MASTOPOSTER_CONFIG_FILE="/etc/mastoposter/config.ini"
diff --git a/net-im/mastoposter/files/mastoposter.initd b/net-im/mastoposter/files/mastoposter.initd
new file mode 100644
index 000000000..0057cddc4
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.initd
@@ -0,0 +1,16 @@
+#!/sbin/openrc-run
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# shellcheck shell=sh
+
+command="/usr/bin/mastoposter"
+command_args="${MASTOPOSTER_CONFIG_FILE:=/etc/mastoposter/config.ini}"
+command_background=1
+pidfile="/run/${RC_SVCNAME}.pid"
+output_log="/var/log/${RC_SVCNAME}.log"
+error_log="${output_log}"
+
+depend() {
+ need net
+}
diff --git a/net-im/mastoposter/files/mastoposter.service b/net-im/mastoposter/files/mastoposter.service
new file mode 100644
index 000000000..095626e7b
--- /dev/null
+++ b/net-im/mastoposter/files/mastoposter.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Configurable reposter from Mastodon-compatible Fediverse servers
+After=network.target
+Wants=network-online.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/mastoposter /etc/mastoposter/config.ini
+Restart=always
+RestartSec=5
+StandardOutput=journal
+StandardError=inherit
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-im/mastoposter/mastoposter-0.1.ebuild b/net-im/mastoposter/mastoposter-0.1.ebuild
new file mode 100644
index 000000000..c490eae74
--- /dev/null
+++ b/net-im/mastoposter/mastoposter-0.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+DISTUTILS_USE_PEP517=flit
+inherit distutils-r1 pypi systemd
+
+DESCRIPTION="Configurable reposter from Mastodon-compatible Fediverse servers"
+HOMEPAGE="
+ https://pypi.org/project/mastoposter/
+ https://github.com/hatkidchan/mastoposter
+"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/beautifulsoup4[${PYTHON_USEDEP}]
+ dev-python/emoji[${PYTHON_USEDEP}]
+ dev-python/httpx[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ dev-python/websockets[${PYTHON_USEDEP}]
+"
+
+src_install() {
+ distutils-r1_src_install
+
+ systemd_dounit "${FILESDIR}"/mastoposter.service
+ newinitd "${FILESDIR}"/mastoposter.initd mastoposter
+ newconfd "${FILESDIR}"/mastoposter.confd mastoposter
+
+ insinto /etc/mastoposter
+ insopts --mode 600
+ doins config.ini
+}
diff --git a/net-im/mastoposter/metadata.xml b/net-im/mastoposter/metadata.xml
new file mode 100644
index 000000000..c23e04d78
--- /dev/null
+++ b/net-im/mastoposter/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>cyber+gentoo@sysrq.in</email>
+ <name>Anna</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">mastoposter</remote-id>
+ <remote-id type="github">hatkidchan/mastoposter</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: net-im/mastoposter/, net-im/mastoposter/files/
@ 2023-05-14 2:31 Anna Vyalkova
0 siblings, 0 replies; 2+ messages in thread
From: Anna Vyalkova @ 2023-05-14 2:31 UTC (permalink / raw
To: gentoo-commits
commit: 31af51e4bf339fb907f84dc80695dde8b5dcba1a
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Sun May 14 02:31:21 2023 +0000
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> 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 <cyber+gentoo <AT> 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
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-14 2:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 2:07 [gentoo-commits] repo/proj/guru:dev commit in: net-im/mastoposter/, net-im/mastoposter/files/ Anna Vyalkova
-- strict thread matches above, loose matches on Subject: below --
2023-05-14 2:31 Anna Vyalkova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox