From patchwork Wed Feb 13 19:22:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timothy Sample X-Patchwork-Id: 1080 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 DE35416C17; Wed, 13 Feb 2019 19:30:36 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 5B35F16C15 for ; Wed, 13 Feb 2019 19:30:36 +0000 (GMT) Received: from localhost ([127.0.0.1]:34015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu0Et-0002c0-SA for patchwork@mira.cbaines.net; Wed, 13 Feb 2019 14:30:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu0EU-0002IC-4W for guix-patches@gnu.org; Wed, 13 Feb 2019 14:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu07e-0001Ct-Mw for guix-patches@gnu.org; Wed, 13 Feb 2019 14:23:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu07a-0000xF-SN for guix-patches@gnu.org; Wed, 13 Feb 2019 14:23:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gu07a-0001iU-H7 for guix-patches@gnu.org; Wed, 13 Feb 2019 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34470] [PATCH 1/8] services: gdm: Remove etc service. Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 13 Feb 2019 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34470 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34470@debbugs.gnu.org Received: via spool by 34470-submit@debbugs.gnu.org id=B34470.15500857766564 (code B ref 34470); Wed, 13 Feb 2019 19:23:02 +0000 Received: (at 34470) by debbugs.gnu.org; 13 Feb 2019 19:22:56 +0000 Received: from localhost ([127.0.0.1]:47314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu07P-0001he-H1 for submit@debbugs.gnu.org; Wed, 13 Feb 2019 14:22:56 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44549) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu07M-0001hQ-Lh for 34470@debbugs.gnu.org; Wed, 13 Feb 2019 14:22:50 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4570B21F4F; Wed, 13 Feb 2019 14:22:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 13 Feb 2019 14:22:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=KgRBokNmfDbqpnMQGwfpGWOYzbQWuxiyVu+Xn2FId NY=; b=EIDZhscfXJbS5WthMCd5R74meUM51RFDB8AtPO2F2SSaz6JAghc2ZRZnh FpLlJdYbxA+S7WZZumP1XkG9xJtj7a6LHOrxdD9SgnmCrnaEHaMOHCOqVRzZPjMi oWWetW6zUwfsP23A7riGbAQk8hxySLF5HHhIb8IS9OsQVW4rX7bLlxShwZPKAzl4 /2qouX3Tm1CRKDWO1iAbIoeffy1n1+xRfiJwNP4uTljb3v9YdpIuJ1D3EGa4DqVp ie/AZob9PDEyyMD/B1rNxGbvUhjN8heE1Ka7PtxoXCmTT5jWhu8ptv3bzwLqtXiA pp2asSOUrJkZja+subx8v5t5hub2A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtfedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu fedttdenucenucfjughrpefhvffufffkofgjfhggtgfgsehtkeertdertdejnecuhfhroh hmpefvihhmohhthhihucfurghmphhlvgcuoehsrghmphhlvghtsehnghihrhhordgtohhm qeenucfkphepjeegrdduudeirddukeeirdeggeenucfrrghrrghmpehmrghilhhfrhhomh epshgrmhhplhgvthesnhhghihrohdrtghomhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from mrblack.lan (74-116-186-44.qc.dsl.ebox.net [74.116.186.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 66BA2E4543; Wed, 13 Feb 2019 14:22:42 -0500 (EST) From: Timothy Sample Date: Wed, 13 Feb 2019 14:22:14 -0500 Message-Id: <20190213192221.26599-1-samplet@ngyro.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <87o97fijyh.fsf@ngyro.com> References: <87o97fijyh.fsf@ngyro.com> MIME-Version: 1.0 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-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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gnome.scm (gdm)[arguments]: Update pre-configure phase to make GDM get the configuration file path from an environment variable. * gnu/services/xorg.scm (gdm-etc-service): Remove function. (gdm-configuration-file): New function. (gdm-shepherd-service): Set GDM_CUSTOM_CONF before invoking GDM. (gdm-service-type)[extensions]: Remove etc-service-type extension. --- gnu/packages/gnome.scm | 9 ++++-- gnu/services/xorg.scm | 67 ++++++++++++++++++++---------------------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 367d5de16c..b2c7aa60cc 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -32,7 +32,7 @@ ;;; Copyright © 2018 Jovany Leandro G.C ;;; Copyright © 2018 Vasile Dumitrascu ;;; Copyright © 2018 Björn Höfling -;;; Copyright © 2018 Timothy Sample +;;; Copyright © 2018, 2019 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -5380,6 +5380,9 @@ libxml2.") ;; processes. "gdm_session_set_environment_variable (self, \"GDM_X_SERVER\",\n" " g_getenv (\"GDM_X_SERVER\"));\n" + ;; Propagate the GDM_CUSTOM_CONF environment variable. + "gdm_session_set_environment_variable (self, \"GDM_CUSTOM_CONF\",\n" + " g_getenv (\"GDM_CUSTOM_CONF\"));\n" ;; FIXME: Really glib should be declaring XDG_CONFIG_DIRS as a ;; variable, but it doesn't do that right now. Anyway ;; /run/current-system/profile/share/gnome-session/sessions/gnome.desktop @@ -5399,7 +5402,9 @@ libxml2.") ;; Look for custom GDM conf in /run/current-system. (substitute* '("common/gdm-settings-desktop-backend.c") (("GDM_CUSTOM_CONF") - "\"/run/current-system/etc/gdm/custom.conf\"")) + (string-append "(g_getenv(\"GDM_CUSTOM_CONF\") != NULL" + " ? g_getenv(\"GDM_CUSTOM_CONF\")" + " : GDM_CUSTOM_CONF)"))) ;; Use service-supplied path to X. (substitute* '("daemon/gdm-server.c") (("\\(X_SERVER X_SERVER_ARG_FORMAT") diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index 1efb275794..de5438e3fe 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Andy Wingo ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019 Ludovic Courtès ;;; Copyright © 2015 Sou Bunnbu -;;; Copyright © 2018 Timothy Sample +;;; Copyright © 2018, 2019 Timothy Sample ;;; ;;; This file is part of GNU Guix. ;;; @@ -633,38 +633,34 @@ makes the good ol' XlockMore usable." (x-server gdm-configuration-x-server (default (xorg-wrapper)))) -(define (gdm-etc-service config) - (define gdm-configuration-file - (mixed-text-file "gdm-custom.conf" - "[daemon]\n" - "#User=gdm\n" - "#Group=gdm\n" - (if (gdm-configuration-auto-login? config) - (string-append - "AutomaticLoginEnable=true\n" - "AutomaticLogin=" - (or (gdm-configuration-default-user config) - (error "missing default user for auto-login")) - "\n") - (string-append - "AutomaticLoginEnable=false\n" - "#AutomaticLogin=\n")) - "#TimedLoginEnable=false\n" - "#TimedLogin=\n" - "#TimedLoginDelay=0\n" - "#InitialSetupEnable=true\n" - ;; Enable me once X is working. - "WaylandEnable=false\n" - "\n" - "[debug]\n" - "#Enable=true\n" - "\n" - "[security]\n" - "#DisallowTCP=true\n" - "#AllowRemoteAutoLogin=false\n")) - `(("gdm" ,(file-union - "gdm" - `(("custom.conf" ,gdm-configuration-file)))))) +(define (gdm-configuration-file config) + (mixed-text-file "gdm-custom.conf" + "[daemon]\n" + "#User=gdm\n" + "#Group=gdm\n" + (if (gdm-configuration-auto-login? config) + (string-append + "AutomaticLoginEnable=true\n" + "AutomaticLogin=" + (or (gdm-configuration-default-user config) + (error "missing default user for auto-login")) + "\n") + (string-append + "AutomaticLoginEnable=false\n" + "#AutomaticLogin=\n")) + "#TimedLoginEnable=false\n" + "#TimedLogin=\n" + "#TimedLoginDelay=0\n" + "#InitialSetupEnable=true\n" + ;; Enable me once X is working. + "WaylandEnable=false\n" + "\n" + "[debug]\n" + "#Enable=true\n" + "\n" + "[security]\n" + "#DisallowTCP=true\n" + "#AllowRemoteAutoLogin=false\n")) (define (gdm-pam-service config) "Return a PAM service for @command{gdm}." @@ -698,6 +694,9 @@ makes the good ol' XlockMore usable." "/bin/gdm")) #:environment-variables (list (string-append + "GDM_CUSTOM_CONF=" + #$(gdm-configuration-file config)) + (string-append "GDM_X_SERVER=" #$(gdm-configuration-x-server config)) ;; XXX: GDM requires access to a handful of @@ -719,8 +718,6 @@ makes the good ol' XlockMore usable." (const %gdm-accounts)) (service-extension pam-root-service-type gdm-pam-service) - (service-extension etc-service-type - gdm-etc-service) (service-extension dbus-root-service-type (compose list gdm-configuration-gdm))))