[packages/kbd] - updated to 2.5.1 - reworked unicode_start patch (instead of disabling dumpkeys/loadkeys, introduce

qboosh qboosh at pld-linux.org
Sat Aug 20 20:50:18 CEST 2022


commit 5c385ec42eedc1d640a2e975756a71ac587ab007
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Aug 20 20:50:12 2022 +0200

    - updated to 2.5.1
    - reworked unicode_start patch (instead of disabling dumpkeys/loadkeys, introduce sysconfig setting with dumpkeys charset)
    - updated tty-detect patch
    - removed obsolete pc patch
    - versioned Obsoletes

 kbd-pc.patch            | 10 ------
 kbd-tty-detect.patch    | 12 +++----
 kbd-unicode_start.patch | 83 +++++++++++++++++--------------------------------
 kbd.spec                | 18 +++++------
 kbd.sysconfig           |  3 ++
 5 files changed, 45 insertions(+), 81 deletions(-)
---
diff --git a/kbd.spec b/kbd.spec
index 9eead21..787c08e 100644
--- a/kbd.spec
+++ b/kbd.spec
@@ -5,12 +5,12 @@ Summary:	Linux console utilities
 Summary(ko.UTF-8):	콘솔을 설정하는 도구 (글쇠판, 가상 터미널, 그 밖에)
 Summary(pl.UTF-8):	Narzędzia do obsługi konsoli
 Name:		kbd
-Version:	2.4.0
+Version:	2.5.1
 Release:	1
 License:	GPL v2+
 Group:		Applications/Console
 Source0:	https://www.kernel.org/pub/linux/utils/kbd/%{name}-%{version}.tar.xz
-# Source0-md5:	3cac5be0096fcf7b32dcbd3c53831380
+# Source0-md5:	10f10c0a9d897807733f2e2419814abb
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
@@ -30,7 +30,6 @@ Source11:	%{name}-pl4.map
 Source12:	vlock.pamd
 Patch0:		%{name}-unicode_start.patch
 Patch1:		%{name}-tty-detect.patch
-Patch2:		%{name}-pc.patch
 URL:		http://kbd-project.org/
 BuildRequires:	autoconf >= 2.69
 BuildRequires:	automake >= 1:1.9
@@ -50,10 +49,10 @@ Requires:	open
 Requires:	rc-scripts >= 0.4.3.0
 Requires:	sed
 Requires:	util-linux
-Obsoletes:	console-data
-Obsoletes:	console-tools
-Obsoletes:	console-tools-devel
-Obsoletes:	console-tools-static
+Obsoletes:	console-data < 1999.08.30
+Obsoletes:	console-tools < 1:0.4
+Obsoletes:	console-tools-devel < 1:0.4
+Obsoletes:	console-tools-static < 1:0.4
 Conflicts:	man-pages < 1.43-5
 Conflicts:	util-linux < 2.11
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -72,9 +71,9 @@ klawiatury. Dodatkowo dołączono znaczną liczbę różnych fontów i map.
 Summary:	Utility to lock one or more virtual consoles
 Summary(pl.UTF-8):	Narzędzie do blokowania jednej lub wielu konsol wirtualnych
 Group:		Applications/Console
-Obsoletes:	vlock
-Provides:	vlock
 Requires:	%{name} = %{version}-%{release}
+Provides:	vlock
+Obsoletes:	vlock < 2.3
 
 %description vlock
 Utility to lock one or more virtual consoles.
@@ -122,7 +121,6 @@ Statyczna biblioteka libkeymap.
 %setup -q -a52
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 %{__gettextize}
diff --git a/kbd-pc.patch b/kbd-pc.patch
deleted file mode 100644
index d00159d..0000000
--- a/kbd-pc.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- kbd-2.1.0/src/libkeymap/libkeymap.pc.in.orig	2017-08-29 21:05:21.000000000 +0200
-+++ kbd-2.1.0/src/libkeymap/libkeymap.pc.in	2019-07-21 17:27:18.475979073 +0200
-@@ -7,6 +7,6 @@
- Version: @VERSION@
- Description: Library to manage the Linux keymaps
- Requires:
--Libs: -L${libdir} -lkeymap -lfindfile
-+Libs: -L${libdir} -lkeymap -lkbdfile
- Libs.private:
- Cflags: -I${includedir}
diff --git a/kbd-tty-detect.patch b/kbd-tty-detect.patch
index 7cc206c..657006b 100644
--- a/kbd-tty-detect.patch
+++ b/kbd-tty-detect.patch
@@ -1,20 +1,20 @@
---- kbd-1.15/src/unicode_stop~	2008-04-08 19:57:20.000000000 +0200
-+++ kbd-1.15/src/unicode_stop	2009-03-12 17:48:10.000000000 +0100
+--- kbd-2.5.1/src/unicode_stop.orig	2022-08-20 19:58:25.772620769 +0200
++++ kbd-2.5.1/src/unicode_stop	2022-08-20 19:59:19.465663223 +0200
 @@ -1,5 +1,7 @@
  #!/bin/sh
  
 +[ -x /usr/bin/tty ] || exit 0
 +
- TTY="`/usr/bin/tty`"
+ TTY=$(/usr/bin/tty)
  case "$TTY" in
  	/dev/console|/dev/vc*|/dev/tty[0-9]*)
---- kbd-1.15/src/unicode_start~	2009-03-12 17:42:50.000000000 +0100
-+++ kbd-1.15/src/unicode_start	2009-03-12 17:49:35.000000000 +0100
+--- kbd-2.5.1/src/unicode_start.orig	2022-08-20 19:58:25.775954085 +0200
++++ kbd-2.5.1/src/unicode_start	2022-08-20 19:59:38.195561754 +0200
 @@ -1,5 +1,7 @@
  #!/bin/sh
  
 +[ -x /usr/bin/tty ] || exit 0
 +
  # 0. Check whether we're on a console
- TTY="`/usr/bin/tty`"
+ TTY=$(/usr/bin/tty)
  case "$TTY" in
diff --git a/kbd-unicode_start.patch b/kbd-unicode_start.patch
index a496267..b03574b 100644
--- a/kbd-unicode_start.patch
+++ b/kbd-unicode_start.patch
@@ -1,60 +1,33 @@
---- kbd-1.15.3/src/unicode_start~	2011-08-23 08:14:50.523611798 +0300
-+++ kbd-1.15.3/src/unicode_start	2011-08-23 08:14:24.636851881 +0300
-@@ -34,29 +36,34 @@
- # not the global keymap. root will have to load the keymap in unicode mode
- # explicitly.
+--- kbd-2.5.1/src/unicode_start.orig	2022-08-20 19:32:56.350906358 +0200
++++ kbd-2.5.1/src/unicode_start	2022-08-20 19:58:04.852734102 +0200
+@@ -11,6 +11,14 @@ case "$TTY" in
+ 		;;
+ esac
  
--uid="`id -u 2>/dev/null`" ||:
--if [ "$uid" = '0' ]; then
--	# There is no way of reverting the effect of "dumpkeys | loadkeys --unicode",
--	# the memory of the earlier keymap is lost. Therefore, try
--	# to save a copy of the original keymap to be able to reload it in unicode_stop.
--	# (see also http://mail.nl.linux.org/linux-utf8/2003-08/msg00053.html):
--
--	[ -n "$HOME" -a "$HOME" != '/' ] ||
--		HOME='/root'
--
--	if [ -d "$HOME" -a -w "$HOME" ]; then
--		[ -d "$HOME/.kbd" ] ||
--			mkdir -- "$HOME/.kbd"
--
--		[ ! -w "$HOME/.kbd" ] ||
++DUMPKEYS_OPT=
++if [ -r /etc/sysconfig/console ]; then
++	. /etc/sysconfig/console
++	if [ -n "$KEYTABLE_CHARSET" ]; then
++		DUMPKEYS_OPT="-c$KEYTABLE_CHARSET"
++	fi
++fi
++
+ # Enables Unicode processing in the current console.
+ #
+ # 1. The input side: the keyboard driver.
+@@ -49,13 +57,13 @@ if [ "$uid" = 0 ]; then
+ 			mkdir -- "$HOME/.kbd"
+ 
+ 		[ ! -w "$HOME/.kbd" ] ||
 -			dumpkeys > "$HOME/.kbd/.keymap_sv"
--	fi
--
--	# redirect stderr and stdout of loadkeys to /dev/null to avoid the confusing
--	# "plus before udiaeresis ignored" warnings.
--
++			dumpkeys $DUMPKEYS_OPT > "$HOME/.kbd/.keymap_sv"
+ 	fi
+ 
+ 	# redirect stderr and stdout of loadkeys to /dev/null to avoid the confusing
+ 	# "plus before udiaeresis ignored" warnings.
+ 
 -	dumpkeys | loadkeys --unicode > /dev/null 2>&1
--fi
-+# PLD Linux: disabled because it breaks non-iso-8859-1 keymaps
-+# instead use manually:
-+#   loadkeys --unicode <keymap>
-+# or
-+#   dumpkeys -c <charset> | loadkeys --unicode
-+
-+#uid="`id -u 2>/dev/null`" ||:
-+#if [ "$uid" = '0' ]; then
-+#	# There is no way of reverting the effect of "dumpkeys | loadkeys --unicode",
-+#	# the memory of the earlier keymap is lost. Therefore, try
-+#	# to save a copy of the original keymap to be able to reload it in unicode_stop.
-+#	# (see also http://mail.nl.linux.org/linux-utf8/2003-08/msg00053.html):
-+#
-+#	[ -n "$HOME" -a "$HOME" != '/' ] ||
-+#		HOME='/root'
-+#
-+#	if [ -d "$HOME" -a -w "$HOME" ]; then
-+#		[ -d "$HOME/.kbd" ] ||
-+#			mkdir -- "$HOME/.kbd"
-+#
-+#		[ ! -w "$HOME/.kbd" ] ||
-+#			dumpkeys > "$HOME/.kbd/.keymap_sv"
-+#	fi
-+#
-+#	# redirect stderr and stdout of loadkeys to /dev/null to avoid the confusing
-+#	# "plus before udiaeresis ignored" warnings.
-+#	#dumpkeys | loadkeys --unicode > /dev/null 2>&1
-+#fi
++	dumpkeys $DUMPKEYS_OPT | loadkeys --unicode > /dev/null 2>&1
+ fi
  
  # 2. The output side: the console screen.
- 
diff --git a/kbd.sysconfig b/kbd.sysconfig
index d72c55d..3662070 100644
--- a/kbd.sysconfig
+++ b/kbd.sysconfig
@@ -29,6 +29,9 @@ CONSOLEMAP=
 # Keyboard table file name
 KEYTABLE=pl2
 
+# charset used for key table in non-unicode case (used for dumpkeys in unicode_start)
+#KEYTABLE_CHARSET=iso-8859-2
+
 # Terminals affected with font change when using framebuffer
 SET_FONT_TERMINALS="1 2 3 4 5 6 7 8"
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kbd.git/commitdiff/5c385ec42eedc1d640a2e975756a71ac587ab007



More information about the pld-cvs-commit mailing list