Portfiles for an OpenStreetMap Tile Server

Frank Dean frank at fdsd.co.uk
Sun Aug 29 12:02:46 UTC 2021


I have a few questions to ask in relation to a series of Portfiles that
I have created to support installing and running a map tile server for
OpenStreetMaps [1].

[1]: https://switch2osm.org/serving-tiles/

The logical Portfiles:

- libprotozero - library required by libosmium

    https://github.com/mapbox/protozero

- libosmium - library required by osmium-tool

    https://github.com/osmcode/libosmium

- osmium-tool - application required at runtime by mod_tile/renderd

    https://github.com/osmcode/osmium-tool

- osmosis - Java application required at runtime by mod_tile/renderd

    https://github.com/openstreetmap/osmosis

- openstreetmap-carto - style sheets used by mod_tile/renderd

    https://github.com/gravitystorm/openstreetmap-carto

- mod_tile/renderd - the OpenStreetMaps tile server

    https://wiki.openstreetmap.org/wiki/Mod_tile

1.  Should I submit each Portfile in dependency order and await its
    acceptance before submitting the next in sequence, or submit them
    in dependency related batches in a single pull request?

2.  The primary port is 'mod_tile' which contains an Apache module for
    serving the tiles and a 'renderd' daemon that renders and creates
    tile images based on requests from 'mod_tile'.  Both artefacts are
    created in a single build.

    I have currently named the port 'renderd', but the project is
    commonly known as 'mod_tile'.  Naming the port 'renderd' was the
    only way I could succeed in the 'renderd' startup item being loaded
    via the 'sudo port load ${subport}' command.

    Is there a better way of naming and creating this port, perhaps as
    subports?

3.  Getting the tile server up and running requires quite a number of
    steps.  I have created a shell script to largely automate the
    process.  At runtime it uses scripts from both 'openstreetmap-carto'
    and 'mod_tile/renderd', so doesn't immediately sit comfortably being
    installed with either of them.

    Is it best to create a simple separate standalone port (without an
    upstream project), containing just the shell script, naming it
    something like 'osm-tile-server' and depending on the other two
    ports; or simply include it in one of the other ports with runtime
    checks for the existence of required executables with helpful error
    messages when they're absent?

Many thanks,

Frank


More information about the macports-dev mailing list