diff --git a/SOURCES/spec-template.new b/SOURCES/spec-template.new index b248ecdb..2a558fb7 100644 --- a/SOURCES/spec-template.new +++ b/SOURCES/spec-template.new @@ -4,17 +4,17 @@ # https://docs.fedoraproject.org/en-US/packaging-guidelines/ -Name: -Version: -Release: 0%{?dist} -Summary: +Name: +Version: +Release: 0%{?dist} +Summary: -License: -URL: -Source0: +License: +URL: +Source0: -BuildRequires: -Requires: +BuildRequires: +Requires: %description diff --git a/SOURCES/vim-7.0-fixkeys.patch b/SOURCES/vim-7.0-fixkeys.patch index 5554e1bf..4092b3e6 100644 --- a/SOURCES/vim-7.0-fixkeys.patch +++ b/SOURCES/vim-7.0-fixkeys.patch @@ -1,9 +1,10 @@ ---- vim70aa/src/term.c.orig 2006-03-01 23:07:55.000000000 +0100 -+++ vim70aa/src/term.c 2006-03-14 15:39:12.000000000 +0100 -@@ -1008,14 +1008,14 @@ +diff -up vim81/src/term.c.fixkeys vim81/src/term.c +--- vim81/src/term.c.fixkeys 2019-12-12 09:00:20.685567074 +0100 ++++ vim81/src/term.c 2019-12-12 09:21:36.708769626 +0100 +@@ -957,14 +957,14 @@ static struct builtin_term builtin_termc {K_XRIGHT, IF_EB("\033[1;*C", ESC_STR "[1;*C")}, {K_XLEFT, IF_EB("\033[1;*D", ESC_STR "[1;*D")}, - /* An extra set of function keys for vt100 mode */ + // An extra set of function keys for vt100 mode - {K_XF1, IF_EB("\033O*P", ESC_STR "O*P")}, - {K_XF2, IF_EB("\033O*Q", ESC_STR "O*Q")}, - {K_XF3, IF_EB("\033O*R", ESC_STR "O*R")}, diff --git a/SOURCES/vim-7.4-fstabsyntax.patch b/SOURCES/vim-7.4-fstabsyntax.patch index f82a66c0..87ddef43 100644 --- a/SOURCES/vim-7.4-fstabsyntax.patch +++ b/SOURCES/vim-7.4-fstabsyntax.patch @@ -1,6 +1,6 @@ -diff -up vim80/runtime/syntax/fstab.vim.fstabsyntax vim80/runtime/syntax/fstab.vim ---- vim80/runtime/syntax/fstab.vim.fstabsyntax 2017-11-19 20:32:49.000000000 +0100 -+++ vim80/runtime/syntax/fstab.vim 2017-11-20 16:01:31.494316342 +0100 +diff -up vim81/runtime/syntax/fstab.vim.fstabsyntax vim81/runtime/syntax/fstab.vim +--- vim81/runtime/syntax/fstab.vim.fstabsyntax 2019-06-11 09:55:23.000000000 +0200 ++++ vim81/runtime/syntax/fstab.vim 2019-06-11 10:14:22.223616868 +0200 @@ -56,7 +56,7 @@ syn keyword fsMountPointKeyword containe " Type syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown @@ -14,8 +14,8 @@ diff -up vim80/runtime/syntax/fstab.vim.fstabsyntax vim80/runtime/syntax/fstab.v syn keyword fsOptionsYesNo yes no syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck syn keyword fsOptionsSize 512 1024 2048 --syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx -+syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx +-syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail ++syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail syn match fsOptionsGeneral /_netdev/ " Options: adfs diff --git a/SOURCES/vim-7.4-globalsyntax.patch b/SOURCES/vim-7.4-globalsyntax.patch index 1e0b08ed..4503f2d0 100644 --- a/SOURCES/vim-7.4-globalsyntax.patch +++ b/SOURCES/vim-7.4-globalsyntax.patch @@ -1,12 +1,13 @@ -diff -up vim74/runtime/syntax/spec.vim.orig vim74/runtime/syntax/spec.vim ---- vim74/runtime/syntax/spec.vim.orig 2016-01-12 13:51:55.727569873 +0100 -+++ vim74/runtime/syntax/spec.vim 2016-01-12 13:53:08.124991178 +0100 -@@ -114,7 +114,7 @@ syn region specDescriptionArea matchgrou +diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim +index 1a5a108..b709d20 100644 +--- a/runtime/syntax/spec.vim ++++ b/runtime/syntax/spec.vim +@@ -111,7 +111,7 @@ syn region specDescriptionArea matchgroup=specSection start='^%description' end= syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment "%% Scripts Section %% --syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 -+syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|check\|clean\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|global\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 +-syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 ++syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|check\|pre\|postun\|preun\|post\|posttrans\)\>' skip='^%{\|^%\(define\|global\|patch\d*\|configure\|GNUconfigure\|setup\|autosetup\|autopatch\|find_lang\|make_build\|makeinstall\|make_install\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 "%% Changelog Section %% syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense diff --git a/SOURCES/vim-7.4-syncolor.patch b/SOURCES/vim-7.4-syncolor.patch index 440da186..b41f2fe3 100644 --- a/SOURCES/vim-7.4-syncolor.patch +++ b/SOURCES/vim-7.4-syncolor.patch @@ -1,25 +1,26 @@ -diff -up vim80/src/syntax.c.syncolor vim80/src/syntax.c ---- vim80/src/syntax.c.syncolor 2017-08-15 12:14:21.716020676 +0200 -+++ vim80/src/syntax.c 2017-08-15 12:30:31.380158974 +0200 -@@ -6972,8 +6972,8 @@ static char *(highlight_init_light[]) = +diff --git a/src/highlight.c b/src/highlight.c +index 9322f96..f7147a0 100644 +--- a/src/highlight.c ++++ b/src/highlight.c +@@ -211,8 +211,8 @@ static char *(highlight_init_light[]) = { CENT("Visual term=reverse", "Visual term=reverse guibg=LightGrey"), #ifdef FEAT_DIFF - CENT("DiffAdd term=bold ctermbg=LightBlue", - "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"), + CENT("DiffAdd term=bold ctermbg=LightRed", -+ "DiffAdd term=bold ctermbg=LightRed guibg=LightBlue"), ++ "DiffAdd term=bold ctermbg=LightRed guibg=LightBlue"), CENT("DiffChange term=bold ctermbg=LightMagenta", "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta"), CENT("DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan", -@@ -7066,8 +7066,8 @@ static char *(highlight_init_dark[]) = { +@@ -304,8 +304,8 @@ static char *(highlight_init_dark[]) = { CENT("Visual term=reverse", "Visual term=reverse guibg=DarkGrey"), #ifdef FEAT_DIFF - CENT("DiffAdd term=bold ctermbg=DarkBlue", - "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"), + CENT("DiffAdd term=bold ctermbg=DarkRed", -+ "DiffAdd term=bold ctermbg=DarkRed guibg=DarkBlue"), ++ "DiffAdd term=bold ctermbg=DarkRed guibg=DarkBlue"), CENT("DiffChange term=bold ctermbg=DarkMagenta", "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta"), CENT("DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan", diff --git a/SOURCES/vim-8.0-copy-paste.patch b/SOURCES/vim-8.0-copy-paste.patch index 5cb1a88c..1ef4c9b1 100644 --- a/SOURCES/vim-8.0-copy-paste.patch +++ b/SOURCES/vim-8.0-copy-paste.patch @@ -1,14 +1,20 @@ -diff -up vim80/runtime/defaults.vim.copy-paste vim80/runtime/defaults.vim ---- vim80/runtime/defaults.vim.copy-paste 2016-12-19 09:01:20.351119199 +0100 -+++ vim80/runtime/defaults.vim 2016-12-19 09:01:53.735738941 +0100 -@@ -64,12 +64,6 @@ map Q gq +diff -up vim81/runtime/defaults.vim.copypaste vim81/runtime/defaults.vim +--- vim81/runtime/defaults.vim.copypaste 2019-10-30 10:30:23.108710252 +0100 ++++ vim81/runtime/defaults.vim 2019-10-30 10:36:19.127508406 +0100 +@@ -73,18 +73,6 @@ map Q gq " Revert with ":iunmap ". inoremap u -" In many terminal emulators the mouse works just fine. By enabling it you -" can position the cursor, Visually select and scroll with the mouse. +-" Only xterm can grab the mouse events when using the shift key, for other +-" terminals use ":", select text and press Esc. -if has('mouse') -- set mouse=a +- if &term =~ 'xterm' +- set mouse=a +- else +- set mouse=nvi +- endif -endif - " Switch syntax highlighting on when the terminal has colors or when using the diff --git a/SOURCES/vim-python3-tests.patch b/SOURCES/vim-python3-tests.patch index 26027f74..98b5f758 100644 --- a/SOURCES/vim-python3-tests.patch +++ b/SOURCES/vim-python3-tests.patch @@ -1,16 +1,16 @@ -diff -up vim80/runtime/tools/demoserver.py.python3-tests vim80/runtime/tools/demoserver.py ---- vim80/runtime/tools/demoserver.py.python3-tests 2018-05-11 08:24:41.774618804 +0200 -+++ vim80/runtime/tools/demoserver.py 2018-05-11 09:24:48.363309856 +0200 +diff -up vim82/runtime/tools/demoserver.py.python-tests vim82/runtime/tools/demoserver.py +--- vim82/runtime/tools/demoserver.py.python-tests 2019-07-26 07:58:50.000000000 +0200 ++++ vim82/runtime/tools/demoserver.py 2020-04-17 06:18:06.748977527 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Server that will accept connections from a Vim channel. # Run this server and then in Vim you can open the channel: -diff -up vim80/src/auto/configure.python3-tests vim80/src/auto/configure ---- vim80/src/auto/configure.python3-tests 2018-05-11 08:25:03.632420873 +0200 -+++ vim80/src/auto/configure 2018-05-11 09:25:26.062000471 +0200 -@@ -6396,7 +6396,7 @@ eof +diff -up vim82/src/auto/configure.python-tests vim82/src/auto/configure +--- vim82/src/auto/configure.python-tests 2020-04-17 06:07:48.000000000 +0200 ++++ vim82/src/auto/configure 2020-04-17 06:18:06.750977509 +0200 +@@ -6418,7 +6418,7 @@ eof if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \ "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then vi_cv_path_python_plibs="-framework Python" @@ -19,10 +19,10 @@ diff -up vim80/src/auto/configure.python3-tests vim80/src/auto/configure vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else -diff -up vim80/src/configure.ac.python3-tests vim80/src/configure.ac ---- vim80/src/configure.ac.python3-tests 2018-05-11 08:25:26.070218957 +0200 -+++ vim80/src/configure.ac 2018-05-11 09:26:01.603708243 +0200 -@@ -1248,7 +1248,7 @@ eof +diff -up vim82/src/configure.ac.python-tests vim82/src/configure.ac +--- vim82/src/configure.ac.python-tests 2020-04-17 06:07:48.000000000 +0200 ++++ vim82/src/configure.ac 2020-04-17 06:18:06.750977509 +0200 +@@ -1263,7 +1263,7 @@ eof if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \ "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then vi_cv_path_python_plibs="-framework Python" @@ -31,54 +31,54 @@ diff -up vim80/src/configure.ac.python3-tests vim80/src/configure.ac vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else -diff -up vim80/src/testdir/test_channel_pipe.py.python3-tests vim80/src/testdir/test_channel_pipe.py ---- vim80/src/testdir/test_channel_pipe.py.python3-tests 2018-05-11 09:23:05.738146018 +0200 -+++ vim80/src/testdir/test_channel_pipe.py 2018-05-11 09:26:37.354413350 +0200 +diff -up vim82/src/testdir/test_channel_pipe.py.python-tests vim82/src/testdir/test_channel_pipe.py +--- vim82/src/testdir/test_channel_pipe.py.python-tests 2019-07-26 07:58:53.000000000 +0200 ++++ vim82/src/testdir/test_channel_pipe.py 2020-04-17 06:18:06.751977500 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Server that will communicate over stdin/stderr # -diff -up vim80/src/testdir/test_channel.py.python3-tests vim80/src/testdir/test_channel.py ---- vim80/src/testdir/test_channel.py.python3-tests 2018-05-11 09:22:48.522284266 +0200 -+++ vim80/src/testdir/test_channel.py 2018-05-11 09:26:17.762574955 +0200 +diff -up vim82/src/testdir/test_channel.py.python-tests vim82/src/testdir/test_channel.py +--- vim82/src/testdir/test_channel.py.python-tests 2020-04-17 06:18:06.751977500 +0200 ++++ vim82/src/testdir/test_channel.py 2020-04-17 06:18:24.517813082 +0200 @@ -1,4 +1,4 @@ --#!/usr/bin/python +-#!/usr/bin/env python +#!/usr/bin/python3 # # Server that will accept connections from a Vim channel. # Used by test_channel.vim. -diff -up vim80/src/testdir/test_channel_write.py.python3-tests vim80/src/testdir/test_channel_write.py ---- vim80/src/testdir/test_channel_write.py.python3-tests 2018-05-11 09:23:21.254021422 +0200 -+++ vim80/src/testdir/test_channel_write.py 2018-05-11 09:26:54.952268193 +0200 +diff -up vim82/src/testdir/test_channel_write.py.python-tests vim82/src/testdir/test_channel_write.py +--- vim82/src/testdir/test_channel_write.py.python-tests 2019-07-26 07:58:53.000000000 +0200 ++++ vim82/src/testdir/test_channel_write.py 2020-04-17 06:18:06.751977500 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Program that writes a number to stdout repeatedly # -diff -up vim80/src/testdir/test_makeencoding.py.python3-tests vim80/src/testdir/test_makeencoding.py ---- vim80/src/testdir/test_makeencoding.py.python3-tests 2018-05-11 09:23:38.990878990 +0200 -+++ vim80/src/testdir/test_makeencoding.py 2018-05-11 09:27:14.402107759 +0200 +diff -up vim82/src/testdir/test_makeencoding.py.python-tests vim82/src/testdir/test_makeencoding.py +--- vim82/src/testdir/test_makeencoding.py.python-tests 2019-07-26 07:58:53.000000000 +0200 ++++ vim82/src/testdir/test_makeencoding.py 2020-04-17 06:18:06.751977500 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: utf-8 -*- # Test program for :make, :grep and :cgetfile. -diff -up vim80/src/testdir/test_netbeans.py.python3-tests vim80/src/testdir/test_netbeans.py ---- vim80/src/testdir/test_netbeans.py.python3-tests 2018-05-11 09:23:54.398752732 +0200 -+++ vim80/src/testdir/test_netbeans.py 2018-05-11 09:27:30.489975057 +0200 +diff -up vim82/src/testdir/test_netbeans.py.python-tests vim82/src/testdir/test_netbeans.py +--- vim82/src/testdir/test_netbeans.py.python-tests 2019-07-26 07:58:53.000000000 +0200 ++++ vim82/src/testdir/test_netbeans.py 2020-04-17 06:18:06.751977500 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # Server that will communicate with Vim through the netbeans interface. # Used by test_netbeans.vim. -diff -up vim80/src/testdir/test_short_sleep.py.python3-tests vim80/src/testdir/test_short_sleep.py ---- vim80/src/testdir/test_short_sleep.py.python3-tests 2018-05-11 09:24:09.134631798 +0200 -+++ vim80/src/testdir/test_short_sleep.py 2018-05-11 09:27:48.432827053 +0200 +diff -up vim82/src/testdir/test_short_sleep.py.python-tests vim82/src/testdir/test_short_sleep.py +--- vim82/src/testdir/test_short_sleep.py.python-tests 2019-07-26 07:58:53.000000000 +0200 ++++ vim82/src/testdir/test_short_sleep.py 2020-04-17 06:18:06.751977500 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 diff --git a/SOURCES/vimrc b/SOURCES/vimrc index cf660612..4842faf2 100644 --- a/SOURCES/vimrc +++ b/SOURCES/vimrc @@ -1,15 +1,51 @@ -if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" - set fileencodings=ucs-bom,utf-8,latin1 +" When started as "evim", evim.vim will already have done these settings. +if v:progname =~? "evim" + finish endif -set nocompatible " Use Vim defaults (much better!) -set bs=indent,eol,start " allow backspacing over everything in insert mode +" Use Vim settings, rather than Vi settings (much better!). +" This must be first, because it changes other options as a side effect. +" Avoid side effects when it was already reset. +if &compatible + set nocompatible +endif + +" When the +eval feature is missing, the set command above will be skipped. +" Use a trick to reset compatible only when the +eval feature is missing. +silent! while 0 + set nocompatible +silent! endwhile + +" Allow backspacing over everything in insert mode. +set backspace=indent,eol,start + "set ai " always set autoindenting on "set backup " keep a backup file set viminfo='20,\"50 " read/write a .viminfo file, don't store more " than 50 lines of registers set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time +set showcmd " display incomplete commands +set wildmenu " display completion matches in a status line + +set ttimeout " time out for key codes +set ttimeoutlen=100 " wait up to 100ms after Esc for special key + +" Show @@@ in the last line if it is truncated. +set display=truncate + +" Show a few lines of context around the cursor. Note that this makes the +" text scroll if you mouse-click near the start or end of the window. +set scrolloff=5 + +" Do incremental searching when it's possible to timeout. +if has('reltime') + set incsearch +endif + +" Do not recognize octal numbers for Ctrl-A and Ctrl-X, most users find it +" confusing. +set nrformats-=octal " Only do this part when compiled with support for autocommands if has("autocmd") @@ -25,7 +61,10 @@ if has("autocmd") " don't write swapfile on most commonly used directories for NFS mounts or USB sticks autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp " start with spec file template - autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec + " 1724126 - do not open new file with .spec suffix with spec file template + " apparently there are other file types with .spec suffix, so disable the + " template + " autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec augroup END endif @@ -47,7 +86,12 @@ endif " Switch syntax highlighting on, when the terminal has colors " Also switch on highlighting the last used search pattern. if &t_Co > 2 || has("gui_running") + " Revert with ":syntax off". syntax on + + " I like highlighting strings inside C comments. + " Revert with ":unlet c_comment_strings". + let c_comment_strings=1 set hlsearch endif @@ -59,6 +103,26 @@ if &term=="xterm" set t_Sf=[3%dm endif +" Convenient command to see the difference between the current buffer and the +" file it was loaded from, thus the changes you made. +" Only define it when not defined already. +" Revert with: ":delcommand DiffOrig". +if !exists(":DiffOrig") + command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_ | diffthis + \ | wincmd p | diffthis +endif + +if has('langmap') && exists('+langremap') + " Prevent that the langmap option applies to characters that result from a + " mapping. If set (default), this may break plugins (but it's backward + " compatible). + set nolangremap +endif + " Don't wake up system with blinking cursor: -" http://www.linuxpowertop.org/known.php let &guicursor = &guicursor . ",a:blinkon0" + +" Source a global configuration file if available +if filereadable("/etc/vimrc.local") + source /etc/vimrc.local +endif diff --git a/SPECS/vim.spec b/SPECS/vim.spec index 0c6ff27d..6fdb05f3 100644 --- a/SPECS/vim.spec +++ b/SPECS/vim.spec @@ -1,4 +1,4 @@ -%define patchlevel 1137 +%define patchlevel 628 %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} %define WITH_SELINUX 1 %endif @@ -14,8 +14,8 @@ %define withruby 1 %define withlua 1 -%define baseversion 8.1 -%define vimdir vim81 +%define baseversion 8.2 +%define vimdir vim82 Summary: The VIM editor URL: http://www.vim.org/ @@ -50,10 +50,8 @@ BuildRequires: hunspell-devel Patch3000: vim-7.4-syntax.patch Patch3002: vim-7.4-nowarnings.patch Patch3004: vim-7.0-rclocation.patch -Patch3006: vim-7.4-checkhl.patch Patch3007: vim-7.4-fstabsyntax.patch Patch3008: vim-7.4-syncolor.patch -Patch3009: vim-7.0-specedit.patch Patch3010: vim-7.3-manpage-typo-668894-675480.patch Patch3011: vim-manpagefixes-948566.patch Patch3013: vim-7.4-globalsyntax.patch @@ -61,13 +59,13 @@ Patch3014: vim-7.4-releasestring-1318991.patch Patch3016: vim-8.0-copy-paste.patch # migrate shebangs in script to /usr/bin/python3 and use python2 when necessary Patch3017: vim-python3-tests.patch -# typo introduced in the latest upstream commit, reported upstream with patch -Patch3018: 0001-Typo-in-gvim.desktop-file.patch +# fips warning +Patch3018: vim-crypto-warning.patch # gcc is no longer in buildroot by default BuildRequires: gcc -BuildRequires: python-devel python3-devel ncurses-devel gettext perl-devel +BuildRequires: python3-devel ncurses-devel gettext perl-devel #BuildRequires: perl-generators BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) BuildRequires: libacl-devel gpm-devel autoconf file @@ -88,11 +86,6 @@ BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} Epoch: 2 Conflicts: filesystem < 3 -# vim bundles libvterm, which is used during build - so we need to provide -# bundled libvterm for catching possible libvterm CVEs -Provides: bundled(libvterm) - - %description VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is @@ -128,7 +121,7 @@ many different languages. %package minimal Summary: A minimal version of the VIM editor -Provides: vi = %{version}-%{release} +Provides: vi Provides: %{_bindir}/vi # conflicts in package because of manpage move (bug #1599663) Conflicts: %{name}-common < %{epoch}:8.1.1-1 @@ -145,20 +138,22 @@ only available when the vim-common package is installed. %package enhanced Summary: A version of the VIM editor which includes recent enhancements Requires: vim-common = %{epoch}:%{version}-%{release} which -Provides: vim = %{version}-%{release} +Provides: vim Provides: %{_bindir}/mergetool Provides: %{_bindir}/vim # suggest python3, python2, lua, ruby and perl packages because of their # embedded functionality in Vim/GVim -Requires: python python-libs Requires: python3 python3-libs -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-devel %if "%{withruby}" == "1" Requires: ruby-libs ruby %endif %if "%{withlua}" == "1" -Requires: lua +Requires: lua-libs %endif +# vim bundles libvterm, which is used during build - so we need to provide +# bundled libvterm for catching possible libvterm CVEs +Provides: bundled(libvterm) %description enhanced VIM (VIsual editor iMproved) is an updated and improved version of the @@ -192,21 +187,20 @@ BuildRequires: libXpm-devel BuildRequires: libICE-devel Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk3 -Provides: gvim = %{version}-%{release} +Provides: gvim Provides: %{_bindir}/mergetool Provides: %{_bindir}/gvim BuildRequires: gtk3-devel libSM-devel libXt-devel libXpm-devel libappstream-glib Requires: hicolor-icon-theme # suggest python3, python2, lua, ruby and perl packages because of their # embedded functionality in Vim/GVim -Requires: python python-libs Requires: python3 python3-libs -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-libs perl-devel +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-devel %if "%{withruby}" == "1" Requires: ruby-libs ruby %endif %if "%{withlua}" == "1" -Requires: lua +Requires: lua-libs %endif %description X11 @@ -230,7 +224,7 @@ sed -i -e 's,/usr/bin/python3,%{__python3},' %{PATCH3017} # fix rogue dependencies from sample code chmod -x runtime/tools/mve.awk -%patch2002 -p1 +%patch2002 -p1 -b .fixkeys %patch2003 -p1 %if %{withhunspell} %patch2011 -p1 @@ -245,16 +239,14 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3000 -p1 %patch3002 -p1 %patch3004 -p1 -%patch3006 -p1 -%patch3007 -p1 +%patch3007 -p1 -b .fstabsyntax %patch3008 -p1 -b .syncolor -#patch3009 -p1 %patch3010 -p1 %patch3011 -p1 %patch3013 -p1 %patch3014 -p1 -%patch3016 -p1 -%patch3017 -p1 +%patch3016 -p1 -b .copypaste +%patch3017 -p1 -b .python-tests %patch3018 -p1 %build @@ -290,15 +282,12 @@ perl -pi -e "s/vimrc/virc/" os_unix.h %configure --prefix=%{_prefix} --with-features=small --with-x=no \ --enable-multibyte \ --disable-netbeans \ -%if %{WITH_SELINUX} --enable-selinux \ -%else - --disable-selinux \ -%endif --disable-pythoninterp --disable-perlinterp --disable-tclinterp \ --with-tlib=ncurses --enable-gui=no --disable-gpm --exec-prefix=/ \ --with-compiledby="" \ --with-modified-by="" \ + --enable-fips-warning \ --enable-fail-if-missing make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} @@ -308,31 +297,33 @@ make clean mv -f os_unix.h.save os_unix.h mv -f ex_cmds.c.save ex_cmds.c +%if 0%{?fedora} > 31 +export LDFLAGS="%{__global_ldflags} $(python3-config --libs --embed)" +%else +export LDFLAGS="%{__global_ldflags} $(python3-config --libs)" +%endif + # More configure options: # --enable-xim - enabling X Input Method - international input module for X, # it is for multibyte languages in Vim with X # --enable-termtruecolor - use terminal with true colors %configure --with-features=huge \ - --enable-pythoninterp=dynamic \ --enable-python3interp=dynamic \ --enable-perlinterp=dynamic \ --disable-tclinterp --with-x=yes \ --enable-xim --enable-multibyte \ --with-tlib=ncurses \ --enable-gtk3-check --enable-gui=gtk3 \ - --with-compiledby="" --enable-cscope \ - --with-modified-by="" \ + --enable-fips-warning \ + --with-compiledby="" --enable-cscope \ + --with-modified-by="" \ %if "%{withnetbeans}" == "1" --enable-netbeans \ %else --disable-netbeans \ %endif -%if %{WITH_SELINUX} --enable-selinux \ -%else - --disable-selinux \ -%endif %if "%{withruby}" == "1" --enable-rubyinterp=dynamic \ %else @@ -350,25 +341,21 @@ cp vim gvim make clean %configure --prefix=%{_prefix} --with-features=huge \ - --enable-pythoninterp=dynamic \ --enable-python3interp=dynamic \ --enable-perlinterp=dynamic \ --disable-tclinterp \ --with-x=no \ --enable-gui=no --exec-prefix=%{_prefix} --enable-multibyte \ - --enable-cscope --with-modified-by="" \ + --enable-cscope --with-modified-by="" \ --with-tlib=ncurses \ - --with-compiledby="" \ + --enable-fips-warning \ + --with-compiledby="" \ %if "%{withnetbeans}" == "1" --enable-netbeans \ %else --disable-netbeans \ %endif -%if %{WITH_SELINUX} --enable-selinux \ -%else - --disable-selinux \ -%endif %if "%{withruby}" == "1" --enable-rubyinterp=dynamic \ %else @@ -476,17 +463,13 @@ EOF ln -sf gvim ./%{_bindir}/gvimdiff ln -sf gvim ./%{_bindir}/vimx %if "%{desktop_file}" == "1" - mkdir -p %{buildroot}/%{_datadir}/applications desktop-file-install \ - %if 0%{?fedora} && 0%{?fedora} < 19 - --vendor fedora \ - %endif --dir %{buildroot}/%{_datadir}/applications \ - %{_builddir}/%{vimdir}/runtime/gvim.desktop + %{buildroot}/%{_datadir}/applications/gvim.desktop # --add-category "Development;TextEditor;X-Red-Hat-Base" D\ %else mkdir -p ./%{_sysconfdir}/X11/applnk/Applications - cp %{_builddir}/%{vimdir}/runtime/gvim.desktop ./%{_sysconfdir}/X11/applnk/Applications/gvim.desktop + cp %{buildroot}/%{_datadir}/applications/gvim.desktop ./%{_sysconfdir}/X11/applnk/Applications/gvim.desktop %endif # ja_JP.ujis is obsolete, ja_JP.eucJP is recommended. ( cd ./%{_datadir}/%{name}/%{vimdir}/lang; \ @@ -534,8 +517,8 @@ install -p -m644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/vimrc # if Vim isn't built for Fedora, use redhat augroup %if 0%{?rhel} >= 7 -sed -i -e "s/augroup fedora/augroup powerel/" %{buildroot}/%{_sysconfdir}/vimrc -sed -i -e "s/augroup fedora/augroup powerel/" %{buildroot}/%{_sysconfdir}/virc +sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/vimrc +sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/virc %endif mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ @@ -546,16 +529,6 @@ rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/macros/maze/maze*.c rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/tools rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/doc/vim2html.pl rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/tutor/tutor.gr.utf-8~ -( cd %{buildroot}/%{_mandir} - for i in `find ??/ -type f`; do - if [[ "`file $i`" == *UTF-8\ Unicode\ text* ]]; then - continue - fi - bi=`basename $i` - iconv -f latin1 -t UTF8 $i > %{buildroot}/$bi - mv -f %{buildroot}/$bi $i - done -) # Remove not UTF-8 manpages for i in pl.ISO8859-2 it.ISO8859-1 ru.KOI8-R fr.ISO8859-1 da.ISO8859-1 de.ISO8859-1; do @@ -582,11 +555,11 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags # Refresh documentation helptags #%transfiletriggerin common -- %{_datadir}/%{name}/vimfiles/doc -%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : +#%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : #%transfiletriggerpostun common -- %{_datadir}/%{name}/vimfiles/doc -> %{_datadir}/%{name}/vimfiles/doc/tags || : -%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : +#> %{_datadir}/%{name}/vimfiles/doc/tags || : +#%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || : %files common %config(noreplace) %{_sysconfdir}/vimrc @@ -650,6 +623,7 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %lang(sk.cp1250) %{_datadir}/%{name}/%{vimdir}/lang/sk.cp1250 %lang(sr) %{_datadir}/%{name}/%{vimdir}/lang/sr %lang(sv) %{_datadir}/%{name}/%{vimdir}/lang/sv +%lang(tr) %{_datadir}/%{name}/%{vimdir}/lang/tr %lang(uk) %{_datadir}/%{name}/%{vimdir}/lang/uk %lang(uk.cp1251) %{_datadir}/%{name}/%{vimdir}/lang/uk.cp1251 %lang(vi) %{_datadir}/%{name}/%{vimdir}/lang/vi @@ -797,6 +771,200 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_datadir}/icons/locolor/*/apps/* %changelog +* Fri Apr 24 2020 Zdenek Dohnal - 2:8.2.628-1 +- patchlevel 628 + +* Tue Apr 21 2020 Zdenek Dohnal - 2:8.2.613-1 +- patchlevel 613 + +* Fri Apr 17 2020 Zdenek Dohnal - 2:8.2.587-1 +- patchlevel 587 + +* Thu Apr 09 2020 Zdenek Dohnal - 2:8.2.534-1 +- patchlevel 534 + +* Tue Apr 07 2020 Zdenek Dohnal - 2:8.2.525-1 +- patchlevel 525 + +* Mon Apr 06 2020 Zdenek Dohnal - 2:8.2.520-1 +- patchlevel 520 + +* Mon Mar 30 2020 Zdenek Dohnal - 2:8.2.480-1 +- patchlevel 480 + +* Thu Mar 26 2020 Zdenek Dohnal - 2:8.2.448-1 +- patchlevel 448 + +* Wed Mar 25 2020 Zdenek Dohnal - 2:8.2.444-1 +- patchlevel 444 + +* Mon Mar 16 2020 Lubomir Rintel - 2:8.2.390-2 +- source /etc/vimrc.local if it exists + +* Mon Mar 16 2020 Zdenek Dohnal - 2:8.2.390-1 +- patchlevel 390 + +* Tue Mar 10 2020 Zdenek Dohnal - 2:8.2.357-2 +- put providing bundled libvterm into subpackage vim-enhanced + +* Fri Mar 06 2020 Zdenek Dohnal - 2:8.2.357-1 +- patchlevel 357 + +* Thu Mar 05 2020 Zdenek Dohnal - 2:8.2.356-1 +- patchlevel 356 + +* Tue Mar 03 2020 Zdenek Dohnal - 2:8.2.348-1 +- patchlevel 348 + +* Thu Feb 13 2020 Zdenek Dohnal - 2:8.2.236-2 +- F32 got branched - do separate update for it + +* Mon Feb 10 2020 Zdenek Dohnal - 2:8.2.236-1 +- patchlevel 236 + +* Wed Jan 29 2020 Zdenek Dohnal - 2:8.2.158-2 +- man page file format conversion is not needed anymore + +* Mon Jan 27 2020 Zdenek Dohnal - 2:8.2.158-1 +- patchlevel 158 + +* Fri Jan 10 2020 Zdenek Dohnal - 2:8.2.109-1 +- patchlevel 109 + +* Thu Jan 02 2020 Zdenek Dohnal - 2:8.2.076-1 +- patchlevel 076 + +* Wed Dec 18 2019 Zdenek Dohnal - 2:8.2.019-1 +- patchlevel 019 + +* Mon Dec 16 2019 Zdenek Dohnal - 2:8.2.012-1 +- patchlevel 012 + +* Thu Dec 12 2019 Zdenek Dohnal - 2:8.1.2424-1 +- patchlevel 2424 + +* Thu Nov 28 2019 Zdenek Dohnal - 2:8.1.2352-1 +- patchlevel 2352 + +* Thu Nov 28 2019 Zdenek Dohnal - 2:8.1.2267-2 +- leave out f29, will be soon EOL + +* Thu Nov 07 2019 Zdenek Dohnal - 2:8.1.2267-1 +- patchlevel 2267 + +* Wed Nov 06 2019 Zdenek Dohnal - 2:8.1.2234-2 +- do not add python-libs into LDFLAGS until we build vim and gvim + +* Wed Oct 30 2019 Zdenek Dohnal - 2:8.1.2234-1 +- patchlevel 2234 + +* Tue Oct 22 2019 Zdenek Dohnal - 2:8.1.2198-1 +- patchlevel 2198 + +* Mon Oct 21 2019 Zdenek Dohnal - 2:8.1.2197-1 +- patchlevel 2197 + +* Thu Oct 17 2019 Zdenek Dohnal - 2:8.1.2168-1 +- patchlevel 2168 + +* Mon Oct 07 2019 Zdenek Dohnal - 2:8.1.2120-1 +- patchlevel 2120 + +* Mon Sep 30 2019 Zdenek Dohnal - 2:8.1.2102-1 +- patchlevel 2102 + +* Thu Sep 19 2019 Zdenek Dohnal - 2:8.1.2056-1 +- patchlevel 2056 + +* Mon Sep 16 2019 Zdenek Dohnal - 2:8.1.2019-2 +- enable fips warning + +* Tue Sep 10 2019 Zdenek Dohnal - 2:8.1.2019-1 +- patchlevel 2019 + +* Fri Sep 06 2019 Zdenek Dohnal - 2:8.1.1991-2 +- add f32 as rawhide and f31 as standalone branch + +* Fri Sep 06 2019 Zdenek Dohnal - 2:8.1.1991-1 +- patchlevel 1991 + +* Tue Sep 03 2019 Zdenek Dohnal - 2:8.1.1912-3 +- 1744956 - vim does not build with python3.8 + +* Mon Aug 26 2019 Zdenek Dohnal - 2:8.1.1912-2 +- remove python2 interpreter - python2 will be retired soon. +- use 'file' with '--mime' option - output is more stable + +* Fri Aug 23 2019 Zdenek Dohnal - 2:8.1.1912-1 +- patchlevel 1912 + +* Fri Aug 23 2019 Zdenek Dohnal - 2:8.1.1890-2 +- revert vimx removal + +* Tue Aug 20 2019 Zdenek Dohnal - 2:8.1.1890-1 +- patchlevel 1890 + +* Tue Aug 20 2019 Zdenek Dohnal - 2:8.1.1790-2 +- 1740892 - vimx is symlink to gvim instead of vim + +* Fri Aug 02 2019 Zdenek Dohnal - 2:8.1.1790-1 +- patchlevel 1790 + +* Fri Jul 26 2019 Zdenek Dohnal - 2:8.1.1749-1 +- patchlevel 1749 + +* Tue Jul 23 2019 Zdenek Dohnal - 2:8.1.1713-6 +- Provides must be unversioned according FPG + +* Mon Jul 22 2019 Zdenek Dohnal - 2:8.1.1713-5 +- remove perl-libs, because they are supplied perl MODULE_COMPAT + +* Fri Jul 19 2019 Zdenek Dohnal - 2:8.1.1713-4 +- remove unused patch + +* Fri Jul 19 2019 Zdenek Dohnal - 2:8.1.1713-3 +- 1724126 - disable showing spec template for new file with .spec suffix +- minor changes in spec.template - tabs->spaces + +* Fri Jul 19 2019 Zdenek Dohnal - 2:8.1.1713-2 +- remove skip_defaults_vim - it does not make sense to have it in system vimrc + +* Thu Jul 18 2019 Zdenek Dohnal - 2:8.1.1713-1 +- patchlevel 1713 + +* Thu Jul 18 2019 Zdenek Dohnal - 2:8.1.1661-2 +- 1643311 - add several defaults from Vim upstream and remove forcing fileencodings + +* Thu Jul 11 2019 Zdenek Dohnal - 2:8.1.1661-1 +- patchlevel 1661 + +* Fri Jun 28 2019 Zdenek Dohnal - 2:8.1.1602-1 +- patchlevel 1602 + +* Mon Jun 17 2019 Zdenek Dohnal - 2:8.1.1561-1 +- patchlevel 1561 + +* Tue Jun 11 2019 Zdenek Dohnal - 2:8.1.1517-1 +- patchlevel 1517 + +* Tue Jun 11 2019 Zdenek Dohnal - 2:8.1.1471-2 +- remove desktop patch, already in upstream + +* Thu Jun 06 2019 Zdenek Dohnal - 2:8.1.1471-1 +- patchlevel 1471 + +* Tue May 28 2019 Zdenek Dohnal - 2:8.1.1413-1 +- patchlevel 1413 + +* Mon May 20 2019 Zdenek Dohnal - 2:8.1.1359-2 +- stop updating f28 + +* Mon May 20 2019 Zdenek Dohnal - 2:8.1.1359-1 +- patchlevel 1359 + +* Mon May 20 2019 Zdenek Dohnal - 2:8.1.1137-2 +- remove upstream patch + * Mon Apr 08 2019 Zdenek Dohnal - 2:8.1.1137-1 - patchlevel 1137