Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
install: Support Debian 12.
Anders Kaseorg12310189edc3
diff --git a/.github/workflows/production-suite.yml b/.github/workflows/production-suite.ymlindex 1c6b03242e1..7295047a42c 100644--- a/.github/workflows/production-suite.yml+++ b/.github/workflows/production-suite.yml@@ -144,6 +144,11 @@ jobs:os: bullseyeextra-args: --test-custom-db+ - docker_image: zulip/ci:bookworm+ name: Debian 12 production install+ os: bookworm+ extra-args: ""+name: ${{ matrix.name }}container:image: ${{ matrix.docker_image }}diff --git a/.github/workflows/zulip-ci.yml b/.github/workflows/zulip-ci.ymlindex cb0cdd118a8..4d47ed74f29 100644--- a/.github/workflows/zulip-ci.yml+++ b/.github/workflows/zulip-ci.yml@@ -48,6 +48,12 @@ jobs:os: jammyinclude_documentation_tests: falseinclude_frontend_tests: false+ # Debian 12 ships with Python 3.11.2.+ - docker_image: zulip/ci:bookworm+ name: Debian 12 (Python 3.11, backend)+ os: bookworm+ include_documentation_tests: false+ include_frontend_tests: falseruns-on: ubuntu-latestname: ${{ matrix.name }}diff --git a/docs/development/setup-advanced.md b/docs/development/setup-advanced.mdindex 2a9c4fd4dea..387a4a1609b 100644--- a/docs/development/setup-advanced.md+++ b/docs/development/setup-advanced.md@@ -20,7 +20,7 @@ host by following these instructions. Currently supported platformsare:- Ubuntu 20.04, 22.04-- Debian 11+- Debian 11, 12- CentOS 7 (beta)- Fedora 33 and 34 (beta)- RHEL 7 (beta)diff --git a/docs/development/setup-recommended.md b/docs/development/setup-recommended.mdindex 47ecc48be72..995f789942a 100644--- a/docs/development/setup-recommended.md+++ b/docs/development/setup-recommended.md@@ -51,7 +51,7 @@ a proxy to access the internet.)[GitHub account](#step-0-set-up-git--github).- **macOS**: macOS (10.11 El Capitan or newer recommended)- **Ubuntu LTS**: 20.04 or 22.04-- **Debian**: 11+- **Debian**: 11 or 12- **Fedora**: tested for 36- **Windows**: Windows 64-bit (Win 10 recommended), hardwarevirtualization enabled (VT-x or AMD-V), administrator access.diff --git a/docs/production/requirements.md b/docs/production/requirements.mdindex da1d6ba1593..a83ac136307 100644--- a/docs/production/requirements.md+++ b/docs/production/requirements.md@@ -7,6 +7,7 @@ To run a Zulip server, you will need:- Ubuntu 20.04- Ubuntu 22.04- Debian 11+ - Debian 12- A supported CPU architecture:- x86-64- aarch64@@ -36,7 +37,7 @@ on issues you'll encounter](install-existing-server.md).#### Operating system-Ubuntu 20.04, Ubuntu 22.04, and Debian 11+Ubuntu 20.04, Ubuntu 22.04, Debian 11, and Debian 12are supported for running Zulip in production. You can alsorun Zulip on other platforms that support Docker using[docker-zulip][docker-zulip-homepage].diff --git a/docs/production/upgrade.md b/docs/production/upgrade.mdindex b4f22ad543e..36c1ee8c65e 100644--- a/docs/production/upgrade.md+++ b/docs/production/upgrade.md@@ -484,6 +484,52 @@ instructions for other supported platforms.18.04](#upgrading-from-ubuntu-1604-xenial-to-1804-bionic), sothat you are running a supported operating system.+### Upgrading from Debian 11 to 12++1. Upgrade your server to the latest `7.x` release.++2. As the Zulip user, stop the Zulip server and run the following+ to back up the system:++ ```bash+ /home/zulip/deployments/current/scripts/stop-server+ /home/zulip/deployments/current/manage.py backup --output=/home/zulip/release-upgrade.backup.tar.gz+ ```++3. Follow [Debian's instructions to upgrade the OS][bookworm-upgrade].++ [bookworm-upgrade]: https://www.debian.org/releases/bookworm/amd64/release-notes/ch-upgrading.html++ When prompted for you how to upgrade configuration+ files for services that Zulip manages like Redis, PostgreSQL,+ nginx, and memcached, the best choice is `N` to keep the+ currently installed version. But it's not important; the next+ step will re-install Zulip's configuration in any case.++4. As root, run the following steps to regenerate configurations+ for services used by Zulip:++ ```bash+ apt remove upstart -y+ /home/zulip/deployments/current/scripts/zulip-puppet-apply -f+ ```++5. Reinstall the current version of Zulip, which among other things+ will recompile Zulip's Python module dependencies for your new+ version of Python:++ ```bash+ rm -rf /srv/zulip-venv-cache/*+ /home/zulip/deployments/current/scripts/lib/upgrade-zulip-stage-2 \+ /home/zulip/deployments/current/ --ignore-static-assets --audit-fts-indexes+ ```++ This will finish by restarting your Zulip server; you should now+ be able to navigate to its URL and confirm everything is working+ correctly.++6. As an additional step, you can also [upgrade the PostgreSQL version](#upgrading-postgresql).+### Upgrading from Debian 10 to 111. Upgrade your server to the latest `5.x` release. You can onlydiff --git a/scripts/lib/install b/scripts/lib/installindex 2aa4715aeb2..835aee9a2ab 100755--- a/scripts/lib/install+++ b/scripts/lib/install@@ -219,7 +219,7 @@ if [ -f /etc/os-release ]; thenficase "$os_id $os_version_id" in- 'debian 11' | 'ubuntu 20.04' | 'ubuntu 22.04') ;;+ 'debian 11' | 'debian 12' | 'ubuntu 20.04' | 'ubuntu 22.04') ;;*)set +xcat <<EOF@@ -228,6 +228,7 @@ Unsupported OS release: $os_id $os_version_idZulip in production is supported only on:- Debian 11+ - Debian 12- Ubuntu 20.04 LTS- Ubuntu 22.04 LTSdiff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2index 71587cafcc3..2c6a74e67ac 100755--- a/scripts/lib/upgrade-zulip-stage-2+++ b/scripts/lib/upgrade-zulip-stage-2@@ -210,6 +210,7 @@ if os.path.exists("/etc/init.d/postgresql"):if not postgresql_version:default_postgresql_version = {("debian", "11"): "13",+ ("debian", "12"): "15",("ubuntu", "20.04"): "12",("ubuntu", "22.04"): "14",("centos", "7"): "11",diff --git a/scripts/setup/apt-repos/zulip/bookworm.list b/scripts/setup/apt-repos/zulip/bookworm.listnew file mode 100644index 00000000000..2a50733f48f--- /dev/null+++ b/scripts/setup/apt-repos/zulip/bookworm.list@@ -0,0 +1,2 @@+deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main+deb-src http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg maindiff --git a/scripts/setup/apt-repos/zulip/custom.sh b/scripts/setup/apt-repos/zulip/custom.shindex 0720d88b2fb..5ffbd9f91a8 100755--- a/scripts/setup/apt-repos/zulip/custom.sh+++ b/scripts/setup/apt-repos/zulip/custom.sh@@ -26,6 +26,10 @@ if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; thenread -r distributionread -r release} <<<"$os_info"+ if [ "$distribution" = debian ] && [ "$release" = bookworm ]; then+ # PGroonga binaries are not yet provided for Debian 12.+ exit+ figroonga_apt_source_deb="groonga-apt-source-latest-$release.deb"groonga_apt_source_deb_sign="$groonga_apt_source_deb.asc.$pgroonga_apt_sign_key_fingerprint"curl -fLO --retry 3 "https://packages.groonga.org/$distribution/$groonga_apt_source_deb"diff --git a/tools/ci/build-docker-images b/tools/ci/build-docker-imagesindex a3aa57c81ac..d0bd045ac60 100755--- a/tools/ci/build-docker-images+++ b/tools/ci/build-docker-images@@ -4,3 +4,4 @@ cd "$(dirname "${BASH_SOURCE[0]}")"docker build . --build-arg=BASE_IMAGE=ubuntu:20.04 --pull --tag=zulip/ci:focaldocker build . --build-arg=BASE_IMAGE=ubuntu:22.04 --pull --tag=zulip/ci:jammydocker build . --build-arg=BASE_IMAGE=debian:11 --pull --tag=zulip/ci:bullseye+docker build . --build-arg=BASE_IMAGE=debian:bookworm --pull --tag=zulip/ci:bookwormdiff --git a/tools/lib/provision.py b/tools/lib/provision.pyindex f07c1a51dc7..efd63c69f82 100755--- a/tools/lib/provision.py+++ b/tools/lib/provision.py@@ -78,6 +78,8 @@ vendor = distro_info["ID"]os_version = distro_info["VERSION_ID"]if vendor == "debian" and os_version == "11": # bullseyePOSTGRESQL_VERSION = "13"+elif vendor == "debian" and os_version == "12": # bookworm+ POSTGRESQL_VERSION = "15"elif vendor == "ubuntu" and os_version == "20.04": # focalPOSTGRESQL_VERSION = "12"elif vendor == "ubuntu" and os_version == "21.10": # impish@@ -159,7 +161,7 @@ COMMON_YUM_DEPENDENCIES = []BUILD_PGROONGA_FROM_SOURCE = False-if vendor == "debian" and os_version in [] or vendor == "ubuntu" and os_version in []:+if vendor == "debian" and os_version in ["12"] or vendor == "ubuntu" and os_version in []:# For platforms without a PGroonga release, we need to build it# from source.BUILD_PGROONGA_FROM_SOURCE = True@@ -180,7 +182,7 @@ elif "debian" in os_families():# additional dependency for postgresql-13-pgdg-pgroonga.## See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037- if vendor == "debian" and os_version == "11":+ if vendor == "debian":DEBIAN_DEPENDENCIES.remove("libappindicator1")DEBIAN_DEPENDENCIES.append("libgroonga0")