* [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
@ 2025-07-27 12:18 gevisz
2025-07-27 13:02 ` Michael
2025-07-27 13:06 ` Dale
0 siblings, 2 replies; 17+ messages in thread
From: gevisz @ 2025-07-27 12:18 UTC (permalink / raw
To: gentoo-user
On July 25, 2025 my custom keyboard layout files located
in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
during system despite the fact that they were config-protected:
# emerge --info | grep CONFIG_PROTECT
CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
/usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
/etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
/etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
/etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
ChatGPT says to me that it was done when
x11-misc/xkeyboard-config-2.45-r1 was updated.
I do not use etc-update or dispatch-conf, and there were no ._cfg*
files left behind — the overwrite happened silently.
After examining the ebuild, ChatGPT noticed that src_install() uses
meson_src_install,
and then moves the entire installed /usr/share/X11/xkb tree to
/usr/share/X11/xkb.workaround/
as a workaround for bug #957712. In pkg_preinst(), that tree is then
forcibly moved back to /usr/share/X11/xkb, overwriting any existing
files.
This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
as pkg_preinst()
runs before Portage has a chance to apply config file protection.
While I understand the intention behind the workaround, the result was
a total loss of my custom layout files,
despite explicitly protecting the directory. I’ve been using Gentoo
for 12 years, and I have never been so
disappointed by the Gentoo as I was when this happened to say the least.
Is there a Gentoo-compliant way to preserve customized layouts that
replace system-provided ones under such circumstances?
Thanks in advance for any suggestions or guidance.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 12:18 [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols) gevisz
@ 2025-07-27 13:02 ` Michael
2025-07-27 13:39 ` gevisz
2025-07-27 13:06 ` Dale
1 sibling, 1 reply; 17+ messages in thread
From: Michael @ 2025-07-27 13:02 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 3242 bytes --]
On Sunday, 27 July 2025 13:18:34 British Summer Time gevisz wrote:
> On July 25, 2025 my custom keyboard layout files located
> in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
> during system despite the fact that they were config-protected:
> # emerge --info | grep CONFIG_PROTECT
> CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
> /usr/share/gnupg/qualified.txt"
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
> /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
> /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
> /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
>
> ChatGPT says to me that it was done when
> x11-misc/xkeyboard-config-2.45-r1 was updated.
>
> I do not use etc-update or dispatch-conf, and there were no ._cfg*
> files left behind — the overwrite happened silently.
>
> After examining the ebuild, ChatGPT noticed that src_install() uses
> meson_src_install,
> and then moves the entire installed /usr/share/X11/xkb tree to
> /usr/share/X11/xkb.workaround/
> as a workaround for bug #957712. In pkg_preinst(), that tree is then
> forcibly moved back to /usr/share/X11/xkb, overwriting any existing
> files.
>
> This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
> as pkg_preinst()
> runs before Portage has a chance to apply config file protection.
>
> While I understand the intention behind the workaround, the result was
> a total loss of my custom layout files,
> despite explicitly protecting the directory. I’ve been using Gentoo
> for 12 years, and I have never been so
> disappointed by the Gentoo as I was when this happened to say the least.
>
> Is there a Gentoo-compliant way to preserve customized layouts that
> replace system-provided ones under such circumstances?
>
> Thanks in advance for any suggestions or guidance.
The offending lines in /var/db/repos/gentoo/x11-misc/xkeyboard-config/
xkeyboard-config-2.45-r1.ebuild are:
====================================
...
68 src_install() {
69 meson_src_install
70
71 # Workaround for portage's collision checks, see pkg_preinst (bug
#957712)
72 mv "${ED}"/usr/share/X11/xkb{,.workaround} || die
73 }
74
75 pkg_preinst() { 76 # Avoid touching EROOT if not needed, and use
-f just-in-case anyway
77 if [[ -d ${EROOT}/usr/share/X11/xkb && ! -L ${EROOT}/usr/share/
X11/xkb ]]; then
78 rm -rf "${EROOT}"/usr/share/X11/xkb || die
79 fi
80 mv "${ED}"/usr/share/X11/xkb{.workaround,} || die
81 }
==============
I suggest you re-open this bug[1], because its workaround may have been
somewhat inconsiderate as to potential impacts.
However, unlike files in /etc/ subdirectories, files under /usr/share/ are
generally expected to be overwritten by package updates. I see the wiki[2]
suggests to create/edit files in place for custom keyboard layouts, but I
wonder if it would have been safer for a symlink pointing to /etc where custom
xkb config files could be stored more safely.
[1] https://bugs.gentoo.org/957712
[2] https://wiki.gentoo.org/wiki/Keyboard_layout_switching
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 13:02 ` Michael
@ 2025-07-27 13:39 ` gevisz
0 siblings, 0 replies; 17+ messages in thread
From: gevisz @ 2025-07-27 13:39 UTC (permalink / raw
To: gentoo-user
вс, 27 июл. 2025 г. в 16:03, Michael <confabulate@kintzios.com>:
>
> On Sunday, 27 July 2025 13:18:34 British Summer Time gevisz wrote:
> > On July 25, 2025 my custom keyboard layout files located
> > in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
> > during system despite the fact that they were config-protected:
> > # emerge --info | grep CONFIG_PROTECT
> > CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
> > /usr/share/gnupg/qualified.txt"
> > CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
> > /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
> > /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
> > /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
> >
> > ChatGPT says to me that it was done when
> > x11-misc/xkeyboard-config-2.45-r1 was updated.
> >
> > I do not use etc-update or dispatch-conf, and there were no ._cfg*
> > files left behind — the overwrite happened silently.
> >
> > After examining the ebuild, ChatGPT noticed that src_install() uses
> > meson_src_install,
> > and then moves the entire installed /usr/share/X11/xkb tree to
> > /usr/share/X11/xkb.workaround/
> > as a workaround for bug #957712. In pkg_preinst(), that tree is then
> > forcibly moved back to /usr/share/X11/xkb, overwriting any existing
> > files.
> >
> > This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
> > as pkg_preinst()
> > runs before Portage has a chance to apply config file protection.
> >
> > While I understand the intention behind the workaround, the result was
> > a total loss of my custom layout files,
> > despite explicitly protecting the directory. I’ve been using Gentoo
> > for 12 years, and I have never been so
> > disappointed by the Gentoo as I was when this happened to say the least.
> >
> > Is there a Gentoo-compliant way to preserve customized layouts that
> > replace system-provided ones under such circumstances?
> >
> > Thanks in advance for any suggestions or guidance.
>
> The offending lines in /var/db/repos/gentoo/x11-misc/xkeyboard-config/
> xkeyboard-config-2.45-r1.ebuild are:
> ====================================
> ...
> 68 src_install() {
> 69 meson_src_install
> 70
> 71 # Workaround for portage's collision checks, see pkg_preinst (bug
> #957712)
> 72 mv "${ED}"/usr/share/X11/xkb{,.workaround} || die
> 73 }
> 74
> 75 pkg_preinst() { 76 # Avoid touching EROOT if not needed, and use
> -f just-in-case anyway
> 77 if [[ -d ${EROOT}/usr/share/X11/xkb && ! -L ${EROOT}/usr/share/
> X11/xkb ]]; then
> 78 rm -rf "${EROOT}"/usr/share/X11/xkb || die
> 79 fi
> 80 mv "${ED}"/usr/share/X11/xkb{.workaround,} || die
> 81 }
> ==============
>
> I suggest you re-open this bug[1], because its workaround may have been
> somewhat inconsiderate as to potential impacts.
Yes, I have opened the bug https://bugs.gentoo.org/960773
> However, unlike files in /etc/ subdirectories, files under /usr/share/ are
> generally expected to be overwritten by package updates. I see the wiki[2]
> suggests to create/edit files in place for custom keyboard layouts, but I
> wonder if it would have been safer for a symlink pointing to /etc where custom
> xkb config files could be stored more safely.
Yes, to symlink the custom keyboard configuration files somewhere
seems to be the best idea so far. Thank you.
> [1] https://bugs.gentoo.org/957712
> [2] https://wiki.gentoo.org/wiki/Keyboard_layout_switching
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 12:18 [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols) gevisz
2025-07-27 13:02 ` Michael
@ 2025-07-27 13:06 ` Dale
2025-07-27 13:24 ` Dale
2025-07-27 13:41 ` gevisz
1 sibling, 2 replies; 17+ messages in thread
From: Dale @ 2025-07-27 13:06 UTC (permalink / raw
To: gentoo-user
gevisz wrote:
> On July 25, 2025 my custom keyboard layout files located
> in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
> during system despite the fact that they were config-protected:
> # emerge --info | grep CONFIG_PROTECT
> CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
> /usr/share/gnupg/qualified.txt"
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
> /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
> /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
> /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
>
> ChatGPT says to me that it was done when
> x11-misc/xkeyboard-config-2.45-r1 was updated.
>
> I do not use etc-update or dispatch-conf, and there were no ._cfg*
> files left behind — the overwrite happened silently.
>
> After examining the ebuild, ChatGPT noticed that src_install() uses
> meson_src_install,
> and then moves the entire installed /usr/share/X11/xkb tree to
> /usr/share/X11/xkb.workaround/
> as a workaround for bug #957712. In pkg_preinst(), that tree is then
> forcibly moved back to /usr/share/X11/xkb, overwriting any existing
> files.
>
> This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
> as pkg_preinst()
> runs before Portage has a chance to apply config file protection.
>
> While I understand the intention behind the workaround, the result was
> a total loss of my custom layout files,
> despite explicitly protecting the directory. I’ve been using Gentoo
> for 12 years, and I have never been so
> disappointed by the Gentoo as I was when this happened to say the least.
>
> Is there a Gentoo-compliant way to preserve customized layouts that
> replace system-provided ones under such circumstances?
>
> Thanks in advance for any suggestions or guidance.
>
I'm no guru at this but in the past, when something in a config file in
/usr needs to be changed, there is usually a place in /etc to put the
settings. Software looks in /usr first for default settings then looks
in /etc for custom user settings. The config in /etc overrides the
settings in /usr.
If it were me, I'd find out if you can put those settings in /etc
somewhere. Odds are, that is where they should be. I'd suspect they
would go in the /etc/X11/ directory somewhere. Also, /etc is routinely
updated and the config protect seems to work well there. Might solve
that problem.
Just a thought.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 13:06 ` Dale
@ 2025-07-27 13:24 ` Dale
2025-07-27 13:41 ` gevisz
1 sibling, 0 replies; 17+ messages in thread
From: Dale @ 2025-07-27 13:24 UTC (permalink / raw
To: gentoo-user
Dale wrote:
> gevisz wrote:
>> On July 25, 2025 my custom keyboard layout files located
>> in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
>> during system despite the fact that they were config-protected:
>> # emerge --info | grep CONFIG_PROTECT
>> CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
>> /usr/share/gnupg/qualified.txt"
>> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
>> /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
>> /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
>> /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
>>
>> ChatGPT says to me that it was done when
>> x11-misc/xkeyboard-config-2.45-r1 was updated.
>>
>> I do not use etc-update or dispatch-conf, and there were no ._cfg*
>> files left behind — the overwrite happened silently.
>>
>> After examining the ebuild, ChatGPT noticed that src_install() uses
>> meson_src_install,
>> and then moves the entire installed /usr/share/X11/xkb tree to
>> /usr/share/X11/xkb.workaround/
>> as a workaround for bug #957712. In pkg_preinst(), that tree is then
>> forcibly moved back to /usr/share/X11/xkb, overwriting any existing
>> files.
>>
>> This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
>> as pkg_preinst()
>> runs before Portage has a chance to apply config file protection.
>>
>> While I understand the intention behind the workaround, the result was
>> a total loss of my custom layout files,
>> despite explicitly protecting the directory. I’ve been using Gentoo
>> for 12 years, and I have never been so
>> disappointed by the Gentoo as I was when this happened to say the least.
>>
>> Is there a Gentoo-compliant way to preserve customized layouts that
>> replace system-provided ones under such circumstances?
>>
>> Thanks in advance for any suggestions or guidance.
>>
> I'm no guru at this but in the past, when something in a config file in
> /usr needs to be changed, there is usually a place in /etc to put the
> settings. Software looks in /usr first for default settings then looks
> in /etc for custom user settings. The config in /etc overrides the
> settings in /usr.
>
> If it were me, I'd find out if you can put those settings in /etc
> somewhere. Odds are, that is where they should be. I'd suspect they
> would go in the /etc/X11/ directory somewhere. Also, /etc is routinely
> updated and the config protect seems to work well there. Might solve
> that problem.
>
> Just a thought.
>
> Dale
>
> :-) :-)
>
My first searches didn't turn up anything. I started adding some
keywords until I think I found something that might help.
https://xkbcommon.org/doc/current/user-configuration.html
Scroll down to Data locations. Option two is no longer to be used but
option 1, 3 and 4 might be good ideas to try. I think number one is for
individual user settings and the other two are more system wide,
requires root to change.
I hope that helps. I to would hate to lose some of my config files. I
have backups but still, don't want to lose them anyway.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 13:06 ` Dale
2025-07-27 13:24 ` Dale
@ 2025-07-27 13:41 ` gevisz
2025-07-27 14:47 ` Dale
1 sibling, 1 reply; 17+ messages in thread
From: gevisz @ 2025-07-27 13:41 UTC (permalink / raw
To: gentoo-user
вс, 27 июл. 2025 г. в 16:07, Dale <rdalek1967@gmail.com>:
>
> gevisz wrote:
> > On July 25, 2025 my custom keyboard layout files located
> > in /usr/share/X11/xkb/symbols/ were unexpectedly overwritten
> > during system despite the fact that they were config-protected:
> > # emerge --info | grep CONFIG_PROTECT
> > CONFIG_PROTECT="/etc /usr/share/X11/xkb/symbols/ /usr/share/config
> > /usr/share/gnupg/qualified.txt"
> > CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d
> > /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
> > /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d
> > /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
> >
> > ChatGPT says to me that it was done when
> > x11-misc/xkeyboard-config-2.45-r1 was updated.
> >
> > I do not use etc-update or dispatch-conf, and there were no ._cfg*
> > files left behind — the overwrite happened silently.
> >
> > After examining the ebuild, ChatGPT noticed that src_install() uses
> > meson_src_install,
> > and then moves the entire installed /usr/share/X11/xkb tree to
> > /usr/share/X11/xkb.workaround/
> > as a workaround for bug #957712. In pkg_preinst(), that tree is then
> > forcibly moved back to /usr/share/X11/xkb, overwriting any existing
> > files.
> >
> > This manual move bypasses Portage’s CONFIG_PROTECT mechanism entirely,
> > as pkg_preinst()
> > runs before Portage has a chance to apply config file protection.
> >
> > While I understand the intention behind the workaround, the result was
> > a total loss of my custom layout files,
> > despite explicitly protecting the directory. I’ve been using Gentoo
> > for 12 years, and I have never been so
> > disappointed by the Gentoo as I was when this happened to say the least.
> >
> > Is there a Gentoo-compliant way to preserve customized layouts that
> > replace system-provided ones under such circumstances?
> >
> > Thanks in advance for any suggestions or guidance.
> >
>
> I'm no guru at this but in the past, when something in a config file in
> /usr needs to be changed, there is usually a place in /etc to put the
> settings. Software looks in /usr first for default settings then looks
> in /etc for custom user settings. The config in /etc overrides the
> settings in /usr.
>
> If it were me, I'd find out if you can put those settings in /etc
> somewhere. Odds are, that is where they should be. I'd suspect they
> would go in the /etc/X11/ directory somewhere. Also, /etc is routinely
> updated and the config protect seems to work well there. Might solve
> that problem.
Thank you for this and the next your suggestion.
Probably, I will symlink my custom keyboard layout files there.
> Just a thought.
>
> Dale
>
> :-) :-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 13:41 ` gevisz
@ 2025-07-27 14:47 ` Dale
2025-07-27 15:01 ` gevisz
0 siblings, 1 reply; 17+ messages in thread
From: Dale @ 2025-07-27 14:47 UTC (permalink / raw
To: gentoo-user
gevisz wrote:
> Thank you for this and the next your suggestion.
> Probably, I will symlink my custom keyboard layout files there.
I think the reply on the bug gave a clue. Your user files should be in
/etc/xkb. Given that reply should work with Gentoo, I'd try that
first. If that doesn't work, maybe try the info in the link I shared
earlier. I'm not sure linking is the right way either. It might mess
up a link as well by renaming something and breaking the link or some
other method one wouldn't expect. I'd try putting the files somewhere
in /etc and then test it to see if it sees your config and works like it
should. You should be safe if that works.
My fingers are awful today. I'm about to wear the print off my
backspace key. After proofing three times, I hope this email makes
sense still. :/
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 14:47 ` Dale
@ 2025-07-27 15:01 ` gevisz
2025-07-27 15:24 ` gevisz
0 siblings, 1 reply; 17+ messages in thread
From: gevisz @ 2025-07-27 15:01 UTC (permalink / raw
To: gentoo-user
If leaving my custom keyboard layout files in /etc/xkb directory will
work, it will suit my needs.
I just wonder if it should be /etc/xkb/symbols/ directory or just
/etc/xkb directory to place a keyboard layout file like "us", for
example.
вс, 27 июл. 2025 г. в 17:49, Dale <rdalek1967@gmail.com>:
>
> gevisz wrote:
> > Thank you for this and the next your suggestion.
> > Probably, I will symlink my custom keyboard layout files there.
>
>
> I think the reply on the bug gave a clue. Your user files should be in
> /etc/xkb. Given that reply should work with Gentoo, I'd try that
> first. If that doesn't work, maybe try the info in the link I shared
> earlier. I'm not sure linking is the right way either. It might mess
> up a link as well by renaming something and breaking the link or some
> other method one wouldn't expect. I'd try putting the files somewhere
> in /etc and then test it to see if it sees your config and works like it
> should. You should be safe if that works.
>
> My fingers are awful today. I'm about to wear the print off my
> backspace key. After proofing three times, I hope this email makes
> sense still. :/
>
> Dale
>
> :-) :-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 15:01 ` gevisz
@ 2025-07-27 15:24 ` gevisz
2025-07-27 15:32 ` Dale
2025-07-27 23:57 ` gevisz
0 siblings, 2 replies; 17+ messages in thread
From: gevisz @ 2025-07-27 15:24 UTC (permalink / raw
To: gentoo-user
Ionen Wolkens replied that it should be /etc/xkb/symbols/ directory.
I will try it. If it does not work, I will copy my custom keyboard
configuration files from there manually.
вс, 27 июл. 2025 г. в 18:01, gevisz <gevisz@gmail.com>:
>
> If leaving my custom keyboard layout files in /etc/xkb directory will
> work, it will suit my needs.
>
> I just wonder if it should be /etc/xkb/symbols/ directory or just
> /etc/xkb directory to place a keyboard layout file like "us", for
> example.
>
> вс, 27 июл. 2025 г. в 17:49, Dale <rdalek1967@gmail.com>:
> >
> > gevisz wrote:
> > > Thank you for this and the next your suggestion.
> > > Probably, I will symlink my custom keyboard layout files there.
> >
> >
> > I think the reply on the bug gave a clue. Your user files should be in
> > /etc/xkb. Given that reply should work with Gentoo, I'd try that
> > first. If that doesn't work, maybe try the info in the link I shared
> > earlier. I'm not sure linking is the right way either. It might mess
> > up a link as well by renaming something and breaking the link or some
> > other method one wouldn't expect. I'd try putting the files somewhere
> > in /etc and then test it to see if it sees your config and works like it
> > should. You should be safe if that works.
> >
> > My fingers are awful today. I'm about to wear the print off my
> > backspace key. After proofing three times, I hope this email makes
> > sense still. :/
> >
> > Dale
> >
> > :-) :-)
> >
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 15:24 ` gevisz
@ 2025-07-27 15:32 ` Dale
2025-07-27 15:40 ` gevisz
2025-07-27 23:57 ` gevisz
1 sibling, 1 reply; 17+ messages in thread
From: Dale @ 2025-07-27 15:32 UTC (permalink / raw
To: gentoo-user
gevisz wrote:
> Ionen Wolkens replied that it should be /etc/xkb/symbols/ directory.
> I will try it. If it does not work, I will copy my custom keyboard
> configuration files from there manually.
Given the source for the info posted by Ionen, I'd go with that. It
should apply to Gentoo. Some of the info I found may apply to other
distros and not so much to Gentoo. As Ionen pointed out tho, it isn't
well documented which explains why the info is hard to find.
I might add, most all config files in /usr are the default and will
likely be overwritten. Custom config files should almost always either
be somewhere in /home if for a user or in /etc if system wide. As far
as I know, it has always been that way. So, if you have other custom
config files in /usr, I'd either make sure I have backup copies or find
out where they should be located to prevent being overwritten.
I'm not much but glad to have helped. :-D
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 15:32 ` Dale
@ 2025-07-27 15:40 ` gevisz
0 siblings, 0 replies; 17+ messages in thread
From: gevisz @ 2025-07-27 15:40 UTC (permalink / raw
To: gentoo-user
вс, 27 июл. 2025 г. в 18:33, Dale <rdalek1967@gmail.com>:
>
> gevisz wrote:
> > Ionen Wolkens replied that it should be /etc/xkb/symbols/ directory.
> > I will try it. If it does not work, I will copy my custom keyboard
> > configuration files from there manually.
>
>
> Given the source for the info posted by Ionen, I'd go with that. It
> should apply to Gentoo. Some of the info I found may apply to other
> distros and not so much to Gentoo. As Ionen pointed out tho, it isn't
> well documented which explains why the info is hard to find.
>
> I might add, most all config files in /usr are the default and will
> likely be overwritten. Custom config files should almost always either
> be somewhere in /home if for a user or in /etc if system wide. As far
> as I know, it has always been that way. So, if you have other custom
> config files in /usr, I'd either make sure I have backup copies or find
> out where they should be located to prevent being overwritten.
No, I don't have any other custom config files in /usr.
The problem, however, lies in that that the same custom keyboard
layout files placed in /usr/share/X11/xkb/symbols/ have been preserved
by portage at least for the last 8 years, until 25.07.2025. :(
> I'm not much but glad to have helped. :-D
Yes it helped, thank you.
> Dale
>
> :-) :-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 15:24 ` gevisz
2025-07-27 15:32 ` Dale
@ 2025-07-27 23:57 ` gevisz
2025-07-28 0:35 ` James Cloos
` (3 more replies)
1 sibling, 4 replies; 17+ messages in thread
From: gevisz @ 2025-07-27 23:57 UTC (permalink / raw
To: gentoo-user
вс, 27 июл. 2025 г. в 18:24, gevisz <gevisz@gmail.com>:
>
> Ionen Wolkens replied that it should be /etc/xkb/symbols/ directory.
> I will try it. If it does not work, I will copy my custom keyboard
> configuration files from there manually.
I have just checked: my Gentoo system ignores my custom
keyboard layout configuration files that I have put into the
/etc/xkb/symbols/ directory. For me, it a failure of Gentoo to
meet its own specifications and common sense in general
because a rolling release definitely should preserve user-changed
configuration files.
> вс, 27 июл. 2025 г. в 18:01, gevisz <gevisz@gmail.com>:
> >
> > If leaving my custom keyboard layout files in /etc/xkb directory will
> > work, it will suit my needs.
> >
> > I just wonder if it should be /etc/xkb/symbols/ directory or just
> > /etc/xkb directory to place a keyboard layout file like "us", for
> > example.
> >
> > вс, 27 июл. 2025 г. в 17:49, Dale <rdalek1967@gmail.com>:
> > >
> > > gevisz wrote:
> > > > Thank you for this and the next your suggestion.
> > > > Probably, I will symlink my custom keyboard layout files there.
> > >
> > >
> > > I think the reply on the bug gave a clue. Your user files should be in
> > > /etc/xkb. Given that reply should work with Gentoo, I'd try that
> > > first. If that doesn't work, maybe try the info in the link I shared
> > > earlier. I'm not sure linking is the right way either. It might mess
> > > up a link as well by renaming something and breaking the link or some
> > > other method one wouldn't expect. I'd try putting the files somewhere
> > > in /etc and then test it to see if it sees your config and works like it
> > > should. You should be safe if that works.
> > >
> > > My fingers are awful today. I'm about to wear the print off my
> > > backspace key. After proofing three times, I hope this email makes
> > > sense still. :/
> > >
> > > Dale
> > >
> > > :-) :-)
> > >
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 23:57 ` gevisz
@ 2025-07-28 0:35 ` James Cloos
2025-07-28 0:44 ` Dale
2025-07-28 0:37 ` Dale
` (2 subsequent siblings)
3 siblings, 1 reply; 17+ messages in thread
From: James Cloos @ 2025-07-28 0:35 UTC (permalink / raw
To: gevisz; +Cc: gentoo-user
I just looked at the file /usr/lib64/libxkbcommon.so with strings(1).
(The src is better, but this was quicker.)
It includes these strings in succession:
,----
| Include path added: %s
| Include path failed: %s (%s)
| /etc/xkb
| XKB_CONFIG_EXTRA_PATH
| /usr/share/X11/xkb
| XKB_CONFIG_ROOT
| %s/xkb
| %s/.config/xkb
| %s/.xkb
| XKB_LOG_LEVEL
`----
So /etc/xkb ought to work. As ought ~/.xkb and ~/.config/xkb.
Ang you should be able to use the environmental variables (set them
before starting Xorg) XKB_CONFIG_EXTRA_PATH to add another path, or
XKB_CONFIG_ROOT to completely replace /usr/share/X11/xkb.
I also tried running:
,----
| strace xkbcli how-to-type --layout us U+0229|&fgrep /etc
`----
which invluded the line:
,----
| newfstatat(AT_FDCWD, "/etc/xkb", 0x7ffdcd70b0d0, 0) = -1 ENOENT (No such file or directory)
`----
which strongly suggests /etc/xkb is supported. At least by default.
Did anything show up in your /var/log/Xorg.0.log when you tried /etc/xkb?
-JimC
--
James Cloos <cloos@jhcloos.com>
OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-28 0:35 ` James Cloos
@ 2025-07-28 0:44 ` Dale
0 siblings, 0 replies; 17+ messages in thread
From: Dale @ 2025-07-28 0:44 UTC (permalink / raw
To: gentoo-user
James Cloos wrote:
> I just looked at the file /usr/lib64/libxkbcommon.so with strings(1).
>
> (The src is better, but this was quicker.)
>
> It includes these strings in succession:
>
> ,----
> | Include path added: %s
> | Include path failed: %s (%s)
> | /etc/xkb
> | XKB_CONFIG_EXTRA_PATH
> | /usr/share/X11/xkb
> | XKB_CONFIG_ROOT
> | %s/xkb
> | %s/.config/xkb
> | %s/.xkb
> | XKB_LOG_LEVEL
> `----
>
> So /etc/xkb ought to work. As ought ~/.xkb and ~/.config/xkb.
>
> Ang you should be able to use the environmental variables (set them
> before starting Xorg) XKB_CONFIG_EXTRA_PATH to add another path, or
> XKB_CONFIG_ROOT to completely replace /usr/share/X11/xkb.
>
> I also tried running:
>
> ,----
> | strace xkbcli how-to-type --layout us U+0229|&fgrep /etc
> `----
>
> which invluded the line:
>
> ,----
> | newfstatat(AT_FDCWD, "/etc/xkb", 0x7ffdcd70b0d0, 0) = -1 ENOENT (No such file or directory)
> `----
>
> which strongly suggests /etc/xkb is supported. At least by default.
>
> Did anything show up in your /var/log/Xorg.0.log when you tried /etc/xkb?
>
> -JimC
Could it be that it doesn't want a sub directory but to be in /etc/xkb
itself? I know most software supports that but maybe this one doesn't?
Just a thought.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 23:57 ` gevisz
2025-07-28 0:35 ` James Cloos
@ 2025-07-28 0:37 ` Dale
2025-07-28 0:41 ` James Cloos
2025-07-28 0:50 ` James Cloos
3 siblings, 0 replies; 17+ messages in thread
From: Dale @ 2025-07-28 0:37 UTC (permalink / raw
To: gentoo-user
gevisz wrote:
> вс, 27 июл. 2025 г. в 18:24, gevisz <gevisz@gmail.com>:
>> Ionen Wolkens replied that it should be /etc/xkb/symbols/ directory.
>> I will try it. If it does not work, I will copy my custom keyboard
>> configuration files from there manually.
> I have just checked: my Gentoo system ignores my custom
> keyboard layout configuration files that I have put into the
> /etc/xkb/symbols/ directory. For me, it a failure of Gentoo to
> meet its own specifications and common sense in general
> because a rolling release definitely should preserve user-changed
> configuration files.
There has to be a right place for those config files. Finding the place
might be a problem tho. Lack of documentation is the biggest problem.
I would try it directly in /etc/xkb. See if that works. If not, then I
would try a location similar to what it is in /usr only in /etc, or
maybe try it in /home. My thinking is this, if you put them in /usr
again, you could end up with them being overwritten again. I'd keep
testing to find where that place is to avoid problems in the future.
Oh, sometimes a file has to end in a certain way, like .conf for
example. If not, it won't apply it. That may be something else to look
into.
If you do find out where it goes, I'd post that info on the bug report.
It might get updated in the build process and others can find the info
as well. Save someone else some grief. Actually, it might be worth
posting on the bug report that those locations are not working. Could
be a bug.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 23:57 ` gevisz
2025-07-28 0:35 ` James Cloos
2025-07-28 0:37 ` Dale
@ 2025-07-28 0:41 ` James Cloos
2025-07-28 0:50 ` James Cloos
3 siblings, 0 replies; 17+ messages in thread
From: James Cloos @ 2025-07-28 0:41 UTC (permalink / raw
To: gevisz; +Cc: gentoo-user
And this is also illustrative:
xkbcli how-to-type --layout oo «
xkbcommon: ERROR: [XKB-338] Couldn't find file "symbols/oo" in include paths
xkbcommon: ERROR: [XKB-338] 1 include paths searched:
xkbcommon: ERROR: [XKB-338] /usr/share/X11/xkb
xkbcommon: ERROR: [XKB-338] 3 include paths could not be added:
xkbcommon: ERROR: [XKB-338] /home/cloos/.config/xkb
xkbcommon: ERROR: [XKB-338] /home/cloos/.xkb
xkbcommon: ERROR: [XKB-338] /etc/xkb
xkbcommon: ERROR: [XKB-769] Abandoning symbols file "(unnamed map)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: [XKB-822] Failed to compile keymap
ERROR: Failed to create XKB keymap
(oo chosen to be an intentional error, just to see what is reports.)
the 3 paths which could not be added are not extant here. if they were
they should get used.
-JimC
--
James Cloos <cloos@jhcloos.com>
OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
2025-07-27 23:57 ` gevisz
` (2 preceding siblings ...)
2025-07-28 0:41 ` James Cloos
@ 2025-07-28 0:50 ` James Cloos
3 siblings, 0 replies; 17+ messages in thread
From: James Cloos @ 2025-07-28 0:50 UTC (permalink / raw
To: gevisz; +Cc: gentoo-user
I just thought:
is it not working in somethnig like a gnome or kde application?
those so-called "desktop" environments might be doing their own thing
and ignoring the xkb library code. Even gtk or qt might do so.
it that is the case, one'd need to look in the src of such projects to
see what they support.
i'm only really up on the xorg stuff myself.
-JimC
--
James Cloos <cloos@jhcloos.com>
OpenPGP: https://jhcloos.com/0x997A9F17ED7DAEA6.asc
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-07-28 0:51 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-27 12:18 [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols) gevisz
2025-07-27 13:02 ` Michael
2025-07-27 13:39 ` gevisz
2025-07-27 13:06 ` Dale
2025-07-27 13:24 ` Dale
2025-07-27 13:41 ` gevisz
2025-07-27 14:47 ` Dale
2025-07-27 15:01 ` gevisz
2025-07-27 15:24 ` gevisz
2025-07-27 15:32 ` Dale
2025-07-27 15:40 ` gevisz
2025-07-27 23:57 ` gevisz
2025-07-28 0:35 ` James Cloos
2025-07-28 0:44 ` Dale
2025-07-28 0:37 ` Dale
2025-07-28 0:41 ` James Cloos
2025-07-28 0:50 ` James Cloos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox