From aaa22b62c0756d325531c5b1a2edd80d5b9fb16c Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Sun, 3 Sep 2023 15:07:57 +0200 Subject: [PATCH] www-apps/zitadel-bin: Initial import Signed-off-by: Stefan Knoblich --- acct-group/zitadel/Manifest | 1 + acct-group/zitadel/zitadel-0.ebuild | 9 ++++ acct-user/zitadel/Manifest | 1 + acct-user/zitadel/zitadel-0.ebuild | 13 +++++ www-apps/zitadel-bin/Manifest | 6 +++ www-apps/zitadel-bin/files/zitadel.confd | 12 +++++ www-apps/zitadel-bin/files/zitadel.initd | 26 ++++++++++ .../zitadel-bin/zitadel-bin-2.35.0.ebuild | 47 +++++++++++++++++++ 8 files changed, 115 insertions(+) create mode 100644 acct-group/zitadel/Manifest create mode 100644 acct-group/zitadel/zitadel-0.ebuild create mode 100644 acct-user/zitadel/Manifest create mode 100644 acct-user/zitadel/zitadel-0.ebuild create mode 100644 www-apps/zitadel-bin/Manifest create mode 100644 www-apps/zitadel-bin/files/zitadel.confd create mode 100644 www-apps/zitadel-bin/files/zitadel.initd create mode 100644 www-apps/zitadel-bin/zitadel-bin-2.35.0.ebuild diff --git a/acct-group/zitadel/Manifest b/acct-group/zitadel/Manifest new file mode 100644 index 0000000..5134c84 --- /dev/null +++ b/acct-group/zitadel/Manifest @@ -0,0 +1 @@ +EBUILD zitadel-0.ebuild 187 BLAKE2B bda2890c15bc1b23eeea38a932e138244abac0cf7cd9006a1c14d3ac3b74287c8e3a177c1d12c678ddc23c8bed5a1c2143395250d5393043f37460c7037424de SHA512 c25f314a1ad517f41c9f2e6a3bd2264e7cf40520097b4fabba5e5d976e6217f5039524d1b52c498c3caf3ee29f7ed2e782d7c9930369b2c34b2bf7a2be8ceac3 diff --git a/acct-group/zitadel/zitadel-0.ebuild b/acct-group/zitadel/zitadel-0.ebuild new file mode 100644 index 0000000..6d77a8b --- /dev/null +++ b/acct-group/zitadel/zitadel-0.ebuild @@ -0,0 +1,9 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +DESCRIPTION="Zitadel program group" +ACCT_GROUP_ID=984 diff --git a/acct-user/zitadel/Manifest b/acct-user/zitadel/Manifest new file mode 100644 index 0000000..9ce7ba3 --- /dev/null +++ b/acct-user/zitadel/Manifest @@ -0,0 +1 @@ +EBUILD zitadel-0.ebuild 290 BLAKE2B f8b49be770daf01273f14f6b9f11cbc04e263a14317f7745325df98e46c66e9f6651222c614a1358bc2b6574c3679eb0b865ebec89a12d6691f84cd3a85bf92b SHA512 cd669bc04309c4ca144da25f65a317f68d584e3081c0ccfd9a0ffbef323500c24a6053ec529124ec3bc8b9eace36e6634f8229fef62a8dab6fa2f93803b37c24 diff --git a/acct-user/zitadel/zitadel-0.ebuild b/acct-user/zitadel/zitadel-0.ebuild new file mode 100644 index 0000000..5688366 --- /dev/null +++ b/acct-user/zitadel/zitadel-0.ebuild @@ -0,0 +1,13 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="Zitadel program user" +ACCT_USER_ID=984 +ACCT_USER_HOME=/var/lib/zitadel +ACCT_USER_HOME_PERMS=0750 +ACCT_USER_GROUPS=( zitadel ) +acct-user_add_deps diff --git a/www-apps/zitadel-bin/Manifest b/www-apps/zitadel-bin/Manifest new file mode 100644 index 0000000..7534aae --- /dev/null +++ b/www-apps/zitadel-bin/Manifest @@ -0,0 +1,6 @@ +AUX zitadel.confd 294 BLAKE2B 29e25abba3600adbb5ff7e3b9bbd4c968ebfff56aa7afb37bd5b9ea5f56a9476f7c5d9518d2d16cee4e5d11f5429c99cb9993cb6ba37529920a8a31c9ceb751c SHA512 1c583574019abf4cf71e86c3acd3a3d386316beb206dd0dc7a17980e4fd81ef203fbc83e2f77bc1e85acd60aa18a26b2e20bd644e7c5e58623f72dcdf2f61ad7 +AUX zitadel.initd 1246 BLAKE2B 2016c1641ae8bdc3757963d49c29bf0c52cb812b5d1d8db3dfc4ce2b4286fecd23666344faa4b0a095c32a0a112c89b8af6395e242c8e198a7ef29cc275735d8 SHA512 a31ca95ece9b9bfde78ecfe90e53155be6cfc2b145f143cfa15900b0fb6057fb3f7b37863b3bd61f708138db55ad16af80ce099c8f14a2b0c012208d26b2eae7 +DIST zitadel-bin-2.35.0-defaults.yaml 226080 BLAKE2B 078afc1c7e9dbe3bfed76e032e0209acf830b001f454a296e8264e9c932d07d52b6abe20511ddba60c69201f35023d2ca292100d8ba7a82d18a44dba6a661a9f SHA512 0b48546d1fdc615ce449535fd94e816b687acf10ab08889cc37c222349259ee65796cb7ccc5011e18715bb1b966dbc71c32365041d3a0b0ba2fee21cb75840e3 +DIST zitadel-bin-2.35.0-linux-amd64.tar.gz 33966041 BLAKE2B d5fbfe27b993aa72323ef6fec2a2bc4ebef6c0e6f7e9d83b7ea4dc1a2781b96c70e390bbb457adbe37382ab0775e42103d60a66140378e425d0e80b178a7638c SHA512 b55e7ef89f171ec95774b4959b08442a921b453924c159aa798d2ce7a1f74158cedecc31691ad3759c7e1cc7fd7011b6572b22057f0ae73276566701bd04e67c +DIST zitadel-bin-2.35.0-steps.yaml 16868 BLAKE2B 4e1911c6ca3341b6fb866bdcf14a66747a806d858b62ed20efdbc86378fe0e11c0f74a909aff7d52fee6c99c9381a3e82559d050f04b3d045761edffce99d220 SHA512 ca401c4ad9e83dfc6643f1f6425937b72eb4c80ec8c7ed164005f20bb62fa574b2c95c0ac74d5d90e4eb0faff51b341fe75998bf2984123663a5d62ab7899e57 +EBUILD zitadel-bin-2.35.0.ebuild 1121 BLAKE2B 48ce828a10cbe2d2be423cbdae50a98a03c284084070d95f55496928799c4dbf64ce71127f0ce394d8d5b3dffd4653ccf09b3f404498a93620715d0229a3d4da SHA512 8fed6f1176a089a8cf242cde22e36f02d8e5d417a50dd50460d47b0d4cdea2f7dd49820bab2e51deb343ea9be71c815a0022a88ed898368f59dea48e96a122ad diff --git a/www-apps/zitadel-bin/files/zitadel.confd b/www-apps/zitadel-bin/files/zitadel.confd new file mode 100644 index 0000000..02c2f69 --- /dev/null +++ b/www-apps/zitadel-bin/files/zitadel.confd @@ -0,0 +1,12 @@ +# Zitadel user and group +#ZITADEL_USER="zitadel" +#ZITADEL_GROUP="zitadel" + +# Zitadel main configuration file +#ZITADEL_CONFIG="/etc/zitadel/config.yaml" + +# Zitadel initial setup steps +#ZITADEL_STEPS="/etc/zitadel/steps.yaml" + +# Additional commandline options for the zitadel +#ZITADEL_OPTIONS="" diff --git a/www-apps/zitadel-bin/files/zitadel.initd b/www-apps/zitadel-bin/files/zitadel.initd new file mode 100644 index 0000000..06fd874 --- /dev/null +++ b/www-apps/zitadel-bin/files/zitadel.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +ZITADEL_USER="${ZITADEL_USER:-zitadel}" +ZITADEL_GROUP="${ZITADEL_GROUP:-zitadel}" +ZITADEL_CONFIG="${ZITADEL_CONFIG:-/etc/zitadel/config.yaml}" +ZITADEL_STEPS="${ZITADEL_STEPS:-/etc/zitadel/steps.yaml}" +ZITADEL_DATA_DIR="${ZITADEL_DATA_DIR:-/var/lib/zitadel}" +ZITADEL_LOG_DIR="${ZITADEL_LOG_DIR:-/var/log/zitadel}" +ZITADEL_MASTERKEY_FILE="${ZITADEL_MASTERKEY_FILE:-/etc/zitadel/master.key}" + +command="/usr/bin/zitadel" +command_args="start-from-init --config '${ZITADEL_CONFIG}' --steps '${ZITADEL_STEPS}' --masterkeyFile '${ZITADEL_MASTERKEY_FILE}' ${ZITADEL_OPTIONS:-}" + +pidfile="/run/${RC_SVCNAME}.pid" +command_background="true" +start_stop_daemon_args="--user=\"${ZITADEL_USER}\" --group=\"${ZITADEL_GROUP}\" --stdout ${ZITADEL_LOG_DIR}/zitadel.log --stderr ${ZITADEL_LOG_DIR}/zitadel.err" + +start_pre() { + checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_CONFIG}" + checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_STEPS}" + checkpath -f -o "${ZITADEL_USER}" -m600 "${ZITADEL_MASTERKEY_FILE}" + checkpath -d -o "${ZITADEL_USER}" -m750 "${ZITADEL_DATA_DIR}" + checkpath -d -o "${ZITADEL_USER}" -m750 "${ZITADEL_LOG_DIR}" +} diff --git a/www-apps/zitadel-bin/zitadel-bin-2.35.0.ebuild b/www-apps/zitadel-bin/zitadel-bin-2.35.0.ebuild new file mode 100644 index 0000000..e3fd7b4 --- /dev/null +++ b/www-apps/zitadel-bin/zitadel-bin-2.35.0.ebuild @@ -0,0 +1,47 @@ + +EAPI=7 +MY_PV="v${PV}" + +#inherit + +SLOT="0" +DESCRIPTION="Identity and access management" +HOMEPAGE="https://zitadel.com/" +SRC_URI="https://github.com/zitadel/zitadel/releases/download/${MY_PV}/zitadel-linux-amd64.tar.gz -> ${P}-linux-amd64.tar.gz + https://github.com/zitadel/zitadel/blob/${MY_PV}/cmd/defaults.yaml -> ${P}-defaults.yaml + https://github.com/zitadel/zitadel/blob/${MY_PV}/cmd/setup/steps.yaml -> ${P}-steps.yaml" +KEYWORDS="~amd64" +LICENSE="Apache-2.0" + +DOCS=( "LICENSE" "README.md" ) + +QA_PRESTRIPPED="/usr/bin/zitadel" + +S="${WORKDIR}/zitadel-linux-amd64" + +DEPEND=" + acct-group/zitadel + acct-user/zitadel +" + +RDEPEND="${DEPEND}" + +src_install() { + default_src_install + dobin zitadel + + keepdir "/var/lib/zitadel" + fowners zitadel:zitadel "/var/lib/zitadel" + fperms 0700 "/var/lib/zitadel" + + keepdir "/var/log/zitadel" + fowners zitadel:zitadel "/var/log/zitadel" + fperms 0750 "/var/log/zitadel" + + insinto "/etc/zitadel" + newins "${DISTDIR}/${P}-defaults.yaml" "defaults.yaml.dist" + newins "${DISTDIR}/${P}-steps.yaml" "steps.yaml.dist" + + fowners zitadel:zitadel "/etc/zitadel" + fperms 0700 "/etc/zitadel" +}