diff --git a/srcpkgs/vault/INSTALL b/srcpkgs/vault/INSTALL new file mode 100644 index 00000000000..6b74176f572 --- /dev/null +++ b/srcpkgs/vault/INSTALL @@ -0,0 +1,13 @@ +case "${ACTION}" in +post) + # Set CAP_IPC_LOCK capability or exit gracefully if we cannot + # set the capability due to invalid permissions (fakeroot + # install). + set +e + setcap 'cap_ipc_lock=+ep' /usr/bin/vault + if [ $? -ne 0 ]; then + echo "ERROR: failed to set cap_ipc_lock capability on vault." + exit 0 + fi + ;; +esac diff --git a/srcpkgs/vault/files/vault.hcl b/srcpkgs/vault/files/vault.hcl deleted file mode 100644 index fa01cd9d381..00000000000 --- a/srcpkgs/vault/files/vault.hcl +++ /dev/null @@ -1,8 +0,0 @@ -storage "file" { - path = "/var/lib/vault" -} - -listener "tcp" { - address = "127.0.0.1:8200" - tls_disable = 1 -} diff --git a/srcpkgs/vault/files/vault/run b/srcpkgs/vault/files/vault/run index c9fc6d03f78..840cc283692 100644 --- a/srcpkgs/vault/files/vault/run +++ b/srcpkgs/vault/files/vault/run @@ -1,3 +1,3 @@ #!/bin/sh -exec chpst -u _vault vault server -config=/etc/vault.hcl +exec chpst -u _vault vault server -config=/etc/vault/ diff --git a/srcpkgs/vault/template b/srcpkgs/vault/template index d28a520a587..5b34538ad0c 100644 --- a/srcpkgs/vault/template +++ b/srcpkgs/vault/template @@ -1,37 +1,24 @@ # Template file for 'vault' pkgname=vault -version=1.2.3 +version=1.5.4 revision=1 build_style=go go_import_path="github.com/hashicorp/${pkgname}" -go_build_tags="ui release" +go_build_tags="release" _git_commit=e16495da552c996068e05574cddf69875199f949 go_ldflags="-X ${go_import_path}/sdk/version.GitCommit=${_git_commit}" -conf_files="/etc/vault.hcl" -make_dirs="/var/lib/vault 0700 _vault _vault" -hostmakedepends="git nodejs-lts python yarn" -short_desc="Tool for securely accessing secrets" -maintainer="iaroki " +hostmakedepends="git" +short_desc="Manage Secrets and Protect Sensitive Data" +maintainer="Michael Aldridge " license="MPL-2.0" homepage="https://www.vaultproject.io/" distfiles="https://github.com/hashicorp/${pkgname}/archive/v${version}.tar.gz" -checksum=b9f909b613d53ae591a5b91a4862c750aaf59e87592b1a74b4c4651c0b5790e3 +checksum=99e3145a9b6f5ee6429b997f3e1f35f648d07c617ff6aef7041f91fcf34e1582 system_accounts="_vault" - -case "$XBPS_TARGET_MACHINE" in - ppc*) broken="fails in yarn when building v8";; -esac - -broken="https://build.voidlinux.org/builders/i686_builder/builds/25404/steps/shell_3/logs/stdio" - -pre_build() { - vsed -i Makefile -e "s@(find \. -name '\*\.go' | grep -v pb\.go | grep -v vendor)@(find . -name '*.go' | grep -v pb.go | grep -v vendor | grep -v ./_build-)@" - local depbin="${wrksrc}/_build-depbin" - GOOS= GOARCH= CGO_ENABLED=0 PATH="$depbin:$PATH" GOBIN="$depbin" make bootstrap ember-dist static-assets -} +make_dirs="/var/lib/vault 0700 _vault _vault + /etc/vault 0700 root root" post_install() { - vinstall ${FILESDIR}/vault.hcl 644 etc/ vlicense LICENSE vsv vault }