Update to kbd-2.3.0, use make macros, minor spec file changes

This commit is contained in:
Vitezslav Crhonek 2020-07-29 11:56:19 +02:00
parent cba2479a4c
commit 5b68f0b6fd
8 changed files with 63 additions and 100 deletions

2
.gitignore vendored
View File

@ -9,4 +9,4 @@ terminus.tar.bz2
/fr-dvorak.tar.bz2 /fr-dvorak.tar.bz2
/kbd-latarcyrheb-32.tar.bz2 /kbd-latarcyrheb-32.tar.bz2
/kbdinfo.1 /kbdinfo.1
/kbd-2.2.0.tar.xz /kbd-2.3.0.tar.xz

View File

@ -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 diff -up kbd-2.3.0/docs/man/man1/showkey.1.orig kbd-2.3.0/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.3.0/docs/man/man1/showkey.1.orig 2020-07-08 19:25:47.000000000 +0200
+++ kbd-2.0.4/docs/man/man1/showkey.1 2017-01-11 10:45:03.763312393 +0100 +++ 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 @@ -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 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 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" .SH "SEE ALSO"
.BR loadkeys (1), .BR loadkeys (1),
.BR dumpkeys (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 diff -up kbd-2.3.0/docs/man/man8/setkeycodes.8.orig kbd-2.3.0/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.3.0/docs/man/man8/setkeycodes.8.orig 2020-07-08 19:35:35.000000000 +0200
+++ kbd-2.0.4/docs/man/man8/setkeycodes.8 2017-01-11 10:45:03.763312393 +0100 +++ kbd-2.3.0/docs/man/man8/setkeycodes.8 2020-07-16 08:57:52.293900997 +0200
@@ -38,6 +38,10 @@ to showkey(1), the command @@ -42,6 +42,10 @@ the command
.RE will assign the keycode 112 to it, and then
will assign the keycode 112 to it, and then loadkeys(1) can be used .BR loadkeys (1)
to define the function of this key. can be used to define the function of this key.
+ +
+USB keyboards have standardized keycodes and +USB keyboards have standardized keycodes and
+.B setkeycodes +.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 .LP
Some older kernels might hardwire a low scancode range to the Some older kernels might hardwire a low scancode range to the
equivalent keycodes; setkeycodes will fail when you try to remap equivalent keycodes; setkeycodes will fail when you try to remap
@@ -56,6 +60,14 @@ None. @@ -60,6 +64,14 @@ None.
.SH BUGS .SH BUGS
The keycodes of X have nothing to do with those of Linux. The keycodes of X have nothing to do with those of Linux.
Unusual keys can be made visible under Linux, but not under X. 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. +cannot change the mapping of other devices than the "first" one.
+ +
.SH "SEE ALSO" .SH "SEE ALSO"
.I "dumpkeys (1), loadkeys (1), showkey (1), getkeycodes (8)" .BR dumpkeys (1),
.BR loadkeys (1),

View File

@ -1,18 +1,18 @@
diff -up kbd-2.1.0/src/loadkeys.c.orig kbd-2.1.0/src/loadkeys.c diff -up kbd-2.3.0/src/loadkeys.c.orig kbd-2.3.0/src/loadkeys.c
--- kbd-2.1.0/src/loadkeys.c.orig 2019-07-15 10:57:18.000000000 +0200 --- kbd-2.3.0/src/loadkeys.c.orig 2020-06-02 12:16:45.000000000 +0200
+++ kbd-2.1.0/src/loadkeys.c 2019-07-17 14:34:51.224525616 +0200 +++ kbd-2.3.0/src/loadkeys.c 2020-07-16 09:02:50.398864688 +0200
@@ -24,7 +24,7 @@ @@ -28,6 +28,8 @@
#include "paths.h" static const char *const dirpath1[] = {
#include "keymap.h" "",
DATADIR "/" KEYMAPDIR "/**",
-static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", KERNDIR "/", 0 }; + DATADIR "/" XKBKEYMAPDIR "/",
+static const char *const dirpath1[] = { "", DATADIR "/" KEYMAPDIR "/**", DATADIR "/" XKBKEYMAPDIR "/", DATADIR "/" LEGACYKEYMAPDIR "/**", KERNDIR "/", 0 }; + DATADIR "/" LEGACYKEYMAPDIR "/**",
static const char *const suffixes[] = { "", ".kmap", ".map", 0 }; KERNDIR "/",
NULL
static void __attribute__((noreturn)) };
diff -up kbd-2.1.0/src/paths.h.orig kbd-2.1.0/src/paths.h diff -up kbd-2.3.0/src/paths.h.orig kbd-2.3.0/src/paths.h
--- kbd-2.1.0/src/paths.h.orig 2019-05-07 11:21:10.000000000 +0200 --- kbd-2.3.0/src/paths.h.orig 2020-07-16 09:02:59.243010909 +0200
+++ kbd-2.1.0/src/paths.h 2019-07-17 14:35:13.870574558 +0200 +++ kbd-2.3.0/src/paths.h 2020-07-16 09:03:23.446410942 +0200
@@ -5,6 +5,8 @@ @@ -5,6 +5,8 @@
* The following five subdirectories are defined: * The following five subdirectories are defined:
*/ */

View File

@ -1,23 +1,11 @@
diff -up kbd-2.1.0/src/kdmapop.c.orig kbd-2.1.0/src/kdmapop.c diff -up kbd-2.3.0/src/libkfont/kdmapop.c.orig kbd-2.3.0/src/libkfont/kdmapop.c
--- kbd-2.1.0/src/kdmapop.c.orig 2019-05-07 11:21:10.000000000 +0200 --- kbd-2.3.0/src/libkfont/kdmapop.c.orig 2020-04-27 17:53:01.000000000 +0200
+++ kbd-2.1.0/src/kdmapop.c 2019-07-17 14:38:15.799967669 +0200 +++ kbd-2.3.0/src/libkfont/kdmapop.c 2020-07-16 09:06:45.246742724 +0200
@@ -155,6 +155,7 @@ int getunimap(int fd, struct unimapdesc @@ -166,6 +166,7 @@ kfont_get_unicodemap(struct kfont_contex
}
if (ioctl(fd, GIO_UNIMAP, &ud)) { if (ioctl(fd, GIO_UNIMAP, &ud)) {
perror("GIO_UNIMAP"); KFONT_ERR(ctx, "ioctl(GIO_UNIMAP): %m");
+ free(ud.entries); + free(ud.entries);
return -1; return -1;
} }
if (ct != ud.entry_ct) 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

View File

@ -1,16 +0,0 @@
diff -up kbd-2.2.0/configure.ac.orig kbd-2.2.0/configure.ac
--- kbd-2.2.0/configure.ac.orig 2019-08-28 11:07:00.787173606 +0200
+++ kbd-2.2.0/configure.ac 2019-08-28 11:08:07.217317151 +0200
@@ -72,9 +72,9 @@ if test "$enable_code_coverage" = yes; t
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([\

View File

@ -1,14 +0,0 @@
diff -up kbd-2.2.0/src/libkeymap/analyze.l.orig kbd-2.2.0/src/libkeymap/analyze.l
--- kbd-2.2.0/src/libkeymap/analyze.l.orig 2019-06-25 11:41:55.000000000 +0200
+++ kbd-2.2.0/src/libkeymap/analyze.l 2019-10-17 08:39:01.924605478 +0200
@@ -463,7 +463,10 @@ To to|To|TO
strerror_r(errno, buf, sizeof(buf));
+ /* workaround -Werror=format-security error
ERR(yyextra, buf);
+ */
+ ERR(yyextra, _("unknown error"));
return(ERROR);
}

View File

@ -4,8 +4,8 @@
%global kbd_datadir %{_exec_prefix}/lib/kbd %global kbd_datadir %{_exec_prefix}/lib/kbd
Name: kbd Name: kbd
Version: 2.2.0 Version: 2.3.0
Release: 4%{?dist} Release: 1%{?dist}
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.) Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
License: GPLv2+ License: GPLv2+
URL: http://www.kbd-project.org/ URL: http://www.kbd-project.org/
@ -34,10 +34,6 @@ Patch5: kbd-1.15.5-loadkeys-search-path.patch
Patch6: kbd-2.0.2-unicode-start-font.patch Patch6: kbd-2.0.2-unicode-start-font.patch
# Patch7: fixes issues found by static analysis # Patch7: fixes issues found by static analysis
Patch7: kbd-2.0.4-covscan-fixes.patch Patch7: kbd-2.0.4-covscan-fixes.patch
# Patch8: fix flags
Patch8: kbd-2.2.0-fix-flags.patch
# Patch9: workaround -Werror=format-security build error
Patch9: kbd-2.2.0-format-security.patch
BuildRequires: gcc, bison, flex, gettext, pam-devel, check-devel, automake BuildRequires: gcc, bison, flex, gettext, pam-devel, check-devel, automake
BuildRequires: console-setup, xkeyboard-config BuildRequires: console-setup, xkeyboard-config
@ -83,8 +79,7 @@ cp -fp %{SOURCE6} .
%patch5 -p1 -b .loadkeys-search-path %patch5 -p1 -b .loadkeys-search-path
%patch6 -p1 -b .unicode-start-font %patch6 -p1 -b .unicode-start-font
%patch7 -p1 -b .covscan-fixes %patch7 -p1 -b .covscan-fixes
%patch8 -p1 -b .fix-flags aclocal
%patch9 -p1 -b .format-security
autoconf autoconf
# 7-bit maps are obsolete; so are non-euro maps # 7-bit maps are obsolete; so are non-euro maps
@ -115,10 +110,10 @@ mv "ChangeLog_" "ChangeLog"
%build %build
%configure --prefix=%{_prefix} --datadir=%{kbd_datadir} --mandir=%{_mandir} --localedir=%{_datadir}/locale --enable-nls %configure --prefix=%{_prefix} --datadir=%{kbd_datadir} --mandir=%{_mandir} --localedir=%{_datadir}/locale --enable-nls
make %{?_smp_mflags} V=1 %make_build
%install %install
make install DESTDIR=$RPM_BUILD_ROOT %make_install
# ro_win.map.gz is useless # ro_win.map.gz is useless
rm -f $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/i386/qwerty/ro_win.map.gz rm -f $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/i386/qwerty/ro_win.map.gz
@ -137,10 +132,6 @@ sed -i -e 's,\<kbd_mode\>,%{_bindir}/kbd_mode,g;s,\<setfont\>,%{_bindir}/setfont
# install kbdinfo manpage # install kbdinfo manpage
gzip -c %SOURCE5 > $RPM_BUILD_ROOT/%{_mandir}/man1/kbdinfo.1.gz gzip -c %SOURCE5 > $RPM_BUILD_ROOT/%{_mandir}/man1/kbdinfo.1.gz
# Move locale files to correct place
cp -r $RPM_BUILD_ROOT%{kbd_datadir}/locale/ $RPM_BUILD_ROOT%{_datadir}/locale
rm -rf $RPM_BUILD_ROOT%{kbd_datadir}/locale
# Install PAM configuration for vlock # Install PAM configuration for vlock
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vlock install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vlock
@ -168,15 +159,19 @@ done < layouts-list-uniq.lst
# wipe converted layouts which cannot input ASCII (#1031848) # wipe converted layouts which cannot input ASCII (#1031848)
zgrep -L "U+0041" $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/* | xargs rm -f zgrep -L "U+0041" $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/* | xargs rm -f
# Rename the converted default fi (kotoistus) layout (#1117891) # Rename the converted default fi (kotoistus) layout (#1117891), if exists
gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map.gz if [ -f "$RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map.gz" ]; then
mv $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map.gz
gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map mv $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi.map $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map
gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/fi-kotoistus.map
fi
# Fix converted cz layout - add compose rules # Fix converted cz layout - add compose rules, if exists
gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map.gz if [ -f "$RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map.gz" ]; then
patch $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map < %{SOURCE6} gunzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map.gz
gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map patch $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map < %{SOURCE6}
gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map
fi
%find_lang %{name} %find_lang %{name}
@ -184,6 +179,9 @@ gzip $RPM_BUILD_ROOT%{kbd_datadir}/keymaps/xkb/cz.map
%ifnarch s390x %ifnarch s390x
make check make check
%endif %endif
# remove library used only for tests
rm -f $RPM_BUILD_ROOT%{_libdir}/libtswrap*
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug/%{_libdir}/libtswrap*
%files -f %{name}.lang %files -f %{name}.lang
%license COPYING %license COPYING
@ -200,6 +198,13 @@ make check
%{kbd_datadir}/keymaps/legacy %{kbd_datadir}/keymaps/legacy
%changelog %changelog
* Wed Jul 29 2020 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.3.0-1
- Make changes in converted layouts conditionally
- Use make macros, patch by Tom Stellard <tstellar@redhat.com>
(https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro)
- Update to kbd-2.3.0
Resolves: #1855867
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-4 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

View File

@ -1,4 +1,4 @@
SHA512 (kbd-latsun-fonts.tar.bz2) = b98da5df85017ef1bd297eb2255046d54dd805c84356db7533f24e49fb78c8e3999901a45a49cdf6a74c0002bba2e0aa8327469d78dd38b6e747103972c30584 SHA512 (kbd-latsun-fonts.tar.bz2) = b98da5df85017ef1bd297eb2255046d54dd805c84356db7533f24e49fb78c8e3999901a45a49cdf6a74c0002bba2e0aa8327469d78dd38b6e747103972c30584
SHA512 (kbd-latarcyrheb-32.tar.bz2) = 1870a708e16cf16f8343f02f7e97940e8404655078f92709a0b8a334be772faa99b4dbaca37e8d8c5b16d0d4d811fe6b102e4f76ae821148eb33075613dc95b8 SHA512 (kbd-latarcyrheb-32.tar.bz2) = 1870a708e16cf16f8343f02f7e97940e8404655078f92709a0b8a334be772faa99b4dbaca37e8d8c5b16d0d4d811fe6b102e4f76ae821148eb33075613dc95b8
SHA512 (kbdinfo.1) = 8696d55f6c15f0ee2c2936eca6180b18100a87b11f0efe809a9531bb1228c67cd096cbc8fa25d9ee496daab28892ee5f320cc4bc9c9d816ff666bb4f80271c99 SHA512 (kbdinfo.1) = 8696d55f6c15f0ee2c2936eca6180b18100a87b11f0efe809a9531bb1228c67cd096cbc8fa25d9ee496daab28892ee5f320cc4bc9c9d816ff666bb4f80271c99
SHA512 (kbd-2.2.0.tar.xz) = 73885d98e81a630065e0b1b380af87f12fe983c8e148e97f0b884ec2ec724ed5295ad170e9734c03c37ca3ac80db6366c5ca73aadaa6ccdd2cb5bc80f394e909 SHA512 (kbd-2.3.0.tar.xz) = 6d7ba496a963c29abf1f514831c47e6bc73797b04021115879cbdb203c879c5abfae9f8fcaeec52d8891cad848240d39f5293452d26c7f0a84fb58499ad6e927