Received: (at 61458) by debbugs.gnu.org; 21 Mar 2023 19:12:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 15:12:23 2023 Received: from localhost ([127.0.0.1]:60699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pehPD-000651-B3 for submit <at> debbugs.gnu.org; Tue, 21 Mar 2023 15:12:23 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:39865) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <roman@HIDDEN>) id 1pehPA-00064c-Lx for 61458 <at> debbugs.gnu.org; Tue, 21 Mar 2023 15:12:21 -0400 Received: by mail-wm1-f43.google.com with SMTP id i5-20020a05600c354500b003edd24054e0so4936507wmq.4 for <61458 <at> debbugs.gnu.org>; Tue, 21 Mar 2023 12:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; t=1679425935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PjWUSwnBzJVkDRgazEARRYOVduH/UNd/SN8rsqwZeLU=; b=FI6HqHxuKtFxvRAG/mzoM7Q4DnfcbPZBUNJvGGdgIMNvgBje1bnKKhWKk8Cmf2BhCw Mj49QIF3USIPfmu//vR8nDLx91zNHDVOiRifW/zBU9UNXvuwdMm2ZWc7LCRXPMBHBIDn b0C5O3pdQXJDono4jqZxQx6wUSrffzO6gy1i5EamwDj9MQV1VbKgtTV6R5CG/Nc+Hj6F VSU/5abr95Qrem/Y1e37M/igqAjMPSuu/wASVervqWW+HPfZOIw4UztYBGxP7A+sYlqn MqozfVfxkJeTINJ55UXZvuWmxJcJ2VDY76aq//WBcxJjN8m7ohssnW4YEhCgp2CAHVY/ K/sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679425935; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PjWUSwnBzJVkDRgazEARRYOVduH/UNd/SN8rsqwZeLU=; b=dKqtD1D397CJVImyFFhBLphA19jwG20tfbYlzNJ4A0nSu31+282VpL3cyVQSZb8N9z Ko+cysIDceoRcU20iIqBWFlAJ32ZIlA1/cRD7NwfuKdWdaa9TIKrGHXjlvy87voYwaEg wtjE7uvH3vIlRq+0N1hKoD8KHxgJR//vMrRbpLJ3mMqQiAX9SQtSyS8m5Quim9EzrJ45 Jn0QWxfGHCDoAR4gR1vh09uwxJKGx2V3AXObQvEAmknNm//ym8a7jqu40yLZ5d/tn1wv HYR1Cy/oC6CR99fj/ezRdhfI9LNiVJVdzy41PKmXpYP4PY97lLTl8Hq1tixh+dcLzsR8 MNTg== X-Gm-Message-State: AO0yUKUBxpbsQGqV9vWd5wzRp1eS1Jg3XtIjlfKozJaJcWzJcmwvCq3Q N1MLklcobLby/Un/6q49FhZ8K7Xf31SkD9Ncvs4= X-Google-Smtp-Source: AK7set/VzpVakjSipPxSLisdxwY5Uo2Bu5d2j3GW04RPEN7i3alvrxMtEOXXzFepXThoxEYDOxfwqA== X-Received: by 2002:a7b:c845:0:b0:3ed:df74:bac7 with SMTP id c5-20020a7bc845000000b003eddf74bac7mr3094663wml.21.1679425934831; Tue, 21 Mar 2023 12:12:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:598:b1af:cb71:ef:b0c6:7178:9dc0]) by smtp.gmail.com with ESMTPSA id j19-20020a05600c191300b003eddc6aa5fasm8807634wmq.39.2023.03.21.12.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 12:12:14 -0700 (PDT) From: Roman Scherer <roman@HIDDEN> To: 61458 <at> debbugs.gnu.org Subject: [PATCH v2 1/1] services: xorg-wrapper: Support xorg server input rewriting. Date: Tue, 21 Mar 2023 20:11:41 +0100 Message-Id: <af690c2b48f456fda57a00bb2622b571df15aec9.1679425545.git.roman@HIDDEN> X-Mailer: git-send-email 2.39.1 In-Reply-To: <cover.1679425545.git.roman@HIDDEN> References: <cover.1679425545.git.roman@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61458 Cc: r0man <roman@HIDDEN>, iyzsong@HIDDEN 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.0 (-) From: r0man <roman@HIDDEN> * gnu/services/xorg.scm (xorg-wrapper): Support xorg server input rewriting. This patch adds support for proper xorg server input rewriting. It uses the lookup-package-direct-input procedure to configure the X server paths dynamically, instead of always using the hard coded package. Something like this is now possible: (define other-mesa (package-input-rewriting/spec `(("mesa" . ,(const other-mesa))))) (xorg-configuration (xorg-configuration (server (other-mesa xorg-server)))) Without this patch the X server would still be configured with mesa (causing version issues), and not with other-mesa (as per the input rewrite). --- gnu/services/xorg.scm | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index c4745cecf5..7295a45b59 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -358,6 +358,22 @@ (define (xorg-configuration-directory modules) files) #t)))) +(define (xorg-configuration-server-package-path config input path) + "Lookup the direct @var{input} in the xorg server package of @var{config} +and append @var{path} to it." + (let* ((server (xorg-configuration-server config)) + (package (lookup-package-direct-input server input))) + (when package (file-append package path)))) + +(define (xorg-configuration-dri-driver-path config) + (xorg-configuration-server-package-path config "mesa" "/lib/dri")) + +(define (xorg-configuration-xkb-bin-dir config) + (xorg-configuration-server-package-path config "xkbcomp" "/bin")) + +(define (xorg-configuration-xkb-dir config) + (xorg-configuration-server-package-path config "xkeyboard-config" "/share/X11/xkb")) + (define* (xorg-wrapper #:optional (config (xorg-configuration))) "Return a derivation that builds a script to start the X server with the given @var{config}. The resulting script should be used in place of @@ -365,12 +381,13 @@ (define* (xorg-wrapper #:optional (config (xorg-configuration))) (define exp ;; Write a small wrapper around the X server. #~(begin - (setenv "XORG_DRI_DRIVER_PATH" (string-append #$mesa "/lib/dri")) - (setenv "XKB_BINDIR" (string-append #$xkbcomp "/bin")) + (setenv "XORG_DRI_DRIVER_PATH" + #$(xorg-configuration-dri-driver-path config)) + (setenv "XKB_BINDIR" #$(xorg-configuration-xkb-bin-dir config)) (let ((X (string-append #$(xorg-configuration-server config) "/bin/X"))) (apply execl X X - "-xkbdir" (string-append #$xkeyboard-config "/share/X11/xkb") + "-xkbdir" #$(xorg-configuration-xkb-dir config) "-config" #$(xorg-configuration->file config) "-configdir" #$(xorg-configuration-directory (xorg-configuration-modules config)) -- 2.39.1
guix-patches@HIDDEN
:bug#61458
; Package guix-patches
.
Full text available.Received: (at 61458) by debbugs.gnu.org; 21 Mar 2023 19:12:19 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 15:12:19 2023 Received: from localhost ([127.0.0.1]:60696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pehP9-00064l-1v for submit <at> debbugs.gnu.org; Tue, 21 Mar 2023 15:12:19 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:44901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <roman@HIDDEN>) id 1pehP7-00064W-7k for 61458 <at> debbugs.gnu.org; Tue, 21 Mar 2023 15:12:17 -0400 Received: by mail-wm1-f48.google.com with SMTP id u11-20020a05600c19cb00b003edcc414997so5259909wmq.3 for <61458 <at> debbugs.gnu.org>; Tue, 21 Mar 2023 12:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; t=1679425931; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8JYA4FMDBfH0jt344Ef+K37mz7xg0r0EBRx4zlpgIGo=; b=AVSfNO+qxVYz5W+rnkfOmka/FFu+YD382daE7nOd+XrARCw5KTC8M6PsBTlOjDyZC/ FSSuT/vn+r/4b0GzBpEfhIIv7vu0dubsBOXCXMUpWSKGzC0rtMrH8Vy0QlAVrmDD+McI 5oKk+B/dts7yHvPYPgYYLE2+Lx9mdeJBuGbeZauEw6nGYPFwXjz0bOKWU4BGxSi4uFtJ wOiLpOl52F14IFbBaKz1KrhJO8DRnMWVcbWls9juPHOL5fzsKwjoDr0kj0IXj4KIOdJF +unDqdojIfZxJFhQ4w5DJgwsQ9GRPHBa352zvXoOC8sFPEAy7BIbjGCC11AABNS3+QM5 hyRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679425931; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8JYA4FMDBfH0jt344Ef+K37mz7xg0r0EBRx4zlpgIGo=; b=NG/nBwqT8dixO6SELWsOReSFf+i5s86gS3wTgo7eLY5zqMH+9vques3Io8Q8nx01Km vaY2zC0KPl2ng+fDlHen5VOGzJMzd+4yJceACNc6aNvbsGjvqW74eiml6YITPgFthRE0 k/ZQAwqdUgtGHiByJxC1k4iXPQEHYzhSqR5b4fUXIX7LvZQJNIWOeyNaroLzJeav9KJg sSzU5haWPtI/N950dDrUhwXKRaL7nmmTSiWQ5uMZp+Be0R8NEab95SjU8CPoI4z5eV+S ddQhliY5OAxP0j4aFNqVpOPEcbSO5+P9fiCq6rsBh0fYPEzfHNTkzCAM7KJkF4/6oAlO 0CCA== X-Gm-Message-State: AO0yUKXKC0gMM2Lxnu7eyfPGuZF3OL5D0bgnBL6Bs+DnHK2VETGiUNRn UMxhh0M3W3dCMSMi0ynoDZoE9910JqFdDMI4YLQ= X-Google-Smtp-Source: AK7set/4NsGjFDfqpUbgyAyofPK3FArH1Zeec+M4k9DJInnQTx+WMDIW5SzgFE9Z44gIJZnPKmcjtQ== X-Received: by 2002:a7b:c5c6:0:b0:3ed:f957:10c7 with SMTP id n6-20020a7bc5c6000000b003edf95710c7mr3675147wmk.14.1679425930957; Tue, 21 Mar 2023 12:12:10 -0700 (PDT) Received: from localhost.localdomain ([2a01:598:b1af:cb71:ef:b0c6:7178:9dc0]) by smtp.gmail.com with ESMTPSA id j19-20020a05600c191300b003eddc6aa5fasm8807634wmq.39.2023.03.21.12.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 12:12:10 -0700 (PDT) From: Roman Scherer <roman@HIDDEN> To: 61458 <at> debbugs.gnu.org Subject: [PATCH v2 0/1] Support xorg server input rewriting Date: Tue, 21 Mar 2023 20:11:40 +0100 Message-Id: <cover.1679425545.git.roman@HIDDEN> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61458 Cc: Roman Scherer <roman@HIDDEN>, iyzsong@HIDDEN 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.0 (-) Hi 宋文武, I'm back on track. Here's an improved version of the patch. It was indeed way too complicated. :) Can you have another look please? Thanks, Roman. r0man (1): services: xorg-wrapper: Support xorg server input rewriting. gnu/services/xorg.scm | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) -- 2.39.1
guix-patches@HIDDEN
:bug#61458
; Package guix-patches
.
Full text available.Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 61458) by debbugs.gnu.org; 10 Mar 2023 15:33:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 10 10:33:42 2023 Received: from localhost ([127.0.0.1]:55552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1paekX-0005dm-VL for submit <at> debbugs.gnu.org; Fri, 10 Mar 2023 10:33:42 -0500 Received: from mail-ed1-f50.google.com ([209.85.208.50]:35784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <roman.scherer@HIDDEN>) id 1paekV-0005da-U3 for 61458 <at> debbugs.gnu.org; Fri, 10 Mar 2023 10:33:40 -0500 Received: by mail-ed1-f50.google.com with SMTP id u9so22084521edd.2 for <61458 <at> debbugs.gnu.org>; Fri, 10 Mar 2023 07:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; t=1678462414; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=JFlOxz+VyIWmgjDrrkLBY0ig2/pOtKpGEP/90BYt9c8=; b=l4rgkt93zOWRgQD7pLaYTt1gOz3Fg2tkwj6nfw5fuEflIDd/M2rkEsbFMNCt+VkTNW euWACd3p4RokswW67LeEt5odfzdZ/sPB7BnDU9qVeg+Xr9lRWZTIEXlOPlrryLS1oL8p hxECiJTUx+qYH4boOmHtKQyr/0wos/bmtZPMrQYmppxQ+tDzU14sTce1OT2vHiCLWxDZ wBxZJ+iFzTB3DmWfv8udYQitnVBtQSEpk1+WIrhKOqdqwGb7knF61xCALy+l1HKCexAh 8cdU6oLPCWbDMXfEQHPiT69D6pqjUzd/p3g9gzWOaPH0YffMGRNPZtfwGxexBUjjKAvH F6Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678462414; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JFlOxz+VyIWmgjDrrkLBY0ig2/pOtKpGEP/90BYt9c8=; b=GSLt8zP48rhsNqHzya4cj+AirpKno3j0Qzggz+gqM2Uq0yb192Q6bqzDsK1Z/i0c5g M4hZ0c9DlL1gxPy9c6l3LQmXP7kUZF98Ja2MWkQG3CQ3BEBjAU9eO7GFEXj4B74DWDIT QRXh4Lg95IFNZ5u6ENsU9R+3qtDAE2k4ZGCqU88pR56lHKMtjwvSZ949cUFW5+4pV4sA 2cs7TsIbZFENMUd9/NogkABUmhSsEyDAXVOipGg+alrjP8u2hD5JdwYNonXTWMWk18iM aMo1U0JIlJZ3Ki2g07mjvBxWaq3D7Wes3fWLF9/MxV4hWtee/8uHSlCT9iktyM8NIG10 5yNg== X-Gm-Message-State: AO0yUKXQdxiMcC06KQC3vcAQogJ/osULHwjLww9s0Wlab4j9uTx3YLxM nYBgvNctKc2t/OQceqrzZOmlRezVlBxWjNP0hkk= X-Google-Smtp-Source: AK7set9Ec/kTabEsXjoNBNJBX9CynuKZMwMpbJsj3pXTQaUKGFPBY1NCqA9/4tps4KlFE7ExLIp/Wg== X-Received: by 2002:a05:6402:654:b0:49e:1f0e:e209 with SMTP id u20-20020a056402065400b0049e1f0ee209mr2926209edx.10.1678462413814; Fri, 10 Mar 2023 07:33:33 -0800 (PST) Received: from bombaclaat ([2a01:598:b1af:e722:2fbf:91d3:41c3:f544]) by smtp.gmail.com with ESMTPSA id s13-20020a170906454d00b008b1b644c9fbsm14836ejq.103.2023.03.10.07.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 07:33:33 -0800 (PST) References: <86k00mvgmi.fsf@HIDDEN> <871qm1nyau.fsf@HIDDEN> User-agent: mu4e 1.8.13; emacs 29.0.60 From: Roman Scherer <roman.scherer@HIDDEN> To: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN> Subject: Re: bug#61458: [PATCH] services: xorg-wrapper: Support xorg server input Date: Fri, 10 Mar 2023 16:32:28 +0100 In-reply-to: <871qm1nyau.fsf@HIDDEN> Message-ID: <86o7p039kj.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61458 Cc: 61458 <at> debbugs.gnu.org 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.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi =E5=AE=8B=E6=96=87=E6=AD=A6, thanks for taking a look. I messed up my system, but will update the patch once I got everyting working again. Roman =E5=AE=8B=E6=96=87=E6=AD=A6 <iyzsong@HIDDEN> writes: > Roman Scherer <roman.scherer@HIDDEN> writes: > >> Hello Guix, >> >> I would like to replace the Mesa package in my Xorg configuration. I >> tried to do this with the following snippet: >> >> ``` >> (modify-services %desktop-services >> (slim-service-type config =3D> >> (slim-configuration >> (inherit config) >> (xorg-configuration >> (xorg-configuration >> (server (replace-mesa xorg-server))))))) >> ``` >> >> But this unfortunately does not work, because the xorg-wrapper uses >> static paths for the mesa, xkbcomp and xkeyboard-config packages in the >> derivation. >> >> The xserver starts now with the replaced mesa, but some paths still >> point to the hard coded packages in Guix itself (and not the >> replacement), which cause some things to not work. >> >> This patch changes this to lookup the paths from the inputs of the >> server field of the xorg-configuration instead. That way the correct >> paths are setup in the xor-wrapper script. If those inputs are not found >> for some reason it falls back to the current behavior, using the >> packages from Guix. >> >> Could you please review this? >> >> Thanks, Roman. > > Sorry for a long deley.. >> >> From d035c99ed4703da0e3e9b62299c390560c074a17 Mon Sep 17 00:00:00 2001 >> From: r0man <roman@HIDDEN> >> Date: Sat, 11 Feb 2023 19:36:16 +0100 >> Subject: [PATCH] services: xorg-wrapper: Support xorg server input >> transformations. > > I think it's better add some explaination to commit message like: > The xorg-wrapper uses [...] > This patch [...] > > Should be good. >> >> * gnu/services/xorg.scm (xorg-wrapper): Support xorg server input transf= ormations. >> --- >> gnu/services/xorg.scm | 22 +++++++++++++++++++--- >> 1 file changed, 19 insertions(+), 3 deletions(-) >> >> diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm >> index 5f073d05d3..92735e6004 100644 >> --- a/gnu/services/xorg.scm >> +++ b/gnu/services/xorg.scm >> @@ -355,6 +355,21 @@ (define files >> files) >> #t)))) >> >> +(define (xorg-configuration-append-input config input default-input pat= h) >> + (let ((server (xorg-configuration-server config))) >> + (file-append (or (lookup-package-direct-input server input) default= -input) >> + path))) > I'm not sure about the procedure name, maybe add a docstring explain > it's function? > > > Otherwise, look good to me, thank you! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmQLTcwfHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmcpaB/94+vinsbcxYfj1 6hAhCdyIOr5ngPdHlJiPpRYSYqbfEK0Mq8WJTGljE0TXKsrNXsamCzkgHxk2Q2sU TUoEGYxeM8cryx12el+ISDNM0iuAcHMdRSxzO9+wF62dr5XJ0L2cJqbQxIkudt7+ ORljc5QP0x4CQ8dIXjd1syxG1n8UQJPVuxtErApwLUL5r1HsW8cSgPa4jxl+Xd7H 8I34/1NA2YQlAbFA1o85o2/Ed8i0Gpd5qGss7jlKxTmALLcXkfghX1sUDEVYXAAG 8YxCsua2kePxZ3pwM4dvp/lNYtmEADx9LxhWI6Vz5EhCCNMCHahUz3Q1v9HI/osu ulqQABGN =J74u -----END PGP SIGNATURE----- --=-=-=--
guix-patches@HIDDEN
:bug#61458
; Package guix-patches
.
Full text available.Received: (at 61458) by debbugs.gnu.org; 7 Mar 2023 01:29:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 06 20:29:49 2023 Received: from localhost ([127.0.0.1]:44051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pZM9F-00072H-7j for submit <at> debbugs.gnu.org; Mon, 06 Mar 2023 20:29:49 -0500 Received: from mail.envs.net ([5.199.136.28]:56774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <iyzsong@HIDDEN>) id 1pZM9C-000728-Rt for 61458 <at> debbugs.gnu.org; Mon, 06 Mar 2023 20:29:48 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 69D9338A0876; Tue, 7 Mar 2023 01:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1678152585; bh=yBgqcsB7+qkbA6tO8AwzsXk7Xyv5YCZuVHsKTCmVxrs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ehxal39vq6jniDXHo2p9JAXvHqE8AR8Tv1s1PeVvHud+uN7ak/kMXDO9QuXsTpCo4 ZbORUH+KYuPQSUepYaUZcS9cirKKEZlEh96Lmv/PHn5gZ7pRyQe8Dkm3Q4Gzan+F1n GKJJqWiCRKlptBdUxNUElbq2Nkq8sCAXp+9tWau9xGwkpfyMpzjmRPlzFA6NMoChJ8 teo14D6ineu4UxHm9wng9vBDAw4C3SSJmWMrB/HLM0rH5KQQ45Zt4nbNhS3pCyV6BG 3Fa79shb1W+afCXMYlmUuq/lfqMSs2Xptvyo24grx1XFXl31fKByjRc20QEoSsDGXP ZkrQvrQdvyb5XKgZ6mIWK83doHIRcNza0BDfhphytlb2DfBsm3o/xt4zGp4WMdK11r sJn2J+DEsscXwI0Q8Wv2RkWCe4IU9dINQ0lwCPdeivU103+D6dsmpNdqynAopYHy+x ZGCOkanhxTyRvsMTBQo10Q9yGbGLKA+bajoKIuB5r+LTLMh0qkuIvy51SOYt/ARKYp z+dmxzF/D9dGOUNW67HGpSns6vwxsxS9aAkYzXdtUhCiQayE09BhJdr6WT/5kW9Ost 4epZHsB4dLUgX0xUk3MCN1Ch8MbD98YgVT8yaPW0M/v2iTfag/pGmui7EQIhlpvKyg 9WrIaHGZGKnT77mmVqhK4RWA= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id o9qVdzsRSIpK; Tue, 7 Mar 2023 01:29:42 +0000 (UTC) Received: from localhost (unknown [182.150.116.135]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 7 Mar 2023 01:29:42 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id ec5474e8; Tue, 7 Mar 2023 01:30:01 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= <iyzsong@HIDDEN> To: Roman Scherer <roman.scherer@HIDDEN> Subject: Re: bug#61458: [PATCH] services: xorg-wrapper: Support xorg server input References: <86k00mvgmi.fsf@HIDDEN> Date: Tue, 07 Mar 2023 09:30:01 +0800 In-Reply-To: <86k00mvgmi.fsf@HIDDEN> (Roman Scherer's message of "Sun, 12 Feb 2023 19:52:40 +0100") Message-ID: <871qm1nyau.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61458 Cc: 61458 <at> debbugs.gnu.org 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.0 (-) Roman Scherer <roman.scherer@HIDDEN> writes: > Hello Guix, > > I would like to replace the Mesa package in my Xorg configuration. I > tried to do this with the following snippet: > > ``` > (modify-services %desktop-services > (slim-service-type config => > (slim-configuration > (inherit config) > (xorg-configuration > (xorg-configuration > (server (replace-mesa xorg-server))))))) > ``` > > But this unfortunately does not work, because the xorg-wrapper uses > static paths for the mesa, xkbcomp and xkeyboard-config packages in the > derivation. > > The xserver starts now with the replaced mesa, but some paths still > point to the hard coded packages in Guix itself (and not the > replacement), which cause some things to not work. > > This patch changes this to lookup the paths from the inputs of the > server field of the xorg-configuration instead. That way the correct > paths are setup in the xor-wrapper script. If those inputs are not found > for some reason it falls back to the current behavior, using the > packages from Guix. > > Could you please review this? > > Thanks, Roman. Sorry for a long deley.. > > From d035c99ed4703da0e3e9b62299c390560c074a17 Mon Sep 17 00:00:00 2001 > From: r0man <roman@HIDDEN> > Date: Sat, 11 Feb 2023 19:36:16 +0100 > Subject: [PATCH] services: xorg-wrapper: Support xorg server input > transformations. I think it's better add some explaination to commit message like: The xorg-wrapper uses [...] This patch [...] Should be good. > > * gnu/services/xorg.scm (xorg-wrapper): Support xorg server input transformations. > --- > gnu/services/xorg.scm | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm > index 5f073d05d3..92735e6004 100644 > --- a/gnu/services/xorg.scm > +++ b/gnu/services/xorg.scm > @@ -355,6 +355,21 @@ (define files > files) > #t)))) > > +(define (xorg-configuration-append-input config input default-input path) > + (let ((server (xorg-configuration-server config))) > + (file-append (or (lookup-package-direct-input server input) default-input) > + path))) I'm not sure about the procedure name, maybe add a docstring explain it's function? Otherwise, look good to me, thank you!
guix-patches@HIDDEN
:bug#61458
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 12 Feb 2023 19:16:50 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 12 14:16:50 2023 Received: from localhost ([127.0.0.1]:46779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1pRHqD-0008Am-Ih for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 14:16:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:54880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <roman.scherer@HIDDEN>) id 1pRHqB-0008Ae-FW for submit <at> debbugs.gnu.org; Sun, 12 Feb 2023 14:16:48 -0500 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 <roman.scherer@HIDDEN>) id 1pRHq9-0001GM-Ux for guix-patches@HIDDEN; Sun, 12 Feb 2023 14:16:45 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <roman.scherer@HIDDEN>) id 1pRHq7-0002y8-Lo for guix-patches@HIDDEN; Sun, 12 Feb 2023 14:16:45 -0500 Received: by mail-ej1-x632.google.com with SMTP id sb24so3110752ejb.8 for <guix-patches@HIDDEN>; Sun, 12 Feb 2023 11:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=burningswell-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=QCDCXi0iqJWNgDoV4cOhFKiyCk2s/AHQR/iEJhxzcBg=; b=MNNP4Ovj+wjdSB3Byp0wLhm7riDa3RIuVRBZLQPLSxgQRIunDzL3dNtC6o52A5gVL7 rwIv6XaIr0pfHwIE9UHnqhgDWG3kwhzKnw1PQio4lRKH9abOmOCEnO0KqCW1vhPViafX gtclpjYOOtjnWSJpami4yLI08xAYuMbhTX0d9Je51s42MTPZLf5r6WEjfLkPwK/dCAwO aA30QxqTwZlpTmE9FlJMYEy+yUQp2kCm4adZpdU6t/GmnoAnREc3BiW1PzNcIBcek9QN 4EY55zCcwCD/4ht8Mhn+i78OHLXe3jCEmn2uyBvaSBqmSqV2key/nBoMCnDAcSXOqZ7O lOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QCDCXi0iqJWNgDoV4cOhFKiyCk2s/AHQR/iEJhxzcBg=; b=OcVIDy6ee4tvaxBIL+dBroC3oT82Pz5D45A33eC2iIiM/I+6W2rTFwhCwVbLiSzED+ DI5oY+/EFOA357WTuMDdZXjVFRt8lBy9ytcHl5UTpIA3K5AAnCwX4Of0ETgUe5rAiSoa P4Z3VcdQyVSJHcc1MNr5PPkY3QiWP8SrrK2JCr7Kv/eqPQAu43QNEPYTkd7nk6b38Ybt mdRhfbVPyYWFz6FM1w4T9jPyhvhZJHmgrJqW6qvUiom/rEk5Kc4grVmcNE87L496jHw5 xeCwDyto/uBwkjc91BeN0K3M9b6bfEdrfTUOrz0DuAmNmKreIRIJ0/j/ZC7N4zLfN6a3 fc8g== X-Gm-Message-State: AO0yUKUdwhcnG4NyXgSXh+6+OTsk0xau3InPZR8XyYY/iOWE6WE0wjca d/CdHaCk9UCCoEsrZF8Om/AFZAzof22f/t2q8Wk= X-Google-Smtp-Source: AK7set+SIe6WBWdor+TTgko6WNTFT+tZqf3zHTnot4zdP8jMRfWxDG9l/PlA8+yceYSRrQdyZG5VBw== X-Received: by 2002:a17:906:b202:b0:882:239e:23c0 with SMTP id p2-20020a170906b20200b00882239e23c0mr19263202ejz.12.1676229399976; Sun, 12 Feb 2023 11:16:39 -0800 (PST) Received: from bombaclaat ([2a01:598:b1b0:992:157d:949e:916b:98f2]) by smtp.gmail.com with ESMTPSA id r14-20020a170906364e00b0088351ea808bsm5676609ejb.46.2023.02.12.11.16.39 for <guix-patches@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 11:16:39 -0800 (PST) User-agent: mu4e 1.8.13; emacs 29.0.50 From: Roman Scherer <roman.scherer@HIDDEN> To: Guix Patches <guix-patches@HIDDEN> Subject: [PATCH] services: xorg-wrapper: Support xorg server input Date: Sun, 12 Feb 2023 19:52:40 +0100 Message-ID: <86k00mvgmi.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::632; envelope-from=roman.scherer@HIDDEN; helo=mail-ej1-x632.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit 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: -3.3 (---) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hello Guix, I would like to replace the Mesa package in my Xorg configuration. I tried to do this with the following snippet: ``` (modify-services %desktop-services (slim-service-type config => (slim-configuration (inherit config) (xorg-configuration (xorg-configuration (server (replace-mesa xorg-server))))))) ``` But this unfortunately does not work, because the xorg-wrapper uses static paths for the mesa, xkbcomp and xkeyboard-config packages in the derivation. The xserver starts now with the replaced mesa, but some paths still point to the hard coded packages in Guix itself (and not the replacement), which cause some things to not work. This patch changes this to lookup the paths from the inputs of the server field of the xorg-configuration instead. That way the correct paths are setup in the xor-wrapper script. If those inputs are not found for some reason it falls back to the current behavior, using the packages from Guix. Could you please review this? Thanks, Roman. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-services-xorg-wrapper-Support-xorg-server-input-tran.patch Content-Transfer-Encoding: quoted-printable From=20d035c99ed4703da0e3e9b62299c390560c074a17 Mon Sep 17 00:00:00 2001 From: r0man <roman@HIDDEN> Date: Sat, 11 Feb 2023 19:36:16 +0100 Subject: [PATCH] services: xorg-wrapper: Support xorg server input transformations. * gnu/services/xorg.scm (xorg-wrapper): Support xorg server input transform= ations. =2D-- gnu/services/xorg.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 5f073d05d3..92735e6004 100644 =2D-- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -355,6 +355,21 @@ (define files files) #t)))) =20 +(define (xorg-configuration-append-input config input default-input path) + (let ((server (xorg-configuration-server config))) + (file-append (or (lookup-package-direct-input server input) default-in= put) + path))) + +(define (xorg-configuration-dri-driver-path config) + (xorg-configuration-append-input config "mesa" mesa "/lib/dri")) + +(define (xorg-configuration-xkb-bin-dir config) + (xorg-configuration-append-input config "xkbcomp" xkbcomp "/bin")) + +(define (xorg-configuration-xkb-dir config) + (xorg-configuration-append-input config "xkeyboard-config" + xkeyboard-config "/share/X11/xkb")) + (define* (xorg-wrapper #:optional (config (xorg-configuration))) "Return a derivation that builds a script to start the X server with the given @var{config}. The resulting script should be used in place of @@ -362,12 +377,13 @@ (define* (xorg-wrapper #:optional (config (xorg-confi= guration))) (define exp ;; Write a small wrapper around the X server. #~(begin =2D (setenv "XORG_DRI_DRIVER_PATH" (string-append #$mesa "/lib/dri")) =2D (setenv "XKB_BINDIR" (string-append #$xkbcomp "/bin")) + (setenv "XORG_DRI_DRIVER_PATH" + #$(xorg-configuration-dri-driver-path config)) + (setenv "XKB_BINDIR" #$(xorg-configuration-xkb-bin-dir config)) =20 (let ((X (string-append #$(xorg-configuration-server config) "/bin= /X"))) (apply execl X X =2D "-xkbdir" (string-append #$xkeyboard-config "/share/X11= /xkb") + "-xkbdir" #$(xorg-configuration-xkb-dir config) "-config" #$(xorg-configuration->file config) "-configdir" #$(xorg-configuration-directory (xorg-configuration-modules config)) =2D-=20 2.38.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFTBAEBCAA9FiEE0iajOdjfRIFd3gygPdpSUn0qwZkFAmPpOxUfHHJvbWFuLnNj aGVyZXJAYnVybmluZ3N3ZWxsLmNvbQAKCRA92lJSfSrBmbUaB/9OdqZsRIF7ndO/ M/S0Xjglb4clxdKAwIPr42FLq2AFm8hAZbUNfWyNyEdG8JcIxOdhcmangDlyv9n7 CHFJuZBheVxHPQiJnm8/jOFmosnVtH9rtUE0p1iZ1ZJ+O7SMhF3dFZ/Dtr4y9Ssm ow+EIWp5/afeHFA9iLRfy6qcQ7I29A8N9f+bJs7NTDy6t0ThI0abTfTP1HPrtZkj PuZ4kCw7cyIaPu+Uu8xPWkpsfV24ZiE9sh9iZ336gQZrOEb9oVJ7lRCKladefw9W S/DJ5xNXOngU1PYrMPTbZ9r+/jxK5f8vuYqLLOr+cQoyuIcJtp97fjKraXjs/VBG lVcF8NlU =ppDt -----END PGP SIGNATURE----- --==-=-=--
Roman Scherer <roman.scherer@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#61458
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.