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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 95B491382C5 for ; Tue, 30 Mar 2021 08:53:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D112EE095D; Tue, 30 Mar 2021 08:53:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD117E095D for ; Tue, 30 Mar 2021 08:53:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A0CEB340E9C for ; Tue, 30 Mar 2021 08:53:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 433CF637 for ; Tue, 30 Mar 2021 08:53:48 +0000 (UTC) From: "Andrew Ammerlaan" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Ammerlaan" Message-ID: <1617043181.391278d559abf05ee79afa855fd04e0b28373d3c.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: net-misc/gmid/files/, net-misc/gmid/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-misc/gmid/Manifest net-misc/gmid/files/gmid.confd net-misc/gmid/files/gmid.initd net-misc/gmid/gmid-1.6.ebuild net-misc/gmid/gmid-9999.ebuild net-misc/gmid/metadata.xml X-VCS-Directories: net-misc/gmid/ net-misc/gmid/files/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: 391278d559abf05ee79afa855fd04e0b28373d3c X-VCS-Branch: master Date: Tue, 30 Mar 2021 08:53:48 +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: 6f1feaff-2e6f-415f-bc33-5c8b1c8a5042 X-Archives-Hash: 833f637ff8f42f23447d7c01790590cf commit: 391278d559abf05ee79afa855fd04e0b28373d3c Author: Anna Vyalkova sysrq in> AuthorDate: Mon Mar 29 18:33:01 2021 +0000 Commit: Andrew Ammerlaan riseup net> CommitDate: Mon Mar 29 18:39:41 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=391278d5 net-misc/gmid: new package Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Anna Vyalkova sysrq.in> net-misc/gmid/Manifest | 1 + net-misc/gmid/files/gmid.confd | 13 ++++++++ net-misc/gmid/files/gmid.initd | 53 ++++++++++++++++++++++++++++++++ net-misc/gmid/gmid-1.6.ebuild | 69 ++++++++++++++++++++++++++++++++++++++++++ net-misc/gmid/gmid-9999.ebuild | 69 ++++++++++++++++++++++++++++++++++++++++++ net-misc/gmid/metadata.xml | 15 +++++++++ 6 files changed, 220 insertions(+) diff --git a/net-misc/gmid/Manifest b/net-misc/gmid/Manifest new file mode 100644 index 000000000..00cf99da9 --- /dev/null +++ b/net-misc/gmid/Manifest @@ -0,0 +1 @@ +DIST gmid-1.6.tar.gz 59402 BLAKE2B 1a13ae3f598a406e7920ad3a4f73cb230d70fe3bf4a1017d8d196ab80fdc0ffcf339ad79c64de93dc69d06e294132d714ad8ea1a5248dc69377e8d088f772d6c SHA512 cf118ac3b067b23d480006bccf36218ab0bf91d778092855a01706782fb0c68252157615d92d143d29deb8331422ef1263228b9eb53dd30e64a480b17c48af7a diff --git a/net-misc/gmid/files/gmid.confd b/net-misc/gmid/files/gmid.confd new file mode 100644 index 000000000..62027f6a4 --- /dev/null +++ b/net-misc/gmid/files/gmid.confd @@ -0,0 +1,13 @@ +# /etc/conf.d/gmid + +# Configuration file +#GMID_CONFIGFILE="/etc/gmid/gmid.conf" + +# PID file +#GMID_PIDFILE="/var/run/gmid.pid" + +# User to run gmid as +#GMID_USER="gemini" + +# Group to run gmid as +#GMID_GROUP="gemini" diff --git a/net-misc/gmid/files/gmid.initd b/net-misc/gmid/files/gmid.initd new file mode 100644 index 000000000..dfe3b0009 --- /dev/null +++ b/net-misc/gmid/files/gmid.initd @@ -0,0 +1,53 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configtest" +extra_started_commands="reload" + +description="Simple and secure Gemini server" +description_configtest="Run gmid's internal config check." +description_reload="Reload the gmid configuration without losing connections." + +GMID_CONFIGFILE=${GMID_CONFIGFILE:-/etc/gmid/gmid.conf} + +command="/usr/bin/gmid" +command_args="-c \"${GMID_CONFIGFILE}\"" +pidfile=${GMID_PIDFILE:-/var/run/gmid.pid} +user=${GMID_USER:-gemini} +group=${GMID_GROUP:-gemini} + +depend() { + need net + use dns logger netmount +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + configtest || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi +} + +stop_post() { + rm -f ${pidfile} +} + +reload() { + configtest || return 1 + ebegin "Refreshing gmid's configuration" + start-stop-daemon --signal SIGHUP --pidfile "${pidfile}" + eend $? "Failed to reload gmid" +} + +configtest() { + ebegin "Checking gmid's configuration" + ${command} -c "${GMID_CONFIGFILE}" -n + + eend $? "failed, please correct errors in the config file" +} diff --git a/net-misc/gmid/gmid-1.6.ebuild b/net-misc/gmid/gmid-1.6.ebuild new file mode 100644 index 000000000..7f845df6f --- /dev/null +++ b/net-misc/gmid/gmid-1.6.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="simple and secure Gemini server" +HOMEPAGE=" + gemini://gemini.omarpolo.com/pages/gmid.gmi + https://www.omarpolo.com/pages/gmid.html +" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.omarpolo.com/${PN}" + KEYWORDS="" +else + SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="ISC" +SLOT="0" +IUSE="libressl" + +DEPEND="acct-user/gemini + dev-libs/libevent + !libressl? ( dev-libs/libretls ) + libressl? ( dev-libs/libressl )" +BDEPEND="sys-devel/flex + virtual/yacc" +RDEPEND="${DEPEND}" + +DOCS=( README.md ChangeLog ) + +src_prepare() { + default + + # QA Notice: command not found + # remove `etags` from the "all" target + sed \ + -e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \ + -i Makefile || die +} + +src_configure() { + # note: not an autoconf configure script + ./configure \ + CC="$(tc-getCC)" \ + PREFIX="${EPREFIX}"/usr/share \ + BINDIR="${EPREFIX}"/usr/bin \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die +} + +src_install() { + default + + newinitd "${FILESDIR}"/gmid.initd gmid + newconfd "${FILESDIR}"/gmid.confd gmid +} + +pkg_postinst() { + einfo "This gemini server can be run as a user with zero configuration.\n" + einfo "In order to use it with the init service you will need to generate a" + einfo "self-signed TLS certificate and key and set up the configuration" + einfo "file (see man 1 gmid for details)." +} diff --git a/net-misc/gmid/gmid-9999.ebuild b/net-misc/gmid/gmid-9999.ebuild new file mode 100644 index 000000000..7f845df6f --- /dev/null +++ b/net-misc/gmid/gmid-9999.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +DESCRIPTION="simple and secure Gemini server" +HOMEPAGE=" + gemini://gemini.omarpolo.com/pages/gmid.gmi + https://www.omarpolo.com/pages/gmid.html +" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://git.omarpolo.com/${PN}" + KEYWORDS="" +else + SRC_URI="https://git.omarpolo.com/${PN}/snapshot/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="ISC" +SLOT="0" +IUSE="libressl" + +DEPEND="acct-user/gemini + dev-libs/libevent + !libressl? ( dev-libs/libretls ) + libressl? ( dev-libs/libressl )" +BDEPEND="sys-devel/flex + virtual/yacc" +RDEPEND="${DEPEND}" + +DOCS=( README.md ChangeLog ) + +src_prepare() { + default + + # QA Notice: command not found + # remove `etags` from the "all" target + sed \ + -e "s/^\(all: .*\) TAGS \(.*\)$/\1 \2/" \ + -i Makefile || die +} + +src_configure() { + # note: not an autoconf configure script + ./configure \ + CC="$(tc-getCC)" \ + PREFIX="${EPREFIX}"/usr/share \ + BINDIR="${EPREFIX}"/usr/bin \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS} -ltls -lssl -lcrypto -levent" || die +} + +src_install() { + default + + newinitd "${FILESDIR}"/gmid.initd gmid + newconfd "${FILESDIR}"/gmid.confd gmid +} + +pkg_postinst() { + einfo "This gemini server can be run as a user with zero configuration.\n" + einfo "In order to use it with the init service you will need to generate a" + einfo "self-signed TLS certificate and key and set up the configuration" + einfo "file (see man 1 gmid for details)." +} diff --git a/net-misc/gmid/metadata.xml b/net-misc/gmid/metadata.xml new file mode 100644 index 000000000..2f806f847 --- /dev/null +++ b/net-misc/gmid/metadata.xml @@ -0,0 +1,15 @@ + + + + + + Omar Polo + op@omarpolo.com + + https://git.omarpolo.com/gmid/tree/ChangeLog + + + cyber@sysrq.in + Anna + +