rpms/xorg-x11-server/devel 10-x11-keymap.fdi, NONE, 1.1 fedora-setup-keyboard, NONE, 1.1 xorg-x11-server.spec, 1.336, 1.337

Adam Jackson (ajax) fedora-extras-commits at redhat.com
Mon Aug 4 21:16:16 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/xorg-x11-server/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23872

Modified Files:
	xorg-x11-server.spec 
Added Files:
	10-x11-keymap.fdi fedora-setup-keyboard 
Log Message:
* Mon Aug 04 2008 Adam Jackson <ajax at redhat.com> 1.4.99.906-3
- 10-x11-keymap.fdi, fedora-setup-keyboard: Attempt to read keyboard settings
  from /etc/sysconfig/keyboard and stuff them into hal.



--- NEW FILE 10-x11-keymap.fdi ---
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
    <device>
	<match key="input.xkb.layout" exists="true">
	    <append key="info.callouts.add" type="strlist">fedora-setup-keyboard</append>
	</match>
    </device>
</deviceinfo>


--- NEW FILE fedora-setup-keyboard ---
#!/bin/sh
#
# Trivial egregious hack to load the console keyboard layout into XKB.
#
# Yes, this should really just be written in python.  If you can figure
# out how to make hal callouts written in python _work_, then please
# let me know.  In the meantime, we'll do this.

[[ -x /usr/bin/python ]] || exit 0
[[ -x /usr/bin/hal-set-property ]] || exit 0

source /etc/sysconfig/keyboard >& /dev/null || exit 0

[[ -n "$KEYTABLE" ]] || exit 0

rhplquery () {
    /usr/bin/python -c "import rhpl.keyboard_models; m = rhpl.keyboard_models.KeyboardModels().get_models(); print \"junk='%s' layout='%s' model='%s' variant='%s' options='%s'\" % tuple(m[\"$1\"])" || echo "exit 0"
}

eval `rhplquery $KEYTABLE`

hal_set () {
    if [[ -n "${!1}" ]]; then
	/usr/bin/hal-set-property --direct --udi "$UDI" --key input.xkb.$1 --string "${!1}"
    else
	/usr/bin/hal-set-property --direct --udi "$UDI" --key input.xkb.$1 --remove
    fi
}

hal_set layout
hal_set model
hal_set variant
hal_set options


Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -r1.336 -r1.337
--- xorg-x11-server.spec	4 Aug 2008 02:20:26 -0000	1.336
+++ xorg-x11-server.spec	4 Aug 2008 21:15:46 -0000	1.337
@@ -35,6 +35,10 @@
 Source0:   http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.bz2
 %endif
 
+# keyboard enablement
+Source10:  10-x11-keymap.fdi
+Source11:  fedora-setup-keyboard
+
 # OpenGL compositing manager feature/optimization patches.
 Patch100:  xorg-x11-server-1.1.0-no-move-damage.patch
 Patch101:  xserver-1.4.99-dont-backfill-bg-none.patch
@@ -312,6 +316,11 @@
 # be able to parse the same modelist as the X server uses (rhpxl).
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/xorg
 install -m 0444 hw/xfree86/common/{vesa,extra}modes $RPM_BUILD_ROOT%{_datadir}/xorg/
+
+# fedora-isms to slurp keyboard settings out of /etc/sysconfig/keyboard
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/10osvendor
+install -m 0444 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/10osvendor
+install -m 0755 %{SOURCE11} $RPM_BUILD_ROOT%{_bindir}
 %endif
 
 # Make the source package
@@ -377,9 +386,11 @@
 %defattr(-,root,root,-)
 %{_bindir}/X
 %attr(4711, root, root) %{_bindir}/Xorg
-%{_bindir}/gtf
 %{_bindir}/cvt
+%{_bindir}/fedora-setup-keyboard
+%{_bindir}/gtf
 %dir %{_datadir}/xorg
+%{_datadir}/hal/fdi/policy/10osvendor/10-x11-keymap.fdi
 %{_datadir}/xorg/vesamodes
 %{_datadir}/xorg/extramodes
 %dir %{_libdir}/xorg
@@ -477,6 +488,10 @@
 
 
 %changelog
+* Mon Aug 04 2008 Adam Jackson <ajax at redhat.com> 1.4.99.906-3
+- 10-x11-keymap.fdi, fedora-setup-keyboard: Attempt to read keyboard settings
+  from /etc/sysconfig/keyboard and stuff them into hal.
+
 * Thu Jul 31 2008 Adam Jackson <ajax at redhat.com> 1.4.99.906-2
 - Drop the evdev keyboarding patch.
 




More information about the scm-commits mailing list