Bug 101845 - setxkbmap 1.3.1 Couldn't find configuration file
Summary: setxkbmap 1.3.1 Couldn't find configuration file
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/setxkbmap (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-19 18:03 UTC by Bodo Thiesen
Modified: 2019-06-09 18:56 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bodo Thiesen 2017-07-19 18:03:09 UTC
When I try to use my own created config file, despite it existing and setxkbmap actually opening and reading from it, it claims the file to be not existing:

# strace setxkbmap -config $FILE [...]
[...]
open("$FILE", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=31423, ...}) = 0
read(4, "$CONTENT"..., 2048) = 2048
close(4)                                = 0
write(2, "Couldn't find configuration file "$FILE""..., 96) = 96
exit_group(-3)                          = ?
+++ exited with 253 +++
#
Comment 1 Sergey V. Udaltsov 2017-07-19 20:11:39 UTC
setxkbmap utility does not belong to xkeyboard-config
Comment 2 Bodo Thiesen 2017-07-20 00:48:23 UTC
Quote from Alan Coopersmith in another bug report:
| Fortunately, since xkeyboard-config and X.Org are both hosted in the same
| bugzilla instance, we can reassign the bug instead of having to close it
| and file a new one in the right place.
Comment 3 Peter Hutterer 2017-07-24 05:19:02 UTC
I'm gonna need something more reproducible please. What's the file and where did you install it, what commands do you run to read it, etc.
Comment 4 Bodo Thiesen 2017-07-26 01:37:46 UTC
Actually, I provided all information: The file is there, got successfully opened and read from and THEN the program claims the file not to exist. This is a bug, where all those things don't matter:

* location of the file
* content of the file.

However, since you actually asked for a reproducible way, I give you a step by step way to reproduce the problem:

$ cd /tmp # Directory doesn't really matter, so let's take this one
% echo "xkb_keymap {" > existing-file && setxkbmap -config existing-file 
Couldn't find configuration file "existing-file"
$ echo "xkb_symbols {" > existing-file && setxkbmap -config existing-file
Couldn't find configuration file "existing-file"
$ ls -l existing-file
-rw-r--r-- 1 user group 13 26. Jul 03:32 existing-file
$ 

Adding strace reveals, that the file is actually opened and read prior to the output of that error message like in the initial report.
Comment 5 GitLab Migration User 2018-08-10 20:28:22 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/setxkbmap/issues/3.
Comment 6 Alan Coopersmith 2019-06-09 18:56:39 UTC
Fixed, thanks for the report:
https://gitlab.freedesktop.org/xorg/app/setxkbmap/commit/7e74a1d3d443df68a1a4be9ccce7439462c1531a


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.