bitnami-containers/bitnami/schema-registry/6.2/debian-11
Marc Rovner 5439966ea8
[bitnami/java] postunpack.sh should be copying the contents of JAVA_EXTRA_SECURITY_DIR, not the directory itself (#28667)
* java/postunpack.sh should be copying the contents of JAVA_EXTRA_SECURITY_DIR, not the directory

java/postunpack.sh copies the directory pointed to by JAVA_EXTRA_SECURITY_DIR as a subdir of `/opt/bitnami/java/lib/security` directory.

java/postunpack.sh should be coping just the contents of JAVA_EXTRA_SECURITY_DIR to `/opt/bitnami/java/lib/security` directory.

Rather it is copying the finaly directory on the path in JAVA_EXTRA_SECURITY_DIR as a subdir of `/opt/bitname/java/lib/security`

For example, using the default `JAVA_EXTRA_SECURITY_DIR` value "/bitnami/java/extra-security", create the file `rootfs/bitnami/java/extra-security/cacerts`, and build the image, rather than `/opt/bitnami/java/lib/security/cacerts` replaced with the new file, a new subdir `/opt/bitnami/java/lib/security/extra-security` directory is created, with the new `cacerts` file under there.

As a proposed fix for this, change the relevate `cp` commands from
```
   cp -Lr "$JAVA_EXTRA_SECURITY_DIR" /opt/bitnami/java/lib/security
```
to this, by added a `/.` to the end of the source argument:
```
   cp -Lr "$JAVA_EXTRA_SECURITY_DIR/." /opt/bitnami/java/lib/security
```

Signed-off-by: QuirkyMarc <mrovner@panix.com>

* Use braces for env-vars expansion

Signed-off-by: Andrés Bono <andresbono@vmware.com>

---------

Signed-off-by: QuirkyMarc <mrovner@panix.com>
Signed-off-by: Andrés Bono <andresbono@vmware.com>
Co-authored-by: Andrés Bono <andresbono@vmware.com>
2023-04-03 11:44:00 +02:00
..
prebuildfs
rootfs/opt/bitnami/scripts [bitnami/java] postunpack.sh should be copying the contents of JAVA_EXTRA_SECURITY_DIR, not the directory itself (#28667) 2023-04-03 11:44:00 +02:00
Dockerfile
docker-compose.yml
tags-info.yaml