diff --git a/README.md b/README.md index d45e7bd..14ea56e 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ annotations as defined by the [OCI Image Format Specification](https://github.co | `org.opencontainers.image.title` | Human-readable image title | | `org.opencontainers.image.description` | Image description | | `org.opencontainers.image.source` | Source repository URL | -| `org.opencontainers.image.licenses` | License identifier (Apache-2.0) | +| `org.opencontainers.image.licenses` | License identifier | You can inspect these labels using container tools: diff --git a/docker-bake.hcl b/docker-bake.hcl index 738268d..fa66d20 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -74,7 +74,7 @@ target "default" { "index,manifest:org.opencontainers.image.description=A ${metadata.name} ${getExtensionVersion(distro, pgVersion)} container image for PostgreSQL ${pgVersion} on ${distro}", "index,manifest:org.opencontainers.image.documentation=${url}", "index,manifest:org.opencontainers.image.authors=${authors}", - "index,manifest:org.opencontainers.image.licenses=Apache-2.0", + "index,manifest:org.opencontainers.image.licenses=${metadata.licenses}", "index,manifest:org.opencontainers.image.base.name=scratch", "index,manifest:io.cloudnativepg.image.base.name=${getBaseImage(distro, pgVersion)}", "index,manifest:io.cloudnativepg.image.base.pgmajor=${pgVersion}", @@ -91,7 +91,7 @@ target "default" { "org.opencontainers.image.description" = "A ${metadata.name} ${getExtensionVersion(distro, pgVersion)} container image for PostgreSQL ${pgVersion} on ${distro}", "org.opencontainers.image.documentation" = "${url}", "org.opencontainers.image.authors" = "${authors}", - "org.opencontainers.image.licenses" = "Apache-2.0", + "org.opencontainers.image.licenses" = "${metadata.licenses}", "org.opencontainers.image.base.name" = "scratch", "io.cloudnativepg.image.base.name" = "${getBaseImage(distro, pgVersion)}", "io.cloudnativepg.image.base.pgmajor" = "${pgVersion}", diff --git a/pgaudit/metadata.hcl b/pgaudit/metadata.hcl index 35a4670..132af0d 100644 --- a/pgaudit/metadata.hcl +++ b/pgaudit/metadata.hcl @@ -2,6 +2,7 @@ metadata = { name = "pgaudit" sql_name = "pgaudit" image_name = "pgaudit" + licenses = "PostgreSQL" shared_preload_libraries = ["pgaudit"] extension_control_path = [] dynamic_library_path = [] diff --git a/pgvector/metadata.hcl b/pgvector/metadata.hcl index afb37f3..a170751 100644 --- a/pgvector/metadata.hcl +++ b/pgvector/metadata.hcl @@ -2,6 +2,7 @@ metadata = { name = "pgvector" sql_name = "vector" image_name = "pgvector" + licenses = "PostgreSQL" shared_preload_libraries = [] extension_control_path = [] dynamic_library_path = [] diff --git a/postgis/metadata.hcl b/postgis/metadata.hcl index 0f555fb..ecaabce 100644 --- a/postgis/metadata.hcl +++ b/postgis/metadata.hcl @@ -2,6 +2,16 @@ metadata = { name = "postgis" sql_name = "postgis" image_name = "postgis-extension" + licenses = <<-EOT + Apache-2.0 AND blessing AND BSD-2-Clause AND BSD-3-Clause AND + BSD-3-Clause-Clear AND BSD-3-Clause-LBNL AND BSD-4-Clause-UC AND + BSL-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-BY-SA-3.0 AND cURL AND + FTL AND GPL-2.0 AND GPL-3.0 AND HDF5 AND HPND-sell-variant AND + IJG AND Info-ZIP AND ISC AND LGPL-2.1 AND Libpng AND libtiff AND + MIT AND MIT-Modern-Variant AND MPL-1.1 AND OpenLDAP-2.8 AND + PostgreSQL AND Spencer-86 AND SPL-1.0 AND Unicode-DFS-2015 AND + Unlicense AND X11 AND Zlib + EOT shared_preload_libraries = [] extension_control_path = [] dynamic_library_path = [] diff --git a/templates/metadata.hcl.tmpl b/templates/metadata.hcl.tmpl index e34eaf3..a916e7c 100644 --- a/templates/metadata.hcl.tmpl +++ b/templates/metadata.hcl.tmpl @@ -9,6 +9,12 @@ metadata = { # it identifies the image (e.g. ghcr.io/cloudnative-pg/) image_name = "{{ .Name }}" + # TODO: Remove this comment block after customizing the file. + # `licenses`: The SPDX license identifier(s) for the extension software. + # Examples: "Apache-2.0", "PostgreSQL", "GPL-2.0-only". + # See: https://spdx.org/licenses/ + licenses = "Apache-2.0" + # TODO: Remove this comment block after customizing the file. # `shared_preload_libraries`: list libraries to be added to # `shared_preload_libraries` in Postgres. Usually empty.