From a32792ac685c17544d1507fdc3ce1b202cc28f8a Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Thu, 5 Jan 2023 20:03:45 -0500 Subject: dev-vcs/git-srht: new package, add 0.81.3 Signed-off-by: Julien Roy --- dev-vcs/git-srht/Manifest | 1 + dev-vcs/git-srht/files/git.sr.ht-api.confd | 2 + dev-vcs/git-srht/files/git.sr.ht-api.initd | 15 +++++ dev-vcs/git-srht/files/git.sr.ht-api.service | 13 ++++ dev-vcs/git-srht/files/git.sr.ht-periodic.service | 7 +++ dev-vcs/git-srht/files/git.sr.ht-periodic.timer | 9 +++ dev-vcs/git-srht/files/git.sr.ht-webhooks.initd | 15 +++++ dev-vcs/git-srht/files/git.sr.ht-webhooks.service | 13 ++++ dev-vcs/git-srht/files/git.sr.ht.confd | 2 + dev-vcs/git-srht/files/git.sr.ht.cron | 4 ++ dev-vcs/git-srht/files/git.sr.ht.initd | 15 +++++ dev-vcs/git-srht/files/git.sr.ht.service | 13 ++++ dev-vcs/git-srht/git-srht-0.81.3.ebuild | 73 +++++++++++++++++++++++ dev-vcs/git-srht/metadata.xml | 17 ++++++ 14 files changed, 199 insertions(+) create mode 100644 dev-vcs/git-srht/Manifest create mode 100644 dev-vcs/git-srht/files/git.sr.ht-api.confd create mode 100644 dev-vcs/git-srht/files/git.sr.ht-api.initd create mode 100644 dev-vcs/git-srht/files/git.sr.ht-api.service create mode 100644 dev-vcs/git-srht/files/git.sr.ht-periodic.service create mode 100644 dev-vcs/git-srht/files/git.sr.ht-periodic.timer create mode 100644 dev-vcs/git-srht/files/git.sr.ht-webhooks.initd create mode 100644 dev-vcs/git-srht/files/git.sr.ht-webhooks.service create mode 100644 dev-vcs/git-srht/files/git.sr.ht.confd create mode 100644 dev-vcs/git-srht/files/git.sr.ht.cron create mode 100644 dev-vcs/git-srht/files/git.sr.ht.initd create mode 100644 dev-vcs/git-srht/files/git.sr.ht.service create mode 100644 dev-vcs/git-srht/git-srht-0.81.3.ebuild create mode 100644 dev-vcs/git-srht/metadata.xml (limited to 'dev-vcs/git-srht') diff --git a/dev-vcs/git-srht/Manifest b/dev-vcs/git-srht/Manifest new file mode 100644 index 0000000..848a0a3 --- /dev/null +++ b/dev-vcs/git-srht/Manifest @@ -0,0 +1 @@ +DIST git-srht-0.81.3.tar.gz 196249 BLAKE2B 594d58ec556eb2bd686463d8f0d0f8d034bb31ad57983789d02da59b350d8933d8ccfa20cddf2abdb53607e7ab213237f88bfd204782e6a1eca5fd847ae2a209 SHA512 98a86ece25402835d3dd540a1892be71ce36f3d8154272546282c6f5454dcc8f877d8e1bd23e94f04af3bfe32df9971d3ce5a959c9d18fe39a477d02a9f1ce0d diff --git a/dev-vcs/git-srht/files/git.sr.ht-api.confd b/dev-vcs/git-srht/files/git.sr.ht-api.confd new file mode 100644 index 0000000..4160577 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-api.confd @@ -0,0 +1,2 @@ +ADDRESS=0.0.0.0 +PORT=5101 \ No newline at end of file diff --git a/dev-vcs/git-srht/files/git.sr.ht-api.initd b/dev-vcs/git-srht/files/git.sr.ht-api.initd new file mode 100644 index 0000000..0effd1d --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-api.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="git.sr.ht API daemon" +description="" +command="/usr/bin/gitsrht-api" +command_args="-b ${ADDRESS}:${PORT}" +command_user="srht:srht" +command_background=true +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} diff --git a/dev-vcs/git-srht/files/git.sr.ht-api.service b/dev-vcs/git-srht/files/git.sr.ht-api.service new file mode 100644 index 0000000..c41c2fc --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-api.service @@ -0,0 +1,13 @@ +[Unit] +Description=git.sr.ht API service +Requires=redis.service postgresql.service +After=redis.service postgresql.service network.target + +[Service] +Type=simple +User=gitsrht +Restart=always +ExecStart=/usr/bin/gitsrht-api -b :5101 + +[Install] +WantedBy=multi-user.target diff --git a/dev-vcs/git-srht/files/git.sr.ht-periodic.service b/dev-vcs/git-srht/files/git.sr.ht-periodic.service new file mode 100644 index 0000000..ce4c4b7 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-periodic.service @@ -0,0 +1,7 @@ +[Unit] +Description=git.sr.ht maintenance tasks + +[Service] +Type=oneshot +User=gitsrht +ExecStart=/usr/bin/gitsrht-periodic diff --git a/dev-vcs/git-srht/files/git.sr.ht-periodic.timer b/dev-vcs/git-srht/files/git.sr.ht-periodic.timer new file mode 100644 index 0000000..09f86f7 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-periodic.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Periodic git.sr.ht maintenance tasks + +[Timer] +OnBootSec=20m +OnUnitActiveSec=20m + +[Install] +WantedBy=timers.target diff --git a/dev-vcs/git-srht/files/git.sr.ht-webhooks.initd b/dev-vcs/git-srht/files/git.sr.ht-webhooks.initd new file mode 100644 index 0000000..717f888 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-webhooks.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="git.sr.ht webhooks daemon" +description="" +command="/usr/bin/celery" +command_args="-A gitsrht.webhooks worker --loglevel=INFO" +command_user="srht:srht" +command_background=true +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} diff --git a/dev-vcs/git-srht/files/git.sr.ht-webhooks.service b/dev-vcs/git-srht/files/git.sr.ht-webhooks.service new file mode 100644 index 0000000..0a4b4d1 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht-webhooks.service @@ -0,0 +1,13 @@ +[Unit] +Description=git.sr.ht webhooks service +Requires=postgresql.service +After=postgresql.service network.target + +[Service] +Type=simple +User=gitsrht +Restart=always +ExecStart=/usr/bin/celery -A gitsrht.webhooks worker --loglevel=INFO + +[Install] +WantedBy=multi-user.target diff --git a/dev-vcs/git-srht/files/git.sr.ht.confd b/dev-vcs/git-srht/files/git.sr.ht.confd new file mode 100644 index 0000000..4864f19 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht.confd @@ -0,0 +1,2 @@ +BINDADDRESS=0.0.0.0 +PORT=5001 \ No newline at end of file diff --git a/dev-vcs/git-srht/files/git.sr.ht.cron b/dev-vcs/git-srht/files/git.sr.ht.cron new file mode 100644 index 0000000..06c8477 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht.cron @@ -0,0 +1,4 @@ +#!/bin/sh + +su - srht -s /bin/sh -c /usr/bin/gitsrht-periodic +exit $? diff --git a/dev-vcs/git-srht/files/git.sr.ht.initd b/dev-vcs/git-srht/files/git.sr.ht.initd new file mode 100644 index 0000000..9d5aac0 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht.initd @@ -0,0 +1,15 @@ +#!/sbin/openrc-run +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +name="git.sr.ht daemon" +description="" +command="/usr/bin/gunicorn" +command_args="gitsrht.app:app -b ${ADDRESS}:${PORT}" +command_user="srht:srht" +command_background=true +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} diff --git a/dev-vcs/git-srht/files/git.sr.ht.service b/dev-vcs/git-srht/files/git.sr.ht.service new file mode 100644 index 0000000..a3f0082 --- /dev/null +++ b/dev-vcs/git-srht/files/git.sr.ht.service @@ -0,0 +1,13 @@ +[Unit] +Description=git.sr.ht website service +Requires=redis.service postgresql.service +After=redis.service postgresql.service network.target + +[Service] +Type=simple +User=gitsrht +Restart=always +ExecStart=/usr/bin/gunicorn gitsrht.app:app -b 127.0.0.1:5001 + +[Install] +WantedBy=multi-user.target diff --git a/dev-vcs/git-srht/git-srht-0.81.3.ebuild b/dev-vcs/git-srht/git-srht-0.81.3.ebuild new file mode 100644 index 0000000..1d01f26 --- /dev/null +++ b/dev-vcs/git-srht/git-srht-0.81.3.ebuild @@ -0,0 +1,73 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +DISTUTILS_USE_PEP517=setuptools +inherit distutils-r1 go-module optfeature systemd + +DESCRIPTION="sr.ht git services" +HOMEPAGE="https://git.sr.ht/~sircmpwn/git.sr.ht" +SRC_URI="http://git.sr.ht/~sircmpwn/git.sr.ht/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="AGPL-3" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND="" +DEPEND="${RDEPEND} + dev-python/scmsrht[${PYTHON_USEDEP}] + dev-python/core-srht[${PYTHON_USEDEP}] + dev-python/pygit2[${PYTHON_USEDEP}] + dev-python/minio[${PYTHON_USEDEP}] +" +BDEPEND="net-libs/nodejs + dev-lang/sassc + dev-lang/go +" + +S="${WORKDIR}/git.sr.ht-${PV}" + +src_unpack() { + default_src_unpack +} + +src_compile() { + distutils-r1_src_compile + cd "${S}/gitsrht-dispatch" || die + ego build + cd "${S}/gitsrht-shell" || die + ego build + cd "${S}/gitsrht-keys" || die + ego build + cd "${S}/gitsrht-update-hook" || die + ego build + cd "${S}/api" || die + ego build -o gitsrht-api +} + +src_install() { + distutils-r1_src_install + dobin "${S}/gitsrht-dispatch/gitsrht-dispatch" + dobin "${S}/gitsrht-shell/gitsrht-shell" + dobin "${S}/gitsrht-keys/gitsrht-keys" + dobin "${S}/gitsrht-update-hook/gitsrht-update-hook" + dobin "${S}/api/gitsrht-api" + exeinto "/etc/cron.hourly" + doexe "${FILESDIR}/git.sr.ht.cron" + newinitd "${FILESDIR}/git.sr.ht.initd" "git.sr.ht" + newconfd "${FILESDIR}/git.sr.ht.confd" "git.sr.ht" + newinitd "${FILESDIR}/git.sr.ht-api.initd" "git.sr.ht-api" + newconfd "${FILESDIR}/git.sr.ht-api.confd" "git.sr.ht-api" + newinitd "${FILESDIR}/git.sr.ht-webhooks.initd" "git.sr.ht-webhooks" + systemd_dounit "${FILESDIR}/git.sr.ht.service" + systemd_dounit "${FILESDIR}/git.sr.ht-api.service" + systemd_dounit "${FILESDIR}/git.sr.ht-webhooks.service" + systemd_dounit "${FILESDIR}/git.sr.ht-periodic.service" + systemd_dounit "${FILESDIR}/git.sr.ht-periodic.timer" +} + +plg_postinst() { + optfeature "builds.sr.ht integration" "dev-util/builds-srht" +} diff --git a/dev-vcs/git-srht/metadata.xml b/dev-vcs/git-srht/metadata.xml new file mode 100644 index 0000000..9e7b31c --- /dev/null +++ b/dev-vcs/git-srht/metadata.xml @@ -0,0 +1,17 @@ + + + + + julien@jroy.ca + Julien Roy + + + + Drew DeVault + sir@cmpwn.com + + https://git.sr.ht/~sircmpwn/git.sr.ht/refs + https://man.sr.ht/git.sr.ht/ + git.sr.ht + + -- cgit v1.2.3