From cd8148cf1ceba988d30beb7a49b799cf41b30aee Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Tue, 30 Apr 2024 15:33:38 +0200 Subject: [PATCH 1/3] Fix broken full-nav-restore.sh script After the Docker development container was re-engineered (in #2859) to run as a non-root user, this helper script stopped working, as it now needs sudo to run the nav start/stop command. --- tools/docker/full-nav-restore.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/full-nav-restore.sh b/tools/docker/full-nav-restore.sh index 7259624392..3764659412 100755 --- a/tools/docker/full-nav-restore.sh +++ b/tools/docker/full-nav-restore.sh @@ -10,7 +10,7 @@ if ! which navsyncdb 2>/dev/null; then echo "NAV source directory not correctly mounted on /source" > /dev/stderr exit 1 fi -nav stop +sudo nav stop export PGHOST=postgres export PGUSER=postgres From 0ecdef197f70c7fefdcaaabd4b3615646787243d Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Tue, 30 Apr 2024 15:38:34 +0200 Subject: [PATCH 2/3] Run dev environment on "slightly" newer PostgreSQL While the current version of NAV may require no newer PostgreSQL syntax than 9.6, that version is hopelessly outdated (and newer Django versions we are considering moving to will not support PostgreSQLs this old). We also run mostly version 13 in production, and without this change, dumping and loading data from an actual production server just becomes that much harder (dump from PostgreSQL 13 don't seem to be compatible with 9.6). --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8643011c8b..77894629d8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,7 +77,7 @@ services: restart: on-failure:5 postgres: - image: "postgres:9.6" + image: "postgres:13" environment: - POSTGRES_HOST_AUTH_METHOD=trust restart: on-failure:5 From ae8bcf8da0f9b443273c4764d7071b20fe619543 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Tue, 30 Apr 2024 15:46:23 +0200 Subject: [PATCH 3/3] Document PostgreSQL >= 11 requirement Realistically, nothing in NAV uses any PostgreSQL syntax newer than version 9.6. However, this version of PostgreSQL has been EOL for many years, and we cannot even dump production data from modern PostgreSQL versions and expect to load them into our development installs by now. PostgreSQL 13 ought to be our target, but the next NAV release should still be able to run on Debian Buster, which means PostgreSQL 11 is the minimum. We can move to require PostgreSQL 13 in NAV 5.11. --- .github/workflows/build-and-test.yml | 2 +- NOTES.rst | 9 +++++++++ changelog.d/+pg11.changed | 1 + doc/howto/generic-install-from-source.rst | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 changelog.d/+pg11.changed diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 538939c240..df4431b000 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -71,7 +71,7 @@ jobs: - name: "Set up PostgreSQL" uses: harmon758/postgresql-action@v1 with: - postgresql version: '9.6' # minimum NAV requirement + postgresql version: '11' # minimum NAV requirement postgresql user: $PGUSER postgresql password: $PGPASSWORD diff --git a/NOTES.rst b/NOTES.rst index ba8b2fbe33..3887802cd0 100644 --- a/NOTES.rst +++ b/NOTES.rst @@ -8,6 +8,15 @@ existing bug reports, go to https://github.com/uninett/nav/issues . To see an overview of upcoming release milestones and the issues they resolve, please go to https://github.com/uninett/nav/milestones . +NAV 5.10 (Unreleased) +===================== + +Dependency changes +------------------ + +.. IMPORTANT:: NAV 5.10 requires PostgreSQL to be at least version *11*. + + NAV 5.9 ======= diff --git a/changelog.d/+pg11.changed b/changelog.d/+pg11.changed new file mode 100644 index 0000000000..f98d192eb0 --- /dev/null +++ b/changelog.d/+pg11.changed @@ -0,0 +1 @@ +Changed required PostgreSQL version to 11 \ No newline at end of file diff --git a/doc/howto/generic-install-from-source.rst b/doc/howto/generic-install-from-source.rst index 70738cc133..9ae9a62659 100644 --- a/doc/howto/generic-install-from-source.rst +++ b/doc/howto/generic-install-from-source.rst @@ -27,7 +27,7 @@ Runtime requirements To run NAV, these software packages are required: * Apache2 + mod_wsgi (or, really, any web server that supports the WSGI interface) - * PostgreSQL >= 9.6 (With the ``hstore`` extension available) + * PostgreSQL >= 11 (With the ``hstore`` extension available) * :xref:`Graphite` * Python >= 3.7.0 * nbtscan = 1.5.1