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 0D62215808D for ; Mon, 18 Apr 2022 11:47:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96EA8E095E; Mon, 18 Apr 2022 11:47:44 +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 880C8E0943 for ; Mon, 18 Apr 2022 11:47:43 +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 72275341751 for ; Mon, 18 Apr 2022 11:47:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E72AF3B8 for ; Mon, 18 Apr 2022 11:47:38 +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: <1650229059.fa5ec1cfbe8dcc32df3d01bf03904d626cdaa592.andrewammerlaan@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: app-crypt/tang/files/, app-crypt/tang/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-crypt/tang/Manifest app-crypt/tang/files/tangd.initd app-crypt/tang/files/tangd.service app-crypt/tang/metadata.xml app-crypt/tang/tang-11.ebuild X-VCS-Directories: app-crypt/tang/files/ app-crypt/tang/ X-VCS-Committer: andrewammerlaan X-VCS-Committer-Name: Andrew Ammerlaan X-VCS-Revision: fa5ec1cfbe8dcc32df3d01bf03904d626cdaa592 X-VCS-Branch: master Date: Mon, 18 Apr 2022 11:47:38 +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: e9a9f8a0-0f18-4342-ab60-2a06f3f224f4 X-Archives-Hash: a76f7292d56244ff11266b060c34c1a0 commit: fa5ec1cfbe8dcc32df3d01bf03904d626cdaa592 Author: Julien Roy jroy ca> AuthorDate: Sun Apr 17 20:57:39 2022 +0000 Commit: Andrew Ammerlaan gentoo org> CommitDate: Sun Apr 17 20:57:39 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=fa5ec1cf app-crypt/tang: initial import Signed-off-by: Julien Roy jroy.ca> app-crypt/tang/Manifest | 1 + app-crypt/tang/files/tangd.initd | 16 ++++++++++++ app-crypt/tang/files/tangd.service | 6 +++++ app-crypt/tang/metadata.xml | 8 ++++++ app-crypt/tang/tang-11.ebuild | 52 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+) diff --git a/app-crypt/tang/Manifest b/app-crypt/tang/Manifest new file mode 100644 index 000000000..c79d202ff --- /dev/null +++ b/app-crypt/tang/Manifest @@ -0,0 +1 @@ +DIST tang-11.tar.gz 38502 BLAKE2B cc440780eda3aa2ded7dfa6bea62794c2f08d3c7e89573c4002d5f2644f5cd809357400031c9df94f5128fb24e3e038a56f3df14f8f7762c071404fdb7b62444 SHA512 a1115c7192224f2d09d026776768b4247632333ad152f2cb700567404ff33a220dc1280e4f588c6408775c4b9dc5049b5601bbee6336c8ff7f39ec6f28e26599 diff --git a/app-crypt/tang/files/tangd.initd b/app-crypt/tang/files/tangd.initd new file mode 100644 index 000000000..4b7e42991 --- /dev/null +++ b/app-crypt/tang/files/tangd.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +port=8888 +bind=0.0.0.0 +tangd=/usr/libexec/tangd +tangdir=/var/db/tang + +name="tang daemon" +description="Tang binding daemon" +command=/usr/bin/socat +pidfile="/var/run/${RC_SVCNAME}.pid" +command_user="tang" +command_args="TCP-LISTEN:${port},bind=${bind},fork SYSTEM:'${tangd} ${tangdir}'" +command_background=true diff --git a/app-crypt/tang/files/tangd.service b/app-crypt/tang/files/tangd.service new file mode 100644 index 000000000..59625d974 --- /dev/null +++ b/app-crypt/tang/files/tangd.service @@ -0,0 +1,6 @@ +[Unit] +Description=Tang Server + +[Service] +ExecStart=/usr/bin/socat TCP-LISTEN:8888,bind=0.0.0.0,fork SYSTEM:'/usr/libexec/tangd /var/db/tang' +User=tang diff --git a/app-crypt/tang/metadata.xml b/app-crypt/tang/metadata.xml new file mode 100644 index 000000000..97ba7c28b --- /dev/null +++ b/app-crypt/tang/metadata.xml @@ -0,0 +1,8 @@ + + + + + julien@jroy.ca + Julien Roy + + diff --git a/app-crypt/tang/tang-11.ebuild b/app-crypt/tang/tang-11.ebuild new file mode 100644 index 000000000..94b1883d7 --- /dev/null +++ b/app-crypt/tang/tang-11.ebuild @@ -0,0 +1,52 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit meson + +DESCRIPTION="Tang binding daemon" +HOMEPAGE="https://github.com/latchset/tang" +SRC_URI="https://github.com/latchset/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="systemd" + +DEPEND="acct-user/tang + app-text/asciidoc + net-misc/socat + >=net-libs/http-parser-2.8.0 + >=dev-libs/jose-8" +RDEPEND="${DEPEND}" +BDEPEND="" + +src_install(){ + meson_install + newinitd "${FILESDIR}"/tangd.initd tangd + + dodir /var/db/tang + keepdir /var/db/tang + fowners tang:tang /var/db/tang + fperms 770 /var/db/tang + + if use systemd; then + insinto /usr/lib/systemd/system + doins ${FILESDIR}/tangd.service + fi +} + +pkg_postinst(){ + einfo "By default, tang runs on port 8888 and listens on address 0.0.0.0" + einfo "It also stores JWKs in /var/db/tang." + if use systemd; then + einfo "If you want to change this, modify /usr/lib/systemd/system/tangd.service directly." + else + einfo "If you want to change this, modify /etc/init.d/tangd directly." + fi + + if use systemd; then + systemctl daemon-reload + fi +}