From patchwork Sun Feb 9 21:31:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 20199 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6244D17AF9; Sun, 9 Feb 2020 21:42:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 301D017A2F for ; Sun, 9 Feb 2020 21:42:26 +0000 (GMT) Received: from localhost ([::1]:54614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0uLR-0008N7-KV for patchwork@mira.cbaines.net; Sun, 09 Feb 2020 16:42:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44453) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0uBP-0005e3-Fh for guix-patches@gnu.org; Sun, 09 Feb 2020 16:32:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0uBO-0007qo-34 for guix-patches@gnu.org; Sun, 09 Feb 2020 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47350) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0uBN-0007qc-W9 for guix-patches@gnu.org; Sun, 09 Feb 2020 16:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0uBN-0007wz-Tr for guix-patches@gnu.org; Sun, 09 Feb 2020 16:32:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39535] [PATCH] services: xorg: Filter modules based on system Resent-From: shtwzrd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 09 Feb 2020 21:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39535 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39535@debbugs.gnu.org Cc: shtwzrd X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158128388730517 (code B ref -1); Sun, 09 Feb 2020 21:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Feb 2020 21:31:27 +0000 Received: from localhost ([127.0.0.1]:53323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0uAo-0007w9-Pp for submit@debbugs.gnu.org; Sun, 09 Feb 2020 16:31:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:53185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0uAn-0007w2-KO for submit@debbugs.gnu.org; Sun, 09 Feb 2020 16:31:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44410) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0uAm-0005d1-1D for guix-patches@gnu.org; Sun, 09 Feb 2020 16:31:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0uAk-0007WR-CC for guix-patches@gnu.org; Sun, 09 Feb 2020 16:31:23 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:50648) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j0uAj-0007Uu-Rm for guix-patches@gnu.org; Sun, 09 Feb 2020 16:31:22 -0500 Date: Sun, 09 Feb 2020 21:31:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1581283878; bh=sDxWTA1D+MO8abxwjy6DW9WdCeWavqobhGoakMNzyg0=; h=Date:To:From:Cc:Reply-To:Subject:Feedback-ID:From; b=nxh+fmSjImpe/gmmyKmJbBpOWL4LjHMhK7605j8hkXbKGa7Kk8A+CHaXQe/ctKAnI l39/FddXzjiD0zNhmNHQx2xElN9/MCNjKQ4WJV2b7C9426cYD7glXwvWyDpPvAwQUu uVHKWtshhffAjEr5hYjP42G/Tm0YD8qHv6dsL22Y= Message-ID: Feedback-ID: zWLOmdNK465NSc9NhqEt4ZM6-V4iXach0rvA_JGRX4PV2HBydhahPKFng7EKRbGuoUf2smBaJzvGb4W4uiVQsg==:Ext:ProtonMail MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-Mailman-Approved-At: Sun, 09 Feb 2020 16:42:18 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: shtwzrd , shtwzrd via Guix-patches X-Patchwork-Original-From: shtwzrd via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches Fixes . Reported by shtwzrd . * gnu/services/xorg.scm (xorg-configuration): Apply a filter over %default-xorg-modules packages, excluding those for which the %current-system is not among the package's supported-systems. This patch makes it possible to use xorg-configuration on systems other than x86_64 and i686, as without it, xf86-video-intel would be pulled in on the unsupported architecture and fail. --- gnu/services/xorg.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 9c84f7413f..edb421ada6 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -152,7 +152,12 @@ xorg-configuration make-xorg-configuration xorg-configuration? (modules xorg-configuration-modules ;list of packages - (default %default-xorg-modules)) + ; filter out modules not supported on current system + (default (filter + (lambda (p) + (member (%current-system) + (package-supported-systems p))) + %default-xorg-modules))) (fonts xorg-configuration-fonts ;list of packges (default %default-xorg-fonts)) (drivers xorg-configuration-drivers ;list of strings @@ -356,7 +361,7 @@ in @var{config}, are available. The result should be used in place of #~(apply execl #$X #$X ;; Second #$X is for argv[0]. "-logverbose" "-verbose" "-terminate" #$@(xorg-configuration-server-arguments config) - (cdr (command-line)))) + (cdr (command-line)))) (program-file "startx" exp)) @@ -477,7 +482,7 @@ desktop session from the system or user profile will be used." (auto-login? slim-configuration-auto-login? (default #f)) (default-user slim-configuration-default-user - (default "")) + (default "")) (theme slim-configuration-theme (default %default-slim-theme)) (theme-name slim-configuration-theme-name @@ -870,10 +875,10 @@ the GNOME desktop environment.") "Enable=" (if (gdm-configuration-debug? config) "true" "false") "\n" - "\n" - "[security]\n" - "#DisallowTCP=true\n" - "#AllowRemoteAutoLogin=false\n")) + "\n" + "[security]\n" + "#DisallowTCP=true\n" + "#AllowRemoteAutoLogin=false\n")) (define (gdm-pam-service config) "Return a PAM service for @command{gdm}."