diff --git a/backport-vim-syntax-adjusted-to-save-cpoptions.patch b/backport-vim-syntax-adjusted-to-save-cpoptions.patch new file mode 100644 index 0000000000000000000000000000000000000000..280180295756c2a45193ffdaca20eb86de9b3873 --- /dev/null +++ b/backport-vim-syntax-adjusted-to-save-cpoptions.patch @@ -0,0 +1,36 @@ +From 7ba3063952f53b710d092f00881ccc2996c3b5fc Mon Sep 17 00:00:00 2001 +From: Maxim Dounin +Date: Sat, 22 Jan 2022 00:28:51 +0300 +Subject: [PATCH] Contrib: vim syntax adjusted to save cpoptions (ticket + #2276). + +Line continuation as used in the syntax file might be broken if "compatible" +is set or "C" is added to cpoptions. Fix is to set the "cpoptions" option +to vim default value at script start and restore it later, see +":help use-cpo-save". +--- + contrib/vim/syntax/nginx.vim | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/contrib/vim/syntax/nginx.vim b/contrib/vim/syntax/nginx.vim +index 1b52d4869b..6828cd3e5a 100644 +--- a/contrib/vim/syntax/nginx.vim ++++ b/contrib/vim/syntax/nginx.vim +@@ -5,6 +5,9 @@ if exists("b:current_syntax") + finish + end + ++let s:save_cpo = &cpo ++set cpo&vim ++ + " general syntax + + if has("patch-7.4.1142") +@@ -2485,4 +2488,7 @@ hi def link ngxDirectiveThirdPartyDeprecated Error + hi def link ngxListenOptions Keyword + hi def link ngxListenOptionsDeprecated Error + ++let &cpo = s:save_cpo ++unlet s:save_cpo ++ + let b:current_syntax = "nginx" diff --git a/nginx.spec b/nginx.spec index 1e4948c0d88d19da7daae300d65049bea2852cdb..2971a7a766de7f311e3302fcc9516e85104c417e 100644 --- a/nginx.spec +++ b/nginx.spec @@ -17,7 +17,7 @@ Name: nginx Epoch: 1 Version: 1.21.5 -Release: 6 +Release: 7 Summary: A HTTP server, reverse proxy and mail proxy server License: BSD URL: http://nginx.org/ @@ -41,6 +41,7 @@ Patch1: nginx-1.12.1-logs-perm.patch Patch2: nginx-fix-pidfile.patch Patch3: backport-CVE-2022-41742_CVE-2022-41741.patch Patch4: backport-CVE-2023-44487.patch +Patch5: backport-vim-syntax-adjusted-to-save-cpoptions.patch BuildRequires: gcc openssl-devel pcre2-devel zlib-devel systemd gperftools-devel Requires: nginx-filesystem = %{epoch}:%{version}-%{release} openssl @@ -389,6 +390,9 @@ fi %{_mandir}/man8/nginx.8* %changelog +* Thu Dec 28 2023 sunwenhan - 1:1.21.5-7 +- Contrib: vim syntax adjusted to save cpoptions (ticket #2276). + * Thu Oct 19 2023 yanglu - 1:1.21.5-6 - fix CVE-2023-44487