[ZBX-17328] Font setting error for Web frontend of package for RHEL 8 Created: 2020 Feb 17  Updated: 2024 Apr 10  Resolved: 2020 Apr 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 4.4.5
Fix Version/s: 5.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Atsushi Tanaka Assignee: Jurijs Klopovskis
Resolution: Fixed Votes: 0
Labels: frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL 8/CentOS 8
zabbix-web-4.4.5-2.el8.noarch.rpm
zabbix-web-japanese-4.4.5-2.el8.noarch.rpm


Team: Team I
Sprint: Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020)
Story Points: 1

 Description   

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
$

 

 



 Comments   
Comment by Jurijs Klopovskis [ 2020 Feb 17 ]

Thanks for your report!
Yes indeed the conditional was added to zabbix-web package instead of zabbix-web-japanese.
Will fix it ASAP.

Comment by Jurijs Klopovskis [ 2020 Feb 20 ]

Fixed in pre 4.4.6 & 5.0.0alpha2.

Generated at Tue May 27 22:17:54 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.