Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17328

Font setting error for Web frontend of package for RHEL 8

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 5.0 (plan)
    • 4.4.5
    • Frontend (F)
    • RHEL 8/CentOS 8
      zabbix-web-4.4.5-2.el8.noarch.rpm
      zabbix-web-japanese-4.4.5-2.el8.noarch.rpm
    • Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020)
    • 1

      Steps to reproduce(case 1):

      1. install zabbix-web package (# dnf install zabbix-web)
      2. uninstall zabbix-web-package (# dnf remove zabbix-web)

      Steps to reproduce(case 2):

      1. install zabbix-web-japanese package (# dnf install zabbix-web-japanese)
      2. uninstall zabbix-web-japanese package (# dnf remove zabbix-web-japanese)

      Result:
      case 1 - Warning message is displayed

      /usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc has not been configured as an alternative for zabbix-web-font

      case 2 - Warning message is displyed

      /usr/share/fonts/vlgothic/VL-PGothic-Regular.ttf has not been configured as an alternative for zabbix-web-font

      Expected:
      Perform the same font operation during installation and uninstallation.

      Investigating the cause:

      When installing the zabbix-web package, the DejaVuSans font is enabled with the following command.

      /usr/sbin/update-alternatives --install /usr/share/zabbix/assets/fonts/graphfont.ttf \
       zabbix-web-font /usr/share/fonts/dejavu/DejaVuSans.ttf 10

      However, when uninstalling the zabbix-web package, package script try to disable another font with the following command.

      /usr/sbin/update-alternatives --remove zabbix-web-font \
       /usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc

      Similarly, when installing the zabbix-web-japanese package, the following command enables the NotoSansCJK-Regular font.

      /usr/sbin/update-alternatives --install /usr/share/zabbix/assets/fonts/graphfont.ttf zabbix-web-font \
       /usr/share/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc 20

      However, when uninstalling the zabbix-web-japanese package, package script try to disable another font with the following command.

      /usr/sbin/update-alternatives --remove zabbix-web-font \
       /usr/share/fonts/vlgothic/VL-PGothic-Regular.ttf

      The changes of the SPEC file are as follows.

      $ diff -Nru zabbix.spec.bak zabbix.spec
      --- zabbix.spec.bak 2020-02-17 16:28:25.924059107 +0900
      +++ zabbix.spec 2020-02-17 18:02:08.324440904 +0900
      @@ -951,18 +951,18 @@
       %preun web
       if [ "$1" = 0 ]; then
       /usr/sbin/update-alternatives --remove zabbix-web-font \
      -%if 0%{?rhel} >= 8
      - %{_datadir}/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc
      -%else
       %{_datadir}/fonts/dejavu/DejaVuSans.ttf
      -%endif
       fi
       :
      %preun web-japanese
       if [ "$1" = 0 ]; then
       /usr/sbin/update-alternatives --remove zabbix-web-font \
      +%if 0%{?rhel} >= 8
      + %{_datadir}/fonts/google-noto-cjk/NotoSansCJK-Regular.ttc
      +%else
       %{_datadir}/fonts/vlgothic/VL-PGothic-Regular.ttf
      +%endif
       fi
       :
       %endif
      $
      

       

       

            yurii Jurijs Klopovskis
            atanaka Atsushi Tanaka
            Team I
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: