diff options
author | Julien Roy <julien@jroy.ca> | 2024-11-17 00:14:31 -0500 |
---|---|---|
committer | Julien Roy <julien@jroy.ca> | 2024-11-18 07:40:22 -0500 |
commit | 7fcf0c2916182f6a4b0ac5e8055c4bbdabcc45f3 (patch) | |
tree | 510b14ce23b9986a87dcabfd33d720b580b3ea03 /app-admin | |
parent | net-im/mautrix-meta: drop 0.4.1 (diff) | |
download | guru-7fcf0c2916182f6a4b0ac5e8055c4bbdabcc45f3.tar.gz guru-7fcf0c2916182f6a4b0ac5e8055c4bbdabcc45f3.tar.bz2 guru-7fcf0c2916182f6a4b0ac5e8055c4bbdabcc45f3.zip |
app-admin/vaultwarden: add 1.32.4
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/vaultwarden/Manifest | 3 | ||||
-rw-r--r-- | app-admin/vaultwarden/metadata.xml | 4 | ||||
-rw-r--r-- | app-admin/vaultwarden/vaultwarden-1.32.4.ebuild | 128 |
3 files changed, 135 insertions, 0 deletions
diff --git a/app-admin/vaultwarden/Manifest b/app-admin/vaultwarden/Manifest index e116fec63..0b434a97f 100644 --- a/app-admin/vaultwarden/Manifest +++ b/app-admin/vaultwarden/Manifest @@ -5,3 +5,6 @@ DIST vaultwarden-1.30.4-deps.tar.xz 46442248 BLAKE2B 2d6f81583fe16855073f7bf6bcd DIST vaultwarden-1.30.4-docs.tar.xz 73864 BLAKE2B 5a7d71d639b19dedf997a3ab418be228795a03761b3d08cf4e2368ce72548d09dea3fb06b6f485d8b35240161982f1e74d3b4fb7a178714b0de3733ef7db17a4 SHA512 17917c8a365c5d32f1d83aaacdd0a9faac95241cc187d0237e584c34bbadeb1b11948fbcc5def104a091968b3845edcde57900f8f4d1536728664ef9d99467ae DIST vaultwarden-1.30.4.tar.gz 597933 BLAKE2B 24f9517173a4832cbd6b002831d4b09fe5b52531772e8f2aa1cca2517c50d39dc830ebb4f13d14851a52638891be2f9144d7ce38ca79813adcd3d62687812f6b SHA512 a84899ebe30129a62971d4391f4801d3a6eb63b22075a11e676a07f73d8ff0f431a4b8868bac37dc344678ff7de70959ed062c2c7fea4c254fe4f5286d56647e DIST vaultwarden-1.30.5.tar.gz 597882 BLAKE2B 8b7a8135cd4b454a7cd7016ee1b0efed09d4507ec28ff712b3d935ca006c524dc27e9de65c930a82e6cb0911cb9629ae1d5a9ee95531d3e5a171abae8ba99f72 SHA512 acf7c344840f9b19e3aa366dae794ca6daca9dfad10d2bfdfa08d195d00f553643b46f2f7fe9344d0949306f9dc892722af7aeb7a047986edc98b51ec0c143bb +DIST vaultwarden-1.32.4-docs.tar.xz 703140 BLAKE2B 6bca8f3e03b73d2bc921cc7f91df7bf5199a6267f7cd34e5f183d04d29d29aeb6d6973c61611ee4a18bbe2e8d3627682c018a3af2411497c140f772c977bae5b SHA512 2e865e3cc68a58227b2d5d99fd2292a4f6ddecce3dccbda99c896a1a83afd2020d0252f2104988099a8f564e20b67e2b09ce82923594bf6bafa2c91736ee057b +DIST vaultwarden-1.32.4-vendor.tar.xz 57601460 BLAKE2B d7e4a9f03848b93dc7c2619e1140c09112805e7cb61657310a4a3759eedd4e6b2c4cd948b7c64836c9455a79aa63e12a31e64237bfab7cdce07eaa7a0bdcd920 SHA512 0ccedfa75d2d45aab0bff81c27282f22c8b41f91d9de9e76d657e8722efff374ad2130a56ae9c197aad12fbdb7747904cace0246b3ec0ca3126c5ae4513b5584 +DIST vaultwarden-1.32.4.tar.gz 619528 BLAKE2B 7c559b984f889c86c9902e9bd07e6b63748f36e0532f90bca3715229de1c98fe2c4aa846a40c7dc946167fc9ad4da5294271d0cdefe9ff7a206d600554e356ed SHA512 2377ac9acdef157011c03a916ad07d8905550f41efd950f5afdb97bbf4a69ff1b372b5ebe18ca92edb0f02904330f95025b1ec376c5c3cad1388c61493eccb93 diff --git a/app-admin/vaultwarden/metadata.xml b/app-admin/vaultwarden/metadata.xml index 3c4ab14ed..0ba50b32b 100644 --- a/app-admin/vaultwarden/metadata.xml +++ b/app-admin/vaultwarden/metadata.xml @@ -5,6 +5,10 @@ <email>me@rahil.rocks</email> <name>Rahil Bhimjiani</name> </maintainer> + <maintainer type="person"> + <email>julien@jroy.ca</email> + <name>Julien Roy</name> + </maintainer> <use> <flag name="cli"> Install client with the Command-Line Interface diff --git a/app-admin/vaultwarden/vaultwarden-1.32.4.ebuild b/app-admin/vaultwarden/vaultwarden-1.32.4.ebuild new file mode 100644 index 000000000..b96d3cd77 --- /dev/null +++ b/app-admin/vaultwarden/vaultwarden-1.32.4.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# https://github.com/dani-garcia/vaultwarden/issues/4649 +RUST_MAX_VER="1.82.0" + +inherit cargo check-reqs readme.gentoo-r1 systemd tmpfiles + +DESCRIPTION="Unofficial Bitwarden compatible password manager server written in Rust" +HOMEPAGE="https://github.com/dani-garcia/vaultwarden" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/dani-garcia/vaultwarden.git" +else + SRC_URI=" + https://github.com/dani-garcia/vaultwarden/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz + https://jroy.ca/dist/${P}-vendor.tar.xz + https://jroy.ca/dist/${P}-wiki.tar.xz -> ${P}-docs.tar.xz +" + KEYWORDS="~amd64" +fi + +# main +LICENSE="AGPL-3" +# deps +LICENSE+=" 0BSD Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 BSD ISC MIT MPL-2.0 Unicode-DFS-2016" + +SLOT="0" +IUSE="cli mysql postgres +sqlite web" +REQUIRED_USE="|| ( mysql postgres sqlite )" + +RDEPEND=" + acct-user/vaultwarden + acct-group/vaultwarden + cli? ( || ( app-admin/bitwarden-cli app-admin/bitwarden-cli-bin ) ) + mysql? ( dev-db/mysql-connector-c:= ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) + web? ( || ( www-apps/vaultwarden-web www-apps/vaultwarden-web-bin ) ) +" + +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +QA_FLAGS_IGNORED="usr/bin/${PN}" +QA_PRESTRIPPED="usr/bin/${PN}" +ECARGO_VENDOR="${WORKDIR}/vendor" + +PATCHES=( + "${FILESDIR}"/vaultwarden-envfile-1.30.3.patch +) + +CHECKREQS_MEMORY=3G +CHECKREQS_DISK_BUILD=2G + +DOC_CONTENTS="\n + Configuration file: /etc/${PN}.env\n + Data directory: /var/lib/${PN}\n + \n + MySQL & PostgreSQL users must set DATABASE_URL in config\n + \n + Default server: http://0.0.0.0:8000\n + Admin interface: http://0.0.0.0:8000/admin +" + +pkg_setup() { + check-reqs_pkg_setup + rust_pkg_setup +} + +src_unpack() { + if [[ ${PV} == 9999* ]]; then + # clone vaultwarden + git-r3_src_unpack + + # clone vaultwarden.wiki + EGIT_REPO_URI="https://github.com/dani-garcia/vaultwarden.wiki.git" + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}.wiki" + git-r3_src_unpack + + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_prepare() { + default + use web && { sed -i -e 's|^WEB_VAULT_ENABLED=false|WEB_VAULT_ENABLED=true|g;' .env.template || die; } +} + +src_configure() { + local myfeatures=( + $(usev sqlite) + $(usev mysql) + $(usev postgres postgresql ) + ) + cargo_src_configure +} + +src_compile() { + # https://github.com/dani-garcia/vaultwarden/blob/main/build.rs + [[ ${PV} != 9999* ]] && export VW_VERSION="${PV}" + cargo_src_compile +} + +src_install() { + dobin target/*/*/"${PN}" + systemd_newunit "${FILESDIR}"/vaultwarden-1.30.3.service "${PN}".service + newinitd "${FILESDIR}"/vaultwarden-1.30.3.initd "${PN}" + newtmpfiles "${FILESDIR}"/vaultwarden-tmpfiles-1.30.3.conf "${PN}".conf + insinto /etc + newins .env.template "${PN}".env + dosym -r /etc/"${PN}".env /etc/conf.d/"${PN}" + keepdir /var/lib/"${PN}" + + readme.gentoo_create_doc + einstalldocs + dodoc -r ../"${PN}".wiki/* +} + +pkg_postinst() { + tmpfiles_process "${PN}".conf + readme.gentoo_print_elog +} |