Skip to content
Snippets Groups Projects

Upgrade to ubuntu 24.04 and mapserver 8.2

Merged David Hoese requested to merge update-deps into master
5 files
+ 69
220
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 15
10
@@ -8,13 +8,16 @@ error() {
echo >&2 "ERROR: $@"
}
if [[ $# -ne 2 ]]; then
error "Usage: ./test_mapserver_image.sh <image_url> <image_tag>"
if [[ $# -eq 1 ]]; then
image=$1
elif [[ $# -eq 2 ]]; then
# deprecated: use single URL:tag from now on
image="$1:$2"
else
error "Usage: ./test_mapserver_image.sh <image_url:image_tag>"
exit 1
fi
image_url=$1
image_tag=$2
MINIO_SERVER_NAME="test-minio-server"
export AWS_ACCESS_KEY_ID="minioadmin"
export AWS_SECRET_ACCESS_KEY="minioadmin"
@@ -44,7 +47,7 @@ teardown_test() {
kill_postgres || debug "Could not kill postgres container"
kill_minio || debug "Could not kill minio container"
if [ -d $base_tmp_dir ]; then
docker run --rm --name tmpremover -v ${base_tmp_dir}:/dst ${image_url}:${image_tag} bash -c "chmod -R 777 /dst"
docker run --rm --name tmpremover -v ${base_tmp_dir}:/dst ${image} bash -c "chmod -R 777 /dst"
rm -rf $base_tmp_dir || debug "Could not remove temporary directory: ${base_tmp_dir}"
fi
docker network rm ${NETWORK_NAME} > /dev/null || debug "Could not remove docker network"
@@ -57,12 +60,14 @@ graceful_exit() {
}
start_test_container() {
debug "Starting test docker container (${image_url}:${image_tag})..."
docker run --rm -d --network ${NETWORK_NAME} --name test -p 8888:80 $@ ${image_url}:${image_tag}
debug "Starting test docker container (${image})..."
docker run --rm -d --network ${NETWORK_NAME} --name test -p 8888:80 $@ ${image}
start_status=$?
# just wait a bit to let the server start
sleep 2
debug "Container started."
debug "Installing rasterio into test container for geotiff creation"
docker exec -i test python3 -m pip install --break-system-packages --root-user-action ignore rasterio fiona shapely
return $start_status
}
@@ -225,8 +230,8 @@ create_fake_s3_geotiff() {
gtiff_fn=$(basename $fn)
bucket_name=$(basename $(dirname $fn))
aws s3api create-bucket --endpoint-url "http://localhost:9000" --bucket "${bucket_name}" 1>&2
aws s3 cp --endpoint-url "http://localhost:9000" "${fn}" s3://${bucket_name}/ 1>&2
aws s3api create-bucket --endpoint-url "http://localhost:9000" --bucket "${bucket_name}" 1>&2 || error "Can't create MinIO S3 bucket"
aws s3 cp --endpoint-url "http://localhost:9000" "${fn}" s3://${bucket_name}/ 1>&2 || error "Can't copy geotiff to S3 bucket"
echo "${bucket_name}/${gtiff_fn}"
}
@@ -261,7 +266,7 @@ check_image_content() {
cat $img_filename
return 1
fi
docker exec -i test pip install pillow >/dev/null
docker exec -i test python3 -m pip install --break-system-packages --root-user-action ignore pillow >/dev/null
incontainer_file="/tmp/$(basename $img_filename)"
docker cp $img_filename test:${incontainer_file}
docker exec -i test python3 <<EOF
Loading