From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols)
Date: Sun, 27 Jul 2025 08:06:12 -0500 [thread overview]
Message-ID: <4b33c8db-676f-12ea-b9ba-da08d8e82849@gmail.com> (raw)
In-Reply-To: <CA+t6X7d+=Zw8GvYZ_YR=5Pg=YMKcD48E2bcirvgEcpxv59ffjg@mail.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.
Just a thought.
Dale
:-) :-)
next prev parent reply other threads:[~2025-07-27 13:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b33c8db-676f-12ea-b9ba-da08d8e82849@gmail.com \
--to=rdalek1967@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox