Skip to content

Commit e9d93b7

Browse files
committed
chore: testing
Signed-off-by: Niccolò Fei <[email protected]>
1 parent bb34821 commit e9d93b7

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ in CloudNativePG.
2121
## Supported Extensions
2222

2323
- [pgvector](pgvector) - Open-source vector similarity search for PostgreSQL
24-
- [pgvector](postgis) - Open-source geospatial database extension for PostgreSQL
24+
- [PostGIS](postgis) - Open-source geospatial database extension for PostgreSQL
2525

2626
---
2727

postgis/Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@ RUN mkdir -p /system /licenses && \
2323
# Extract all the libs that aren't already part of the base image
2424
comm -13 /tmp/base-image-libs.out /tmp/all-deps.out > /tmp/libraries.out && \
2525
while read -r lib; do \
26-
# Resolve the symlink to get the real file
2726
resolved=$(readlink -f "$lib"); \
28-
# Base name of real file
29-
basename=$(basename "$resolved"); \
30-
# Copy the real file and all its symlinks
31-
cp -a "$(dirname "$resolved")/${basename%.so*}.so"* /system/; \
27+
dir=$(dirname "$lib"); \
28+
base=$(basename "$lib"); \
29+
# Copy the real file
30+
cp -a "$resolved" /system/; \
31+
# Reconstruct all its symlinks
32+
for file in "$dir"/"${base%.so*}.so"*; do \
33+
[ -e "$file" ] || continue; \
34+
# If it's a symlink and it resolves to the same real file, we reconstruct it
35+
if [ -L "$file" ] && [ "$(readlink -f "$file")" = "$resolved" ]; then \
36+
ln -sf "$(basename "$resolved")" "/system/$(basename "$file")"; \
37+
fi; \
38+
done; \
3239
done < /tmp/libraries.out && \
3340
# Get licenses
3441
for lib in $(find /system -maxdepth 1 -type f -name '*.so*'); do \

0 commit comments

Comments
 (0)