* [gentoo-commits] repo/proj/guru:dev commit in: app-crypt/tang/, app-crypt/tang/files/
@ 2022-04-17 20:57 Julien Roy
0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2022-04-17 20:57 UTC (permalink / raw
To: gentoo-commits
commit: fa5ec1cfbe8dcc32df3d01bf03904d626cdaa592
Author: Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun Apr 17 20:57:39 2022 +0000
Commit: Julien Roy <julien <AT> jroy <DOT> ca>
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 <julien <AT> 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>julien@jroy.ca</email>
+ <name>Julien Roy</name>
+ </maintainer>
+</pkgmetadata>
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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-crypt/tang/, app-crypt/tang/files/
@ 2022-07-09 2:01 Julien Roy
0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2022-07-09 2:01 UTC (permalink / raw
To: gentoo-commits
commit: 14b434163321e60a6f3d3f4b167909d55fc8e0ee
Author: Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sat Jul 9 01:58:22 2022 +0000
Commit: Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sat Jul 9 02:00:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=14b43416
app-crypt/tang: add conf.d config file
Signed-off-by: Julien Roy <julien <AT> jroy.ca>
app-crypt/tang/files/tangd | 8 ++++++++
app-crypt/tang/files/tangd.initd | 7 +------
app-crypt/tang/tang-11.ebuild | 2 ++
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/app-crypt/tang/files/tangd b/app-crypt/tang/files/tangd
new file mode 100644
index 000000000..3bca6e1b8
--- /dev/null
+++ b/app-crypt/tang/files/tangd
@@ -0,0 +1,8 @@
+# Address for tang to listen to (default: 0.0.0.0)
+ADDRESS=0.0.0.0
+
+# Port for tang to listen to (default: 8888)
+PORT=8888
+
+# Directory where keys will be stored (default: /var/db/tang)
+TANGDIR=/var/db/tang
diff --git a/app-crypt/tang/files/tangd.initd b/app-crypt/tang/files/tangd.initd
index 4b7e42991..fc3c25c03 100644
--- a/app-crypt/tang/files/tangd.initd
+++ b/app-crypt/tang/files/tangd.initd
@@ -2,15 +2,10 @@
# 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_args="TCP-LISTEN:${PORT},bind=${ADDRESS},fork SYSTEM:'/usr/libexec/tangd ${TANGDIR}'"
command_background=true
diff --git a/app-crypt/tang/tang-11.ebuild b/app-crypt/tang/tang-11.ebuild
index 380717499..a47a71abb 100644
--- a/app-crypt/tang/tang-11.ebuild
+++ b/app-crypt/tang/tang-11.ebuild
@@ -26,6 +26,8 @@ src_install(){
newinitd "${FILESDIR}"/tangd.initd tangd
systemd_dounit ${FILESDIR}/tangd.service
+ doconfd "${FILESDIR}"/tangd
+
dodir /var/db/tang
keepdir /var/db/tang
fowners tang:tang /var/db/tang
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-09 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-17 20:57 [gentoo-commits] repo/proj/guru:dev commit in: app-crypt/tang/, app-crypt/tang/files/ Julien Roy
-- strict thread matches above, loose matches on Subject: below --
2022-07-09 2:01 Julien Roy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox