X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending. Resent-From: Ian Eure <ian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 26 Mar 2025 04:25:02 +0000 Resent-Message-ID: <handler.77266.B.174296305825915 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77266 <at> debbugs.gnu.org Cc: Ian Eure <ian@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.174296305825915 (code B ref -1); Wed, 26 Mar 2025 04:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Mar 2025 04:24:18 +0000 Received: from localhost ([127.0.0.1]:40809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txIJN-0006jr-L1 for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 00:24:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:46608) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txIJH-0006jU-Ci for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 00:24:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ian@HIDDEN>) id 1txIJA-0001Jk-Kh for guix-patches@HIDDEN; Wed, 26 Mar 2025 00:24:05 -0400 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ian@HIDDEN>) id 1txIJ8-0005AK-H9 for guix-patches@HIDDEN; Wed, 26 Mar 2025 00:24:04 -0400 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 392DB1140151; Wed, 26 Mar 2025 00:23:59 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 26 Mar 2025 00:23:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm1; t=1742963039; x=1743049439; bh=jE66/fGQ+XwDQ+QTJXQjH C5ip0xRJPzZkR7/E2NM2BY=; b=fztgO4Rw1pwBsojqbaVJdknBsaMp851KGiGGJ dFhUrYC0mEMCmzGf2/GNxI7wjWwwLLxULfP9CWDjl1Te2En+rOA/fTPtxLy8tc4B HBfya6+CXtBHC7KSFlzCQ/QKmuMw/gDTlTzbpihPbuV+HzSRt68KyfSPw7cQmyhV /chhCimsTPJbd8hrfJQUOLJM7u+JsAML0sWSk9F/01nkUVFbn4TcfyF9j4ab4fxQ Wz9DV/ROuLOdKi0vKjdw6XFkWBEpGU4n9eFxczttb0cHmalGQuVvv3EqLMKuCgXF hGlNlL98VTZjriBVa3gFUx7HZs27QRuvDyC1jfwntcMm83yOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1742963039; x=1743049439; bh=jE66/fGQ+XwDQ+QTJXQjHC5ip0xRJPzZkR7 /E2NM2BY=; b=V3+RqiZC6HyYFI3u6k6r2fdJZV3K5qJXSWHTq0mhjuq5h/3RjqP DJfLKhHbH+oY0IQxB5Offtm73qsEtKGiJrRKzcGzXyIbD+iq2iNzg9x7Ldqz4gUU HZVVhI/sG44ugyWY0P4zuAsbJe1Jns24c38WWobZrxJT/veban/Ss0nOsGaZn5zG oJU/K5NQvafnZMTA6NuVWVyxF0MXvFFp8rGUrRmyG2soRHYtQKqS8/w+RLDsFFL2 c9DCSXzIPdqr+3VRuigK1lep9Olul0Yx/8QOlkruI+3uowzeph0swQBXCFFq9Wsu szCbkD+nxhWvcnUOHAHbeA17rZ3j2Kp5LCw== X-ME-Sender: <xms:XoHjZ9AifThhiW9JJOPAQmthU5BKOPFbmGH6g7wGnhyQMVmOkDmmeA> <xme:XoHjZ7jORDpsjB6w2T0CId2OUjQSbjy5jMrsysniKbCTJNelUYbqoHyhvmm6emx2l vNjPK9vamSbViFaVQ> X-ME-Received: <xmr:XoHjZ4msBbrkuIZmrsOvtFNGJvlbYGEFGiIC0EYeyrWC2ucTyZIB9PQp8iRG-Jtc5LivOXvaZKmMAEU9Co3RHVni5GOEe40YMw83GfCCw6vIlQRargTWxg> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieegheeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf evufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghn sehrvghtrhhoshhpvggtrdhtvheqnecuggftrfgrthhtvghrnhephfeiveeliedukeffhe fhleeijedtveelleetgefggfehkeeljeehtdeguddvvefgnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrth hvpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehg uhhigidqphgrthgthhgvshesghhnuhdrohhrghdprhgtphhtthhopehirghnsehrvghtrh hoshhpvggtrdhtvh X-ME-Proxy: <xmx:XoHjZ3z4nG6kN2UwXxCU4tRfHUcYBW406KWVNCbLOp6xkaGv9-YnMg> <xmx:XoHjZyT5qPZbRJXXtmcDL8p1CyhlCm6WHW-9j2XX5boe-VIbUU7BBg> <xmx:XoHjZ6YI3zvLSt50F774z1WRAgZRctJfI9aGmYIIEmS1ecq2ufHpDg> <xmx:XoHjZzRkYT8smNtYydpJHrV1PDMPc1SRxOb3epCaTPd4M_fzHZsZxg> <xmx:X4HjZ9eGhNkl8bxwAbkOq1gExgCbwNcI2EcFUb7NpzaI2zvRbljeAJuG> Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Mar 2025 00:23:58 -0400 (EDT) From: Ian Eure <ian@HIDDEN> Date: Tue, 25 Mar 2025 21:23:54 -0700 Message-ID: <20250326042354.14033-1-ian@HIDDEN> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=103.168.172.155; envelope-from=ian@HIDDEN; helo=fhigh-a4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.3 (/) Configuration for xorg is embedded in the various display-manager configuration records, and extension support is factored out into the `handle-xorg-configuration' macro. However, the extension mechanism replaces the existing xorg-configuration with the supplied one, making it impossible to compose configuration from multiple sources. This patch adds a procedure to merge two xorg-configuration records, and calls it within handle-xorg-configuration, allowing the config to be built piecemeal. * gnu/services/xorg.scm (merge-xorg-configurations): New variable. (handle-xorg-configuration): Merge xorg configs. Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba --- gnu/services/xorg.scm | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index bef05b9bb9..dbd1513cc8 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration> (server-arguments xorg-configuration-server-arguments ;list of strings (default %default-xorg-server-arguments))) +(define (merge-xorg-configurations a b) + (let ((configs (list a b))) + (xorg-configuration + (modules + (delete-duplicates (append-map xorg-configuration-modules configs))) + (fonts + (delete-duplicates (append-map xorg-configuration-fonts configs))) + (drivers + (delete-duplicates (append-map xorg-configuration-drivers configs))) + (resolutions + (delete-duplicates (append-map xorg-configuration-resolutions configs))) + (extra-config (append-map xorg-configuration-extra-config configs)) + ;; Prefer the more recently set layout. + (keyboard-layout (or (xorg-configuration-keyboard-layout b) + (xorg-configuration-keyboard-layout a) + #f)) + (server + ;; Prefer the non-default server. + (if (eq? xorg-server (xorg-configuration-server a)) + (xorg-configuration-server b) + (xorg-configuration-server a))) + (server-arguments + ;; Prefer the non-default arguments. + (if (eq? %default-xorg-server-arguments + (xorg-configuration-server-arguments a)) + (xorg-configuration-server-arguments b) + (xorg-configuration-server-arguments a)))))) + (define (xorg-configuration->file config) "Compute an Xorg configuration file corresponding to CONFIG, an <xorg-configuration> record." @@ -628,10 +656,7 @@ (define-syntax handle-xorg-configuration ((_ configuration-record service-type-definition) (service-type (inherit service-type-definition) - (compose (lambda (extensions) - (match extensions - (() #f) - ((config . _) config)))) + (compose (cut reduce merge-xorg-configurations #f <>)) (extend (lambda (config xorg-configuration) (if xorg-configuration (configuration-record -- 2.48.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Ian Eure <ian@HIDDEN> Subject: bug#77266: Acknowledgement ([PATCH] gnu: Merge xorg configurations when extending.) Message-ID: <handler.77266.B.174296305825915.ack <at> debbugs.gnu.org> References: <20250326042354.14033-1-ian@HIDDEN> X-Gnu-PR-Message: ack 77266 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 77266 <at> debbugs.gnu.org Date: Wed, 26 Mar 2025 04:25:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 77266 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 77266: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77266 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 26 Mar 2025 17:17:02 +0000 Resent-Message-ID: <handler.77266.B77266.17430093767212 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ian Eure <ian@HIDDEN> Cc: 77266 <at> debbugs.gnu.org Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.17430093767212 (code B ref 77266); Wed, 26 Mar 2025 17:17:02 +0000 Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 17:16:16 +0000 Received: from localhost ([127.0.0.1]:44205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txUMR-0001sF-SW for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:16:16 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:51632) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1txUMO-0001rx-9C for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:16:13 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 0E403DDF; Wed, 26 Mar 2025 18:16:05 +0100 (CET) Authentication-Results: hera.aquilenet.fr; none X-Virus-Scanned: Debian amavis at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP id pvB245NZ0xBR; Wed, 26 Mar 2025 18:16:04 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id CB75A3CF; Wed, 26 Mar 2025 18:16:01 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> In-Reply-To: <20250326042354.14033-1-ian@HIDDEN> (Ian Eure's message of "Tue, 25 Mar 2025 21:23:54 -0700") References: <20250326042354.14033-1-ian@HIDDEN> Date: Wed, 26 Mar 2025 18:16:01 +0100 Message-ID: <87r02jk90u.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 0E403DDF X-Spamd-Result: default: False [-6.10 / 15.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Action: no action X-Spamd-Bar: ------ X-Rspamd-Server: hera X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) Hi! Ian Eure <ian@HIDDEN> skribis: > Configuration for xorg is embedded in the various display-manager > configuration records, and extension support is factored out into the > `handle-xorg-configuration' macro. However, the extension mechanism repl= aces > the existing xorg-configuration with the supplied one, making it impossib= le to > compose configuration from multiple sources. This patch adds a procedure= to > merge two xorg-configuration records, and calls it within > handle-xorg-configuration, allowing the config to be built piecemeal. > > * gnu/services/xorg.scm (merge-xorg-configurations): New variable. > (handle-xorg-configuration): Merge xorg configs. > > Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba Maybe you can add a word in the relevant part of the manual to give an idea of how configs are merged. Apart from, it LGTM. I can=E2=80=99t think of a scenario where it would br= eak existing config or where the current setup is preferable. Thanks! Ludo=E2=80=99.
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending. References: <20250326042354.14033-1-ian@HIDDEN> Resent-From: Rutherther <rutherther@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 26 Mar 2025 17:32:01 +0000 Resent-Message-ID: <handler.77266.B77266.174301032010489 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77266 <at> debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=83=C2=A8s?= <ludo@HIDDEN>, Ian Eure <ian@HIDDEN> Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.174301032010489 (code B ref 77266); Wed, 26 Mar 2025 17:32:01 +0000 Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 17:32:00 +0000 Received: from localhost ([127.0.0.1]:44240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txUbg-0002j6-0Z for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:32:00 -0400 Received: from ditigal.xyz ([2a01:4f8:1c1b:6a1c::]:60212 helo=mail.ditigal.xyz) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <rutherther@HIDDEN>) id 1txUbd-0002ie-6i for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 13:31:58 -0400 Received: by cerebrum (OpenSMTPD) with ESMTPSA id a1e4dca0 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Wed, 26 Mar 2025 17:31:49 +0000 (UTC) From: Rutherther <rutherther@HIDDEN> In-Reply-To: <87r02jk90u.fsf@HIDDEN> Date: Wed, 26 Mar 2025 18:31:46 +0100 Message-ID: <87msd7aebh.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ditigal.xyz; i=@ditigal.xyz; q=dns/txt; s=20240917; t=1743010309; h=from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type : from; bh=TMMwl2//0qTkXBucz+sxN7p9kxUwcHjKJb5ZwN2t3a0=; b=ezCoHpXRaXlJUzHKjYknQlHqsb3f5ZkoorUyvSFDE5qR5vCCZuMLVwBacKIKOJaOJwq5X LMQJ25txya9dSKZf/A1NetFarvduGXM6vNKEYep53stV/XQ7aN4pUviIGrV/7lRCz/miEim X5FbpvJ/Vo2kAEEHudRM7PAnotwREgs= X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, just wondering, wouldn't it make sense to inherit from the previous a or b in case someone added a field to xorg-configuration and forgot to change this service? Or is there some kind of a smart way how we can in Guix ensure stuff like that is properly checked? I can see someone forgetting about stuff like that... Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, just wondering, wouldn't it make sense to inherit from the previous a or b in case someone added a field to xorg-configuration and forgot to change this service? Or is there some kind of a smart way how we can in Guix ensure stuff like that is properly checked? I can see someone forgetting about stuff like that... Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hello, just wondering, wouldn't it make sense to inherit from the previous a or b in case someone added a field to xorg-configuration and forgot to change this service? Or is there some kind of a smart way how we can in Guix ensure stuff like that is properly checked? I can see someone forgetting about stuff like that... Rutherther
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending. Resent-From: Ian Eure <ian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 26 Mar 2025 19:16:02 +0000 Resent-Message-ID: <handler.77266.B77266.174301651431735 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Rutherther <rutherther@HIDDEN> Cc: Ludovic =?UTF-8?Q?Court=C3=83=C2=A8s?= <ludo@HIDDEN>, 77266 <at> debbugs.gnu.org Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.174301651431735 (code B ref 77266); Wed, 26 Mar 2025 19:16:02 +0000 Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 19:15:14 +0000 Received: from localhost ([127.0.0.1]:44416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txWDa-0008FJ-4V for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:14 -0400 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:50909) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txWDW-0008Cn-Nn for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:11 -0400 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 52B3A1382D08; Wed, 26 Mar 2025 15:15:05 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 26 Mar 2025 15:15:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1743016505; x=1743102905; bh=njYfGLkUqQ0bvWpwh8DsnF0RxuwF4TQZhatMRWtCnoY=; b= kgVew6+obvegA5+Jytbituibn9dEUQMNX58E2DGG/eHgLvURhsTR1kITDKFBX2xx NhMiVSmAVyuoGnbALd+66Ws/VRMTXy81A5B72c46gJyEfkD5d+TtiOttj1xyW4qY AmgwXyG8ocrRjFzMOf7KHnhlLfJfNgGZzje9+yoa/BFpLgNtR3+l6O4x3gwIjGPu xDEra3kJQFIvgcdliVnpWkvp00PXw/yY76sp/rbz/T7f65YKEchsK/vN92bincM3 nEN2OCxD0eQnmfstdrk1/xU1YHKaf6UBpR9krfVpHvDqogNwcNmOliPQCLymsiX7 y7xkRxDQY8EYSiS3l43uig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743016505; x= 1743102905; bh=njYfGLkUqQ0bvWpwh8DsnF0RxuwF4TQZhatMRWtCnoY=; b=d zPWp+7dU7k59zcmAzxBgboPfX80K1/d4habslHfia3MHMwlMoCB5Qz6Yd6WRdWtQ KBRSiDgFnBdSOXNVkJiRlCs6IekNAtE3GQD1fOLHzAq3HAhVoekLWZE5gSYLbZYd REfqVrI4kaNzbfvyrwdWMXb7GY5QBupv83AkVxlR2uOprFCwaGNvplj2hb3dVsUo GtehREJRs5cgduhCFumbZkGmHrlGRgf896ybicuROhWVNbsqgRiBp6IS34/dSLFL OX9drVRLE05ariuW99V5ZW5HHS27z+iakAglJwlfxZE8BrnpBSgVNE5VG3A5MIDO 4dN0pO/8UpF9xtjPkiD7Q== X-ME-Sender: <xms:OVLkZ0yvCpNX19WVvbhsshGV6e73pTplsItpI3qJCD83BNyDCUSOnA> <xme:OVLkZ4QHEf-hBUQKvP_QoZfm5tXs2DhWZ5pF3roPEcpOOuVzjGaqL0ryEwHLVWFEd wrBuJDmz4r9kbStKQ> X-ME-Received: <xmr:OVLkZ2UjEURqePG5WhohDi8Q_CagwIiKQMiXk5jV12GK2HI-HsSPj1T4CUwnvMsDkakRhlS_gE5Rcy1OXkKrnVbApZClHVT3RFwAbY0gnw> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeifeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgfgsehtqhertddt reejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvh eqnecuggftrfgrthhtvghrnhepveeuleeugedujeeukefhhffhlefgjeehfeffhefgffel keevkeeutdegkeelgeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopeef pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehluhguohesghhnuhdrohhrghdprh gtphhtthhopeejjedvieeiseguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohep rhhuthhhvghrthhhvghrseguihhtihhgrghlrdighiii X-ME-Proxy: <xmx:OVLkZyg8GN3OIPHQtgb5TMq6ebxJC7mxk6pxBFG8I9SUbP4j349Dgg> <xmx:OVLkZ2BRgUoUYx9CrF0Y9zAJQumPd9Tbpg3WiM9zT37vQxftII-HgA> <xmx:OVLkZzKCkq1L-68ne_SCfT1vFdRdiIgKbQhSyJUhLfbLf0WSC23eYQ> <xmx:OVLkZ9DsD12-qw85DsE3bRSX_-uhbR164yVP7WVaLj_Wez8iumA0tw> <xmx:OVLkZxM8oiO8CF8VIhJaVWEcZya34WKzAQ6mTjA9IOxuHCmGAC3sFVjF> Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Mar 2025 15:15:04 -0400 (EDT) From: Ian Eure <ian@HIDDEN> In-Reply-To: <87msd7aebh.fsf@HIDDEN> (rutherther@HIDDEN's message of "Wed, 26 Mar 2025 18:31:46 +0100") References: <87msd7aebh.fsf@HIDDEN> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Wed, 26 Mar 2025 12:15:03 -0700 Message-ID: <87iknvhadk.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Rutherther, Rutherther <rutherther@HIDDEN> writes: > Hello, just wondering, wouldn't it make sense to inherit from > the > previous a or b in case someone added a field to > xorg-configuration and > forgot to change this service? Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [103.168.172.146 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [103.168.172.146 listed in sa-trusted.bondedsender.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [103.168.172.146 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: ditigal.xyz (xyz)] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) Hi Rutherther, Rutherther <rutherther@HIDDEN> writes: > Hello, just wondering, wouldn't it make sense to inherit from=20 > the > previous a or b in case someone added a field to=20 > xorg-configuration and > forgot to change this service? I considered using inherit, but since every field has to be set to=20 the combined values of both records, saw no value in doing so. In=20 the case you outline, both inheriting and not will produce an=20 incorrect result -- inheriting will discard all but one=20 user-specified=E2=80=99s value, while not inheriting discards all=20 user-specified value and uses the default. Both are wrong, but I=20 think the latter is more likely to get noticed (therefore fixed). Thanks, -- Ian
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH] gnu: Merge xorg configurations when extending. Resent-From: Ian Eure <ian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 26 Mar 2025 19:16:02 +0000 Resent-Message-ID: <handler.77266.B77266.174301655632005 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Cc: 77266 <at> debbugs.gnu.org Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.174301655632005 (code B ref 77266); Wed, 26 Mar 2025 19:16:02 +0000 Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 19:15:56 +0000 Received: from localhost ([127.0.0.1]:44424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txWEF-0008K9-Tk for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:56 -0400 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]:53667) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txWED-0008Jm-Sh for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 15:15:54 -0400 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id B3E481140218; Wed, 26 Mar 2025 15:15:48 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Wed, 26 Mar 2025 15:15:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1743016548; x=1743102948; bh=0lZi0QYN6cMPYgeiIim5Rkl/c7Ni6OGRTXRwcmzJTtU=; b= j3xC4IIGnQQCwHsDD6j5XmUPqRtHBbHtVma5CsdA6trO3IPXDyHQafRTZgCNdv5B pTII4v0gszFv0gqyAI8aZCSMHXOV/MoIAmlMcVjADFIP4uMfcg3zm1eJ9OVDNB6A uKwB1RPdHSpufKl0buN6oMwey1URn06dXG1P39GlMpoN9IlRFwAuUFt+doSvxYXH f4MHtcu9yUIa8sZHpniq9z2PTx8aXcLX3hnutWUGBKS9pOaGd5zX+J01kRENgjXs /SfqsOi8r6BaBM56T/Zd/bJg4H4cZQlJvRevGHcl2/nag0255a2IaaKGX9ZIlsEJ 5V3A7gZ6dc6o6JZMEJqbUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743016548; x= 1743102948; bh=0lZi0QYN6cMPYgeiIim5Rkl/c7Ni6OGRTXRwcmzJTtU=; b=P yLkyPKiNQ5qmrq6UlmsWl6do8NfUZCKljWasJvgsIGqGF8ujP/Iclcup3dBeKR2O HPzVe2Vfdqnj/7BcvXqk1Ln8mMCTgVZUSA66qYY4kjEpKP3xF1depyAkTGVf2IQi ganC+TtHBV3jklD6awV1B91PBwV6f1yYm3FHiTtoEiQv0iQeefC/jE5tR4iHUes3 DQWze4A4WyTm7tg04j5g7343oYPjBSyF6BnaXcFsX4V+M3PlAV2TYw7L9ndNzk8w w3sH0WE8KWCm+gkvd8wVHcDR4Hlp4V5+klPCZSWOPUCgBymO9P0Richo0oFF+n42 KnYRKZzZeugtN9QZwOzGg== X-ME-Sender: <xms:ZFLkZ8U1ivbrjohuAI6-Y1NMlJFTOx22lcE_VOHDEJ7no1Duw1nkRg> <xme:ZFLkZwn_udS_31knhX4g6P1fZdOrvc8tFqGZcTdYEkcyOLv1VM67Z3JTpQ2d-W-4f AIoeX1mTFUTp6anOA> X-ME-Received: <xmr:ZFLkZwYFAJBnJKhFoJbODK6TSLGe6bhU7aHbOG0TKphqKfA6dsW4_DkE0a8hkIml0XtTJ7ZfHgQQ7gT3Dv0NJYC7_n4rYpmo3fJAsql9cA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeifeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgfgsehtqhertddt reejnecuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvh eqnecuggftrfgrthhtvghrnhepveeuleeugedujeeukefhhffhlefgjeehfeffhefgffel keevkeeutdegkeelgeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopedv pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeejjedvieeiseguvggssghughhsrd hgnhhurdhorhhgpdhrtghpthhtoheplhhuughosehgnhhurdhorhhg X-ME-Proxy: <xmx:ZFLkZ7Xz8G4fPS1qxz337TgCiVBcSmIMR8aBgu2hfvmpYS5cqKR3OA> <xmx:ZFLkZ2kmrJSbScds3m082WxkenhzM7bMLrqiOMYK7y6FocLN-zW1jQ> <xmx:ZFLkZwdNge-8pUQYUA_hhAl2R7KxQ8GZXZc-X27xwmVYQ0f4jxds6Q> <xmx:ZFLkZ4GnU6zIb5ss-jUXndkLpOpxjihgpYaQ1h66xqAFNeC4QGTg5g> <xmx:ZFLkZ7w3BJeH_fkGxLTgwyX55pXXT0IuW1eNic6Dom_zqdniqOmFHx5c> Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Mar 2025 15:15:47 -0400 (EDT) From: Ian Eure <ian@HIDDEN> In-Reply-To: <87r02jk90u.fsf@HIDDEN> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 26 Mar 2025 18:16:01 +0100") References: <20250326042354.14033-1-ian@HIDDEN> <87r02jk90u.fsf@HIDDEN> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Wed, 26 Mar 2025 12:15:46 -0700 Message-ID: <87cye3hacd.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hi! > > Ian Eure <ian@HIDDEN> skribis: > >> Configuration for xorg is embedded in the various=20 >> display-manager >> configuration records, and extension support is factored out=20 >> into the >> `handle-xorg-configuration' macro. However, the extension=20 >> mechanism replaces >> the existing xorg-configuration with the supplied one, making=20 >> it impossible to >> compose configuration from multiple sources. This patch adds a=20 >> procedure to >> merge two xorg-configuration records, and calls it within >> handle-xorg-configuration, allowing the config to be built=20 >> piecemeal. >> >> * gnu/services/xorg.scm (merge-xorg-configurations): New=20 >> variable. >> (handle-xorg-configuration): Merge xorg configs. >> >> Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba > > Maybe you can add a word in the relevant part of the manual to=20 > give an > idea of how configs are merged. Definitely, do you want a look at the wording, or should I write=20 that up and merge? Will send a v2 later today. Thanks, -- Ian
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH v2] gnu: Merge xorg configurations when extending. References: <20250326042354.14033-1-ian@HIDDEN> In-Reply-To: <20250326042354.14033-1-ian@HIDDEN> Resent-From: Ian Eure <ian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Thu, 27 Mar 2025 00:00:03 +0000 Resent-Message-ID: <handler.77266.B77266.174303359617260 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77266 <at> debbugs.gnu.org Cc: Ian Eure <ian@HIDDEN> Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.174303359617260 (code B ref 77266); Thu, 27 Mar 2025 00:00:03 +0000 Received: (at 77266) by debbugs.gnu.org; 26 Mar 2025 23:59:56 +0000 Received: from localhost ([127.0.0.1]:44943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1txaf5-0004UI-Ah for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 19:59:56 -0400 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]:60663) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1txaf0-0004SL-4M for 77266 <at> debbugs.gnu.org; Wed, 26 Mar 2025 19:59:53 -0400 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 7DF1E13838F0; Wed, 26 Mar 2025 19:59:44 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 26 Mar 2025 19:59:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm1; t=1743033584; x=1743119984; bh=0I PbQwHlpM1miJ6dfEePoY2bkga4RmIx2z3l5vx4LA8=; b=dvksyx6pWNa+Xz5oOb nhMwpk6laDRLiih89dZSsMoIqjAziPo0X64Gz9netKKH5sbFBOcHzS/hAeA41pk+ 0NbNpxkru92J/VRiVEnebVccSScyISuvaZhmrUSQwxneMIlMvT0EHNpme4L+rJU3 LDTqDihernMGhqdNY9aOvpdfcqw034EMb8NKU3m0ZTZRV7zgRKvRcVcaebPvQb8k ziUCd8u0AvLVIq1IOzKKYAGiLbz75Eu4CEGdDGYoI0AR/f1t2cwCoj/KMnKUNlxz tlz39ISfEB4ER4kFMD2koozfvL7E72dPEr17zsYnxjiNeu99WH4ZBOjKhaGrCLfm oExA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1743033584; x=1743119984; bh=0IPbQwHlpM1miJ6dfEePoY2bkga4 RmIx2z3l5vx4LA8=; b=ehZmWx18jT3qRXyxAjw3HIvG/OHZkxwMHS2+FV4VmMl5 bH8G44n4cMZ6ubRTFrXIcechZpG6FUDDqmBGuC574rgzde1WnCw8dUCiuzQCAMSS YfiPcR+F7F3JiMiXy4iuDD3kWfvRT0JyGACtdk75IhVjjU0I3EpKCMN13DAAQCFT SoTyaFZ/25IexR3qBrX8TJ7Umggeq1SLiy0RSegUg0E4wPNp+AIcHkMyYGnqj4ra TEJBoTPisp4mDvRdaJ5ff74qDHxvW1ZGnV/5C7Be+xsfXA0bnJAhMPxHxxM9nk1/ M9C0ry8ei0WV35X44TFq+62QV/YQ9YjIyCaKSqOEww== X-ME-Sender: <xms:75TkZ72jSwPUx6EFddbBMFsLqM7EaZi4rVFoBBB046TgAqpnjbrgPA> <xme:75TkZ6Ghgnzgt6CgDbNWKDyJdqjfaD0XArUDddT85HHkMf5kt_ienlhR8RkfD5ta- a3E0WZZ-wpjywTdXw> X-ME-Received: <xmr:75TkZ77PofZMMwlnWSEizTHhgAVrFsxLCszzBQk1_AP-L3iN7DGCdo-KIcanvhnjzQATQtOm7NsLOTG3D__r3f8tq2hSg2EwK2C62J7lIR9LFdOfMu7Q3Q> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieeileduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf evufffkffogggtgfesthekredtredtjeenucfhrhhomhepkfgrnhcugfhurhgvuceoihgr nhesrhgvthhrohhsphgvtgdrthhvqeenucggtffrrghtthgvrhhnpefgueekffejudfgvd evteelteeitdeuuddufffhuefhiefhjeetuefhgfettedvteenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehirghnsehrvghtrhhoshhpvggtrd htvhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep jeejvdeiieesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehirghnsehrvg htrhhoshhpvggtrdhtvh X-ME-Proxy: <xmx:75TkZw2Ule9jnGSIOeNrslZUQo_PREWYHFF38yk64iA1W4HRjFr5aw> <xmx:75TkZ-F782MsrTilBQxkxLR3e582AIXckyjmOcFwbdpGf7yOEE-JzQ> <xmx:75TkZx-BSiJQK8Q5Y8_I_gwxOoefr5ioDZrr-oyDoPOIM7jU4Ogc_Q> <xmx:75TkZ7ll7OYPhpEKQBQ9IkHNFQj8YwSwWO66fw6mqK6G5vpUgUZH0w> <xmx:8JTkZzTEo38nkDmwN6hj0kNMQpfqiv9LD8ZQf21diX3daWhPyAzn1EfY> Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Mar 2025 19:59:43 -0400 (EDT) From: Ian Eure <ian@HIDDEN> Date: Wed, 26 Mar 2025 16:59:32 -0700 Message-ID: <20250326235933.27663-1-ian@HIDDEN> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Configuration for xorg is embedded in the various display-manager configuration records, and extension support is factored out into the `handle-xorg-configuration' macro. However, the extension mechanism replaces the existing xorg-configuration with the supplied one, making it impossible to compose configuration from multiple sources. This patch adds a procedure to merge two xorg-configuration records, and calls it within handle-xorg-configuration, allowing the config to be built piecemeal. * gnu/services/xorg.scm (merge-xorg-configurations): New variable. (handle-xorg-configuration): Merge xorg configs. * doc/guix.texi (X Window): Document xorg-configuration composition. Change-Id: I20e9db911eef5d4efe98fdf382f3084e4defc1ba --- doc/guix.texi | 34 ++++++++++++++++++++++++++++++++-- gnu/services/xorg.scm | 33 +++++++++++++++++++++++++++++---- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 730fb45798..1dedf81715 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -138,6 +138,7 @@ Copyright @copyright{} 2024 45mg@* Copyright @copyright{} 2025 Sören Tempel@* Copyright @copyright{} 2025 Rostislav Svoboda@* Copyright @copyright{} 2025 Zacchaeus@* +Copyright @copyright{} 2025 Ian Eure@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -24865,8 +24866,37 @@ Tell the log-in manager (of type @var{login-manager-service-type}) to use @var{config}, an @code{<xorg-configuration>} record. Since the Xorg configuration is embedded in the log-in manager's -configuration---e.g., @code{gdm-configuration}---this procedure provides a -shorthand to set the Xorg configuration. +configuration---e.g., @code{gdm-configuration}---this procedure provides +a shorthand to set the Xorg configuration. + +Note that @code{set-xorg-configuration} can only be used once, and must +provide a complete configuration. If you know the service-type of the +log-in manager, you can compose a configuration from smaller pieces: + +@lisp +(define %xorg-intel-service + (simple-service + 'xorg-intel + gdm-service-type + (xorg-configuration + (modules (list xf86-video-intel)) + (drivers '("intel"))))) + +(define %xorg-keyboard-service + (simple-service + 'xorg-keyboard + gdm-service-type + (xorg-configuration (keyboard-layout keyboard-layouut)))) + +(operating-system + (services + (cons* + (service gdm-service-type) + %xorg-intel-service + %xorg-keyboard-service + %base-services)) + ...) +@end lisp @end deffn @deffn {Procedure} xorg-start-command [config] diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index bef05b9bb9..c2e34bc10c 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -209,6 +209,34 @@ (define-record-type* <xorg-configuration> (server-arguments xorg-configuration-server-arguments ;list of strings (default %default-xorg-server-arguments))) +(define (merge-xorg-configurations a b) + (let ((configs (list b a))) ; Prefer later configurations. + (xorg-configuration + (modules + (delete-duplicates (append-map xorg-configuration-modules configs))) + (fonts + (delete-duplicates (append-map xorg-configuration-fonts configs))) + (drivers + (delete-duplicates (append-map xorg-configuration-drivers configs))) + (resolutions + (delete-duplicates (append-map xorg-configuration-resolutions configs))) + (extra-config (append-map xorg-configuration-extra-config configs)) + ;; Prefer the more recently set layout. + (keyboard-layout (or (xorg-configuration-keyboard-layout b) + (xorg-configuration-keyboard-layout a) + #f)) + (server + ;; Prefer the non-default server. + (if (eq? xorg-server (xorg-configuration-server a)) + (xorg-configuration-server b) + (xorg-configuration-server a))) + (server-arguments + ;; Prefer the non-default arguments. + (if (eq? %default-xorg-server-arguments + (xorg-configuration-server-arguments a)) + (xorg-configuration-server-arguments b) + (xorg-configuration-server-arguments a)))))) + (define (xorg-configuration->file config) "Compute an Xorg configuration file corresponding to CONFIG, an <xorg-configuration> record." @@ -628,10 +656,7 @@ (define-syntax handle-xorg-configuration ((_ configuration-record service-type-definition) (service-type (inherit service-type-definition) - (compose (lambda (extensions) - (match extensions - (() #f) - ((config . _) config)))) + (compose (cut reduce merge-xorg-configurations #f <>)) (extend (lambda (config xorg-configuration) (if xorg-configuration (configuration-record -- 2.48.1
X-Loop: help-debbugs@HIDDEN Subject: [bug#77266] [PATCH v2] gnu: Merge xorg configurations when extending. Resent-From: Ian Eure <ian@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Mon, 14 Apr 2025 22:21:02 +0000 Resent-Message-ID: <handler.77266.B77266.174466926121021 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 77266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77266 <at> debbugs.gnu.org, Rutherther <rutherther@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Received: via spool by 77266-submit <at> debbugs.gnu.org id=B77266.174466926121021 (code B ref 77266); Mon, 14 Apr 2025 22:21:02 +0000 Received: (at 77266) by debbugs.gnu.org; 14 Apr 2025 22:21:01 +0000 Received: from localhost ([127.0.0.1]:49394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u4SAm-0005Sz-LV for submit <at> debbugs.gnu.org; Mon, 14 Apr 2025 18:21:00 -0400 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]:52985) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ian@HIDDEN>) id 1u4SAi-0005Se-IN for 77266 <at> debbugs.gnu.org; Mon, 14 Apr 2025 18:20:56 -0400 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0FBF325402D7; Mon, 14 Apr 2025 18:20:51 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Mon, 14 Apr 2025 18:20:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=retrospec.tv; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1744669250; x=1744755650; bh=mw/BLrL3Om AusT9QBx7VYXc4mXLkJp8tnq7R9+BVx2Y=; b=Efz0883gOko3ccsmloVY8NrBf1 tC9kgKYxvSD7QMPTVY8KE1mJSKGl7PXWcbG9el0CsRuzFTAjhSkMr5Y/EDruOTde f/2bxUKE+0fMQRzqTA+KfCl1yCjFLLIH1GCa5JeKluG7JjMAibm9cV8ICeEzumuU J4TGLDjoK2re0TBqtRij7pfRDvyabFHoi+GSdTgJr3ylEPxfBO8HLSW+UumIyq49 CjkZ5tBNgKYW/4q9+Y6z2oYXDCM1hpewJmSF0S9ejRPtBBw+hXsbOjpeiBJ/rtC4 WSG90yB0dOz7lx77msix9lnwIjtREntFWkLqqgZpPIO6n7fslCLlSJl+syjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1744669250; x=1744755650; bh=mw/BLrL3OmAusT9QBx7VYXc4mXLkJp8tnq7 R9+BVx2Y=; b=IHLyXum+upL2/1zRX2wW3CcJ/bxXFyyvAlZHP5WZI7J19FOEjKe N8Xj8NnzfXlNF5bkamnNxTNFQEIMoXeWm4QruV70sPvFwhIQ+ApbWh0kiO/UZn0j aRr0IG2i/uci7r0BbSiRGHsS5HJj+AfNez5GZu+0Z5cw+1zbq3JU+FWrNB+Az88r OkwjW1EoPvacJ30EISZ4fiCI1JJzXHwSYDZCqGCgdcfxIip51IsY+XFqvL4jemT4 r8dBGDWh21Z27wdES4BgAPHVAK7iDgGCm0u//XKBwEvOH7dY8x0+WfvUF7AuhFlX dQ3EJ0N4KNSe+4WhuuSorQX84KmGuLPrFrw== X-ME-Sender: <xms:Qor9Z7gvbfyrA6jkRVbXOvvXDMxqUXw-LWlib5AFNz1UuLaTlxlIlA> <xme:Qor9Z4C98mjzviRCf7_apDtUQnLCCt011Hn3FV32hlGvEX_r3sgtncEOyaWGyK4Sp XYV9ZUEaN_jy33yQA> X-ME-Received: <xmr:Qor9Z7EH_G5AO8zeRMlskhwC5z0qz29gi7N7rYBTeCr0lxZy7fxLtJdNWHUf3I7UYNygaj6KfBlpyvJDwBOmmVhtO5B1Ed8sAmvl> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvvddujeefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffvufgjfhgffffkgggtsehttdertddtredt necuhfhrohhmpefkrghnucfguhhrvgcuoehirghnsehrvghtrhhoshhpvggtrdhtvheqne cuggftrfgrthhtvghrnhepgfeugfdtheevheeuhfelieduteejudffveejgffgtdfhkeek hfeludfhteefiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepihgrnhesrhgvthhrohhsphgvtgdrthhvpdhnsggprhgtphhtthhopeefpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopehluhguohesghhnuhdrohhrghdprhgtph htthhopehruhhthhgvrhhthhgvrhesughithhighgrlhdrgiihiidprhgtphhtthhopeej jedvieeiseguvggssghughhsrdhgnhhurdhorhhg X-ME-Proxy: <xmx:Qor9Z4S4R4pCbZ0dG4w_tRPYncfDOHjznWTEd0veMbeyRtXJc3SAXA> <xmx:Qor9Z4zsQx5FJZq2TZHDwONYcwBjPKFR0YfJ5A-gqRROAvIKC01kIA> <xmx:Qor9Z-4baOOwk1dwisyRODQ0ctm-yOelDspdMpftWhfvlfJCSi28sQ> <xmx:Qor9Z9xJcfJKANrvApFkFZRRQ5Nujne4q7JkU209xzvFC1UJsxkg2w> <xmx:Qor9Z6onxNEqsnjSNzU5EJYpbcG8yG7iSOhCez7CDuV_Um9wxHg9Q35R> Feedback-ID: id9014242:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Apr 2025 18:20:49 -0400 (EDT) From: Ian Eure <ian@HIDDEN> In-Reply-To: <20250326235933.27663-1-ian@HIDDEN> (Ian Eure's message of "Wed, 26 Mar 2025 16:59:32 -0700") References: <20250326042354.14033-1-ian@HIDDEN> <20250326235933.27663-1-ian@HIDDEN> User-Agent: mu4e 1.12.9; emacs 29.4 Date: Mon, 14 Apr 2025 15:20:49 -0700 Message-ID: <87mscixu4e.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) Any other feedback on this? Does the manual wording look good? -- Ian
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.