Managing depends
lists?
#636
-
TL;DR: When
ENV: # Fedora RPM depends (attempted to provide YAML array list as full value string, rejected):
#REQUIRED_PACKAGES="[ragel, openssl, glib2, sqlite, file-libs, libicu, pcre, zlib, libsodium, luajit, hyperscan]"
# openSUSE RPM depends (attempted to provide YAML array list as items only and wrap ENV in `nfpm.yaml`, rejected):
REQUIRED_PACKAGES="ragel, openssl, glib2, sqlite, libmagic1, libicu, pcre, zlib, libsodium, luajit"
# Example of arch dependent packages:
# x86_64:
REQUIRED_PACKAGES="${REQUIRED_PACKAGES}, hyperscan-devel, jemalloc"
# aarch64:
REQUIRED_PACKAGES="${REQUIRED_PACKAGES}, vectorscan-devel"
#depends: ${REQUIRED_PACKAGES}
depends: [ ${REQUIRED_PACKAGES} ] What is the right way to approach this? Do you stitch several YAML files together to provide config, or commit several different config copies with common content repeated?
I haven't tried YAML anchors + aliases yet, perhaps I could store the values in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
nfpm.Config
seems to get validated, any foreign keys defined (even if using the convention ofx-
prefix like Docker offers for extensions) throws an error.yq
could be used to modify YAML via shell scripts in CI.envsubst
seems to be the advised alternative to replace file content ENV vars beforenfpm
processes the config. This was the simplest approach for bulk replacing thedepends
for me 👍