From 9bd1da6079b17ba17041f0eb95b57988361819bb Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 9 Feb 2021 10:35:46 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/vim.git#59d01ce8eff3f86ac29903dbeb7d2ec5756b46f1 --- .gitignore | 1 + sources | 2 +- vi_wrapper | 23 +++++++++++++++++++++++ view_wrapper | 6 +++--- vim.spec | 50 ++++++++++++++++++++++++-------------------------- vim_wrapper | 10 ---------- 6 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 vi_wrapper delete mode 100644 vim_wrapper diff --git a/.gitignore b/.gitignore index 9451544d..306bac14 100644 --- a/.gitignore +++ b/.gitignore @@ -341,3 +341,4 @@ /vim-8.2-2311.tar.bz2 /vim-8.2-2451.tar.bz2 /vim-8.2-2465.tar.bz2 +/vim-8.2-2488.tar.bz2 diff --git a/sources b/sources index 3e12735f..a7ee04b2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vim-8.2-2465.tar.bz2) = 9e7b7ace89d66ff981fb7fa7ba382a9c3f1035d8804ae9386ef08d82f406d9f179d2691a90a4bb758fdc81685e546aafc8e844ea78ac47ad746b6f719f7fcaa7 +SHA512 (vim-8.2-2488.tar.bz2) = 84fec937ac5c1bb3c9f98500973df3454bd76b5b42318676cfe5cec592e8b4210d1b652c8b9824b734cda220ec5fdfd800ecea51a87b5b3cdb6efcaa11e89859 diff --git a/vi_wrapper b/vi_wrapper new file mode 100644 index 00000000..1bb1aece --- /dev/null +++ b/vi_wrapper @@ -0,0 +1,23 @@ +#!/usr/bin/sh + +# run vim if: +# - 'vi' command is used and 'vim' binary is available +# - 'vim' command is used +# NOTE: Set up a local alias if you want vim -> vi functionality. We will not +# do it globally, because it messes up with available startup options (see +# ':help starting', 'vi' is not capable of '-d'). The introducing an environment +# variable, which an user must set to get the feature, will do the same trick +# as setting an alias (needs user input, does not work with sudo), so it is left +# on user whether he decides to use an alias: +# +# alias vim=vi +# +# in bashrc file. + +if test -f /usr/bin/vim +then + exec /usr/bin/vim "$@" +fi + +# run vi otherwise +exec /usr/libexec/vi "$@" diff --git a/view_wrapper b/view_wrapper index 228349e7..9e8d7207 100644 --- a/view_wrapper +++ b/view_wrapper @@ -1,10 +1,10 @@ #!/usr/bin/sh # run vim -R if available -if test -f /usr/libexec/vim +if test -f /usr/bin/vim then - exec /usr/libexec/vim -R "$@" + exec /usr/bin/vim -R "$@" fi # run vi otherwise -exec /usr/libexec/vi "$@" +exec /usr/libexec/vi -R "$@" diff --git a/vim.spec b/vim.spec index a039308e..c37c94e7 100644 --- a/vim.spec +++ b/vim.spec @@ -1,4 +1,4 @@ -%define patchlevel 2465 +%define patchlevel 2488 %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} %define WITH_SELINUX 1 %endif @@ -36,7 +36,7 @@ Source9: vim-default-editor.sh Source10: vim-default-editor.csh Source11: vim-default-editor.fish Source12: view_wrapper -Source13: vim_wrapper +Source13: vi_wrapper %if %{withvimspell} Source100: vim-spell-files.tar.bz2 @@ -126,9 +126,10 @@ Summary: A minimal version of the VIM editor # conflicts in package because of manpage move (bug #1599663) # remove when a new RHEL is released (current 8) Conflicts: %{name}-common < %{epoch}:8.1.1-1 +Conflicts: vim-wrappers < 2:8.2.2488-1 +Obsoletes: vim-wrappers < 2:8.2.2488-1 Provides: vi Provides: %{_bindir}/vi -Requires: vim-wrappers %description minimal VIM (VIsual editor iMproved) is an updated and improved version of the @@ -141,6 +142,8 @@ only available when the vim-common package is installed. %package enhanced Summary: A version of the VIM editor which includes recent enhancements +Conflicts: vim-wrappers < 2:8.2.2488-1 +Obsoletes: vim-wrappers < 2:8.2.2488-1 # vim bundles libvterm, which is used during build - so we need to provide # bundled libvterm for catching possible libvterm CVEs Provides: bundled(libvterm) @@ -148,7 +151,6 @@ Provides: vim Provides: %{_bindir}/mergetool Provides: %{_bindir}/vim Requires: vim-common = %{epoch}:%{version}-%{release} which -Requires: vim-wrappers # suggest python3, python2, lua, ruby and perl packages because of their # embedded functionality in Vim/GVim Suggests: python3 python3-libs @@ -235,17 +237,6 @@ Requires: vim-enhanced %description default-editor This subpackage contains files needed to set Vim as the default editor. -%package wrappers -Summary: Ships shell wrappers defining vi/view/vim -BuildArch: noarch -Conflicts: vim-enhanced < 2:8.2.2465-1 -Conflicts: vim-minimal < 2:8.2.2465-1 - -%description wrappers -The subpackage contains shell scripts, which are shipped as vi/view/vim. -The scripts provide the same functionality as aliases, but they work for sudo too. -They are shipped as a separate package because both vim-minimal and vim-enhanced need -them. %prep %setup -q -b 0 -n %{vimdir} @@ -429,10 +420,10 @@ make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMR mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps mkdir -p %{buildroot}%{_libexecdir} install -m755 minimal-vim %{buildroot}%{_libexecdir}/vi -install -m755 enhanced-vim %{buildroot}%{_libexecdir}/vim +install -m755 enhanced-vim %{buildroot}%{_bindir}/vim install -m755 gvim %{buildroot}%{_bindir}/gvim install -m755 %{SOURCE12} %{buildroot}%{_bindir}/view -install -m755 %{SOURCE13} %{buildroot}%{_bindir}/vim +install -m755 %{SOURCE13} %{buildroot}%{_bindir}/vi install -p -m644 %{SOURCE3} \ %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gvim.png install -p -m644 %{SOURCE4} \ @@ -486,12 +477,11 @@ SentUpstream: 2014-05-22 EOF ( cd %{buildroot} - ln -sf %{_bindir}/vim .%{_bindir}/vi ln -sf %{_libexecdir}/vi .%{_bindir}/rvi ln -sf %{_libexecdir}/vi .%{_bindir}/rview ln -sf %{_libexecdir}/vi .%{_bindir}/ex - ln -sf %{_libexecdir}/vim .%{_bindir}/rvim - ln -sf %{_libexecdir}/vim .%{_bindir}/vimdiff + ln -sf %{_bindir}/vim .%{_bindir}/rvim + ln -sf %{_bindir}/vim .%{_bindir}/vimdiff perl -pi -e "s,%{buildroot},," .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vimtutor.1 rm -f .%{_mandir}/man1/rvim.1 cp -p .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vi.1 @@ -755,16 +745,13 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %lang(zu) %{_datadir}/%{name}/%{vimdir}/spell/zu.* %endif -%files wrappers -%{_bindir}/vi -%{_bindir}/view -%{_bindir}/vim - %files minimal %config(noreplace) %{_sysconfdir}/virc %{_bindir}/ex %{_bindir}/rvi %{_bindir}/rview +%{_bindir}/vi +%{_bindir}/view %{_libexecdir}/vi %{_mandir}/man1/vi.* %{_mandir}/man1/ex.* @@ -775,9 +762,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %files enhanced %{_bindir}/rvim +%{_bindir}/vim %{_bindir}/vimdiff %{_bindir}/vimtutor -%{_libexecdir}/vim %files filesystem %{_rpmconfigdir}/macros.d/macros.vim @@ -833,6 +820,17 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %config(noreplace) %{_sysconfdir}/profile.d/vim-default-editor.* %changelog +* Tue Feb 09 2021 Zdenek Dohnal - 2:8.2.2488-1 +- patchlevel 2488 + +* Tue Feb 09 2021 Zdenek Dohnal - 2:8.2.2465-2 +- remove vim-wrappers, vim is a binary again, vi and view stay as wrappers +- removed vim -> vi functionality, because it cannot be optional and work + for all cases at the same time + +* Mon Feb 08 2021 Zdenek Dohnal - 2:8.2.2465-2 +- view is not readonly right now, fix it by -R + * Thu Feb 04 2021 Zdenek Dohnal - 2:8.2.2465-1 - patchlevel 2465 - 1918575 - Use wrappers for vi/vim instead of aliases diff --git a/vim_wrapper b/vim_wrapper deleted file mode 100644 index 52c02822..00000000 --- a/vim_wrapper +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/sh - -# run vim if available -if test -f /usr/libexec/vim -then - exec /usr/libexec/vim "$@" -fi - -# run vi otherwise -exec /usr/libexec/vi "$@"