diff --git a/kbd-2.4.0-setfont-exit-code.patch b/kbd-2.4.0-setfont-exit-code.patch new file mode 100644 index 0000000..a638149 --- /dev/null +++ b/kbd-2.4.0-setfont-exit-code.patch @@ -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; diff --git a/kbd.spec b/kbd.spec index 7e079e1..f7ee934 100644 --- a/kbd.spec +++ b/kbd.spec @@ -5,7 +5,7 @@ Name: kbd Version: 2.4.0 -Release: 5%{?dist} +Release: 6%{?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, bz 1947953 +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,10 @@ make check %{kbd_datadir}/keymaps/legacy %changelog +* Mon May 17 2021 Vitezslav Crhonek - 2.4.0-6 +- Fix setfont exit code + Resolves: #1947953 + * Wed May 05 2021 Vitezslav Crhonek - 2.4.0-5 - Fix issues detected by static analysis Resolves: #1938749