From 8891a2733826b9c900fdf06a1130e4530ec71318 Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Fri, 5 Jul 2024 15:43:28 +0800 Subject: [PATCH] vim rclocation /etc/vimrc path make sure vim reads /etc/vimrc at startup, load normal (cherry picked from commit f6c79baec77951c154a591e9ac1a4c466d1f42c0) --- backport-vim-7.0-rclocation.patch | 31 +++++++++++++++++++++++++++++++ vim.spec | 9 ++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 backport-vim-7.0-rclocation.patch diff --git a/backport-vim-7.0-rclocation.patch b/backport-vim-7.0-rclocation.patch new file mode 100644 index 0000000..00b3fc0 --- /dev/null +++ b/backport-vim-7.0-rclocation.patch @@ -0,0 +1,31 @@ +From 54a4d7d5afe1157778223c9c97563b115b9341bc Mon Sep 17 00:00:00 2001 +From: Zdenek Dohnal +Date: 2003-08-04 15:38:05.000000000 +0200 +Subject: [PATCH] vim-7.0-rclocation.patch + +new /usr/share/vim/{vimrc,virc} symlinks are created forloading /etc/{vimrc,virc}. +New symlinks point to original files in /etc. +--- + src/os_unix.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/os_unix.h b/src/os_unix.h +index 00ae239..a0c9485 100644 +--- a/src/os_unix.h ++++ b/src/os_unix.h +@@ -217,10 +217,10 @@ typedef struct dsc$descriptor DESC; + * 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" +-- +2.27.0 + diff --git a/vim.spec b/vim.spec index 98b0c8c..f857d7b 100644 --- a/vim.spec +++ b/vim.spec @@ -14,7 +14,7 @@ Name: vim Epoch: 2 Version: %{baseversion}.%{patchlevel} -Release: 3 +Release: 4 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 @@ -39,6 +39,7 @@ Patch6005: backport-patch-9.0.2112-overflow-in-shift_line.patch Patch6006: backport-patch-9.0.2114-overflow-detection-not-accurate-when-adding.patch Patch6007: backport-patch-9.0.2121-use-after-free-in-ex_substitute.patch Patch6008: backport-patch-9.0.2123-Problem-with-initializing-the-length-of-range-lists.patch +Patch6009: backport-vim-7.0-rclocation.patch Patch9000: bugfix-rm-modify-info-version.patch @@ -446,6 +447,12 @@ LC_ALL=en_US.UTF-8 make -j1 test || echo "Warning: Please check tests." %{_mandir}/man1/evim.* %changelog +* Fri Jul 5 2024 Han Jinpeng - 2:9.0.2092-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: backport patch, so that vim reads /etc/vimrc at startup + * Sat May 11 2024 wangjiang - 2:9.0.2092-3 - Type:bugfix - ID:NA -- Gitee