diff --git a/vim-7.0-rclocation.patch b/vim-7.0-rclocation.patch new file mode 100644 index 0000000000000000000000000000000000000000..840f53e8cc330d89947618569d2a16ec2ab5305a --- /dev/null +++ b/vim-7.0-rclocation.patch @@ -0,0 +1,15 @@ +--- vim62/src/os_unix.h.rcloc 2003-08-04 15:38:05.000000000 +0200 ++++ vim62/src/os_unix.h 2003-08-04 15:39:25.000000000 +0200 +@@ -230,10 +230,10 @@ + * Unix system-dependent file names + */ + #ifndef SYS_VIMRC_FILE +-# define SYS_VIMRC_FILE "$VIM/vimrc" ++# define SYS_VIMRC_FILE "/etc/vimrc" + #endif + #ifndef SYS_GVIMRC_FILE +-# define SYS_GVIMRC_FILE "$VIM/gvimrc" ++# define SYS_GVIMRC_FILE "/etc/gvimrc" + #endif + #ifndef DFLT_HELPFILE + # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" diff --git a/vim.spec b/vim.spec index 29bbfc9d003eca844beae0c98c1a77d8a28afc8c..b3e857eab060c5c03226717d6051f42e92e06820 100644 --- a/vim.spec +++ b/vim.spec @@ -11,11 +11,15 @@ Name: vim Epoch: 2 Version: 8.1.450 -Release: 4 +Release: 5 Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text. License: Vim and MIT URL: http://www.vim.org Source0: ftp://ftp.vim.org/pub/vim/unix/vim-8.1-450.tar.bz2 +Source1: virc +Source2: vimrc + +Patch1: vim-7.0-rclocation.patch Patch6000: CVE-2019-12735.patch @@ -275,6 +279,8 @@ iconv -f ISO-8859-2 -t UTF8 tutor.sk -o tutor.sk.bak;mv tutor.sk.bak tutor.sk iconv -f KOI8R -t UTF8 tutor.ru -o tutor.ru.bak;mv tutor.ru.bak tutor.ru popd +install -pm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/virc +install -pm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/vimrc pushd %{buildroot}%{_mandir} for files in `find ??/ -type f` @@ -321,6 +327,7 @@ popd %license LICENSE %doc README* %doc runtime/docs +%config(noreplace) %{_sysconfdir}/vimrc %{_datadir}/%{name}/%{vimdir}/{rgb.txt,autoload,colors,compiler,pack,doc} %{_datadir}/%{name}/%{vimdir}/{*.vim,ftplugin,indent,keymap,macros,plugin} %{_datadir}/%{name}/%{vimdir}/{print,syntax,tutor,spell} @@ -378,6 +385,7 @@ popd %{_mandir}/man5/vimrc.* %files minimal +%config(noreplace) %{_sysconfdir}/virc %{_bindir}/{ex,vi,view,rvi,rview} %{_mandir}/man1/{vi.*,ex.*,rvi.*,rview.*,view.*} %{_mandir}/man5/virc.* @@ -401,6 +409,9 @@ popd %{_mandir}/man1/evim.* %changelog +* Sat Jan 18 2020 openEuler Buildteam - 2:8.1.450-5 +- make vi easy to use + * Thu Jan 9 2020 openEuler Buildteam - 2:8.1.450-4 - update spec and patch diff --git a/vimrc b/vimrc new file mode 100644 index 0000000000000000000000000000000000000000..698c4623c9d93d5a9e0284f4ac5b13083c31d2c7 --- /dev/null +++ b/vimrc @@ -0,0 +1 @@ +set nocompatible " Use vim defaults diff --git a/virc b/virc new file mode 100644 index 0000000000000000000000000000000000000000..698c4623c9d93d5a9e0284f4ac5b13083c31d2c7 --- /dev/null +++ b/virc @@ -0,0 +1 @@ +set nocompatible " Use vim defaults