From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mEkiLtk/1l5RFgAA0tVLHw (envelope-from ) for ; Tue, 02 Jun 2020 12:02:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id c3XlKdk/1l7VTgAAbx9fmQ (envelope-from ) for ; Tue, 02 Jun 2020 12:02:33 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B40B1940983 for ; Tue, 2 Jun 2020 12:02:32 +0000 (UTC) Received: from localhost ([::1]:39092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg5ck-0004Ft-5L for larch@yhetil.org; Tue, 02 Jun 2020 08:02:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg5cJ-0004FH-EA for bug-guix@gnu.org; Tue, 02 Jun 2020 08:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg5cI-00021e-6K for bug-guix@gnu.org; Tue, 02 Jun 2020 08:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jg5cI-0002NY-4r for bug-guix@gnu.org; Tue, 02 Jun 2020 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#40806: xorg-configuration->file doesn't honor xorg-configuration-server Resent-From: Caleb Ristvedt Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 02 Jun 2020 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40806 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 40806@debbugs.gnu.org Received: via spool by 40806-submit@debbugs.gnu.org id=B40806.15910992829098 (code B ref 40806); Tue, 02 Jun 2020 12:02:02 +0000 Received: (at 40806) by debbugs.gnu.org; 2 Jun 2020 12:01:22 +0000 Received: from localhost ([127.0.0.1]:38099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg5bd-0002Mg-Lu for submit@debbugs.gnu.org; Tue, 02 Jun 2020 08:01:22 -0400 Received: from mail-il1-f180.google.com ([209.85.166.180]:45393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jg5bc-0002MU-7N for 40806@debbugs.gnu.org; Tue, 02 Jun 2020 08:01:20 -0400 Received: by mail-il1-f180.google.com with SMTP id 9so12570724ilg.12 for <40806@debbugs.gnu.org>; Tue, 02 Jun 2020 05:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cune-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=7tLO5Nki759nULGnkbK40+1jEG09Ym7Gv6D09nijWX4=; b=gVS8Q/goZW/090DD6oO4nD3ZiTRc1d6Wl+bnO1e3P2Xz+9sVStKpwXxTIZAY3olx0B E0r2bKk8PHG0W6UZXlaIbb65RsvNULfUVPz2ONvxD4FAvGKB9iNtfnP+QPEX8CGAFtTL hRUr578GaRUmyXskpHWbiSG6wL6fWhfMAblS35Aj6CMhZ5QQOyT3tenfMvTV7Faq7Qkf 9inEi6ZvzdHF/JLJI5Zn2RmXNllzk3skPkPMLhQgX93j+3eQxTMhewhSshhSGBLL0r5w ouCiKJ+zoJzF67IhxovQsBjtqVpSdhLWkydPhnYWxV9n42VlNr/gdEq8uig++uuKu1HJ R6Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7tLO5Nki759nULGnkbK40+1jEG09Ym7Gv6D09nijWX4=; b=QU3MfRQHiPPw2OzYqf5t92ux2Bi+dkLQx8QmorVZF4YeKJVexwOiO66pxVoNAdHwLp bPjWSmGvTwl3XTsm61xpdYE8BrM8NlG2ETgl63goRuOHLGDW2fmvrpIDa7pfjdZXbDez 92oTDk1MGI6gER1pqWlzl1ON0fH+s5+SxmSW8AWiV22SHUDwJSoczD9M26NIcMHIvaaR XTxtkRNgaVglsdz7n6IBVRP9DMs8hfvptW2qpA+7iX1al3SOXGTHcnqYiI2ySFQsu/MT vwwVNc9OtWuWzODttVuf0bfO0MuWWpZf41emuBV/YStRSbWDbPV7Jra0ZIRgWlt6plYZ 7fsQ== X-Gm-Message-State: AOAM532+ZjXwPY+WBS9iPQ7PZeVspa5uB/+WOEJ0vBQ0VRXl7BcomFuN 93QLz9q+iv09DgelIcXmSicVG9aiKDc= X-Google-Smtp-Source: ABdhPJwqKs7xrymtAaCi0mvrPf1KON0T7CcBrKEI8Uv95IpRTn5jpgbogpwl9x+Hg9APn3951O5zvg== X-Received: by 2002:a05:6e02:f44:: with SMTP id y4mr19467667ilj.237.1591099274201; Tue, 02 Jun 2020 05:01:14 -0700 (PDT) Received: from GuixPotato ([208.89.170.24]) by smtp.gmail.com with ESMTPSA id n12sm965574iog.25.2020.06.02.05.01.13 for <40806@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 05:01:13 -0700 (PDT) From: Caleb Ristvedt References: <87blnh4rck.fsf@cune.org> Date: Tue, 02 Jun 2020 07:01:04 -0500 In-Reply-To: <87blnh4rck.fsf@cune.org> (Caleb Ristvedt's message of "Thu, 23 Apr 2020 20:14:51 -0500") Message-ID: <87blm17k3j.fsf@cune.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=cune-org.20150623.gappssmtp.com header.s=20150623 header.b=gVS8Q/go; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -2.11 X-TUID: 1JtPtB01zwR4 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain If it helps, here's a patch that makes the trivial change. - reepca --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-xorg-honor-xorg-configuration-server-in-xorg-configu.patch Content-Transfer-Encoding: quoted-printable From=20e1071c830ce511eecd57617a3f188740fd49d703 Mon Sep 17 00:00:00 2001 From: Caleb Ristvedt Date: Tue, 2 Jun 2020 06:28:46 -0500 Subject: [PATCH] xorg: honor xorg-configuration-server in xorg-configuration->file Previously the xorg-server package specified in the configuration was ignor= ed entirely in xorg-configuration->file. This had the effect that while the X program of the configured package would be executed, the modules of the configured package would be ignored in favor of the default xorg-server package's modules. This fixes that. * gnu/services/xorg.scm (xorg-configuration->file): honor xorg-configuration-server. =2D-- gnu/services/xorg.scm | 161 +++++++++++++++++++++--------------------- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 2505bde97b..ca39994516 100644 =2D-- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -180,31 +180,32 @@ (define (xorg-configuration->file config) "Compute an Xorg configuration file corresponding to CONFIG, an record." =2D (define all-modules =2D ;; 'xorg-server' provides 'fbdevhw.so' etc. =2D (append (xorg-configuration-modules config) =2D (list xorg-server))) =2D =2D (define build =2D #~(begin =2D (use-modules (ice-9 match) =2D (srfi srfi-1) =2D (srfi srfi-26)) =2D =2D (call-with-output-file #$output =2D (lambda (port) =2D (define drivers =2D '#$(xorg-configuration-drivers config)) + (let ((xorg-server (xorg-configuration-server config))) + (define all-modules + ;; 'xorg-server' provides 'fbdevhw.so' etc. + (append (xorg-configuration-modules config) + (list xorg-server))) + + (define build + #~(begin + (use-modules (ice-9 match) + (srfi srfi-1) + (srfi srfi-26)) + + (call-with-output-file #$output + (lambda (port) + (define drivers + '#$(xorg-configuration-drivers config)) =20 =2D (define (device-section driver) =2D (string-append " + (define (device-section driver) + (string-append " Section \"Device\" Identifier \"device-" driver "\" Driver \"" driver "\" EndSection")) =20 =2D (define (screen-section driver resolutions) =2D (string-append " + (define (screen-section driver resolutions) + (string-append " Section \"Screen\" Identifier \"screen-" driver "\" Device \"device-" driver "\" @@ -218,8 +219,8 @@ Section \"Screen\" EndSubSection EndSection")) =20 =2D (define (input-class-section layout variant model options) =2D (string-append " + (define (input-class-section layout variant model options) + (string-append " Section \"InputClass\" Identifier \"evdev keyboard catchall\" MatchIsKeyboard \"on\" @@ -243,69 +244,69 @@ Section \"InputClass\" Driver \"evdev\" EndSection\n")) =20 =2D (define (expand modules) =2D ;; Append to MODULES the relevant /lib/xorg/modules =2D ;; sub-directories. =2D (append-map (lambda (module) =2D (filter-map (lambda (directory) =2D (let ((full (string-append mod= ule =2D dir= ectory))) =2D (and (file-exists? full) =2D full))) =2D '("/lib/xorg/modules/drivers" =2D "/lib/xorg/modules/input" =2D "/lib/xorg/modules/multimedia" =2D "/lib/xorg/modules/extensions"= ))) =2D modules)) =2D =2D (display "Section \"Files\"\n" port) =2D (for-each (lambda (font) =2D (format port " FontPath \"~a\"~%" font)) =2D '#$(xorg-configuration-fonts config)) =2D (for-each (lambda (module) =2D (format port =2D " ModulePath \"~a\"~%" =2D module)) =2D (append (expand '#$all-modules) =2D =2D ;; For fbdevhw.so and so on. =2D (list #$(file-append xorg-server =2D "/lib/xorg/modules"))= )) =2D (display "EndSection\n" port) =2D (display " + (define (expand modules) + ;; Append to MODULES the relevant /lib/xorg/modules + ;; sub-directories. + (append-map (lambda (module) + (filter-map (lambda (directory) + (let ((full (string-append mod= ule + dir= ectory))) + (and (file-exists? full) + full))) + '("/lib/xorg/modules/drivers" + "/lib/xorg/modules/input" + "/lib/xorg/modules/multimedia" + "/lib/xorg/modules/extensions"= ))) + modules)) + + (display "Section \"Files\"\n" port) + (for-each (lambda (font) + (format port " FontPath \"~a\"~%" font)) + '#$(xorg-configuration-fonts config)) + (for-each (lambda (module) + (format port + " ModulePath \"~a\"~%" + module)) + (append (expand '#$all-modules) + + ;; For fbdevhw.so and so on. + (list #$(file-append xorg-server + "/lib/xorg/modules"))= )) + (display "EndSection\n" port) + (display " Section \"ServerFlags\" Option \"AllowMouseOpenFail\" \"on\" EndSection\n" port) =20 =2D (display (string-join (map device-section drivers) "\n") =2D port) =2D (newline port) =2D (display (string-join =2D (map (cut screen-section <> =2D '#$(xorg-configuration-resolutions confi= g)) =2D drivers) =2D "\n") =2D port) =2D (newline port) =2D =2D (let ((layout #$(and=3D> (xorg-configuration-keyboard-layou= t config) =2D keyboard-layout-name)) =2D (variant #$(and=3D> (xorg-configuration-keyboard-layou= t config) =2D keyboard-layout-variant)) =2D (model #$(and=3D> (xorg-configuration-keyboard-layou= t config) =2D keyboard-layout-model)) =2D (options '#$(and=3D> (xorg-configuration-keyboard-layo= ut config) =2D keyboard-layout-options))) =2D (when layout =2D (display (input-class-section layout variant model optio= ns) =2D port) =2D (newline port))) =2D =2D (for-each (lambda (config) =2D (display config port)) =2D '#$(xorg-configuration-extra-config config)))))) =2D =2D (computed-file "xserver.conf" build)) + (display (string-join (map device-section drivers) "\n") + port) + (newline port) + (display (string-join + (map (cut screen-section <> + '#$(xorg-configuration-resolutions confi= g)) + drivers) + "\n") + port) + (newline port) + + (let ((layout #$(and=3D> (xorg-configuration-keyboard-layou= t config) + keyboard-layout-name)) + (variant #$(and=3D> (xorg-configuration-keyboard-layou= t config) + keyboard-layout-variant)) + (model #$(and=3D> (xorg-configuration-keyboard-layou= t config) + keyboard-layout-model)) + (options '#$(and=3D> (xorg-configuration-keyboard-layo= ut config) + keyboard-layout-options))) + (when layout + (display (input-class-section layout variant model optio= ns) + port) + (newline port))) + + (for-each (lambda (config) + (display config port)) + '#$(xorg-configuration-extra-config config)))))) + + (computed-file "xserver.conf" build))) =20 (define (xorg-configuration-directory modules) "Return a directory that contains the @code{.conf} files for X.org that =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEdNapMPRLm4SepVYGwWaqSV9/GJwFAl7WP4AACgkQwWaqSV9/ GJwBTwf/cykuoXqmdIcCipWE1crV1HXMtMFLqGuxjP2F77CqE00gXVYUFoMCvJyn fr6CxWU/gYvRPL4+90XRx43dm8HdF8N3EOkbhtMxeSVMF+Na16CRkJaegmgsgycS oVkS8YknRvuNCjNUdIjd2VYAJ0nwB3VPgBoO8sopg9LytvRJd0HYhY2bHdpPyu4G mX6fXu8ycif6m28furu4c3x7tnVROmxKlqr2csYhKrROJ3Wkpo5x2l2jcFDnNtw2 Rrey39ImibrnIRng0KkGIEFwDU2xKDd5fmNsRQKq5roS49GerHMka8uHGrbGkOy/ Rmm3pppbvdvYMgt8InX5zKGUqsN24Q== =HEeo -----END PGP SIGNATURE----- --==-=-=--