NetBSD Problem Report #44456

From rhialto@falu.nl  Tue Jan 25 00:56:43 2011
Return-Path: <rhialto@falu.nl>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id C538063B873
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Jan 2011 00:56:42 +0000 (UTC)
Message-Id: <201101250056.p0P0ucnB005750@radl.falu.nl>
Date: Tue, 25 Jan 2011 01:56:38 +0100 (CET)
From: rhialto@falu.nl
Reply-To: rhialto@falu.nl
To: gnats-bugs@gnats.NetBSD.org
Cc: rhialto@falu.nl
Subject: /usr/X11R7/lib/X11/xkb/compiled should be empty directory
X-Send-Pr-Version: 3.95

>Number:         44456
>Category:       xsrc
>Synopsis:       /usr/X11R7/lib/X11/xkb/compiled should be empty directory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 25 01:00:00 +0000 2011
>Closed-Date:    Mon Mar 14 05:51:46 +0000 2022
>Last-Modified:  Mon Mar 14 05:51:46 +0000 2022
>Originator:     Rhialto
>Release:        NetBSD 5.1
>Organization:

>Environment:


System: NetBSD radl.falu.nl 5.1 NetBSD 5.1 (Radl-s_Pervasion_of_the_Incorrect_Chord) #0: Mon Jan 24 20:25:13 CET 2011 root@vargaz.falu.nl:/usr/src/sys/arch/amd64/compile/RADL5.1 amd64
Architecture: x86_64
Machine: amd64
>Description:
	/usr/X11R7/lib/X11/xkb/compiled should be empty directory

	I had re-extracted the X tarballs from NetBSD/amd64 5.0.1.
	Then I had problems with xkb keyboard options and layouts
	(meaning: they failed to work at all).
	After some hair-pulling, while comparing with a backup of a
	previously working installation, I discovered that I didn't have
	the directory /usr/X11R7/lib/X11/xkb/compiled.

	I looked in the tarballs of some previous releases. This is what
	I found:

	4.0: present (as X11R6), with a README inside
	5.0: missing
	5.0.1: missing
	5.1: bad symlink: ./usr/X11R7/lib/X11/xkb/compiled ->
	    /usr/X11R7/lib/X11/xkb. It is bad for multiple reasons:
	    - absolute path, where relative is better;
	    - points to existing directory, which is bad for access
	      control, and any files created in it may clash with the
	      files that are already present.

	This make the 4.0 release the last one that had it right.
	The README explains:

	    The X server uses this directory to store the compiled version of the
	    current keymap and/or any scratch keymaps used by clients.  The X server
	    or some other tool might destroy or replace the files in this directory,
	    so it is not a safe place to store compiled keymaps for long periods of
	    time.  The default keymap for any server is usually stored in:
		X<num>-default.xkm
	    where <num> is the display number of the server in question, which makes
	    it possible for several servers *on the same host* to share the same 
	    directory.

	    Unless the X server is modified, sharing this directory between servers on
	    different hosts could cause problems.


>How-To-Repeat:
	re-extract x*.tgz tarballs from distribution
>Fix:
	# rm /usr/X11R7/lib/X11/xkb/compiled
	# mkdir /usr/X11R7/lib/X11/xkb/compiled

	Add something to LAST_MINUTE.txt.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- There's no point being grown-up if you 
\X/ rhialto/at/xs4all.nl    -- can't be childish sometimes. -The 4th Doctor

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: xsrc-manager->mrg
Responsible-Changed-By: mrg@NetBSD.org
Responsible-Changed-When: Tue, 25 Jan 2011 07:33:42 +0000
Responsible-Changed-Why:
argh, i thought i had this fixed.  it is supposed to point to something in
/var, not forcing /usr to being writeable.

i'll see what is up.  thanks for the PR.


State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Mon, 14 Mar 2022 05:51:46 +0000
State-Changed-Why:
this is now a symlink to /var/db/xkb (defaults to empty dir)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.