Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-23705

please remove the dependency on gpm

    • Major
    • Patch
    • sst_cs_infra_services
    • ssg_core_services
    • All

      GPM is the daemon and library that provides support for using mouse on the Linux text console (/dev/tty1-...) . I believe that this functionality is very little used and it is not worth maintaining this package in RHEL. In order to remove GPM, we need to drop dependencies (build and runtime) on the GPM library. Please remove the dependency from the vim package.

      Note that this only affects mouse support in Linux console (TERM=linux), not in graphical terminal emulators (xterm etc.)

      Here is a patch:

      diff --git a/vim.spec b/vim.spec
      index bcf9bb57..0ddca1de 100644
      --- a/vim.spec
      +++ b/vim.spec
      @@ -118,8 +118,6 @@ BuildRequires: gettext
       # formats during compilation.
       BuildRequires: glibc-gconv-extra
       
      -# for mouse support in console
      -BuildRequires: gpm-devel
       # for setting ACL on created files
       BuildRequires: libacl-devel
       
      @@ -468,7 +466,7 @@ mv -f os_unix.h.save os_unix.h
         --enable-python3interp=dynamic \
         --disable-tclinterp --with-x=yes \
         --enable-xim --enable-multibyte \
      -  --with-tlib=ncurses \
      +  --with-tlib=ncurses --disable-gpm \
         --enable-gtk3-check --enable-gui=gtk3 \
         --enable-fips-warning \
         --with-compiledby="<bugzilla@redhat.com>" --enable-cscope \
      @@ -519,7 +517,7 @@ make clean
        --with-x=no \
        --enable-gui=no --exec-prefix=%{_prefix} --enable-multibyte \
        --enable-cscope --with-modified-by="<bugzilla@redhat.com>" \
      - --with-tlib=ncurses \
      + --with-tlib=ncurses --disable-gpm \
        --enable-fips-warning \
        --with-compiledby="<bugzilla@redhat.com>" \
       %if "%{withnetbeans}" == "1"
      

      I verified that vim builds with this change.

      vim-minimal is already compiled without GPM support and mouse in xterm is working correctly (using :set mouse=a). :features show:
      -mouse_gpm

      This is a minimal patch without any %if rhel .. conditionals. For inspiration, here's how it was done in ncurses including the version conditionals:

      commit 0350e63521ae071f5e41871a1cf28988a82614fd
      Author: Miroslav Lichvar <mlichvar@redhat.com>
      Date:   Thu Feb 1 14:52:14 2024 +0100
      
          disable gpm on RHEL >= 10 (RHEL-23679)
      
      diff --git a/ncurses.spec b/ncurses.spec
      index 01f52f6..9010006 100644
      --- a/ncurses.spec
      +++ b/ncurses.spec
      @@ -1,7 +1,9 @@
       %if 0%{?rhel} >= 10
       %bcond_with compat_libs
      +%bcond_with gpm
       %else
       %bcond_without compat_libs
      +%bcond_without gpm
       %endif
       %global revision 20240127
       Summary: Ncurses support utilities
      @@ -17,7 +19,8 @@ Source2: https://invisible-island.net/public/dickey@invisible-island.net-rsa3072
       Patch8: ncurses-config.patch
       Patch9: ncurses-libs.patch
       Patch11: ncurses-urxvt.patch
      -BuildRequires: gcc gcc-c++ gpm-devel gnupg2 make pkgconfig
      +BuildRequires: gcc gcc-c++ gnupg2 make pkgconfig
      +%{?with_gpm:BuildRequires: gpm-devel}
       
       Requires: %{name}-libs%{?_isa} = %{version}-%{release}
       
      @@ -144,6 +147,7 @@ common_options="\
           --with-termlib=tinfo \
           --with-ticlib=tic \
           --with-xterm-kbs=DEL \
      +%{!?with_gpm:--without-gpm} \
           --without-ada"
       abi5_options="--with-chtype=long"
       
      
      diff --git a/ncurses.spec b/ncurses.spec
      index 9010006..9e534bd 100644
      --- a/ncurses.spec
      +++ b/ncurses.spec
      @@ -9,7 +9,7 @@
       Summary: Ncurses support utilities
       Name: ncurses
       Version: 6.4
      -Release: 11.%{revision}%{?dist}
      +Release: 12.%{revision}%{?dist}
       License: MIT-open-group
       URL: https://invisible-island.net/ncurses/ncurses.html
       Source0: https://invisible-mirror.net/archives/ncurses/current/ncurses-%{version}-%{revision}.tgz
      @@ -298,6 +298,10 @@ xz NEWS
       %{_libdir}/lib*.a
       
       %changelog
      +* Thu Feb 01 2024 Miroslav Lichvar <mlichvar@redhat.com> 6.4-12.20240127
      +- update to 6.4-20240127
      +- disable gpm on RHEL >= 10 (RHEL-23679)
      +
       * Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.4-11.20240113
       - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
       
      

            zdohnal@redhat.com Zdenek Dohnal
            rhn-support-pcahyna Pavel Cahyna
            Zdenek Dohnal Zdenek Dohnal
            Frantisek Hrdina Frantisek Hrdina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: