diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..e76d6d2d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +* +!cmake +!CMakeLists.txt +!docs/man +!etc/apache2/renderd-example-map.conf +!etc/apache2/tile.load.in +!etc/renderd/renderd.conf.in +!includes +!src +!tests +!utils/example-map diff --git a/.github/actions/dependencies/build-and-install/mapnik/action.yml b/.github/actions/dependencies/build-and-install/mapnik/action.yml index 0cefae6d..6381dafe 100644 --- a/.github/actions/dependencies/build-and-install/mapnik/action.yml +++ b/.github/actions/dependencies/build-and-install/mapnik/action.yml @@ -31,6 +31,7 @@ runs: - name: Build `Mapnik` run: | # Export variables + export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1" export GDAL_DATA=/usr/share/gdal export JOBS=${JOBS:-$(nproc)} export PROJ_LIB=/usr/share/proj @@ -41,8 +42,12 @@ runs: # Configure & build ./configure \ - CC=${CC:-gcc} \ - CXX=${CXX:-g++} \ + CC="${CC:-gcc}" \ + CUSTOM_CFLAGS="${CUSTOM_CFLAGS:-}" \ + CUSTOM_CXXFLAGS="${CUSTOM_CXXFLAGS:-}" \ + CUSTOM_DEFINES="${CUSTOM_DEFINES:-}" \ + CUSTOM_LDFLAGS="${CUSTOM_LDFLAGS:-}" \ + CXX="${CXX:-g++}" \ FAST=True \ OPTIMIZATION=0 \ PREFIX="/usr" diff --git a/.github/workflows/docker-image-build.yml b/.github/workflows/docker-image-build.yml new file mode 100644 index 00000000..0d4ba021 --- /dev/null +++ b/.github/workflows/docker-image-build.yml @@ -0,0 +1,58 @@ +--- +name: Docker Image Build + +on: + pull_request: + push: + paths: + - "docker/**" + - ".github/workflows/docker-image-build.yml" + +jobs: + docker-image-build: + name: Build & Test (${{ matrix.service-name }}) + runs-on: ubuntu-latest + strategy: + matrix: + service-name: + - centos-7 + - centos-stream-8 + - centos-stream-9 + - debian-11 + - debian-12 + - debian-testing + - fedora-38 + - fedora-39 + - fedora-rawhide + - opensuse-leap-15 + - opensuse-tumbleweed + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-devel + fail-fast: false + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Build & Start + run: docker compose up --build --detach ${{ matrix.service-name }} + working-directory: docker + + - name: Test + run: | + until $(curl --fail --output tile.png --silent http://localhost:8081/tiles/renderd-example/9/297/191.png); do + echo 'Sleeping 5s'; + sleep 5; + done + echo 'dbf26531286e844a3a9735cdd193598dca78d22f77cafe5824bcaf17f88cbb08 tile.png' | sha256sum --check + timeout-minutes: 1 + + - name: Show logs + if: failure() + run: docker compose logs + working-directory: docker + + - name: Stop + if: success() || failure() + run: docker compose down --volumes + working-directory: docker diff --git a/.github/workflows/flawfinder-analysis.yml b/.github/workflows/flawfinder-analysis.yml index 68c96eb7..87c794bd 100644 --- a/.github/workflows/flawfinder-analysis.yml +++ b/.github/workflows/flawfinder-analysis.yml @@ -1,5 +1,5 @@ --- -name: flawfinder +name: Flawfinder Analysis on: pull_request: diff --git a/.github/workflows/install-package-and-test.yml b/.github/workflows/install-package-and-test.yml index 4a6f7103..1607be13 100644 --- a/.github/workflows/install-package-and-test.yml +++ b/.github/workflows/install-package-and-test.yml @@ -2,7 +2,12 @@ name: Install Package & Test on: - - push + pull_request: + push: + paths: + - "etc/**" + - "utils/**" + - ".github/workflows/install-package-and-test.yml" jobs: install-package-and-test: diff --git a/CMakeLists.txt b/CMakeLists.txt index 8fdd0dca..e500a106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -220,7 +220,7 @@ if(EXISTS "/etc/os-release") elseif(DISTRO_ID MATCHES "freebsd") set(TILE_LOAD_DIRECTORY "${HTTPD_SYSCONFDIR}/modules.d") set(TILE_LOAD_FILENAME "080_tile.conf") - elseif(DISTRO_ID MATCHES "opensuse-leap") + elseif(DISTRO_ID MATCHES "opensuse-leap|opensuse-tumbleweed") set(TILE_LOAD_DIRECTORY "${HTTPD_SYSCONFDIR}/conf.d") set(TILE_LOAD_FILENAME "mod_tile.conf") endif() diff --git a/docker/.env b/docker/.env new file mode 100644 index 00000000..c975ea68 --- /dev/null +++ b/docker/.env @@ -0,0 +1 @@ +COMPOSE_PROJECT_NAME=mod_tile diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000..a95d9537 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,41 @@ +# Docker-based building & testing + +For your convenience, we have provided a Docker-based building and testing method to help get started with development & testing. + +### The following distributions are currently supported: + +- centos-7 _(CentOS 7)_ [[Dockerfile](/docker/centos/7/Dockerfile)] +- centos-stream-8 _(CentOS Stream 8)_ [[Dockerfile](/docker/centos/stream/Dockerfile)] +- centos-stream-9 _(CentOS Stream 9)_ [[Dockerfile](/docker/centos/stream/Dockerfile)] +- debian-10 _(Debian 10)_ [[Dockerfile](/docker/debian/Dockerfile)] +- debian-11 _(Debian 11)_ [[Dockerfile](/docker/debian/Dockerfile)] +- debian-12 _(Debian 12)_ [[Dockerfile](/docker/debian/Dockerfile)] +- debian-testing _(Debian Testing)_ [[Dockerfile](/docker/debian/Dockerfile)] +- fedora-34 _(Fedora 34)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-35 _(Fedora 35)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-36 _(Fedora 36)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-37 _(Fedora 37)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-38 _(Fedora 38)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-39 _(Fedora 39)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- fedora-rawhide _(Fedora Rawhide)_ [[Dockerfile](/docker/fedora/Dockerfile)] +- opensuse-leap-15 _(openSUSE Leap 15)_ [[Dockerfile](/docker/opensuse/Dockerfile)] +- opensuse-tumbleweed _(openSUSE Tumbleweed)_ [[Dockerfile](/docker/opensuse/Dockerfile)] +- ubuntu-20.04 _(Ubuntu 20.04)_ [[Dockerfile](/docker/ubuntu/Dockerfile)] +- ubuntu-22.04 _(Ubuntu 22.04)_ [[Dockerfile](/docker/ubuntu/Dockerfile)] +- ubuntu-devel _(Ubuntu Devel)_ [[Dockerfile](/docker/ubuntu/Dockerfile)] + +### Requirements: + +- [Docker](https://docs.docker.com/get-docker/) +- [Docker Compose](https://github.com/docker/compose) + +### Usage: + +```shell +$ # Use any "{distribution}" value from the list above +$ # I.E. docker-compose up --build ubuntu-devel +$ cd docker +$ docker-compose up --build {distribution} +``` + +Then you can visit: `http://localhost:8081/renderd-example-map` diff --git a/docker/centos/7/Dockerfile b/docker/centos/7/Dockerfile new file mode 100644 index 00000000..96cfe3c8 --- /dev/null +++ b/docker/centos/7/Dockerfile @@ -0,0 +1,173 @@ +# Arguments +ARG mapnik_version=3.1.0 + +# Mapnik Builder +FROM centos:centos7 as mapnik-builder + +## Arguments +ARG mapnik_version + +## Install mapnik-builder dependencies +RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \ + ulimit -n 40000; \ + echo "install_weak_deps=0" >> /etc/yum.conf && \ + sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \ + yum --assumeyes install epel-release centos-release-scl && \ + yum --assumeyes upgrade && \ + yum --assumeyes install \ + boost169-devel \ + bzip2 \ + cairo-devel \ + freetype-devel \ + devtoolset-9-gcc \ + devtoolset-9-gcc-c++ \ + gdal-devel \ + harfbuzz-devel \ + libicu-devel \ + libjpeg-devel \ + libpng-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + make \ + patch \ + postgresql-devel \ + proj-devel \ + python3 \ + sqlite-devel \ + tar \ + zlib-devel + +## Download, Build & Install `Mapnik` +WORKDIR /tmp/mapnik_src +RUN --mount=id=centos:centos7-mapnik:${mapnik_version},target=/tmp/mapnik_src,type=cache \ + export DESTDIR="/tmp/mapnik"; \ + export GDAL_DATA="$(gdal-config --datadir)"; \ + export JOBS="$(nproc)"; \ + export PROJ_LIB="/usr/share/proj"; \ + export PYTHON="python3"; \ + mkdir --parents ${GDAL_DATA} ${PROJ_LIB}; \ + if [ ! -f SConstruct ]; then \ + curl --silent --location https://github.com/mapnik/mapnik/releases/download/v${mapnik_version}/mapnik-v${mapnik_version}.tar.bz2 \ + | tar --extract --bzip2 --strip-components=1 --file=-; \ + sed -i 's#BOOST_APPEND = match.groups()\[0\]#BOOST_APPEND = ""#g' SConstruct; \ + fi; \ + source /opt/rh/devtoolset-9/enable; \ + export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; \ + export CUSTOM_LDFLAGS="-L/usr/lib64/boost169"; \ + bash configure \ + CPP_TESTS=False \ + CUSTOM_CFLAGS="${CUSTOM_CFLAGS:-}" \ + CUSTOM_CXXFLAGS="${CUSTOM_CXXFLAGS:-}" \ + CUSTOM_DEFINES="${CUSTOM_DEFINES:-}" \ + CUSTOM_LDFLAGS="${CUSTOM_LDFLAGS:-}" \ + DEMO=False \ + DESTDIR="${DESTDIR}" \ + FAST=True \ + INPUT_PLUGINS=all \ + LIBDIR_SCHEMA=lib64 \ + OPTIMIZATION=2 \ + PREFIX=/usr \ + SVG2PNG=True \ + XMLPARSER=libxml2 && \ + make PYTHON="${PYTHON}" && \ + make install PYTHON="${PYTHON}" + +# Builder +FROM centos:centos7 as builder + +## Install builder dependencies +RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \ + ulimit -n 40000; \ + echo "install_weak_deps=0" >> /etc/yum.conf && \ + sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \ + yum --assumeyes install epel-release && \ + yum --assumeyes upgrade && \ + yum --assumeyes install \ + boost169-devel \ + cairo-devel \ + cmake3 \ + gcc \ + gcc-c++ \ + gdal \ + glib2-devel \ + harfbuzz-devel \ + httpd-devel \ + iniparser-devel \ + libcurl-devel \ + libicu-devel \ + libjpeg \ + libmemcached-devel \ + librados2-devel \ + libtiff \ + libwebp \ + make \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + export CFLAGS="-I/usr/include/boost169" && \ + export CXXFLAGS="-I/usr/include/boost169" && \ + cmake3 -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake3 --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest3 --output-on-failure && \ + (cmake3 --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM centos:centos7 as runner + +## Install runner dependencies +RUN --mount=id=centos:centos7-/var/cache/yum,target=/var/cache/yum,type=cache,sharing=locked \ + ulimit -n 40000; \ + echo "install_weak_deps=0" >> /etc/yum.conf && \ + sed --in-place 's/keepcache=0/keepcache=1/g' /etc/yum.conf && \ + yum --assumeyes install epel-release && \ + yum --assumeyes upgrade && \ + yum --assumeyes install \ + boost169-filesystem \ + boost169-program-options \ + boost169-regex \ + cairo \ + gdal \ + harfbuzz \ + httpd \ + iniparser \ + libicu \ + libmemcached \ + librados2 \ + libtiff \ + libwebp \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --chown=apache:apache --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/httpd/conf.d/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Start services +CMD httpd -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/centos/stream/Dockerfile b/docker/centos/stream/Dockerfile new file mode 100644 index 00000000..93eb73d7 --- /dev/null +++ b/docker/centos/stream/Dockerfile @@ -0,0 +1,194 @@ +# Arguments +ARG centos_stream_version +ARG extra_repository +ARG mapnik_version=3.1.0 + +# Mapnik Builder +FROM quay.io/centos/centos:stream${centos_stream_version} as mapnik-builder + +## Arguments +ARG centos_stream_version +ARG extra_repository +ARG mapnik_version + +## Install mapnik-builder dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost-devel \ + bzip2 \ + cairo-devel \ + freetype-devel \ + gcc \ + gcc-c++ \ + gdal-devel \ + harfbuzz-devel \ + libicu-devel \ + libjpeg-devel \ + libpng-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + make \ + patch \ + postgresql-devel \ + proj-devel \ + python3 \ + sqlite-devel \ + tar \ + zlib-devel + +## Download, Build & Install `Mapnik` +WORKDIR /tmp/mapnik_src +RUN --mount=id=centos:stream${centos_stream_version}-mapnik:${mapnik_version},target=/tmp/mapnik_src,type=cache \ + export DESTDIR="/tmp/mapnik"; \ + export GDAL_DATA="$(gdal-config --datadir)"; \ + export JOBS="$(nproc)"; \ + export PROJ_LIB="/usr/share/proj"; \ + export PYTHON="python3"; \ + mkdir --parents ${GDAL_DATA} ${PROJ_LIB}; \ + if [ ! -f SConstruct ]; then \ + curl --silent --location https://github.com/mapnik/mapnik/releases/download/v${mapnik_version}/mapnik-v${mapnik_version}.tar.bz2 \ + | tar --extract --bzip2 --strip-components=1 --file=-; \ + if [ "${centos_stream_version}" = "9" ]; then \ + curl --silent --location https://github.com/mapnik/mapnik/commit/8944e81367d2b3b91a41e24116e1813c01491e5d.patch \ + | patch -Np1; \ + curl --silent --location https://github.com/mapnik/mapnik/commit/83779b7b6bdd229740b1b5e12a4a8fe27114cb7d.patch \ + | patch -F3 -Np1; \ + fi \ + fi; \ + if [ "${centos_stream_version}" = "8" ]; then \ + export CUSTOM_DEFINES="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; \ + fi; \ + bash configure \ + CPP_TESTS=False \ + CUSTOM_CFLAGS="${CUSTOM_CFLAGS:-}" \ + CUSTOM_CXXFLAGS="${CUSTOM_CXXFLAGS:-}" \ + CUSTOM_DEFINES="${CUSTOM_DEFINES:-}" \ + CUSTOM_LDFLAGS="${CUSTOM_LDFLAGS:-}" \ + DEMO=False \ + DESTDIR="${DESTDIR}" \ + FAST=True \ + INPUT_PLUGINS=all \ + LIBDIR_SCHEMA=lib64 \ + OPTIMIZATION=2 \ + PREFIX=/usr \ + SVG2PNG=True \ + XMLPARSER=libxml2 && \ + make PYTHON="${PYTHON}" && \ + make install PYTHON="${PYTHON}" + +# Builder +FROM quay.io/centos/centos:stream${centos_stream_version} as builder + +## Arguments +ARG centos_stream_version +ARG extra_repository + +## Install builder dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost-devel \ + cairo-devel \ + cmake3 \ + gcc \ + gcc-c++ \ + gdal \ + glib2-devel \ + harfbuzz-devel \ + httpd-devel \ + iniparser-devel \ + libcurl-devel \ + libicu-devel \ + libjpeg \ + libmemcached-devel \ + librados2-devel \ + libtiff \ + libwebp \ + make \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM quay.io/centos/centos:stream${centos_stream_version} as runner + +## Arguments +ARG centos_stream_version +ARG extra_repository + +## Install runner dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost-filesystem \ + boost-program-options \ + boost-regex \ + cairo \ + gdal \ + harfbuzz \ + httpd \ + iniparser \ + libicu \ + libmemcached \ + librados2 \ + libtiff \ + libwebp \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --chown=apache:apache --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/httpd/conf.d/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Start services +CMD httpd -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/centos/stream/Dockerfile.mapnik-latest b/docker/centos/stream/Dockerfile.mapnik-latest new file mode 100644 index 00000000..9f047216 --- /dev/null +++ b/docker/centos/stream/Dockerfile.mapnik-latest @@ -0,0 +1,178 @@ +# Arguments +ARG centos_stream_version=9 +ARG extra_repository=crb + +# Mapnik Builder +FROM quay.io/centos/centos:stream${centos_stream_version} as mapnik-builder + +## Arguments +ARG centos_stream_version +ARG extra_repository + +## Install mapnik-builder dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost1.78-devel \ + bzip2 \ + cairo-devel \ + cmake3 \ + freetype-devel \ + gcc \ + gcc-c++ \ + gdal-devel \ + git \ + harfbuzz-devel \ + libicu-devel \ + libjpeg-devel \ + libpng-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + make \ + patch \ + postgresql-devel \ + proj-devel \ + python3 \ + sqlite-devel \ + tar \ + zlib-devel + +## Download, Build & Install `Mapnik` +WORKDIR /tmp/mapnik_src +RUN --mount=id=centos:stream${centos_stream_version}-mapnik-src:latest,target=/tmp/mapnik_src,type=cache \ + if [ ! -f CMakeLists.txt ]; then \ + git clone --depth 1 --jobs 8 --recurse-submodules https://github.com/mapnik/mapnik.git /tmp/mapnik_src; \ + fi +WORKDIR /tmp/mapnik_build +RUN --mount=id=centos:stream${centos_stream_version}-mapnik-src:latest,target=/tmp/mapnik_src,type=cache \ + --mount=id=centos:stream${centos_stream_version}-mapnik-build:latest,target=/tmp/mapnik_build,type=cache \ + export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + export DESTDIR=/tmp/mapnik && \ + cmake -B . -S /tmp/mapnik_src \ + -DBUILD_DEMO_VIEWER:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DMAPNIK_PKGCONF_DIR:PATH=/usr/share/pkgconfig && \ + cmake --build . && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) + +# Builder +FROM quay.io/centos/centos:stream${centos_stream_version} as builder + +## Arguments +ARG centos_stream_version +ARG extra_repository + +## Install builder dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost1.78-devel \ + cairo-devel \ + cmake3 \ + freetype-devel \ + gcc \ + gcc-c++ \ + gdal \ + glib2-devel \ + harfbuzz-devel \ + httpd-devel \ + iniparser-devel \ + libcurl-devel \ + libicu-devel \ + libjpeg-devel \ + libmemcached-devel \ + libpng-devel \ + librados2-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + make \ + pkg-config \ + proj-devel + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / + +## Build & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM quay.io/centos/centos:stream${centos_stream_version} as runner + +## Arguments +ARG centos_stream_version +ARG extra_repository + +## Install runner dependencies +RUN --mount=id=centos:stream${centos_stream_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install "dnf-command(config-manager)" && \ + dnf config-manager --save \ + --setopt=${extra_repository}.enabled=1 && \ + dnf --assumeyes install epel-release && \ + dnf --assumeyes upgrade && \ + dnf --assumeyes install \ + boost1.78-filesystem \ + boost1.78-program-options \ + boost1.78-regex \ + cairo \ + gdal \ + harfbuzz \ + httpd \ + iniparser \ + libicu \ + libmemcached \ + librados2 \ + libtiff \ + libwebp \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --chown=apache:apache --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/httpd/conf.d/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Start services +CMD httpd -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile new file mode 100644 index 00000000..e816f326 --- /dev/null +++ b/docker/debian/Dockerfile @@ -0,0 +1,92 @@ +# Arguments +ARG debian_version=12 +ARG libmapnik_version=3.1 + +# Builder +FROM debian:${debian_version} as builder + +## Arguments +ARG debian_version + +## Install builder dependencies +RUN --mount=id=debian:${debian_version}-/var/cache/apt,sharing=locked,target=/var/cache/apt,type=cache \ + --mount=id=debian:${debian_version}-/var/lib/apt,sharing=locked,target=/var/lib/apt,type=cache \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get --yes update && \ + apt-get --yes upgrade && \ + apt-get --no-install-recommends --yes install \ + apache2 \ + apache2-dev \ + cmake \ + curl \ + g++ \ + gcc \ + libcairo2-dev \ + libcurl4-openssl-dev \ + libglib2.0-dev \ + libiniparser-dev \ + libmapnik-dev \ + libmemcached-dev \ + librados-dev + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM debian:${debian_version} as runner + +## Arguments +ARG libmapnik_version +ARG debian_version + +## Install runner dependencies +RUN --mount=id=debian:${debian_version}-/var/cache/apt,sharing=locked,target=/var/cache/apt,type=cache \ + --mount=id=debian:${debian_version}-/var/lib/apt,sharing=locked,target=/var/lib/apt,type=cache \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get --yes update && \ + apt-get --yes upgrade && \ + apt-get --no-install-recommends --yes install \ + apache2 \ + libcairo2 \ + libcurl4 \ + libglib2.0 \ + libiniparser1 \ + libmapnik${libmapnik_version} \ + libmemcached11 \ + libmemcachedutil2 \ + librados2 + +## Copy files from builder(s) +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/apache2/sites-available/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Enable module & site +RUN a2enmod tile && \ + a2ensite renderd-example-map + +## Start services +CMD apachectl -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 00000000..684951e8 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,185 @@ +--- +version: "3.8" + +services: + centos-7: + build: + context: .. + dockerfile: docker/centos/7/Dockerfile + env_file: .env + ports: + - 8081:8081 + ulimits: + nofile: 40000 + centos-stream-8: + build: + args: + centos_stream_version: "8" + extra_repository: powertools + context: .. + dockerfile: docker/centos/stream/Dockerfile + env_file: .env + ports: + - 8081:8081 + centos-stream-9: + build: + args: + centos_stream_version: "9" + extra_repository: crb + context: .. + dockerfile: docker/centos/stream/Dockerfile + env_file: .env + ports: + - 8081:8081 + debian-10: + build: + args: + libmapnik_version: "3.0" + debian_version: "10" + context: .. + dockerfile: docker/debian/Dockerfile + env_file: .env + ports: + - 8081:8081 + debian-11: + build: + args: + libmapnik_version: "3.1" + debian_version: "11" + context: .. + dockerfile: docker/debian/Dockerfile + env_file: .env + ports: + - 8081:8081 + debian-12: + build: + args: + libmapnik_version: "3.1" + debian_version: "12" + context: .. + dockerfile: docker/debian/Dockerfile + env_file: .env + ports: + - 8081:8081 + debian-testing: + build: + args: + libmapnik_version: "3.1" + debian_version: testing + context: .. + dockerfile: docker/debian/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-34: + build: + args: + fedora_version: "34" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-35: + build: + args: + fedora_version: "35" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-36: + build: + args: + fedora_version: "36" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-37: + build: + args: + fedora_version: "37" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-38: + build: + args: + fedora_version: "38" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-39: + build: + args: + fedora_version: "39" + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + fedora-rawhide: + build: + args: + fedora_version: rawhide + context: .. + dockerfile: docker/fedora/Dockerfile + env_file: .env + ports: + - 8081:8081 + opensuse-leap-15: + build: + args: + boost_version: "1_75_0" + opensuse_version: leap:15 + context: .. + dockerfile: docker/opensuse/Dockerfile + env_file: .env + ports: + - 8081:8081 + opensuse-tumbleweed: + build: + args: + opensuse_version: tumbleweed + context: .. + dockerfile: docker/opensuse/Dockerfile + env_file: .env + ports: + - 8081:8081 + ubuntu-20.04: + build: + args: + libmapnik_version: "3.0" + ubuntu_version: "20.04" + context: .. + dockerfile: docker/ubuntu/Dockerfile + env_file: .env + ports: + - 8081:8081 + ubuntu-22.04: + build: + args: + libmapnik_version: "3.1" + ubuntu_version: "22.04" + context: .. + dockerfile: docker/ubuntu/Dockerfile + env_file: .env + ports: + - 8081:8081 + ubuntu-devel: + build: + args: + libmapnik_version: "3.1" + ubuntu_version: devel + context: .. + dockerfile: docker/ubuntu/Dockerfile + env_file: .env + ports: + - 8081:8081 diff --git a/docker/fedora/Dockerfile b/docker/fedora/Dockerfile new file mode 100644 index 00000000..31a1cdff --- /dev/null +++ b/docker/fedora/Dockerfile @@ -0,0 +1,79 @@ +# Arguments +ARG fedora_version=38 + +# Builder +FROM fedora:${fedora_version} as builder + +## Arguments +ARG fedora_version + +## Install builder dependencies +RUN --mount=id=fedora:${fedora_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install \ + cairo-devel \ + cmake \ + gcc \ + gcc-c++ \ + glib2-devel \ + httpd-devel \ + iniparser-devel \ + libcurl-devel \ + libmemcached-devel \ + librados-devel \ + mapnik-devel + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM fedora:${fedora_version} as runner + +## Arguments +ARG fedora_version + +## Install runner dependencies +RUN --mount=id=fedora:${fedora_version}-/var/cache/dnf,target=/var/cache/dnf,type=cache,sharing=locked \ + echo "install_weak_deps=False" >> /etc/dnf/dnf.conf && \ + echo "keepcache=True" >> /etc/dnf/dnf.conf && \ + dnf --assumeyes install \ + cairo \ + glib2 \ + httpd \ + iniparser \ + libcurl \ + libmemcached \ + librados2 \ + mapnik + +## Copy files from builder(s) +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --chown=apache:apache --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/httpd/conf.d/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Start services +CMD httpd -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/opensuse/Dockerfile b/docker/opensuse/Dockerfile new file mode 100644 index 00000000..fc1abfac --- /dev/null +++ b/docker/opensuse/Dockerfile @@ -0,0 +1,178 @@ +# Arguments +ARG boost_version +ARG opensuse_version=leap:15 + +# Mapnik Builder +FROM opensuse/${opensuse_version} as mapnik-builder + +## Arguments +ARG boost_version +ARG opensuse_version + +## Install mapnik-builder dependencies +RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zypp,type=cache,sharing=locked \ + zypper modifyrepo --all --keep-packages && \ + zypper --non-interactive update && \ + zypper --non-interactive install \ + cairo-devel \ + cmake \ + freetype-devel \ + gcc \ + gcc-c++ \ + gdal-devel \ + git \ + harfbuzz-devel \ + libboost_atomic${boost_version}-devel \ + libboost_filesystem${boost_version}-devel \ + libboost_headers${boost_version}-devel \ + libboost_program_options${boost_version}-devel \ + libboost_regex${boost_version}-devel \ + libboost_system${boost_version}-devel \ + libicu-devel \ + libjpeg8-devel \ + libpng16-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + postgresql-devel \ + proj-devel \ + python3 \ + sqlite3-devel \ + tar \ + zlib-devel + +## Download, Build & Install `Mapnik` +WORKDIR /tmp/mapnik_src +RUN --mount=id=opensuse:${opensuse_version}-mapnik-src:latest,target=/tmp/mapnik_src,type=cache \ + if [ ! -f CMakeLists.txt ]; then \ + git clone --depth 1 --jobs 8 --recurse-submodules https://github.com/mapnik/mapnik.git /tmp/mapnik_src; \ + fi +WORKDIR /tmp/mapnik_build +RUN --mount=id=opensuse:${opensuse_version}-mapnik-src:latest,target=/tmp/mapnik_src,type=cache \ + --mount=id=opensuse:${opensuse_version}-mapnik-build:latest,target=/tmp/mapnik_build,type=cache \ + export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + export DESTDIR=/tmp/mapnik && \ + cmake -B . -S /tmp/mapnik_src \ + -DBUILD_DEMO_VIEWER:BOOL=OFF \ + -DBUILD_TESTING:BOOL=OFF \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DMAPNIK_PKGCONF_DIR:PATH=/usr/share/pkgconfig && \ + cmake --build . && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) + +# Builder +FROM opensuse/${opensuse_version} as builder + +## Arguments +ARG boost_version +ARG opensuse_version + +## Install builder dependencies +RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zypp,type=cache,sharing=locked \ + zypper modifyrepo --all --keep-packages && \ + zypper --non-interactive update && \ + zypper --non-interactive install \ + apache2-devel \ + cairo-devel \ + cmake \ + curl \ + gcc \ + gcc-c++ \ + gdal \ + glib2-devel \ + harfbuzz-devel \ + libboost_atomic${boost_version}-devel \ + libboost_filesystem${boost_version}-devel \ + libboost_headers${boost_version}-devel \ + libboost_program_options${boost_version}-devel \ + libboost_regex${boost_version}-devel \ + libboost_system${boost_version}-devel \ + libcurl-devel \ + libicu-devel \ + libiniparser-devel \ + libjpeg8-devel \ + libmemcached-devel \ + librados-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + proj-devel \ + tar + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / + +## Create `nobody` user and group +RUN id nobody || useradd --home-dir / --no-create-home --shell /usr/sbin/nologin --system --user-group nobody + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM opensuse/${opensuse_version} as runner + +## Arguments +ARG boost_version +ARG opensuse_version + +## Install runner dependencies +RUN --mount=id=opensuse:${opensuse_version}-/var/cache/zypp,target=/var/cache/zypp,type=cache,sharing=locked \ + zypper modifyrepo --all --keep-packages && \ + zypper --non-interactive update && \ + zypper --non-interactive install \ + apache2 \ + apache2-utils \ + cairo-devel \ + gdal \ + harfbuzz-devel \ + libboost_atomic${boost_version}-devel \ + libboost_filesystem${boost_version}-devel \ + libboost_program_options${boost_version}-devel \ + libboost_regex${boost_version}-devel \ + libboost_system${boost_version}-devel \ + libicu-devel \ + libiniparser-devel \ + libjpeg8-devel \ + libmemcached-devel \ + librados-devel \ + libtiff-devel \ + libwebp-devel \ + proj + +## Copy files from builder(s) +### Mapnik +COPY --from=mapnik-builder /tmp/mapnik / +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --chown=apache:apache --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/apache2/conf.d/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Enable `mod_access_compat` +RUN sed -i 's/^APACHE_MODULES="actions/APACHE_MODULES="access_compat actions/g' /etc/sysconfig/apache2 + +## Start services +CMD apachectl -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docker/ubuntu/Dockerfile b/docker/ubuntu/Dockerfile new file mode 100644 index 00000000..ec5f86a5 --- /dev/null +++ b/docker/ubuntu/Dockerfile @@ -0,0 +1,91 @@ +# Arguments +ARG libmapnik_version=3.1 +ARG ubuntu_version=22.04 + +# Builder +FROM ubuntu:${ubuntu_version} as builder + +## Arguments +ARG ubuntu_version + +## Install builder dependencies +RUN --mount=id=ubuntu:${ubuntu_version}-/var/cache/apt,sharing=locked,target=/var/cache/apt,type=cache \ + --mount=id=ubuntu:${ubuntu_version}-/var/lib/apt,sharing=locked,target=/var/lib/apt,type=cache \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get --yes update && \ + apt-get --yes upgrade && \ + apt-get --no-install-recommends --yes install \ + apache2 \ + apache2-dev \ + cmake \ + curl \ + g++ \ + gcc \ + libcairo2-dev \ + libcurl4-openssl-dev \ + libglib2.0-dev \ + libiniparser-dev \ + libmapnik-dev \ + libmemcached-dev \ + librados-dev + +## Build, Test & Install `mod_tile` +COPY . /tmp/mod_tile_src +WORKDIR /tmp/mod_tile_build +RUN export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) && \ + cmake -B . -S /tmp/mod_tile_src \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DENABLE_TESTS:BOOL=ON && \ + cmake --build . +RUN export DESTDIR=/tmp/mod_tile && \ + ctest --output-on-failure && \ + (cmake --install . --prefix /usr --strip || make DESTDIR=${DESTDIR} install/strip) && \ + mv /tmp/mod_tile/var/run /tmp/mod_tile/run + +# Runner +FROM ubuntu:${ubuntu_version} as runner + +## Arguments +ARG libmapnik_version +ARG ubuntu_version + +## Install runner dependencies +RUN --mount=id=ubuntu:${ubuntu_version}-/var/cache/apt,sharing=locked,target=/var/cache/apt,type=cache \ + --mount=id=ubuntu:${ubuntu_version}-/var/lib/apt,sharing=locked,target=/var/lib/apt,type=cache \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get --yes update && \ + apt-get --yes upgrade && \ + apt-get --no-install-recommends --yes install \ + apache2 \ + libcairo2 \ + libcurl4 \ + libglib2.0-0 \ + libiniparser1 \ + libmapnik${libmapnik_version} \ + libmemcached11 \ + librados2 + +## Copy files from builder(s) +### mod_tile +COPY --from=builder /tmp/mod_tile / +COPY --from=builder \ + /tmp/mod_tile_src/utils/example-map \ + /usr/share/renderd/example-map +COPY --from=builder \ + /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf \ + /etc/apache2/sites-available/renderd-example-map.conf + +## Add configuration +RUN printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf +RUN printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' >> /etc/renderd.conf + +## Enable module & site +RUN a2enmod tile && \ + a2ensite renderd-example-map + +## Start services +CMD apachectl -e debug -k start; \ + G_MESSAGES_DEBUG=${G_MESSAGES_DEBUG:-info} renderd --foreground diff --git a/docs/build/building_on_centos.md b/docs/build/building_on_centos.md index e5224a51..27948a1e 100644 --- a/docs/build/building_on_centos.md +++ b/docs/build/building_on_centos.md @@ -4,6 +4,8 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + _CentOS does not provide a `mapnik`/`mapnik-devel` package, so it will first need to be built & installed, which is beyond the scope of this document, please visit the project's [installation document on GitHub](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) or our [Continuous Integration script](/.github/actions/dependencies/build-and-install/mapnik/action.yml) for more information._ ## CentOS 7 @@ -64,6 +66,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/httpd/conf.d/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Start services sudo httpd diff --git a/docs/build/building_on_centos_stream.md b/docs/build/building_on_centos_stream.md index 2d740ca2..0f7220f6 100644 --- a/docs/build/building_on_centos_stream.md +++ b/docs/build/building_on_centos_stream.md @@ -4,6 +4,8 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + _CentOS Stream does not provide a `mapnik`/`mapnik-devel` package, so it will first need to be built & installed, which is beyond the scope of this document, please visit the project's [installation document on GitHub](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) or our [Continuous Integration script](/.github/actions/dependencies/build-and-install/mapnik/action.yml) for more information._ ## CentOS Stream 8 @@ -86,6 +88,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/httpd/conf.d/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Start services sudo httpd diff --git a/docs/build/building_on_debian.md b/docs/build/building_on_debian.md index b25a7341..066ad4ec 100644 --- a/docs/build/building_on_debian.md +++ b/docs/build/building_on_debian.md @@ -4,6 +4,8 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + ## Debian 10/11/12 ```shell @@ -54,6 +56,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/apache2/sites-available/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Enable configuration a2enmod tile diff --git a/docs/build/building_on_fedora.md b/docs/build/building_on_fedora.md index 44b36069..5e16c460 100644 --- a/docs/build/building_on_fedora.md +++ b/docs/build/building_on_fedora.md @@ -4,6 +4,8 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + ## Fedora 34/35/36/37/38/39 ```shell @@ -51,6 +53,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/httpd/conf.d/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Start services sudo httpd diff --git a/docs/build/building_on_freebsd.md b/docs/build/building_on_freebsd.md index 8631ef95..73a7cc04 100644 --- a/docs/build/building_on_freebsd.md +++ b/docs/build/building_on_freebsd.md @@ -56,6 +56,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /usr/local/etc/apache24/Includes/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Start services sudo httpd diff --git a/docs/build/building_on_macos.md b/docs/build/building_on_macos.md index 872c355d..f4feaba0 100644 --- a/docs/build/building_on_macos.md +++ b/docs/build/building_on_macos.md @@ -55,6 +55,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/local/share/renderd/example sed 's#/usr/share/#/usr/local/share/#g' /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf | sudo tee /usr/local/etc/httpd/extra/renderd-example-map.conf printf '\nInclude /usr/local/etc/httpd/extra/httpd-tile.conf\nInclude /usr/local/etc/httpd/extra/renderd-example-map.conf\n' | sudo tee -a /usr/local/etc/httpd/httpd.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/local/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Start services httpd diff --git a/docs/build/building_on_opensuse.md b/docs/build/building_on_opensuse.md index ba4d3fdb..556f9a7a 100644 --- a/docs/build/building_on_opensuse.md +++ b/docs/build/building_on_opensuse.md @@ -4,9 +4,11 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + _openSUSE does not provide a `mapnik`/`mapnik-devel` package, so it will first need to be built & installed, which is beyond the scope of this document, please visit the project's [installation document on GitHub](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) or our [Continuous Integration script](/.github/actions/dependencies/build-and-install/mapnik/action.yml) for more information._ -## openSUSE 15 +## openSUSE Leap 15/Tumbleweed ```shell #!/usr/bin/env bash @@ -17,16 +19,32 @@ sudo zypper --non-interactive update # Install build dependencies # (libmemcached-devel & librados-devel are optional) sudo zypper --non-interactive install \ - apache2 \ apache2-devel \ - apache2-prefork \ cairo-devel \ + cmake \ curl \ + gcc \ + gcc-c++ \ + gdal \ glib2-devel \ + harfbuzz-devel \ + libboost_atomic-devel \ + libboost_filesystem-devel \ + libboost_headers-devel \ + libboost_program_options-devel \ + libboost_regex-devel \ + libboost_system-devel \ libcurl-devel \ + libicu-devel \ libiniparser-devel \ + libjpeg8-devel \ libmemcached-devel \ - librados-devel + librados-devel \ + libtiff-devel \ + libwebp-devel \ + libxml2-devel \ + proj-devel \ + tar # Create `nobody` user and group sudo useradd --home-dir / --no-create-home --shell /usr/sbin/nologin --system --user-group nobody @@ -54,6 +72,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/apache2/conf.d/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Enable `mod_access_compat` sudo sed -i 's/^APACHE_MODULES="actions/APACHE_MODULES="access_compat actions/g' /etc/sysconfig/apache2 diff --git a/docs/build/building_on_ubuntu.md b/docs/build/building_on_ubuntu.md index 1607aeab..fa81716c 100644 --- a/docs/build/building_on_ubuntu.md +++ b/docs/build/building_on_ubuntu.md @@ -4,6 +4,8 @@ This document provides users with step-by-step instructions on how to compile an Please see our [Continuous Integration script](/.github/workflows/build-and-test.yml) for more details. +A Docker-based building & testing setup pipeline is also available [here](/docker) for your convenience. + # Ubuntu 20.04/22.04 ```shell @@ -54,6 +56,10 @@ sudo cp -av /tmp/mod_tile_src/utils/example-map /usr/share/renderd/example-map # Add configuration sudo cp -av /tmp/mod_tile_src/etc/apache2/renderd-example-map.conf /etc/apache2/sites-available/renderd-example-map.conf printf '\n[example-map]\nURI=/tiles/renderd-example\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-jpg]\nTYPE=jpg image/jpeg jpeg\nURI=/tiles/renderd-example-jpg\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png256]\nTYPE=png image/png png256\nURI=/tiles/renderd-example-png256\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-png32]\nTYPE=png image/png png32\nURI=/tiles/renderd-example-png32\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf +printf '\n[example-map-webp]\nTYPE=webp image/webp webp\nURI=/tiles/renderd-example-webp\nXML=/usr/share/renderd/example-map/mapnik.xml\n' | sudo tee -a /etc/renderd.conf # Enable configuration a2enmod tile diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3bbec934..174d4322 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -57,9 +57,10 @@ set(TILE_DEFAULT_TILEJSON_URL "http://${HTTPD0_HOST}:${HTTPD0_PORT}/tiles/${DEFA set(TILE_JPG_SHA256SUM "e09c3406c02f03583dadf0c8404c2d3efdc06a40d399e381ed2f47f49fde42d7") set(TILE_PNG256_SHA256SUM "dbf26531286e844a3a9735cdd193598dca78d22f77cafe5824bcaf17f88cbb08") set(TILE_PNG32_SHA256SUM "1006d92152f1e18896e0016fb43201b14bbcf7655955b74495ad3610541d325b") -set(TILE_WEBP_SHA256SUM_4 "ef3862a57831b21ec69c15be196e1e2b4fea66246c361142631b9fa22b85decc") # libwebp.so.4 -set(TILE_WEBP_SHA256SUM_6 "96fc0455b2269a7bcd4a5b3c9844529c3c77e3bb15f56e72f78a5af3bc15b6b5") # libwebp.so.6 -set(TILE_WEBP_SHA256SUM_7 "a82ef9ba5dc333de88af7b645084c30ab2b01c664e17162cbf6659c287cc4df4") # libwebp.so.7 +set(TILE_WEBP_SHA256SUM_01 "ef3862a57831b21ec69c15be196e1e2b4fea66246c361142631b9fa22b85decc") # libwebp.so.4 +set(TILE_WEBP_SHA256SUM_02 "96fc0455b2269a7bcd4a5b3c9844529c3c77e3bb15f56e72f78a5af3bc15b6b5") # libwebp.so.6 +set(TILE_WEBP_SHA256SUM_03 "a82ef9ba5dc333de88af7b645084c30ab2b01c664e17162cbf6659c287cc4df4") # libwebp.so.7 +set(TILE_WEBP_SHA256SUM_04 "904593e291cce2561138bd83b704588c02c16630b8c133d78d535b8986e901af") # libwebp.so.7 set(CURL_CMD "${CURL_EXECUTABLE} --fail --silent") @@ -278,14 +279,16 @@ add_test( (echo '${TILE_PNG32_SHA256SUM} tile.png32.0' | ${SHA256SUM_EXECUTABLE} -c) && \ (echo '${TILE_PNG32_SHA256SUM} tile.png32.1' | ${SHA256SUM_EXECUTABLE} -c) && \ ( \ - (echo '${TILE_WEBP_SHA256SUM_7} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) || \ - (echo '${TILE_WEBP_SHA256SUM_6} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) || \ - (echo '${TILE_WEBP_SHA256SUM_4} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) \ + (echo '${TILE_WEBP_SHA256SUM_01} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_02} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_03} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_04} tile.webp.0' | ${SHA256SUM_EXECUTABLE} -c) \ ) && \ ( \ - (echo '${TILE_WEBP_SHA256SUM_7} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) || \ - (echo '${TILE_WEBP_SHA256SUM_6} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) || \ - (echo '${TILE_WEBP_SHA256SUM_4} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) \ + (echo '${TILE_WEBP_SHA256SUM_01} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_02} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_03} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) || \ + (echo '${TILE_WEBP_SHA256SUM_04} tile.webp.1' | ${SHA256SUM_EXECUTABLE} -c) \ ) " WORKING_DIRECTORY tests