Your message dated Fri, 24 Jul 2009 15:48:38 +0000
with message-id <[email protected]>
and subject line Bug#524907: fixed in kbd 1.15-2
has caused the Debian Bug report #524907,
regarding kbd: no KDSKBDIACRUC support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
524907: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524907
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: kbd
Version: 1.14.1

The loadkeys program in the kbd package ignores the KDSKBDIACRUC ioctl in
current kernels (and so does the console-tools flavor, as far as i can tell).
That means even though I can set both my display and my keyboard into UTF-8
mode and I can display all of the Latin2 characters (for example) if I have
them in my console font, there's no way to enter them on a plain US keyboard
other than with AltGr + keypad, not quite a user-friendly method.

Enclosed find a trivial C program (tested) using this ioctl to load a
compose table with circa 200 entries, and a data file I use with it.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <linux/kd.h>
#include <linux/keyboard.h>
#include <sys/ioctl.h>
#include <fcntl.h>

static int
read_compose_file(struct kbdiacruc kdc[MAX_DIACR], FILE* fp)
{
    int num = 0;

    while(1) {
        char line[256];
        int len;
        int blanks;

        if (fgets(line, sizeof(line), fp) == NULL) {
            if (feof(fp)) return num;
            else {
                perror("fgets");
                exit(1);
            }
        }
        len = strlen(line);
        if (line[len-1] != '\n') {
            fprintf(stderr, "line too long: %s\n", line);
            exit(1);
        }
        blanks = strspn(line, " \t");
        if (line[blanks] != '#' || line[blanks] != '\n') {
            char accent, base;
            unsigned result;
            if (num >= MAX_DIACR) {
                fprintf(stderr, "too many lines: %s\n", line);
                exit(1);
            }
            if (sscanf(line, " %c %c %x", &accent, &base, &result) != 3) {
                fprintf(stderr, "invalid line: %s\n", line);
                exit(1);
            }
            kdc[num].diacr = (unsigned)(unsigned char)accent;
            kdc[num].base = (unsigned)(unsigned char)base;
            kdc[num].result = result;
            num++;
        }
    }
}

static void
stuff_diacruc(int fd, int num, const struct kbdiacruc kdc[MAX_DIACR])
{
    int i;
    struct kbdiacrsuc kdcs = {
        .kb_cnt = num,
    };
    for (i = 0; i < num; ++i)
        kdcs.kbdiacruc[i] = kdc[i];
    if (ioctl(fd, KDSKBDIACRUC, (unsigned long)&kdcs)) {
        perror("ioctl");
        exit(1);
    }
}

static void
usage(void)
{
    fprintf(stderr, "usage: load_diacruc [TTY_DEVICE [INPUT_FILE]]\n");
    fprintf(stderr, "default tty device: /dev/tty1\n");
    fprintf(stderr, "default input file: standard input\n");
}

int
main(int argc, char** argv)
{
    FILE* fp = NULL;
    const char* tty;
    int fd;
    int num;
    struct kbdiacruc kdc[MAX_DIACR];

    switch (argc) {
    case 3:
        fp = fopen(argv[2], "r");
        if (fp == NULL) {
            perror(argv[2]);
            usage();
            exit(2);
        }
        tty = argv[1];
        break;
    case 2:
        fp = stdin;
        tty = argv[1];
        break;
    case 1:
        fp = stdin;
        tty = "/dev/tty1";
        break;
    default:
        usage();
        exit(2);
    }
    fd = open(tty, O_RDWR);
    if (fd < 0) {
        perror(tty);
        usage();
        exit(2);
    }
    num = read_compose_file(kdc, fp);
    stuff_diacruc(fd, num, kdc);
}

Attachment: compose-slavic.inc
Description: data file for compose definitions


-- 
Ian Zimmerman <[email protected]>
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Ham is for reading, not for eating.

--- End Message ---
--- Begin Message ---
Source: kbd
Source-Version: 1.15-2

We believe that the bug you reported is fixed in the latest version of
kbd, which is due to be installed in the Debian FTP archive:

kbd-udeb_1.15-2_i386.udeb
  to pool/main/k/kbd/kbd-udeb_1.15-2_i386.udeb
kbd_1.15-2.diff.gz
  to pool/main/k/kbd/kbd_1.15-2.diff.gz
kbd_1.15-2.dsc
  to pool/main/k/kbd/kbd_1.15-2.dsc
kbd_1.15-2_i386.deb
  to pool/main/k/kbd/kbd_1.15-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Schutte <[email protected]> (supplier of updated kbd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 24 Jul 2009 13:00:49 +0200
Source: kbd
Binary: kbd kbd-udeb
Architecture: source i386
Version: 1.15-2
Distribution: unstable
Urgency: low
Maintainer: Console utilities maintainers 
<[email protected]>
Changed-By: Michael Schutte <[email protected]>
Description: 
 kbd        - Linux console font and keytable utilities
 kbd-udeb   - Linux console keyboard setup utilities (udeb)
Closes: 399531 524057 524907 528357 532139 533065
Changes: 
 kbd (1.15-2) unstable; urgency=low
 .
   * Switch (back) to quilt, see debian/README.source.  TopGit is used to
     manage the patches on top of Git.
   * Revert the old read_keymaps_fmt patch to loadkeys/dumpkeys (auto-converts
     between K(KTYP, KVAL) and Unicode keysyms depending on the console mode)
     and replace it with a new one which has been merged upstream.  See #251550
     for an earlier discussion, closes: #524057.
   * Bump Standards-Version to 3.8.2.
   * Support Unicode compose tables, closes: #524907.
   * Save cat-id-tbl.c, analyze.c, loadkeys.c when building and restore them in
     debian/rules clean.
   * showconsolefont: Print adequate space chars, closes: #528357.  On recent
     kernels a direct-to-font space is needed if the console is in Unicode
     mode.
   * console-screen.kbd.sh: Slightly rephrase evals to avoid quirks in Vim’s
     syntax highlighting.  Remove the “kill -NAL” XSI-ism and replace it with
     “kill -s NAL”.
   * console-screen.kbd.sh: Mention console-setup when font setup is deferred,
     closes: #532139.
   * Update the information regarding hardwired scancode ranges in the
     setkeycodes(8) manpage, closes: #399531.  They don’t exist in recent
     kernels.
   * Replace “-” (hyphen) by “\-” (ASCII minus sign) in some manpages where
     command line options are mentioned.
   * Add support for Brl_dot9 and Brl_dot10, closes: #533065.  These keysyms
     are supported by Linux >= 2.6.23.  Thanks to Samuel Thibault
     <[email protected]> for the patch.
Checksums-Sha1: 
 74f42e55222418efb2083d6964111f30baf467e1 1214 kbd_1.15-2.dsc
 1718354ae585ed788ee99e78578ed1e9c2bf6c60 40584 kbd_1.15-2.diff.gz
 2dd83b39b79b47b0ff20dc5253329884a3b866e0 415322 kbd_1.15-2_i386.deb
 992ffd875b6311e24ff2dcc47aae6be64344f1de 48148 kbd-udeb_1.15-2_i386.udeb
Checksums-Sha256: 
 9478f83da487ea1234ef3855840c7db09397fd4ac67dacd3ff006e78b4b37f4c 1214 
kbd_1.15-2.dsc
 825204820736c963b68095ae95c678d186da9c667e0d8b6a4d3531cb971091a2 40584 
kbd_1.15-2.diff.gz
 8b05452b4ffc2e28470adca48f34cfe9d86c0dd4bf7c8822a00afd3907dee9fb 415322 
kbd_1.15-2_i386.deb
 f2513ab2141876fb97809bcddba4c2960866bc332439a2d6d2644a371f5184fb 48148 
kbd-udeb_1.15-2_i386.udeb
Files: 
 420c118b41e7c7df1a2a4ea0ec1d50d3 1214 utils extra kbd_1.15-2.dsc
 b8d6392fa4196fe39dfa066b232e624e 40584 utils extra kbd_1.15-2.diff.gz
 a8d63b7b73ca72a5462e743dfc2592a1 415322 utils extra kbd_1.15-2_i386.deb
 ed790da427ba8f9a427089dea0ab14f1 48148 debian-installer extra 
kbd-udeb_1.15-2_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFKacErJP1eZJv0KwcRAna4AJ9aDJ6k2ChEl4D3bgxq2IrE3w5RfQCdGaAT
yR1EFXOeufqmzBSRldbyuRg=
=lB6s
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to