From 40d5da8d0cf5eff800c55befb162dfcf9c42cb2a Mon Sep 17 00:00:00 2001 From: xzyang Date: Thu, 23 Dec 2021 19:01:02 +0800 Subject: [PATCH] update to vim-7.4.629-8.el7_9.src.rpm Signed-off-by: xzyang --- ....2.1774-GTK-hang-when-forced-to-exit.patch | 37 +++++++++++++++++++ vim.spec | 23 +++++++----- 2 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 0001-patch-8.2.1774-GTK-hang-when-forced-to-exit.patch diff --git a/0001-patch-8.2.1774-GTK-hang-when-forced-to-exit.patch b/0001-patch-8.2.1774-GTK-hang-when-forced-to-exit.patch new file mode 100644 index 0000000..4612bf3 --- /dev/null +++ b/0001-patch-8.2.1774-GTK-hang-when-forced-to-exit.patch @@ -0,0 +1,37 @@ +From 32fbc4f247a31e35ade0939542e11aa033a2554f Mon Sep 17 00:00:00 2001 +From: Bram Moolenaar +Date: Tue, 29 Sep 2020 22:16:09 +0200 +Subject: [PATCH] patch 8.2.1774: GTK: hang when forced to exit + +Problem: GTK: hang when forced to exit. +Solution: Do not clean up "mainwin" when really_exiting is set. + (Zdenek Dohnal, closes #7042) +--- + src/gui_gtk_x11.c | 7 +++++-- + src/version.c | 2 ++ + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c +index fe1ac5878..ecd2d887f 100644 +--- a/src/gui_gtk_x11.c ++++ b/src/gui_gtk_x11.c +@@ -4381,11 +4381,14 @@ gui_mch_open(void) + return OK; + } + +- ++/* ++ * Clean up for when exiting Vim. ++ */ + void + gui_mch_exit(int rc UNUSED) + { +- if (gui.mainwin != NULL) ++ // Clean up, unless we don't want to invoke free(). ++ if (gui.mainwin != NULL && !really_exiting) + gtk_widget_destroy(gui.mainwin); + } + +-- +2.26.2 + diff --git a/vim.spec b/vim.spec index 1b8736d..7418061 100644 --- a/vim.spec +++ b/vim.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %define patchlevel 629 %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1} %define WITH_SELINUX 1 @@ -22,7 +21,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{patchlevel} -Release: 7%{anolis_release}%{?dist} +Release: 8%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}.tar.bz2 @@ -702,6 +701,8 @@ Patch3019: vim-7.4-ssh-keywords.patch Patch3020: vim-set-bg.patch # 1719964 - CVE-2019-12735 arbitrary command execution in getchar.c [rhel-7.7] Patch3021: 0001-patch-8.1.1365-source-command-doesn-t-check-for-the-.patch +# 1833186 - gvim consums 100% cpu under certain condition +Patch3022: 0001-patch-8.2.1774-GTK-hang-when-forced-to-exit.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel ncurses-devel gettext perl-devel @@ -1490,6 +1491,8 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk %patch3019 -p1 %patch3020 -p1 %patch3021 -p1 +# 1833186 - gvim consums 100% cpu under certain condition +%patch3022 -p1 -b .unclosed-gvim-high-cpu perl -pi -e "s/test71.out//" src/testdir/Makefile @@ -1520,8 +1523,8 @@ perl -pi -e "s/\/etc\/vimrc/\/etc\/virc/" os_unix.h %endif --disable-pythoninterp --disable-perlinterp --disable-tclinterp \ --with-tlib=tinfo --enable-gui=no --disable-gpm --exec-prefix=/ \ - --with-compiledby="OpenAnolis Community" \ - --with-modified-by="OpenAnolis Community" + --with-compiledby="" \ + --with-modified-by="" make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} cp vim minimal-vim @@ -1537,8 +1540,8 @@ mv -f ex_cmds.c.save ex_cmds.c --enable-xim --enable-multibyte \ --with-tlib=ncurses \ --enable-gtk2-check --enable-gui=gtk2 \ - --with-compiledby="OpenAnolis Community" --enable-cscope \ - --with-modified-by="OpenAnolis Community" \ + --with-compiledby="" --enable-cscope \ + --with-modified-by="" \ %if "%{withnetbeans}" == "1" --enable-netbeans \ %else @@ -1570,9 +1573,9 @@ make clean --disable-tclinterp \ --with-x=no \ --enable-gui=no --exec-prefix=%{_prefix} --enable-multibyte \ - --enable-cscope --with-modified-by="OpenAnolis Community" \ + --enable-cscope --with-modified-by="" \ --with-tlib=ncurses \ - --with-compiledby="OpenAnolis Community" \ + --with-compiledby="" \ %if "%{withnetbeans}" == "1" --enable-netbeans \ %else @@ -1987,8 +1990,8 @@ rm -rf %{buildroot} %{_datadir}/icons/hicolor/*/apps/* %changelog -* Mon Oct 18 2021 yangxianzhao - 2:7.4.629-7.0.1 -- Rebrand to Anolis OS +* Wed Sep 30 2020 Zdenek Dohnal - 2:7.4.629-8 +- 1833186 - gvim consums 100% cpu under certain condition * Tue Jan 21 2020 Zdenek Dohnal - 2:7.4.629-7 - 1743070 - manpage of vim is garbled in Japanese locale -- Gitee