ac38203b8e
The plugin runs under both Vault and OpenBao, but nfpm only produced a single RPM that installs into /opt/vault-plugins. OpenBao hosts expect their plugins under /opt/openbao-plugins, so a second package is needed. - Parameterize nfpm.yaml with PACKAGE_NAME, PACKAGE_PLUGIN_DIR, and PACKAGE_PREINSTALL so one config renders per target server - Replace the static preinstall.sh with preinstall.sh.tmpl that mkdir -p's the flavour's plugin directory - Build two RPMs in build-rpm.sh via a build_flavor helper: vault-plugin-secrets-litellm -> /opt/vault-plugins and openbao-plugin-secrets-litellm -> /opt/openbao-plugins
39 lines
1001 B
YAML
39 lines
1001 B
YAML
---
|
|
# nfpm config for building the vault-plugin-secrets-litellm RPM.
|
|
# Rendered through envsubst (see scripts/build-rpm.sh) then fed to `nfpm pkg`.
|
|
# Built once per target server (Vault, OpenBao); PACKAGE_NAME and
|
|
# PACKAGE_PLUGIN_DIR vary per flavour.
|
|
|
|
name: ${PACKAGE_NAME}
|
|
version: ${PACKAGE_VERSION}
|
|
release: ${PACKAGE_RELEASE}
|
|
arch: ${PACKAGE_ARCH}
|
|
platform: ${PACKAGE_PLATFORM}
|
|
section: default
|
|
priority: extra
|
|
description: "${PACKAGE_DESCRIPTION}"
|
|
|
|
maintainer: ${PACKAGE_MAINTAINER}
|
|
homepage: ${PACKAGE_HOMEPAGE}
|
|
license: ${PACKAGE_LICENSE}
|
|
|
|
disable_globbing: false
|
|
|
|
replaces:
|
|
- ${PACKAGE_NAME}
|
|
provides:
|
|
- ${PACKAGE_NAME}
|
|
|
|
# Install the plugin binary into the server's plugin directory. Point the
|
|
# server's plugin_directory at PACKAGE_PLUGIN_DIR to pick it up.
|
|
contents:
|
|
- src: dist/vault-plugin-secrets-litellm
|
|
dst: ${PACKAGE_PLUGIN_DIR}/vault-plugin-secrets-litellm
|
|
file_info:
|
|
mode: 0755
|
|
owner: root
|
|
group: root
|
|
|
|
scripts:
|
|
preinstall: ${PACKAGE_PREINSTALL}
|