diff --git a/.github/workflows/check-crlf.yml b/.github/workflows/check-crlf.yml new file mode 100644 index 0000000..965f7cb --- /dev/null +++ b/.github/workflows/check-crlf.yml @@ -0,0 +1,20 @@ +# check for Windows CRLF in files +# homepage: https://github.com/marketplace/actions/check-crlf + +name: Check CRLF + +on: [push, pull_request] + +jobs: + Check-CRLF: + name: verify that only LF linefeeds are used + runs-on: ubuntu-latest + + steps: + - name: Checkout repository contents + uses: actions/checkout@v7 + + - name: Use action to check for CRLF endings + uses: erclu/check-crlf@master + with: # ignore directories containing *.csv & data + exclude: /demo/ /ms4w/ /test/ Makefile.vc \ No newline at end of file diff --git a/.github/workflows/irc_notify.yml b/.github/workflows/irc_notify.yml new file mode 100644 index 0000000..be8ab28 --- /dev/null +++ b/.github/workflows/irc_notify.yml @@ -0,0 +1,46 @@ +# send build notifications to the #mapserver-docs IRC channel +# homepage: https://github.com/marketplace/actions/notify-irc + +name: "IRC Push Notification" +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + irc_notify: + runs-on: ubuntu-latest + #if: github.repository == 'MapServer/tinyows' + steps: + - name: irc push + uses: rectalogic/notify-irc@v2 + if: github.event_name == 'push' + with: + channel: "#tinyows" + server: "irc.libera.chat" + nickname: tinyows-github-notifier + message: | + ${{ github.actor }} pushed ${{ github.event.ref }} ${{ github.event.compare }} + ${{ join(github.event.commits.*.message) }} + - name: irc pull request + uses: rectalogic/notify-irc@v2 + if: github.event_name == 'pull_request' + with: + channel: "#tinyows" + server: "irc.libera.chat" + nickname: tinyows-github-notifier + message: | + ${{ github.actor }} opened PR ${{ github.event.pull_request.html_url }} + ${{ github.event.pull_request.title }} + - name: irc tag created + uses: rectalogic/notify-irc@v2 + if: github.event_name == 'create' && github.event.ref_type == 'tag' + with: + channel: "#tinyows" + server: "irc.libera.chat" + nickname: tinyows-github-notifier + message: | + ${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }} diff --git a/.github/workflows/linux.sh b/.github/workflows/linux.sh index 90e2887..642f38d 100755 --- a/.github/workflows/linux.sh +++ b/.github/workflows/linux.sh @@ -7,7 +7,7 @@ apt-get update DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ gcc libxml2-dev libpq-dev libfcgi-dev \ autoconf make flex libfl-dev \ - postgresql-12 postgresql-client postgis postgresql-12-postgis-3 postgresql-12-postgis-3-scripts \ + postgresql-16 postgresql-client postgis postgresql-16-postgis-3 postgresql-16-postgis-3-scripts \ wget ca-certificates patch valgrind cd "${WORK_DIR}" @@ -16,9 +16,9 @@ CFLAGS="-Werror" ./configure make make install -cp /etc/postgresql/12/main/pg_hba.conf /etc/postgresql/12/main/pg_hba.conf.bak -echo "local all postgres trust" | cat - /etc/postgresql/12/main/pg_hba.conf.bak > /etc/postgresql/12/main/pg_hba.conf -echo "host all all 127.0.0.1/32 trust" | cat - /etc/postgresql/12/main/pg_hba.conf.bak > /etc/postgresql/12/main/pg_hba.conf +cp /etc/postgresql/16/main/pg_hba.conf /etc/postgresql/16/main/pg_hba.conf.bak +echo "local all postgres trust" | cat - /etc/postgresql/16/main/pg_hba.conf.bak > /etc/postgresql/16/main/pg_hba.conf +echo "host all all 127.0.0.1/32 trust" | cat - /etc/postgresql/16/main/pg_hba.conf.bak > /etc/postgresql/16/main/pg_hba.conf /etc/init.d/postgresql start rm -f /etc/tinyows.xml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5ee5397..e078497 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -9,7 +9,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Build - run: docker run --rm -e WORK_DIR=$PWD -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/linux.sh + run: docker run --rm -e WORK_DIR=$PWD -v $PWD:$PWD ubuntu:24.04 $PWD/.github/workflows/linux.sh diff --git a/LICENSE.md b/LICENSE.md index fffa601..7fb92b4 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) <2007-2024> +Copyright (c) <2007-2026> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/NEWS.md b/NEWS.md index 397d4c5..295f02b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +1.2.2 (2024-07-31) *in memory of Olivier Courtin* + - Include stdlib.h for atoi ([#105](https://github.com/MapServer/tinyows/pull/105)) (Bas Couwenberg) + 1.2.1 (2024-05-17) *in memory of Olivier Courtin* - Fix JSON encoding ([#100](https://github.com/MapServer/tinyows/pull/100)) (Kévin Dubuc) - Use stdbool.h instead of custom definitions ([#99](https://github.com/MapServer/tinyows/pull/99)) (Bas Couwenberg) diff --git a/README.md b/README.md index 41e2c88..8b13bb9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # TinyOWS +[![Build TinyOWS on Linux Status](https://github.com/MapServer/tinyows/actions/workflows/linux.yml/badge.svg)](https://github.com/MapServer/tinyows/actions?query=workflow%3A%22Linux%20Build%22%20branch%3Amain) +[![Release](https://img.shields.io/github/v/release/MapServer/tinyows)](https://github.com/MapServer/tinyows/releases) + TinyOWS is a simple WFS-T server based on PostGIS spatial database. ## Documentation Home @@ -25,7 +28,7 @@ All code must meet the following rules : Code dynamically linked with the following other librairies: - PostgreSQL -- libxml 2.9.x +- libxml2 - flex ## Credits diff --git a/VERSION.md b/VERSION.md index 6085e94..23aa839 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -1.2.1 +1.2.2 diff --git a/demo/install.sh.in b/demo/install.sh.in index 54411a8..43a2d35 100755 --- a/demo/install.sh.in +++ b/demo/install.sh.in @@ -11,32 +11,46 @@ PGUSER=postgres SHP2PGSQL=@SHP2PGSQL@ DB=tinyows_demo -if [ -d /usr/local/pgsql/share/contrib/postgis-3.4 ]; then - PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.4 +if [ -d /usr/local/pgsql/share/contrib/postgis-3.6 ]; then + PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.6 +elif [ -d /usr/local/pgsql/share/contrib/postgis-3.5 ]; then + PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.5 +elif [ -d /usr/local/pgsql/share/contrib/postgis-3.4 ]; then + PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.4 elif [ -d /usr/local/pgsql/share/contrib/postgis-3.3 ]; then PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.3 elif [ -d /usr/local/pgsql/share/contrib/postgis-3.2 ]; then PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.2 elif [ -d /usr/local/pgsql/share/contrib/postgis-3.1 ]; then PGSHARE=/usr/local/pgsql/share/contrib/postgis-3.1 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.5 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.5 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.4 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.4 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.3 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.3 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.2 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.2 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.1 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.1 elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.4 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.3 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.2 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.2 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.2 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.1 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-1.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 else - echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 + echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 fi echo "Create Spatial Database: $DB" diff --git a/demo/tests/expected/wfs10_describe.txt b/demo/tests/expected/wfs10_describe.txt index 2520c20..5f4b340 100644 --- a/demo/tests/expected/wfs10_describe.txt +++ b/demo/tests/expected/wfs10_describe.txt @@ -21,7 +21,7 @@ Content-Type: text/xml; subtype=gml/2.1.2; - + diff --git a/demo/tests/expected/wfs11_describe.txt b/demo/tests/expected/wfs11_describe.txt index 558730c..fb213ca 100644 --- a/demo/tests/expected/wfs11_describe.txt +++ b/demo/tests/expected/wfs11_describe.txt @@ -21,7 +21,7 @@ Content-Type: text/xml; subtype=gml/3.1.1; - + diff --git a/doc/Doxyfile b/doc/Doxyfile index 04c607a..8b66810 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -23,7 +23,7 @@ PROJECT_NAME = tinyows # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.2.1 +PROJECT_NUMBER = 1.2.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/ows/ows_config.c b/src/ows/ows_config.c index 9bdf605..ba4ea97 100644 --- a/src/ows/ows_config.c +++ b/src/ows/ows_config.c @@ -22,6 +22,7 @@ #include +#include #include #include #include diff --git a/src/ows_define.h.in b/src/ows_define.h.in index 30da8ba..7566f61 100644 --- a/src/ows_define.h.in +++ b/src/ows_define.h.in @@ -28,7 +28,7 @@ #define OWS_DEBUG #endif -#define TINYOWS_VERSION "1.2.1" +#define TINYOWS_VERSION "1.2.2" #define TINYOWS_FCGI @USE_FCGI@ #define OWS_CONFIG_FILE_PATH "/etc/tinyows.xml" diff --git a/test/wfs_100/install_wfs_100.sh.in b/test/wfs_100/install_wfs_100.sh.in index 840b742..eecd64c 100755 --- a/test/wfs_100/install_wfs_100.sh.in +++ b/test/wfs_100/install_wfs_100.sh.in @@ -10,24 +10,34 @@ PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 PGUSER=postgres DB=tinyows_test -if [ -d @POSTGIS_SHARE@/contrib/postgis-3.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 +if [ -d @POSTGIS_SHARE@/contrib/postgis-3.5 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.5 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.4 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.4 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.3 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.3 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.2 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.2 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.1 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.1 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.0 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.4 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.3 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.2 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.2 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.2 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.1 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-1.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 else - echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 + echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 fi echo "Create Spatial Database: $DB" diff --git a/test/wfs_110/install_wfs_110.sh.in b/test/wfs_110/install_wfs_110.sh.in index aaddd41..2a7bcbc 100755 --- a/test/wfs_110/install_wfs_110.sh.in +++ b/test/wfs_110/install_wfs_110.sh.in @@ -10,24 +10,34 @@ PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 PGUSER=postgres DB=tinyows_test -if [ -d @POSTGIS_SHARE@/contrib/postgis-3.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 +if [ -d @POSTGIS_SHARE@/contrib/postgis-3.5 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.5 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.4 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.4 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.3 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.3 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.2 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.2 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.1 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.1 +elif [ -d @POSTGIS_SHARE@/contrib/postgis-3.0 ]; then + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-3.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.5 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.4 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.4 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.3 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.3 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.2 ]; then PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.2 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.1 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.1 elif [ -d @POSTGIS_SHARE@/contrib/postgis-2.0 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-2.0 elif [ -d @POSTGIS_SHARE@/contrib/postgis-1.5 ]; then - PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 + PGSHARE=@POSTGIS_SHARE@/contrib/postgis-1.5 else - echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 + echo "Unable to find PostGIS dir in @POSTGIS_SHARE@/contrib/" && exit 1 fi echo "Create Spatial Database: $DB"