From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8D11215808A for ; Sun, 27 Jul 2025 13:43:00 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 71BC9341F62 for ; Sun, 27 Jul 2025 13:43:00 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 834B011056B; Sun, 27 Jul 2025 13:41:56 +0000 (UTC) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 4E6251102A2 for ; Sun, 27 Jul 2025 13:41:55 +0000 (UTC) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-236377f00a1so31202625ad.3 for ; Sun, 27 Jul 2025 06:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753623714; x=1754228514; darn=lists.gentoo.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AHAxEaaa4HYQzV0tr296IrGIuXo8BVUiaioJZhWGLN8=; b=JggHWSs9a5gQOcd+t1da517HJ9K+WPjwl812TF37NaXa+3iDQDwGooSRRf6777GMsp 2ct45wP+RoqybG2KaJLDB8ss0pMknZHJvRjQwz/3HDTvrbC+VlSD6t7UT/kOwTtdcyBm P5qsD8J098WEERTc7jy8BG/LRR56ONnIdUVlXdDoTPRgAZFfQ8/vua0p5swhz4N5OyCG DYu1BzjuYb79HSUze7ehDAJ05Pm1ZXMKvevEfQitlif7QE+1IeAfSBy2QSQAge1yhtkz kfovi0Lx13u8H6zTowqJYl7KdmNUjOBB92SMKJpTSfiX2R5TBQiLp9A8lRDkemEXZu1d lsnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753623714; x=1754228514; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AHAxEaaa4HYQzV0tr296IrGIuXo8BVUiaioJZhWGLN8=; b=iVZJW+zlI8iO40EhaTs1XNGNVXWIxHXV8JoeuqX60rIvnh0S8A5X9PzNmePVsX5/yK nvf9unnAZxDt3ODWbkXIyMrKXFBtoLZpp5bfOAqqQo+gmAt1lu/ANGQZ+2Glyj4S71uf 2/5KLTRpUxqGAxfRVMXJjHe11PAUElfAhx+KAalQcWijScDI1K60EVM05HqjuG6radf1 Lnw9WexM0tttIvJi+1Ft7BUxwRYdy7+s9zOTXSoSCyphV/RIw03M/yLA8l/EIHDDAW3d tcIPQW3h+gQnYS6Hu5/f7YhubX0IIsfZsgJVvHdKwbTZWK9Q3DaMkN+OUhwoIJaXIvr5 EY3w== X-Gm-Message-State: AOJu0YzROf4IE4Q1MQkA2iGi0OkhCQCuBEN2hEabeTIRvm/dahmfJ4S8 rigzaZnOWUnCs1Xtdfb+L0V1gR2QCdf4xHsf2EpHp9cDFfNq8GJPG3kXD6Ve+NOc22LlsMSiHj9 5BUWBceVfbCKsgV64MjU84raiOjcJFnm50Q== X-Gm-Gg: ASbGncuDkDMTaWh1xTP8L3l4XRD5I5vpwOkTRfaE82YQtlMN+TKoJK24M6nMXQ9ihUR FKKH7kC+EwQ7+nC64CXC0xJT5PgbBb/XkZ+ri5O+F2BMnE1H7mOOIPsWX6sAiCfJYnd36Pihvvo hTmLfvUz3sHH2gVCekHTkH2GcxWzptG3ovHSDkclmDiBfLc1qm0CyJKpF8QkjSCFmKkC6bRlQF/ TuPCPXyUg== X-Google-Smtp-Source: AGHT+IEhCks05igMwPirJe5iCMxSC7y2IAo2GDrCRPLouJ4yPSG3uxKwXEQesNes9DSWx0HX/3iAJ9re3k9AuwubfRk= X-Received: by 2002:a17:902:e292:b0:23f:cd4d:a91a with SMTP id d9443c01a7336-23fcd4dab54mr45407245ad.30.1753623714457; Sun, 27 Jul 2025 06:41:54 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <4b33c8db-676f-12ea-b9ba-da08d8e82849@gmail.com> In-Reply-To: <4b33c8db-676f-12ea-b9ba-da08d8e82849@gmail.com> From: gevisz Date: Sun, 27 Jul 2025 16:41:37 +0300 X-Gm-Features: Ac12FXzVCy-QTn5NxcvlrJXwB-RWQk-gWcnUV_pkjd_FveR0JBIwgLlXxzOhhwc Message-ID: Subject: Re: [gentoo-user] xkeyboard-config overwrote files in CONFIG_PROTECT-ed directory (/usr/share/X11/xkb/symbols) To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9613da70-2691-498e-8ed1-25375e9c6d9c X-Archives-Hash: d9ba36f927479ed1e69fa0d7c35c7e3f =D0=B2=D1=81, 27 =D0=B8=D1=8E=D0=BB. 2025=E2=80=AF=D0=B3. =D0=B2 16:07, Dal= e : > > 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=3D"/etc /usr/share/X11/xkb/symbols/ /usr/share/config > > /usr/share/gnupg/qualified.txt" > > CONFIG_PROTECT_MASK=3D"/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 =E2=80=94 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=E2=80=99s CONFIG_PROTECT mechanism en= tirely, > > 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=E2=80=99ve been using Ge= ntoo > > 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 > > :-) :-) >