Update to kbd-2.5.0

This commit is contained in:
Vitezslav Crhonek 2022-06-08 10:16:20 +02:00
parent f075c2adb3
commit bb8392f7ea
9 changed files with 34 additions and 181 deletions

2
.gitignore vendored
View File

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

View File

@ -1,18 +0,0 @@
diff -up kbd-2.0.4/docs/man/man1/dumpkeys.1.in.orig kbd-2.0.4/docs/man/man1/dumpkeys.1.in
--- kbd-2.0.4/docs/man/man1/dumpkeys.1.in.orig 2017-01-11 11:12:22.884029413 +0100
+++ kbd-2.0.4/docs/man/man1/dumpkeys.1.in 2017-01-11 11:12:47.537040194 +0100
@@ -164,6 +164,14 @@ output of
.BI \-S shape " " " " \-\-shape= shape
.LP
.TP
+.B \-1 \-\-separate-lines
+This forces
+.B dumpkeys
+to write one line per (modifier,keycode) pair. It prefixes the word
+.I plain
+for plain keycodes.
+.LP
+.TP
.B \-t \-\-funcs-only
When this option is given,
.B dumpkeys

View File

@ -1,61 +0,0 @@
--- a/src/vlock/auth.c
+++ b/src/vlock/auth.c
@@ -4,7 +4,7 @@
PAM authentication routine for vlock, the VT locking program for linux.
Copyright (C) 1994-1998 Michael K. Johnson <johnsonm@redhat.com>
- Copyright (C) 2002, 2005 Dmitry V. Levin <ldv@altlinux.org>
+ Copyright (C) 2002, 2005, 2013 Dmitry V. Levin <ldv@altlinux.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -36,6 +36,25 @@
/* Unrecognized PAM error timeout. */
#define ERROR_TIMEOUT 10
+static int
+do_account_password_management (pam_handle_t *pamh)
+{
+ int rc;
+
+ /* Whether the authenticated user is allowed to log in? */
+ rc = pam_acct_mgmt (pamh, 0);
+
+ /* Do we need to prompt the user for a new password? */
+ if (rc == PAM_NEW_AUTHTOK_REQD)
+ rc = pam_chauthtok (pamh, PAM_CHANGE_EXPIRED_AUTHTOK);
+
+ /* Extend the lifetime of the existing credentials. */
+ if (rc == PAM_SUCCESS)
+ rc = pam_setcred (pamh, PAM_REFRESH_CRED);
+
+ return rc;
+}
+
int
get_password (pam_handle_t * pamh, const char *username, const char *tty)
{
@@ -84,6 +103,23 @@ get_password (pam_handle_t * pamh, const char *username, const char *tty)
switch (rc)
{
case PAM_SUCCESS:
+ rc = do_account_password_management (pamh);
+
+ if (rc != PAM_SUCCESS)
+ {
+ /*
+ * The user was authenticated but
+ * either account or password management
+ * returned an error.
+ */
+ printf ("%s.\n\n\n",
+ pam_strerror (pamh, rc));
+ fflush (stdout);
+ pam_end (pamh, rc);
+ pamh = 0;
+ break;
+ }
+
pam_end (pamh, rc);
/* Log the fact of console unlocking. */
syslog (LOG_NOTICE,

View File

@ -1,11 +0,0 @@
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)) {
KFONT_ERR(ctx, "ioctl(GIO_UNIMAP): %m");
+ free(ud.entries);
return -1;
}
if (ct != ud.entry_ct)

View File

@ -1,47 +1,3 @@
diff -up kbd-2.4.0/src/libkbdfile/kbdfile.c.orig kbd-2.4.0/src/libkbdfile/kbdfile.c
--- kbd-2.4.0/src/libkbdfile/kbdfile.c.orig 2020-11-11 13:44:48.000000000 +0100
+++ kbd-2.4.0/src/libkbdfile/kbdfile.c 2021-04-27 09:58:08.405671071 +0200
@@ -39,8 +39,10 @@ kbdfile_new(struct kbdfile_ctx *ctx)
if (!fp->ctx) {
fp->ctx = kbdfile_context_new();
- if (!fp->ctx)
+ if (!fp->ctx) {
+ free(fp);
return NULL;
+ }
fp->flags |= KBDFILE_CTX_INITIALIZED;
}
@@ -69,7 +71,7 @@ kbdfile_get_pathname(struct kbdfile *fp)
int
kbdfile_set_pathname(struct kbdfile *fp, const char *pathname)
{
- strncpy(fp->pathname, pathname, sizeof(fp->pathname));
+ strncpy(fp->pathname, pathname, sizeof(fp->pathname) - 1);
return 0;
}
@@ -385,7 +387,7 @@ kbdfile_find(const char *fnam, const cha
fp->flags &= ~KBDFILE_PIPE;
/* Try explicitly given name first */
- strncpy(fp->pathname, fnam, sizeof(fp->pathname));
+ strncpy(fp->pathname, fnam, sizeof(fp->pathname) - 1);
if (!maybe_pipe_open(fp))
return 0;
diff -up kbd-2.4.0/src/libkeymap/common.c.orig kbd-2.4.0/src/libkeymap/common.c
--- kbd-2.4.0/src/libkeymap/common.c.orig 2019-06-24 13:55:23.000000000 +0200
+++ kbd-2.4.0/src/libkeymap/common.c 2021-04-27 09:58:08.405671071 +0200
@@ -139,6 +139,7 @@ init_array(struct lk_ctx *ctx, struct lk
rc = lk_array_init(ptr, size, 0);
if (rc < 0) {
ERR(ctx, _("unable to initialize array: %s"), strerror(rc));
+ free(ptr);
return -1;
}
diff -up kbd-2.4.0/src/libkfont/psffontop.c.orig kbd-2.4.0/src/libkfont/psffontop.c
--- kbd-2.4.0/src/libkfont/psffontop.c.orig 2020-04-27 17:53:01.000000000 +0200
+++ kbd-2.4.0/src/libkfont/psffontop.c 2021-04-27 09:59:14.170153676 +0200

View File

@ -1,14 +0,0 @@
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

@ -0,0 +1,11 @@
diff -up kbd-2.5-rc1/tests/libkeymap.at.orig kbd-2.5-rc1/tests/libkeymap.at
--- kbd-2.5-rc1/tests/libkeymap.at.orig 2022-03-23 09:30:53.176271763 +0100
+++ kbd-2.5-rc1/tests/libkeymap.at 2022-03-23 09:31:13.997291060 +0100
@@ -173,6 +173,6 @@ AT_SKIP_IF([ test "$(arch)" != "x86_64"
cp -f -- \
"$abs_srcdir/data/bkeymap-2.0.4/cz.map.bin" \
expout
-AT_CHECK([$abs_top_builddir/src/loadkeys -b "$abs_top_srcdir/data/keymaps/i386/qwerty/cz.map"],
+AT_CHECK([$abs_top_builddir/src/loadkeys -b "$abs_top_srcdir/data/keymaps/i386/qwerty/cz-qwerty.map"],
[0], [expout])
AT_CLEANUP

View File

@ -4,8 +4,8 @@
%global kbd_datadir %{_exec_prefix}/lib/kbd
Name: kbd
Version: 2.4.0
Release: 9%{?dist}
Version: 2.5.0
Release: 1%{?dist}
Summary: Tools for configuring the console (keyboard, virtual terminals, etc.)
License: GPLv2+
URL: http://www.kbd-project.org/
@ -23,25 +23,17 @@ Patch0: kbd-1.15-keycodes-man.patch
Patch1: kbd-1.15-sparc.patch
# Patch2: adds default unicode font to unicode_start script
Patch2: kbd-1.15-unicode_start.patch
# Patch3: add missing dumpkeys option to man page
Patch3: kbd-1.15.3-dumpkeys-man.patch
# Patch4: fixes decimal separator in Swiss German keyboard layout, bz 882529
Patch4: kbd-1.15.5-sg-decimal-separator.patch
# Patch5: adds xkb and legacy keymaps subdirs to loadkyes search path, bz 1028207
Patch5: kbd-1.15.5-loadkeys-search-path.patch
# Patch6: don't hardcode font used in unicode_start, take it from vconsole.conf,
# Patch3: fixes decimal separator in Swiss German keyboard layout, bz 882529
Patch3: kbd-1.15.5-sg-decimal-separator.patch
# Patch4: adds xkb and legacy keymaps subdirs to loadkyes search path, bz 1028207
Patch4: kbd-1.15.5-loadkeys-search-path.patch
# Patch5: don't hardcode font used in unicode_start, take it from vconsole.conf,
# bz 1101007
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: 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
# Patch10: drop a character from fa.map that makes it fail to load
# https://github.com/legionus/kbd/issues/62
# this may not be a correct upstream fix, it's more of a workaround
Patch10: 0001-fa.map-drop-high-codepoint-character-that-chokes-loa.patch
Patch5: kbd-2.0.2-unicode-start-font.patch
# Patch6: fixes issues found by static analysis
Patch6: kbd-2.4.0-covscan-fixes.patch
# Patch7: test uses cz.map that was previously renamed to cz-qwerty.map during the build
Patch7: kbd-2.5.0-renamed-keymap-in-test.patch
BuildRequires: gcc, bison, flex, gettext, pam-devel, check-devel, automake
BuildRequires: console-setup, xkeyboard-config
@ -81,14 +73,11 @@ cp -fp %{SOURCE6} .
%patch0 -p1 -b .keycodes-man
%patch1 -p1 -b .sparc
%patch2 -p1 -b .unicode_start
%patch3 -p1 -b .dumpkeys-man
%patch4 -p1 -b .sg-decimal-separator
%patch5 -p1 -b .loadkeys-search-path
%patch6 -p1 -b .unicode-start-font
%patch7 -p1 -b .covscan-fixes
%patch8 -p1 -b .covscan-fixes-pt2
%patch9 -p1 -b .setfont-exit-code
%patch10 -p1 -b .fa-bad-char
%patch3 -p1 -b .sg-decimal-separator
%patch4 -p1 -b .loadkeys-search-path
%patch5 -p1 -b .unicode-start-font
%patch6 -p1 -b .covscan-fixes
%patch7 -p1 -b .renamed-keymap-in-test
aclocal
autoconf
@ -193,9 +182,6 @@ make check
%{_bindir}/*
%{_mandir}/*/*
%config(noreplace) %{_sysconfdir}/pam.d/vlock
# library used only for tests
%exclude %{_libdir}/libtswrap*
%exclude %{_prefix}/lib/debug/%{_libdir}/libtswrap*
%files misc
%{kbd_datadir}
@ -205,6 +191,10 @@ make check
%{kbd_datadir}/keymaps/legacy
%changelog
* Wed Jun 08 2022 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.5.0-1
- Update to kbd-2.5.0
Resolves: #2092957
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1,4 +1,4 @@
SHA512 (kbd-latsun-fonts.tar.bz2) = b98da5df85017ef1bd297eb2255046d54dd805c84356db7533f24e49fb78c8e3999901a45a49cdf6a74c0002bba2e0aa8327469d78dd38b6e747103972c30584
SHA512 (kbd-latarcyrheb-32.tar.bz2) = 1870a708e16cf16f8343f02f7e97940e8404655078f92709a0b8a334be772faa99b4dbaca37e8d8c5b16d0d4d811fe6b102e4f76ae821148eb33075613dc95b8
SHA512 (kbdinfo.1) = 8696d55f6c15f0ee2c2936eca6180b18100a87b11f0efe809a9531bb1228c67cd096cbc8fa25d9ee496daab28892ee5f320cc4bc9c9d816ff666bb4f80271c99
SHA512 (kbd-2.4.0.tar.xz) = c3823e40878ed4cb5b90edf753dba37a7fc3189b7b08a2e59a7830cac23a7a7daf31dedef1fcc130698c7508bc2a037c8ab54e749d0cdbf51756e346f2ed5abb
SHA512 (kbd-2.5.0.tar.xz) = 740c4c7b8a2729f5d0539399f691d4201dab97c6eec554b82cc8c80935e956072e9735a739f8f4febc9849c1e8d9d195318b1d0d4e10dce4d34b5fb6d84111d7