$ git diff --patch-with-stat --summary 417eef6b3e6a0b7534eed7255f00adb367290fde..1a2b816cc5655f50925c64df58cea6adf26b2922
.abf.yml | 2 +-
0001-analyze.l-add-missing-string-format.patch | 26 -----------
0001-configure.ac-respect-user-CFLAGS.patch | 33 -------------
kbd-1.15-keycodes-man.patch | 26 +++++------
kbd-1.15.5-loadkeys-search-path.patch | 30 ++++++------
kbd-2.0.4-covscan-fixes.patch | 24 +++-------
kbd.spec | 65 ++++++++++++++------------
7 files changed, 71 insertions(+), 135 deletions(-)
delete mode 100644 0001-analyze.l-add-missing-string-format.patch
delete mode 100644 0001-configure.ac-respect-user-CFLAGS.patch
diff --git a/.abf.yml b/.abf.yml
index 2e43bf8..5c9e7b4 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,4 +1,4 @@
sources:
- kbd-2.2.0.tar.xz: 9b62f5f162b2f9c8e444ddfaccd6720d81c0f319
+ kbd-2.3.0.tar.xz: 1ebd128857e6dd097845a37324ffcb9ede8f457c
kbd-latarcyrheb-32.tar.bz2: 17db7aaba451796278758e7c6e443b4659af17b9
kbd-latsun-fonts.tar.bz2: a5f6d9dff7a8a484cd5014ec7ffdf1eaed27084a
diff --git a/0001-analyze.l-add-missing-string-format.patch b/0001-analyze.l-add-missing-string-format.patch
deleted file mode 100644
index f6021f6..0000000
--- a/0001-analyze.l-add-missing-string-format.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 50eae66fc21ef8e01c69a9d3c1ff3fcb0b2644a0 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Wed, 4 Dec 2019 13:14:01 +0100
-Subject: [PATCH] analyze.l: add missing string format
-
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
----
- src/libkeymap/analyze.l | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
-index e32ace6..de62f46 100644
---- a/src/libkeymap/analyze.l
-+++ b/src/libkeymap/analyze.l
-@@ -463,7 +463,7 @@ To to|To|TO
-
- strerror_r(errno, buf, sizeof(buf));
-
-- ERR(yyextra, buf);
-+ ERR(yyextra, "%s", buf);
- return(ERROR);
- }
-
---
-2.26.0
-
diff --git a/0001-configure.ac-respect-user-CFLAGS.patch b/0001-configure.ac-respect-user-CFLAGS.patch
deleted file mode 100644
index edf5d7e..0000000
--- a/0001-configure.ac-respect-user-CFLAGS.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 15a74479f904f6b15f31854455656710e9aa1942 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Wed, 31 Jul 2019 18:07:33 +0200
-Subject: [PATCH] configure.ac: respect user CFLAGS
-
-Do not override user CFLAGS. Do not unconditionally add -g to CFLAGS.
-
-Gentoo-bug: https://bugs.gentoo.org/691142
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
----
- configure.ac | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6bf6401..0f5ed2f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -72,9 +72,9 @@ if test "$enable_code_coverage" = yes; then
- fi
-
- case "$GCC,$ac_cv_prog_cc_g" in
-- yes,yes) CFLAGS="-g $CC_O_LEVEL $FORTIFY_SOURCE" ;;
-- yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE" ;;
-- ,yes) CFLAGS="-g" ;;
-+ yes,yes) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
-+ yes,) CFLAGS="$CC_O_LEVEL $FORTIFY_SOURCE $CFLAGS" ;;
-+ ,yes) CFLAGS="$CFLAGS" ;;
- esac
-
- CC_CHECK_CFLAGS_APPEND([\
---
-2.26.0
-
diff --git a/kbd-1.15-keycodes-man.patch b/kbd-1.15-keycodes-man.patch
index 8616274..e400c9d 100644
--- a/kbd-1.15-keycodes-man.patch
+++ b/kbd-1.15-keycodes-man.patch
@@ -1,6 +1,6 @@
-diff -up kbd-2.0.4/docs/man/man1/showkey.1.orig kbd-2.0.4/docs/man/man1/showkey.1
---- kbd-2.0.4/docs/man/man1/showkey.1.orig 2016-10-31 16:56:02.000000000 +0100
-+++ kbd-2.0.4/docs/man/man1/showkey.1 2017-01-11 10:45:03.763312393 +0100
+diff -up kbd-2.3.0/docs/man/man1/showkey.1.orig kbd-2.3.0/docs/man/man1/showkey.1
+--- kbd-2.3.0/docs/man/man1/showkey.1.orig 2020-07-08 19:25:47.000000000 +0200
++++ kbd-2.3.0/docs/man/man1/showkey.1 2020-07-16 08:56:15.970254183 +0200
@@ -84,6 +84,19 @@ corresponds to what the keyboard hardwar
to know the scan codes sent by various keys it is better to boot a
2.4 kernel. Since 2.6.9 there also is the boot option atkbd.softraw=0
@@ -21,13 +21,13 @@ diff -up kbd-2.0.4/docs/man/man1/showkey.1.orig kbd-2.0.4/docs/man/man1/showkey.
.SH "SEE ALSO"
.BR loadkeys (1),
.BR dumpkeys (1),
-diff -up kbd-2.0.4/docs/man/man8/setkeycodes.8.orig kbd-2.0.4/docs/man/man8/setkeycodes.8
---- kbd-2.0.4/docs/man/man8/setkeycodes.8.orig 2016-10-31 16:56:02.000000000 +0100
-+++ kbd-2.0.4/docs/man/man8/setkeycodes.8 2017-01-11 10:45:03.763312393 +0100
-@@ -38,6 +38,10 @@ to showkey(1), the command
- .RE
- will assign the keycode 112 to it, and then loadkeys(1) can be used
- to define the function of this key.
+diff -up kbd-2.3.0/docs/man/man8/setkeycodes.8.orig kbd-2.3.0/docs/man/man8/setkeycodes.8
+--- kbd-2.3.0/docs/man/man8/setkeycodes.8.orig 2020-07-08 19:35:35.000000000 +0200
++++ kbd-2.3.0/docs/man/man8/setkeycodes.8 2020-07-16 08:57:52.293900997 +0200
+@@ -42,6 +42,10 @@ the command
+ will assign the keycode 112 to it, and then
+ .BR loadkeys (1)
+ can be used to define the function of this key.
+
+USB keyboards have standardized keycodes and
+.B setkeycodes
@@ -35,7 +35,7 @@ diff -up kbd-2.0.4/docs/man/man8/setkeycodes.8.orig kbd-2.0.4/docs/man/man8/setk
.LP
Some older kernels might hardwire a low scancode range to the
equivalent keycodes; setkeycodes will fail when you try to remap
-@@ -56,6 +60,14 @@ None.
+@@ -60,6 +64,14 @@ None.
.SH BUGS
The keycodes of X have nothing to do with those of Linux.
Unusual keys can be made visible under Linux, but not under X.
@@ -48,5 +48,5 @@ diff -up kbd-2.0.4/docs/man/man8/setkeycodes.8.orig kbd-2.0.4/docs/man/man8/setk
+cannot change the mapping of other devices than the "first" one.
+
.SH "SEE ALSO"
- .I "dumpkeys (1), loadkeys (1), showkey (1), getkeycodes (8)"
-
+ .BR dumpkeys (1),
+ .BR loadkeys (1),
diff --git a/kbd-1.15.5-loadkeys-search-path.patch b/kbd-1.15.5-loadkeys-search-path.patch
index 212dd33..16beb3d 100644
--- a/kbd-1.15.5-loadkeys-search-path.patch
+++ b/kbd-1.15.5-loadkeys-search-path.patch
@@ -1,18 +1,18 @@
-diff -up kbd-2.1.0/src/loadkeys.c.orig kbd-2.1.0/src/loadkeys.c
---- kbd-2.1.0/src/loadkeys.c.orig 2019-07-15 10:57:18.000000000 +0200
-+++ kbd-2.1.0/src/loadkeys.c 2019-07-17 14:34:51.224525616 +0200
-@@ -24,7 +24,7 @@
- #include "paths.h"
- #include "keymap.h"
-
--static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", KERNDIR "/", 0 };
-+static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", DATADIR "/" XKBKEYMAPDIR "/", DATADIR "/" LEGACYKEYMAPDIR "/**", KERNDIR "/", 0 };
- static const char *const suffixes[] = { "", ".kmap", ".map", 0 };
-
- static void __attribute__((noreturn))
-diff -up kbd-2.1.0/src/paths.h.orig kbd-2.1.0/src/paths.h
---- kbd-2.1.0/src/paths.h.orig 2019-05-07 11:21:10.000000000 +0200
-+++ kbd-2.1.0/src/paths.h 2019-07-17 14:35:13.870574558 +0200
+diff -up kbd-2.3.0/src/loadkeys.c.orig kbd-2.3.0/src/loadkeys.c
+--- kbd-2.3.0/src/loadkeys.c.orig 2020-06-02 12:16:45.000000000 +0200
++++ kbd-2.3.0/src/loadkeys.c 2020-07-16 09:02:50.398864688 +0200
+@@ -28,6 +28,8 @@
+ static const char *const dirpath1[] = {
+ "",
+ DATADIR "/" KEYMAPDIR "/**",
++ DATADIR "/" XKBKEYMAPDIR "/",
++ DATADIR "/" LEGACYKEYMAPDIR "/**",
+ KERNDIR "/",
+ NULL
+ };
+diff -up kbd-2.3.0/src/paths.h.orig kbd-2.3.0/src/paths.h
+--- kbd-2.3.0/src/paths.h.orig 2020-07-16 09:02:59.243010909 +0200
++++ kbd-2.3.0/src/paths.h 2020-07-16 09:03:23.446410942 +0200
@@ -5,6 +5,8 @@
* The following five subdirectories are defined:
*/
diff --git a/kbd-2.0.4-covscan-fixes.patch b/kbd-2.0.4-covscan-fixes.patch
index 6b1fda8..5360141 100644
--- a/kbd-2.0.4-covscan-fixes.patch
+++ b/kbd-2.0.4-covscan-fixes.patch
@@ -1,23 +1,11 @@
-diff -up kbd-2.1.0/src/kdmapop.c.orig kbd-2.1.0/src/kdmapop.c
---- kbd-2.1.0/src/kdmapop.c.orig 2019-05-07 11:21:10.000000000 +0200
-+++ kbd-2.1.0/src/kdmapop.c 2019-07-17 14:38:15.799967669 +0200
-@@ -155,6 +155,7 @@ int getunimap(int fd, struct unimapdesc
- }
+diff -up kbd-2.3.0/src/libkfont/kdmapop.c.orig kbd-2.3.0/src/libkfont/kdmapop.c
+--- kbd-2.3.0/src/libkfont/kdmapop.c.orig 2020-04-27 17:53:01.000000000 +0200
++++ kbd-2.3.0/src/libkfont/kdmapop.c 2020-07-16 09:06:45.246742724 +0200
+@@ -166,6 +166,7 @@ kfont_get_unicodemap(struct kfont_contex
+
if (ioctl(fd, GIO_UNIMAP, &ud)) {
- perror("GIO_UNIMAP");
+ KFONT_ERR(ctx, "ioctl(GIO_UNIMAP): %m");
+ free(ud.entries);
return -1;
}
if (ct != ud.entry_ct)
-diff -up kbd-2.1.0/src/setfont.c.orig kbd-2.1.0/src/setfont.c
---- kbd-2.1.0/src/setfont.c.orig 2019-06-25 18:14:32.000000000 +0200
-+++ kbd-2.1.0/src/setfont.c 2019-07-17 14:39:57.928188355 +0200
-@@ -323,6 +323,8 @@ do_loadfont(int fd, char *inbuf, int wid
-
- if (putfont(fd, buf, fontsize, width, hwunit))
- exit(EX_OSERR);
-+
-+ free(buf);
- }
-
- static void
diff --git a/kbd.spec b/kbd.spec
index 8fa4d61..7342d2f 100644
--- a/kbd.spec
+++ b/kbd.spec
@@ -1,9 +1,9 @@
-%define kbddir /lib/kbd
+%define kbd_datadir %{_exec_prefix}/lib/kbd
Summary: Keyboard and console utilities for Linux
Name: kbd
-Version: 2.2.0
-Release: 1
+Version: 2.3.0
+Release: 2
License: GPLv2+
Group: Terminals
Url: http://www.kbd-project.org/
@@ -33,10 +33,6 @@ Patch5: kbd-1.15.5-loadkeys-search-path.patch
Patch6: kbd-2.0.2-unicode-start-font.patch
# Patch7: fixes issues found by static analysis
Patch7: kbd-2.0.4-covscan-fixes.patch
-# Patch8: fix flags
-Patch8: 0001-configure.ac-respect-user-CFLAGS.patch
-# Patch9: workaround -Werror=format-security build error
-Patch9: 0001-analyze.l-add-missing-string-format.patch
BuildRequires: bison
BuildRequires: console-setup
BuildRequires: flex
@@ -45,6 +41,7 @@ BuildRequires: pam-devel
BuildRequires: pkgconfig(xkeyboard-config)
BuildRequires: pkgconfig(check)
BuildRequires: pigz
+Requires: ncurses
Requires(pre): filesystem
Provides: vlock = %{version}-%{release}
Obsoletes: vlock <= 0:2.2.2-8
@@ -68,8 +65,6 @@ cp -fp %{SOURCE10} .
%patch5 -p1 -b .loadkeys-search-path
%patch6 -p1 -b .unicode-start-font
%patch7 -p1 -b .covscan-fixes
-%patch8 -p1 -b .fix-flags
-%patch9 -p1 -b .format-security
autoreconf -f
# 7-bit maps are obsolete; so are non-euro maps
@@ -100,7 +95,7 @@ mv "ChangeLog_" "ChangeLog"
%build
%configure \
- --datadir=%{kbddir} \
+ --datadir=%{kbd_datadir} \
--localedir=%{_localedir} \
--enable-nls \
--enable-optional-progs
@@ -117,14 +112,18 @@ for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop loadkeys ; do
done
# ro_win.map.gz is useless
-rm -f %{buildroot}%{kbddir}/keymaps/i386/qwerty/ro_win.map.gz
+rm -f %{buildroot}%{kbd_datadir}/keymaps/i386/qwerty/ro_win.map.gz
# Create additional name for Serbian latin keyboard
-ln -s sr-cy.map.gz %{buildroot}%{kbddir}/keymaps/i386/qwerty/sr-latin.map.gz
+ln -s sr-cy.map.gz %{buildroot}%{kbd_datadir}/keymaps/i386/qwerty/sr-latin.map.gz
# The rhpl keyboard layout table is indexed by kbd layout names, so we need a
# Korean keyboard
-ln -s us.map.gz %{buildroot}%{kbddir}/keymaps/i386/qwerty/ko.map.gz
+ln -s us.map.gz %{buildroot}%{kbd_datadir}/keymaps/i386/qwerty/ko.map.gz
+
+# Define default console font
+ln -s LatGrkCyr-8x16.psfu.gz \
+ %{buildroot}%{kbd_datadir}/consolefonts/default.psfu.gz
# Some microoptimization
sed -i -e 's,\<kbd_mode\>,/bin/kbd_mode,g;s,\<setfont\>,/bin/setfont,g' \
@@ -138,46 +137,54 @@ mkdir -p %{buildroot}%{_sysconfdir}/pam.d
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/vlock
# Move original keymaps to legacy directory
-mkdir -p %{buildroot}%{kbddir}/keymaps/legacy
-mv %{buildroot}%{kbddir}/keymaps/{amiga,atari,i386,include,mac,ppc,sun} %{buildroot}%{kbddir}/keymaps/legacy
+mkdir -p %{buildroot}%{kbd_datadir}/keymaps/legacy
+mv %{buildroot}%{kbd_datadir}/keymaps/{amiga,atari,i386,include,mac,ppc,sun} %{buildroot}%{kbd_datadir}/keymaps/legacy
# Convert X keyboard layouts to console keymaps
-mkdir -p %{buildroot}%{kbddir}/keymaps/xkb
+mkdir -p %{buildroot}%{kbd_datadir}/keymaps/xkb
perl xml2lst.pl < /usr/share/X11/xkb/rules/base.xml > layouts-variants.lst
while read line; do
XKBLAYOUT="$(echo "$line" | cut -d " " -f 1)"
echo "$XKBLAYOUT" >> layouts-list.lst
XKBVARIANT="$(echo "$line" | cut -d " " -f 2)"
- ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > %{buildroot}%{kbddir}/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
+ ckbcomp "$XKBLAYOUT" "$XKBVARIANT" | gzip > %{buildroot}%{kbd_datadir}/keymaps/xkb/"$XKBLAYOUT"-"$XKBVARIANT".map.gz
done < layouts-variants.lst
# Convert X keyboard layouts (plain, no variant)
cat layouts-list.lst | sort -u >> layouts-list-uniq.lst
while read line; do
- ckbcomp "$line" | gzip > %{buildroot}%{kbddir}/keymaps/xkb/"$line".map.gz
+ ckbcomp "$line" | gzip > %{buildroot}%{kbd_datadir}/keymaps/xkb/"$line".map.gz
done < layouts-list-uniq.lst
# wipe converted layouts which cannot input ASCII (#1031848)
-zgrep -L "U+0041" %{buildroot}%{kbddir}/keymaps/xkb/* | xargs rm -f
+zgrep -L "U+0041" %{buildroot}%{kbd_datadir}/keymaps/xkb/* | xargs rm -f
-# Rename the converted default fi (kotoistus) layout (#1117891)
-gunzip %{buildroot}%{kbddir}/keymaps/xkb/fi.map.gz
-mv %{buildroot}%{kbddir}/keymaps/xkb/fi.map %{buildroot}%{kbddir}/keymaps/xkb/fi-kotoistus.map
-gzip %{buildroot}%{kbddir}/keymaps/xkb/fi-kotoistus.map
+# Rename the converted default fi (kotoistus) layout (#1117891), if exists
+if [ -f "%{buildroot}%{kbd_datadir}/keymaps/xkb/fi.map.gz" ]; then
+ gunzip %{buildroot}%{kbd_datadir}/keymaps/xkb/fi.map.gz
+ mv %{buildroot}%{kbd_datadir}/keymaps/xkb/fi.map %{buildroot}%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map
+ gzip %{buildroot}%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map
+fi
-# Fix converted cz layout - add compose rules
-gunzip %{buildroot}%{kbddir}/keymaps/xkb/cz.map.gz
-patch %{buildroot}%{kbddir}/keymaps/xkb/cz.map < %{SOURCE6}
-gzip %{buildroot}%{kbddir}/keymaps/xkb/cz.map
+# Fix converted cz layout - add compose rules, if exists
+if [ -f "%{buildroot}%{kbd_datadir}/keymaps/xkb/cz.map.gz" ]; then
+ gunzip %{buildroot}%{kbd_datadir}/keymaps/xkb/cz.map.gz
+ patch %{buildroot}%{kbd_datadir}/keymaps/xkb/cz.map < %{SOURCE6}
+ gzip %{buildroot}%{kbd_datadir}/keymaps/xkb/cz.map
+fi
# Link open to openvt
ln -s openvt %{buildroot}%{_bindir}/open
# Generate entries for systemd's /usr/share/systemd/kbd-model-map
mkdir -p %{buildroot}%{_datadir}/systemd
-sh ./genmap4systemd.sh %{buildroot}/%{kbddir}/keymaps/xkb \
+sh ./genmap4systemd.sh %{buildroot}/%{kbd_datadir}/keymaps/xkb \
> %{buildroot}%{_datadir}/systemd/kbd-model-map.xkb-generated
+# remove library used only for tests
+rm -f %{buildroot}%{_libdir}/libtswrap*
+rm -f %{buildroot}%{_prefix}/lib/debug/%{_libdir}/libtswrap*
+
%find_lang %{name}
%files -f %{name}.lang
@@ -258,5 +265,5 @@ sh ./genmap4systemd.sh %{buildroot}/%{kbddir}/keymaps/xkb \
%{_mandir}/man8/setvesablank.8*
%{_mandir}/man8/setvtrgb.8*
%{_mandir}/man8/vcstime.8*
-%{kbddir}
+%{kbd_datadir}
%{_datadir}/systemd/kbd-model-map.xkb-generated