Fix setfont exit code

This commit is contained in:
Vitezslav Crhonek 2021-05-20 09:32:00 +02:00
parent ab3545efb9
commit bd4172466e
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff -up kbd-2.4.0/src/setfont.c.orig kbd-2.4.0/src/setfont.c
--- kbd-2.4.0/src/setfont.c.orig 2020-06-02 11:30:41.000000000 +0200
+++ kbd-2.4.0/src/setfont.c 2021-05-17 12:06:44.360616147 +0200
@@ -189,8 +189,8 @@ int main(int argc, char *argv[])
if (restore)
kfont_restore_font(kfont, fd);
- if (ifilct)
- kfont_load_fonts(kfont, fd, ifiles, ifilct, iunit, hwunit, no_m, no_u);
+ if (ifilct && (ret = kfont_load_fonts(kfont, fd, ifiles, ifilct, iunit, hwunit, no_m, no_u)) < 0)
+ return -ret;
if (ufil && (ret = kfont_load_unicodemap(kfont, fd, ufil)) < 0)
return -ret;

View File

@ -5,7 +5,7 @@
Name: kbd
Version: 2.4.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
License: GPLv2+
URL: http://www.kbd-project.org/
@ -36,6 +36,8 @@ Patch6: kbd-2.0.2-unicode-start-font.patch
Patch7: kbd-2.0.4-covscan-fixes.patch
# Patch8: fixes another batch of issues found by static analysis
Patch8: kbd-2.4.0-covscan-fixes.patch
# Patch9: fixes setfont exit code, accepted upstream
Patch9: kbd-2.4.0-setfont-exit-code.patch
BuildRequires: gcc, bison, flex, gettext, pam-devel, check-devel, automake
BuildRequires: console-setup, xkeyboard-config
@ -81,6 +83,7 @@ cp -fp %{SOURCE6} .
%patch6 -p1 -b .unicode-start-font
%patch7 -p1 -b .covscan-fixes
%patch8 -p1 -b .covscan-fixes-pt2
%patch9 -p1 -b .setfont-exit-code
aclocal
autoconf
@ -200,6 +203,9 @@ make check
%{kbd_datadir}/keymaps/legacy
%changelog
* Thu May 20 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.0-5
- Fix setfont exit code
* Tue Apr 27 2021 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.4.0-4
- Remove one part of the static analysis fix that actually breaks the package
Resolves: #1953782