Commit Graph

550 Commits

Author SHA1 Message Date
f4ee376b35 Build mod_tile with cmake 2023-03-01 11:57:10 +00:00
6c8a1d9aec Fix numerous flawfinder issues in src/gen_tile_test.cpp 2023-02-23 15:56:11 +00:00
235d53026b Fix 'Wrong type of arguments to formatting function' alerts 2023-02-23 15:56:11 +00:00
7dacc63195 Don't forget Makefile.am 2023-02-19 08:25:15 +00:00
28a3d0faa2 Allow for iniparser.h in either iniparser.h or iniparser/iniparser.h 2023-02-19 08:25:15 +00:00
db3c169053 Adjusted header include enclosures to indicate system headers are expected. 2023-02-19 08:23:57 +00:00
91a08f5ccb Fix macOS build support 2023-02-19 08:23:12 +00:00
6e2ac992da Fixed typo HAVE_SYS_CDEFS_C, it should be HAVE_SYS_CDEFS_H. From configure.ac AC_CHECK_HEADERS([sys/cdefs.h]) 2023-02-19 08:22:33 +00:00
8861a4a658 Update README.rst [skip ci] 2023-02-19 08:21:49 +00:00
b0a37a6915 Updated Ubuntu 20.04 doc to fix link to build and test .yml 2023-02-19 08:21:18 +00:00
92bbcab130 Removed Ubuntu 21.04 (replace it with Ubuntu 22.04) 2022-07-25 11:47:07 +00:00
2325f84d1b Upgrade catch.hpp to Catch2 v2.13.9 2022-07-24 18:30:51 +00:00
09ff24809f Remove -d from render_expired test 2022-07-24 18:30:51 +00:00
0c4e2cf8b0 Add gen_tile_test sections, add zoom-level for render_speedtest
Also adjust exit codes for render_*
2022-07-24 18:30:51 +00:00
1529220734 Flawfinder, use non-dot-prefixed (I.E. current directory) paths 2022-07-24 18:28:30 +00:00
ad97e89f5d Update README.rst
Fix minor typo - as implied by the rest of the text, the tiles on disk are .meta not .png.
Also nudged copyright date to 2022.
2022-07-24 18:26:13 +00:00
056b115d26 Fix ERROR 1: bad application_id when reading example GeoPackage file (#281) 2022-05-29 18:29:51 +00:00
296f888752 Resolve various compiler warnings and errors (#279)
* Resolved warnings in `src/daemon.c`

I.E.:
```
src/daemon.c:835:16: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
   char *name = iniparser_getsecname(ini, section);
                ^~~~~~~~~~~~~~~~~~~~
src/daemon.c:860:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
    char *ini_uri = iniparser_getstring(ini, buffer, (char *)"");
                    ^~~~~~~~~~~~~~~~~~~
```

* Resolved warning in `src/mod_tile.c`

I.E.:
```
./src/mod_tile.c:327:53: warning: format '%d' expects argument of type 'int', but argument 9 has type 'long unsigned int' [-Wformat=]
      ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "request_tile: Failed to read response from rendering socket. Got %d bytes but expected %d. Errno %d (%s)",
                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             ret, sizeof(struct protocol_v2), errno, strerror(errno));
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
                  |
                  long unsigned int
```

* Resolved `cppcheck`-detected error

I.E.:
```
src/store_rados.c:355:3: error: Memory leak: store [memleak]
  return NULL;
  ^
```

* Fix `Does not check for buffer overflows (CWE-120)` in `src/daemon.c`

* Fix `Does not check for buffer overflows (CWE-120)` in `src/cache_expire.c`

* Resolved `cppcheck`-detected error

I.E.:
```
src/parameterize_style.cpp:43:3: error: Memory leak: data [memleak]
  return;        //No parameterization given
  ^

* url is `char *`, unlike buffer, size is not known
2022-05-29 18:29:21 +00:00
42e4f0d283 Added PID file path configurability (#282)
* Added PID file path configurability
2022-05-26 20:36:54 +00:00
52308d7996 Updated GitHub Actions job definitions (#277)
* Fixing "Lint with `astyle`" job
2022-05-26 20:35:14 +00:00
fe17e56eba Update man pages to reflect recent changes 2022-05-26 20:33:55 +00:00
9d34dd8044 Updated Usage to reflect recent change allowing TCP for tools (#273)
* Updated `Usage` to reflect recent change allowing TCP for tools as well as "description" alignment
2022-05-06 16:10:01 +00:00
ad0439ecb1 Temporarily disabled CentOS checks on CI 2022-02-07 20:25:19 +00:00
f0453c37d3 Allow connections over TCP besides Unix sockets
Signed-off-by: Stephan Austermühle <au@hcsd.de>
2022-01-06 20:32:50 +00:00
50afe3e351 Fix compile errors on FreeBSD (#268)
* Fix compile errors on FreeBSD

Co-authored-by: Michael Schmiedgen <root@maps.takwa.de>
2022-01-06 20:24:44 +00:00
7e81d950d1 Switch from shapefile to geopackage for example map.
Co-authored-by: Frederik Ramm <frederik@remote.org>
2021-09-21 11:37:38 +00:00
43beadaf08 Improve provided example configuration. 2021-09-21 11:16:45 +00:00
1d837265b5 Move redundant steps to local actions & use a Linux distribution matrix
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix
2021-08-26 19:53:37 +02:00
9d9bfc1c84 Change logging level for empty/absent parameterize_style to DEBUG
Shown once per thread:
```
** INFO: 04:05:50.327: Loading parameterization function for
```

Fixed two minor grammar issues: `to` => `too`
2021-08-18 19:47:57 +02:00
98224eadb2 Allow tests to run again 2021-08-18 19:04:33 +02:00
032d90d130 Reverted change of copyright owners on included source files 0.6.1 2021-08-17 14:43:40 +00:00
fdf94e683f Added flawfinder code check 0.6 2021-08-04 11:03:22 +00:00
c683c5569b Added compilation instructions for several distros 2021-08-03 19:16:48 +02:00
4ea8729e14 Added build & test on CentOS 7
* Requires building `Mapnik`
  * Which requires these `EPEL` repository packages
    * `boost169-devel` + dependencies
    * `gdal-devel` + dependencies
    * `proj-devel` + dependencies
* Caches `Mapnik` build directory
  * Takes about 20-30 minutes without cache
  * Takes about 5-10 minutes with cache
* Runs on `push` to `centos7` branch & `pull_request`
* Includes very basic build documentation
2021-08-03 07:43:47 +02:00
7c4081dc81 Added build & test on Fedora 34
* Takes about 3-5 minutes

**Also:**
* Split up `Lint` and `Build & Test`
  * Into independent workflows
* Changed `.tar` compression to `GZip`
  * `--zstd` not available in `CentOS 7`
  * Also excluded `.git` & `.gitignore`
* Created `Provisioning` local action
  * Combining update & install steps, etc.
* Added libraries to `Ubuntu` build dependencies
  * `libmemcached-dev` & `librados-dev`
  * In order to test for successful compilation
* ~~Reduced `build-archive` retention to 1 day~~
* Updated `ax_pthread` macro
  * While trying to resolve `apxs` failure
  * http://www.gnu.org/software/autoconf-archive/ax_pthread.html
2021-08-02 17:03:19 +02:00
ffda917722 Convert -pthread to -Wc,-pthread when invoking apxs 2021-08-02 14:44:28 +02:00
a642a232f0 Fix .gitignore ignoring too much
* `Makefile.am` ignored by `Makefile*`
* `etc/renderd/*` ignored by `renderd`
2021-08-02 10:21:13 +02:00
cab62c1612 Reduce redundant CI configuration by using local actions 2021-07-30 16:45:05 +02:00
0f017f1ae8 Completed list of authors with recent contributors 2021-07-30 12:16:15 +00:00
d264cf190d Add a Prometheus metrics endpoint
Add a Prometheus `/metrics` endpoint based on the modtile_collector[0]
script.
* Minor metric naming cleanup.
* Drops duplicate TileBufferReads metrics that duplicate the per-zoom values.

Related to: https://github.com/openstreetmap/operations/issues/492

[0]: https://github.com/openstreetmap/prometheus-exporters/blob/main/collectors/modtile/modtile_collector

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-30 14:14:53 +02:00
a7baee9033 Relied on leaflet package for CI 2021-07-29 23:48:54 +00:00
27c470c3eb Improved configuration files 2021-07-29 22:57:26 +00:00
6f93441f60 Adjusted installation instructions 2021-07-29 22:57:21 +00:00
0169d767a1 Install, configure & start apache & renderd, test for mod_tile.so 2021-07-29 10:01:20 +02:00
f28cda9920 Easier installation instructions 2021-07-28 14:46:55 +00:00
a14924a999 Logging Improvements
* Using [`GLib Logging Framework`](https://developer.gnome.org/programming-guidelines/stable/logging.html.en) for logging
  * Created new `g_logger` function for logging
    * Outputs to `stdout`/`stderr` only when running in `foreground`
      * `stderr` for `message`, `warning`, `critical` & `error` levels
      * `stdout` for `debug` & `info` levels
        * Use `G_MESSAGES_DEBUG=all` environment to enable `debug` to print
    * Otherwise, output will be to `syslog` or `systemd journal` (when appropriate)
* Standardized usage of `{LOG_PRIORITY}: ` prefix in log messages
  * Only when using `syslog`, otherwise `GLib Logging` will take care of it
* Changed `fprintf(stderr`, `printf` & `perror` calls to `g_logger` calls
  * You might want to check them out closely to make sure I chose the right levels
  * No changes to `logging/output` were made to "`foreground`" programs (I.E. `render_*`)
* Changed `0`,`1` to `no_argument`,`required_argument` in `getopt_long`'s `long_options`
  * Fixed `renderd`'s `foreground` opt (should be `no_argument` [0] rather than `reguired_argument` [1])
* Basic test for `mod_tile` module
* ~~Extended `renderd` log priority onto Mapnik's logger~~
2021-07-28 14:46:50 +00:00
1ed85f3f8d Documented installation of Debian and Ubuntu packages from official sources 2021-07-27 12:22:25 +00:00
b1091e201b Switched CI from Travis to Github Actions 2021-07-27 14:06:24 +02:00
865a44e63f Explicitly mention Debian packages for config
Explicitly state that Debian helper scripts require packages and configuration section does not apply when building from source.
Fixes #241 misunderstanding.
2021-07-20 15:28:35 +02:00
e85c7afc9e Retry a failed command after reconnecting 2021-07-14 09:20:08 +00:00