Skip to content

Commit 1610b64

Browse files
committed
feat: add support for bin_path in metadata.hcl
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
1 parent 2243834 commit 1610b64

8 files changed

Lines changed: 16 additions & 0 deletions

File tree

dagger/maintenance/catalogs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type ExtensionConfiguration struct {
2828
ExtensionControlPath []string `yaml:"extension_control_path,omitempty"`
2929
DynamicLibraryPath []string `yaml:"dynamic_library_path,omitempty"`
3030
LdLibraryPath []string `yaml:"ld_library_path,omitempty"`
31+
BinPath []string `yaml:"bin_path,omitempty"`
3132
}
3233

3334
type ImageCatalog struct {

dagger/maintenance/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ func (m *Maintenance) GenerateCatalogs(
514514
ExtensionControlPath: metadata.ExtensionControlPath,
515515
DynamicLibraryPath: metadata.DynamicLibraryPath,
516516
LdLibraryPath: metadata.LdLibraryPath,
517+
BinPath: metadata.BinPath,
517518
}
518519

519520
img.Extensions = append(img.Extensions, extensionsConfig)

dagger/maintenance/parse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type extensionMetadata struct {
2828
ExtensionControlPath []string `hcl:"extension_control_path" cty:"extension_control_path"`
2929
DynamicLibraryPath []string `hcl:"dynamic_library_path" cty:"dynamic_library_path"`
3030
LdLibraryPath []string `hcl:"ld_library_path" cty:"ld_library_path"`
31+
BinPath []string `hcl:"bin_path" cty:"bin_path"`
3132
AutoUpdateOsLibs bool `hcl:"auto_update_os_libs" cty:"auto_update_os_libs"`
3233
RequiredExtensions []string `hcl:"required_extensions" cty:"required_extensions"`
3334
CreateExtension bool `hcl:"create_extension" cty:"create_extension"`

dagger/maintenance/testingvalues.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func generateExtensionConfiguration(metadata *extensionMetadata, extensionImage
108108
ExtensionControlPath: metadata.ExtensionControlPath,
109109
DynamicLibraryPath: metadata.DynamicLibraryPath,
110110
LdLibraryPath: metadata.LdLibraryPath,
111+
BinPath: metadata.BinPath,
111112
}, nil
112113
}
113114

pgaudit/metadata.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata = {
77
extension_control_path = []
88
dynamic_library_path = []
99
ld_library_path = []
10+
bin_path = []
1011
auto_update_os_libs = false
1112
required_extensions = []
1213
create_extension = true

pgvector/metadata.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata = {
77
extension_control_path = []
88
dynamic_library_path = []
99
ld_library_path = []
10+
bin_path = []
1011
auto_update_os_libs = false
1112
required_extensions = []
1213
create_extension = true

postgis/metadata.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata = {
88
extension_control_path = []
99
dynamic_library_path = []
1010
ld_library_path = ["system"]
11+
bin_path = []
1112
auto_update_os_libs = true
1213
required_extensions = []
1314
create_extension = true

templates/metadata.hcl.tmpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ metadata = {
4949
# Used in tests and to generate image catalogs.
5050
ld_library_path = []
5151

52+
# TODO: Remove this comment block after customizing the file.
53+
# `bin_path`: this SHOULD be defined when your extension needs executables
54+
# to be present in the PATH of the PostgreSQL process to function properly.
55+
# Each path is appended to the PATH environment variable for the
56+
# Postgres process.
57+
# If left EMPTY (`[]`) the operator will NOT alter `PATH`.
58+
# Used in tests and to generate image catalogs.
59+
bin_path = []
60+
5261
# TODO: Remove this comment block after customizing the file.
5362
# `auto_update_os_libs`: set to true to allow the maintenance tooling
5463
# to update OS libraries automatically; look at the `postgis` example.

0 commit comments

Comments
 (0)