Compare commits

..

11 Commits
5.0-dev ... 4.2

Author SHA1 Message Date
Tim Abbott
a025fab082 Release Zulip Server 4.2. 2021-05-13 22:03:34 -07:00
Anders Kaseorg
812ad52007 install: Run git config commands from a known readable cwd.
Fixes this error when running the installer from a directory that
isn’t world-readable:

+ su zulip -c 'git config --global user.email anders@zulip.com'
fatal: cannot come back to cwd: Permission denied

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 22:01:01 -07:00
Anders Kaseorg
9066fcac9a postgresql-init-db: Fix installation from world-unreadable directory.
This reverts part of commit 476524c0c1
(#18215), to fix this error when running the installer from a
directory that isn’t world-readable:

+ '[' -e /var/run/supervisor.sock ']'
+++ dirname /root/zulip-server-4.1/scripts/setup/postgresql-init-db
++ dirname /root/zulip-server-4.1/scripts/setup
+ su zulip -c /root/zulip-server-4.1/scripts/stop-server
bash: /root/zulip-server-4.1/scripts/stop-server: Permission denied

Zulip installation failed (exit code 126)!

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 22:00:56 -07:00
Anders Kaseorg
a70ebdb005 purge-old-deployments: Check /srv/zulip.git existence before pruning it.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 20:56:47 -07:00
Tim Abbott
956d4b2568 version: Link blog post from 4.0 release. 2021-05-13 18:59:53 -07:00
Tim Abbott
ea2256da29 version: Update version after 4.1 release. 2021-05-13 18:58:51 -07:00
Tim Abbott
d1bd8f3637 Release Zulip Server 4.1. 2021-05-13 18:35:06 -07:00
Tim Abbott
22d486bbf7 scripts: Fix check for services running when upgrading.
When upgrading from a pre-4.0 release, scripts/stop-server logic would
check whether supervisord configuration files were present to
determine what it needed to restart, but only considered paths to
those files that are introduced in Zulip 4.0.
2021-05-13 18:10:08 -07:00
Aman Agrawal
977ff62fe8 message_edit_form: Fix vertical alignment of bottom elements. 2021-05-13 17:19:22 -07:00
Anders Kaseorg
5bfc162df9 changelog: Fix version number typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 17:19:12 -07:00
Tim Abbott
2aa643502a version: Update version after 4.0 release. 2021-05-13 15:53:02 -07:00
10 changed files with 56 additions and 36 deletions

View File

@@ -1,22 +1,22 @@
# Version history
This page the release history for the Zulip server. See also the
[Zulip release lifecycle](../overview/release-lifecycle.md).
## Zulip 5.x series
### 5.0 -- unreleased
This section is an incomplete draft of the release notes for the next
major release, and is only updated occasionally. See the [commit
log][commit-log] for an up-to-date list of raw changes.
#### Upgrade notes for 5.0
- None yet.
This page contains the release history for the Zulip 4.x stable
release series. See the [current Zulip changelog][latest-changelog]
for newer release series, or the [commit log][commit-log] for an
up-to-date list of raw changes.
## Zulip 4.x series
### 4.2 -- 2021-05-13
- Fix exception in purge-old-deployments when upgrading on
a system that has never upgraded using Git.
- Fix installation from a directory readable only by root.
### 4.1 -- 2021-05-13
- Fix exception upgrading to the 4.x series from older releases.
### 4.0 -- 2021-05-13
#### Highlights
@@ -2127,7 +2127,6 @@ Zulip apps.
This section links to the upgrade notes from past releases, so you can
easily read them all when upgrading across multiple releases.
* [Draft upgrade notes for 5.0](#upgrade-notes-for-5-0)
* [Upgrade notes for 4.0](#upgrade-notes-for-4-0)
* [Upgrade notes for 3.0](#upgrade-notes-for-3-0)
* [Upgrade notes for 2.1.5](#upgrade-notes-for-2-1-5)

View File

@@ -524,8 +524,11 @@ if has_class "zulip::app_frontend_base"; then
fi
# Set up a basic .gitconfig for the 'zulip' user
su zulip -c "git config --global user.email $ZULIP_ADMINISTRATOR"
su zulip -c "git config --global user.name 'Zulip Server ($EXTERNAL_HOST)'"
(
cd / # Make sure the current working directory is readable by zulip
su zulip -c "git config --global user.email $ZULIP_ADMINISTRATOR"
su zulip -c "git config --global user.name 'Zulip Server ($EXTERNAL_HOST)'"
)
if [ -n "$NO_INIT_DB" ]; then
set +x

View File

@@ -600,7 +600,21 @@ def is_vagrant_env_host(path: str) -> bool:
def has_application_server() -> bool:
return os.path.exists("/etc/supervisor/conf.d/zulip/zulip.conf")
return (
# Current path
os.path.exists("/etc/supervisor/conf.d/zulip/zulip.conf")
# Old path, relevant for upgrades
or os.path.exists("/etc/supervisor/conf.d/zulip.conf")
)
def has_process_fts_updates() -> bool:
return (
# Current path
os.path.exists("/etc/supervisor/conf.d/zulip/zulip_db.conf")
# Old path, relevant for upgrades
or os.path.exists("/etc/supervisor/conf.d/zulip_db.conf")
)
def deport(netloc: str) -> str:

View File

@@ -14,6 +14,8 @@ from scripts.lib.zulip_tools import (
su_to_zulip,
)
LOCAL_GIT_CACHE_DIR = "/srv/zulip.git"
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
@@ -75,9 +77,10 @@ def main() -> None:
)
if not args.dry_run:
subprocess.check_call(
["git", "worktree", "prune"], cwd="/srv/zulip.git", preexec_fn=su_to_zulip
)
if os.path.exists(LOCAL_GIT_CACHE_DIR):
subprocess.check_call(
["git", "worktree", "prune"], cwd=LOCAL_GIT_CACHE_DIR, preexec_fn=su_to_zulip
)
print("Deployments cleaned successfully...")
print("Cleaning orphaned/unused caches...")

View File

@@ -17,6 +17,7 @@ from scripts.lib.zulip_tools import (
get_config_file,
get_tornado_ports,
has_application_server,
has_process_fts_updates,
overwrite_symlink,
)
@@ -90,7 +91,7 @@ if has_application_server():
worker_status.check_returncode()
workers.extend(status_line.split()[0] for status_line in worker_status.stdout.splitlines())
if os.path.exists("/etc/supervisor/conf.d/zulip/zulip_db.conf"):
if has_process_fts_updates():
workers.append("process-fts-updates")
if action == "restart" and len(workers) > 0:

View File

@@ -28,7 +28,7 @@ fi
# Shut down all services to ensure a quiescent state.
if [ -e "/var/run/supervisor.sock" ]; then
su zulip -c "$(dirname "$(dirname "$0")")/stop-server"
supervisorctl stop all
fi
# Drop any open connections to any old database.

View File

@@ -7,7 +7,13 @@ import sys
import time
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from scripts.lib.zulip_tools import ENDC, OKGREEN, WARNING, has_application_server
from scripts.lib.zulip_tools import (
ENDC,
OKGREEN,
WARNING,
has_application_server,
has_process_fts_updates,
)
deploy_path = os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))
os.chdir(deploy_path)
@@ -22,7 +28,7 @@ logging.basicConfig(format="%(asctime)s stop-server: %(message)s", level=logging
services = []
# Start with the least-critical services:
if os.path.exists("/etc/supervisor/conf.d/zulip/zulip_db.conf"):
if has_process_fts_updates():
services.append("process-fts-updates")
if has_application_server():

View File

@@ -1491,8 +1491,7 @@ div.focused_table {
.message-edit-feature-group {
display: inline-flex;
margin-left: 10px;
margin-bottom: -5px;
margin: -10px auto -5px 10px;
align-items: baseline;
}

View File

@@ -9,16 +9,11 @@ server versions is to check the `zulip_feature_level` parameter in the
`/register` and `/server_settings` responses to determine which of the
below features are supported.
## Changes in Zulip 5.0
Feature levels 66-69 are reserved for future use in 4.x maintenance
releases.
## Changes in Zulip 4.0
**Feature level 65**
No changes; feature level used for Zulip 3.0 release.
No changes; feature level used for Zulip 4.0 release.
**Feature level 64**

View File

@@ -1,6 +1,6 @@
import os
ZULIP_VERSION = "5.0-dev+git"
ZULIP_VERSION = "4.2"
# Add information on number of commits and commit hash to version, if available
zulip_git_version_file = os.path.join(
@@ -14,8 +14,8 @@ ZULIP_VERSION = lines.pop(0).strip()
ZULIP_MERGE_BASE = lines.pop(0).strip()
LATEST_MAJOR_VERSION = "4.0"
LATEST_RELEASE_VERSION = "4.0"
LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2020/07/16/zulip-3-0-released/"
LATEST_RELEASE_VERSION = "4.2"
LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.com/2021/05/13/zulip-4-0-released/"
# Versions of the desktop app below DESKTOP_MINIMUM_VERSION will be
# prevented from connecting to the Zulip server. Versions above