Sync from SUSE:SLFO:Main vim revision 66b68903d30d0a9123d5967bba4c48bd

This commit is contained in:
2025-05-28 11:25:15 +02:00
parent 9f1cd3ddad
commit 8beeab1ba9
10 changed files with 3416 additions and 209 deletions

View File

@@ -3,7 +3,7 @@
" ----------------------------------------------------------------------
" Copyright (c) 2005 Novell, Inc. All Rights Reserved.
" Copyright (c) 2006-2012 Christian Boltz. All Rights Reserved.
" Copyright (c) 2006-2023 Christian Boltz. All Rights Reserved.
"
" This program is free software; you can redistribute it and/or
" modify it under the terms of version 2 of the GNU General Public
@@ -17,14 +17,9 @@
" You should have received a copy of the GNU General Public License
" along with this program; if not, contact Novell, Inc.
"
" To contact Novell about this file by physical or electronic mail,
" you may find current contact information at www.novell.com.
"
" To contact Christian Boltz about this file by physical or electronic
" mail, you may find current contact information at www.cboltz.de/en/kontakt.
"
" If you want to report a bug via bugzilla.novell.com, please assign it
" to suse-beta[AT]cboltz.de (replace [AT] with @).
" If you want to report a bug for apparmor.vim, please do so at
" - https://gitlab.com/apparmor/apparmor/ or
" - https://bugzilla.opensuse.org (assign it to suse-beta[AT]cboltz.de)
" ----------------------------------------------------------------------
"
" stick this file into ~/.vim/syntax/ and add these commands into your .vimrc
@@ -52,6 +47,7 @@ syntax case match
" hi sdComment2 ctermfg=darkblue
hi sdGlob ctermfg=darkmagenta
hi sdAlias ctermfg=darkmagenta
hi sdAll ctermfg=darkred ctermbg=yellow
hi sdEntryWriteExec ctermfg=black ctermbg=yellow
hi sdEntryUX ctermfg=darkred cterm=underline
hi sdEntryUXe ctermfg=darkred
@@ -67,6 +63,7 @@ syntax case match
hi sdCapKey cterm=underline ctermfg=lightblue
hi sdCapDanger ctermfg=darkred
hi sdRLimit ctermfg=lightblue
hi sdUserns ctermfg=darkred
hi def link sdEntryR Normal
hi def link sdEntryK Normal
hi def link sdFlags Normal
@@ -112,7 +109,7 @@ syn match sdError /^.*$/ contains=sdComment "highlight all non-valid lines as er
" TODO: the sdGlob pattern is not anchored with ^ and $, so it matches all lines matching ^@{...}.*
" This allows incorrect lines also and should be checked better.
" This also (accidently ;-) includes variable definitions (@{FOO}=/bar)
" This also (accidentally ;-) includes variable definitions (@{FOO}=/bar)
" TODO: make a separate pattern for variable definitions, then mark sdGlob as contained
syn match sdGlob /\v\?|\*|\{.*,.*\}|[[^\]]\+\]|\@\{[a-zA-Z][a-zA-Z0-9_]*\}/
@@ -120,11 +117,18 @@ syn match sdAlias /\v^\s*alias\s+(\/|\@\{\S*\})\S*\s+-\>\s+(\/|\@\{\S*\})\S*\s*,
" syn match sdComment /#.*/
syn cluster sdEntry contains=sdEntryWriteExec,sdEntryR,sdEntryW,sdEntryIX,sdEntryPX,sdEntryPXe,sdEntryUX,sdEntryUXe,sdEntryM,sdCap,sdSetCap,sdExtHat,sdRLimit,sdNetwork,sdNetworkDanger,sdEntryChangeProfile
" List of all (supported) rules inside a profile.
" XXX When adding support for a new rule type, also add it here. XXX
" XXX Otherwise it will be highlighted as an error. XXX
syn cluster sdEntry contains=sdAll,sdEntryWriteExec,sdEntryR,sdEntryW,sdEntryIX,sdEntryPX,sdEntryPXe,sdEntryUX,sdEntryUXe,sdEntryM,sdCap,sdSetCap,sdExtHat,sdRLimit,sdNetwork,sdNetworkDanger,sdEntryChangeProfile,sdUserns
" TODO: support audit and deny keywords for all rules (not only for files)
" TODO: higlight audit and deny keywords everywhere
" TODO: highlight audit and deny keywords everywhere
" 'all' rule
syn match sdAll /\v^\s*(audit\s+)?(deny\s+|allow\s+)?all\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment nextgroup=@sdEntry,sdComment,sdError,sdInclude
" Capability line
@@ -162,10 +166,13 @@ syn match sdRLimit /\v^\s*set\s+rlimit\s+(nofile|ofile|nproc|rtprio)\s+\<\=\s+[0
syn match sdRLimit /\v^\s*set\s+rlimit\s+(locks|sigpending)\s+\<\=\s+[0-9]+\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+(fsize|data|stack|core|rss|as|memlock|msgqueue)\s+\<\=\s+[0-9]+([KMG]B)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+nice\s+\<\=\s+(-1?[0-9]|-20|1?[0-9])\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+cpu\s+\<\=\s+[0-9]+(seconds|minutes|hours|days)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+rttime\s+\<\=\s+[0-9]+(ms|seconds|minutes)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+cpu\s+\<\=\s+[0-9]+\s*(s|sec|second|seconds|min|minute|minutes|h|hour|hours|d|day|days|week|weeks)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+rttime\s+\<\=\s+[0-9]+\s*(us|microsecond|microseconds|ms|millisecond|milliseconds|s|sec|second|seconds|min|minute|minutes|h|hour|hours|d|day|days|week|weeks)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
syn match sdRLimit /\v^\s*set\s+rlimit\s+(cpu|rttime|nofile|nproc|rtprio|locks|sigpending|fsize|data|stack|core|rss|as|memlock|msgqueue|nice)\s+\<\=\s+infinity\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment
" userns
syn match sdUserns /\v^\s*(audit\s+)?(deny\s+|allow\s+)?userns(\s+create)?\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdComment nextgroup=@sdEntry,sdComment,sdError,sdInclude
" link rules
syn match sdEntryW /\v^\s+(audit\s+)?(deny\s+|allow\s+)?(owner\s+|other\s+)?link\s+(subset\s+)?(\/|\@\{\S*\})\S*\s+-\>\s+(\/|\@\{\S*\})\S*\s*,(\s*$|(\s*#.*$)\@=)/ contains=sdGlob,sdComment
@@ -175,14 +182,14 @@ syn match sdExtHat /\v^\s+(\^|hat\s+|profile\s+)\S+\s*,(\s*$|(\s*#.*$)\@=)/ con
syn match sdProfileName /\v^((profile\s+)?\/\S+|profile\s+([a-zA-Z0-9]\S*\s)?\S+)\s+((flags\s*\=\s*)?\(\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ contains=sdProfileStart,sdHatName,sdFlags,sdComment,sdGlob
syn match sdProfileName /\v^((profile\s+)?\/\S+|profile\s+([a-zA-Z0-9]\S*\s)?\S+)\s+((flags\s*\=\s*)?\(\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ contains=sdProfileStart,sdHatName,sdFlags,sdComment,sdGlob
syn match sdProfileStart /{/ contained
syn match sdProfileEnd /^}\s*(#.*)?$/ contained " TODO: syn region does not (yet?) allow usage of comment in end=
" TODO: Removing the $ mark from end= will allow non-comments also :-(
syn match sdHatName /\v^\s+(\^|hat\s+|profile\s+)\S+\s+((flags\s*\=\s*)?\(\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ contains=sdProfileStart,sdFlags,sdComment
syn match sdHatName /\v^\s+(\^|hat\s+|profile\s+)\S+\s+((flags\s*\=\s*)?\(\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ contains=sdProfileStart,sdFlags,sdComment
syn match sdHatStart /{/ contained
syn match sdHatEnd /}/ contained " TODO: allow comments + [same as for syn match sdProfileEnd]
syn match sdFlags /\v((flags\s*\=\s*)?\(\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)/ contained contains=sdFlagKey
syn match sdFlags /\v((flags\s*\=\s*)?\(\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)/ contained contains=sdFlagKey
syn match sdComment /\s*#.*$/
" NOTE: contains=sdComment changes #include highlighting to comment color.
@@ -196,8 +203,8 @@ syn match sdInclude /\s*abi\s<\S*>\s*,/ contains=sdComment " TODO: doesn't chec
" basic profile block...
" \s+ does not work in end=, therefore using \s\s*
syn region Normal start=/\v^(profile\s+)?\S+\s+((flags\s*\=\s*)?\(\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ matchgroup=sdProfileEnd end=/^}\s*$/ contains=sdProfileName,Hat,@sdEntry,sdComment,sdError,sdInclude
syn region Hat start=/\v^\s+(\^|hat\s+|profile\s+)\S+\s+((flags\s*\=\s*)?\(\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ matchgroup=sdHatEnd end=/^\s\s*}\s*$/ contains=sdHatName,@sdEntry,sdComment,sdError,sdInclude
syn region Normal start=/\v^(profile\s+)?\S+\s+((flags\s*\=\s*)?\(\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ matchgroup=sdProfileEnd end=/^}\s*$/ contains=sdProfileName,Hat,@sdEntry,sdComment,sdError,sdInclude
syn region Hat start=/\v^\s+(\^|hat\s+|profile\s+)\S+\s+((flags\s*\=\s*)?\(\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted)(\s*,\s*(complain|unconfined|audit|attach_disconnected|no_attach_disconnected|chroot_attach|chroot_no_attach|chroot_relative|namespace_relative|mediate_deleted|delegate_deleted))*\s*\)\s+)=\{/ matchgroup=sdHatEnd end=/^\s\s*}\s*$/ contains=sdHatName,@sdEntry,sdComment,sdError,sdInclude
" file permissions

View File

@@ -2,6 +2,7 @@
Encoding=UTF-8
Name=Vi IMproved
Categories=GTK;Application;Utility;TextEditor;
Keywords=editor;gvim;vim;
GenericName=Text Editor
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=gvim -f %f

View File

@@ -0,0 +1,15 @@
Index: vim-9.1.0908/src/vimtutor
===================================================================
--- vim-9.1.0908.orig/src/vimtutor
+++ vim-9.1.0908/src/vimtutor
@@ -158,9 +158,8 @@ done
# We need a temp file for the copy. First try using a standard command.
-tmp="${TMPDIR-/tmp}"
# shellcheck disable=SC2186
-TUTORCOPY=$(mktemp "$tmp/tutorXXXXXX" || tempfile -p tutor || echo none)
+TUTORCOPY=$(mktemp /tmp/tutorXXXXXX || echo /tmp/tutor$$)
# If the standard commands failed then create a directory to put the copy in.
# That is a secure way to make a temp file.

View File

@@ -1,9 +1,9 @@
Index: vim-8.2.2411/runtime/syntax/sh.vim
Index: vim-9.1.1230/runtime/syntax/sh.vim
===================================================================
--- vim-8.2.2411.orig/runtime/syntax/sh.vim
+++ vim-8.2.2411/runtime/syntax/sh.vim
@@ -74,6 +74,13 @@ if exists("b:is_dash")
let b:is_posix= 1
--- vim-9.1.1230.orig/runtime/syntax/sh.vim
+++ vim-9.1.1230/runtime/syntax/sh.vim
@@ -80,6 +80,13 @@ if exists("b:is_kornshell") || exists("b
endif
endif
+" Neither is_kornshell nor is_bash was explicitly set, and

View File

@@ -1,8 +1,8 @@
Index: vim-8.2.2411/src/main.c
Index: vim-9.1.0530/src/main.c
===================================================================
--- vim-8.2.2411.orig/src/main.c
+++ vim-8.2.2411/src/main.c
@@ -3130,7 +3130,10 @@ source_startup_scripts(mparm_T *parmp)
--- vim-9.1.0530.orig/src/main.c
+++ vim-9.1.0530/src/main.c
@@ -3251,7 +3251,10 @@ source_startup_scripts(mparm_T *parmp)
* Get system wide defaults, if the file name is defined.
*/
#ifdef SYS_VIMRC_FILE

BIN
vim-9.1.1176.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
vim-9.1.1330.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env zsh
directory=https://ftp.nluug.nl/pub/vim/patches/
version=9.0
if [ $# -ne 2 ]; then
echo "usage: $0 <old-minor-version> <new-minor-version>" 1>&2
exit 1
fi
echo "Updated to version $version.$(echo $2 | sed 's/^*//'), fixes the following problems"
for i in $(seq -w $1 $2); do
curl $directory/$version/$version.$i -s | grep -v "Binary file (standard input) matches" | \
tr -d '\n' | grep -oP "Problem:.*Solution:" | sed s,"Problem: "," * ", | sed s,"Solution:",, | \
tr '\t' '\n' | sed s,' ','', | fmt -w 80
done

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
#
# spec file for package vim
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
%define pkg_version 9.1
%define patchlevel 1176
%define patchlevel 1330
%define patchlevel_compact %{patchlevel}
%define VIM_SUBDIR vim91
%define site_runtimepath %{_datadir}/vim/site
@@ -59,22 +59,22 @@ Source30: gvim_128.png
Source31: gvim_256.png
Source32: gvim_512.png
# /Section
Source98: vim-changelog.sh
Source99: %{name}-7.4-rpmlintrc
Patch3: %{name}-7.4-disable_lang_no.patch
Patch4: %{name}-7.3-gvimrc_fontset.patch
Patch6: %{name}-7.3-sh_is_bash.patch
Patch7: %{name}-7.3-filetype_ftl.patch
Patch9: %{name}-7.3-use_awk.patch
Patch10: %{name}-7.3-name_vimrc.patch
Patch15: %{name}-7.4-filetype_apparmor.patch
Patch18: %{name}-7.3-filetype_spec.patch
Patch21: %{name}-7.3-filetype_changes.patch
Patch22: %{name}-7.4-filetype_mine.patch
Patch100: %{name}73-no-static-libpython.patch
Patch101: %{name}-8.0.1568-defaults.patch
Patch104: %{name}-8.2.2411-globalvimrc.patch
Patch105: %{name}-9.1.1134-revert-putty-terminal-colors.patch
Patch1: %{name}-7.4-disable_lang_no.patch
Patch2: %{name}-7.3-gvimrc_fontset.patch
Patch3: %{name}-7.3-sh_is_bash.patch
Patch4: %{name}-7.3-filetype_ftl.patch
Patch5: %{name}-7.3-use_awk.patch
Patch6: %{name}-7.3-name_vimrc.patch
Patch7: %{name}-7.3-mktemp_tutor.patch
Patch8: %{name}-7.4-filetype_apparmor.patch
Patch9: %{name}-7.3-filetype_spec.patch
Patch10: %{name}-7.3-filetype_changes.patch
Patch11: %{name}-7.4-filetype_mine.patch
Patch12: %{name}73-no-static-libpython.patch
Patch13: %{name}-8.0.1568-defaults.patch
Patch14: %{name}-8.2.2411-globalvimrc.patch
Patch15: %{name}-9.1.1134-revert-putty-terminal-colors.patch
BuildRequires: autoconf
BuildRequires: db-devel
BuildRequires: fdupes
@@ -120,7 +120,7 @@ Provides: vim_client
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with python2}
BuildRequires: python2-devel
@@ -172,7 +172,7 @@ BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%endif
%description -n gvim
@@ -191,7 +191,7 @@ BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
%endif
%description small
@@ -209,25 +209,28 @@ a hex dump back to its original binary form.
%prep
%setup -q -n %{name}-%{pkg_version}.%{patchlevel}
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
cp %{SOURCE23} runtime/syntax/apparmor.vim
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 10 -p1
cp %{SOURCE23} runtime/syntax/apparmor.vim
%patch -P 11 -p1
%patch -P 12 -p1
%patch -P 13 -p1
%patch -P 14 -p1
%patch -P 15 -p1
%patch -P 18 -p1
%patch -P 21 -p1
%patch -P 22 -p1
%patch -P 100 -p1
%patch -P 101 -p1
%patch -P 104 -p1
%patch -P 105 -p1
cp %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE8} %{SOURCE10} .
%build
export CFLAGS="%{optflags} -Wall -pipe -fno-strict-aliasing"
## about -std=gnu17 see github.com/vim/vim/issues/16575;
## use -std=gnu11 here to allow build on Leap 15.6
export CFLAGS="%{optflags} -Wall -pipe -fno-strict-aliasing -std=gnu11"
export CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/-D_FORTIFY_SOURCE=1}
export COMMON_OPTIONS="\