mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-09 06:37:10 -08:00
app-misc/spire: new package, the spiffe runtime environment
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: William Hubbs <williamh@gentoo.org>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DIST spire-0.8.1-vendor.tar.gz 10550551 BLAKE2B 4ab04c0e4de231097620a015f523ed9d7e0d6872425826e4bc3572f920a4d3de5174cb78f4ed61340ffc1abe3e25d42e8735228b142b424c85ef24fac52740ca SHA512 879cba4eaa681814858fa7965b28d0217d4ae806c979d348cb6d5f413dca7f03f99c34b8dcdbc0dad8e5253990a473962b9c1438ba79bef5fe757df11c7f4ee7
|
||||
DIST spire-0.8.1.tar.gz 1070262 BLAKE2B 7e30ac233759f2fed7476a82d072c4ec7815346cb50419b10ac7c5ce566aae6e783a51284a39847d63c04b0e398aab7ad15d94ea4e05569b43e762abfadaf550 SHA512 aa864f3f1d0faa8b7bfa527effde244957f9b30c6f115e49819777b6f3a5ea751ed751ac19b94a45d02aa22e719e6bd6e33355f9b561bbc5458d5997d95a1437
|
||||
@@ -0,0 +1,6 @@
|
||||
# log file for the spire agent.
|
||||
# The default is /var/log/spire/spire-agent.log
|
||||
#logfile=""
|
||||
#
|
||||
# Extra arguments to pass when starting the spire agent.
|
||||
#spire_agent_args=""
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2019 Sony Interactive Entertainment LLC
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="spire agent daemon"
|
||||
description="spire agent"
|
||||
logfile="${logfile:-/var/log/spire/spire-agent.log}"
|
||||
command=/opt/spire/spire-agent
|
||||
command_args="run --logFile ${logfile} ${spire_agent_args}"
|
||||
command_user=spire
|
||||
directory=/opt/spire
|
||||
supervisor=supervise-daemon
|
||||
@@ -0,0 +1,6 @@
|
||||
# log file for the spire server.
|
||||
# The default is /var/log/spire/spire-server.log
|
||||
#logfile=""
|
||||
#
|
||||
# Extra arguments to pass when starting the spire server.
|
||||
#spire_server_args=""
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2019 Sony Interactive Entertainment LLC
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
name="spire server daemon"
|
||||
description="spire server"
|
||||
logfile="${logfile:-/var/log/spire/spire-server.log}"
|
||||
command=/opt/spire/spire-server
|
||||
command_args="run --logFile ${logfile} ${spire_server_args}"
|
||||
command_user=spire
|
||||
directory=/opt/spire
|
||||
supervisor=supervise-daemon
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>williamh@gentoo.org</email>
|
||||
<name>William Hubbs</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
@@ -0,0 +1,61 @@
|
||||
# Copyright 2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
VENDOR_URI="https://dev.gentoo.org/~whubbs/dist/${P}-vendor.tar.gz"
|
||||
|
||||
DESCRIPTION="the spiffe runtime environment"
|
||||
HOMEPAGE="https://github.com/spiffe/spire"
|
||||
SRC_URI="https://github.com/spiffe/spire/archive/${PV}.tar.gz -> ${P}.tar.gz
|
||||
${VENDOR_URI}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
COMMON_DEPEND="acct-group/spire
|
||||
acct-user/spire"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
dev-lang/go"
|
||||
RDEPEND="${COMMON_DEPEND}"
|
||||
|
||||
RESTRICT="strip"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
mv ../vendor . || die "Unable to move ../vendor directory"
|
||||
}
|
||||
|
||||
do_cmd() {
|
||||
if [[ -z "$@" ]]; then
|
||||
die "No arguments passed to do_cmd"
|
||||
fi
|
||||
echo $@
|
||||
$@ || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
do_cmd cd cmd/spire-agent
|
||||
do_cmd go build -mod vendor -o ../../spire-agent
|
||||
do_cmd cd ../../cmd/spire-server
|
||||
do_cmd go build -mod vendor -o ../../spire-server
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /opt/spire
|
||||
doexe spire-agent spire-server
|
||||
keepdir /opt/spire/.data
|
||||
fowners spire:spire /opt/spire/.data
|
||||
insinto /etc/spire
|
||||
doins -r conf/*
|
||||
dosym ../../etc/spire /opt/spire/conf
|
||||
dosym ../../opt/spire/spire-agent /usr/bin/spire-agent
|
||||
dosym ../../opt/spire/spire-server /usr/bin/spire-server
|
||||
newconfd "${FILESDIR}"/spire-agent.confd spire-agent
|
||||
newinitd "${FILESDIR}"/spire-agent.initd spire-agent
|
||||
newconfd "${FILESDIR}"/spire-server.confd spire-server
|
||||
newinitd "${FILESDIR}"/spire-server.initd spire-server
|
||||
keepdir /var/log/spire
|
||||
fowners spire:spire /var/log/spire
|
||||
}
|
||||
Reference in New Issue
Block a user