From patchwork Sat Aug 13 06:54:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41590 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 1B6BB27BBEB; Sat, 13 Aug 2022 07:56:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9EA7C27BBEA for ; Sat, 13 Aug 2022 07:56:16 +0100 (BST) Received: from localhost ([::1]:42416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4B-0004Mk-PJ for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl30-0004LP-Gs for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl30-0006G5-0j for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl2z-0006oW-Tj for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 01/14] services: configuration: Add a 'maybe-value-set?' procedure. References: <20220813065006.27151-1-maxim.cournoyer@gmail.com> In-Reply-To: <20220813065006.27151-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369226110 (code B ref 57168); Sat, 13 Aug 2022 06:55:01 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:52 +0000 Received: from localhost ([127.0.0.1]:59490 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2n-0006mT-5i for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:52 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:38891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2k-0006m7-If for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:47 -0400 Received: by mail-qt1-f169.google.com with SMTP id y18so2291358qtv.5 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=HPlyqZ1NEiLKUs8b9GgAK4ANceNvfGgBvBKUHD+Czpo=; b=XWG+QaprJSmcQx9la8wR+yuPWoYm1ZZ1mAj8xzsANRgC3iZCd0ZRc1Uy4ghn35MT/c 1EsaKL8/GdZB4TZ/LdOHjneDTELgWtAV1CESAKY3voi9yg4AbNmFVnUI8pwduOE0+K4C 3Z1EanuMLgTcTGYrkvLihPO0XszCV8wG6fSyh9G8TKyGv2bp19lUY1NAdo09gjZiiYsM By8O2unBCHw7CjGXZs9w3pJYRRVSh0RhIYP6GHTog7DkldNZ156OLs7O5QF1mK3YxYNN eIR1zf8PjlhJWv7Zy3PJbLA4GZNO9nNcc+FZyMPIg7EkH7Tu82pW84I4uNypmAMn6w9i zWqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=HPlyqZ1NEiLKUs8b9GgAK4ANceNvfGgBvBKUHD+Czpo=; b=aXmInAMyw55jwkz9mPRCn7g9WbxorAg3HEOvtNH2dk3xtjM0swZ+mkhSXjP9cFIWti /2kppq/MoJwtvkRBK9iACMub5N/YuSbQKX8+TmoQqZMgBgogEaoknIMLdAp7eltN0ELy 2JFxxfULunBeYC8ODzT8iuPYA1FDaH3TFdnJJRJZD/IghygEdvSdX3KXBKBxIYyylOK4 TwXGIJ/GgkRm1mXf75antGzUjXhQ8Uf0Y9oTD7i3VXVjcWzp4jPTcZ3w30XC7IL0nbDV ZNH0NYFl5mi/QO2ZkMTevroODLBFxMcJw1k18L+HyQztJ8optoF8ZTFqrQl4BAyWSZTP QSvQ== X-Gm-Message-State: ACgBeo3G6ebBmusu6546h6hfuTFMBkD8YdUu80D01kGImTkTMirA/Kvj /KMjRI2wSZcXWddhDqd1Ur4s2khR2+c= X-Google-Smtp-Source: AA6agR4PZ5QF9q0shVUYY8N+8ze+HFpnEWb5ySeabxfv01+ZlF2akLsJpMqsu78xWC2ZeoSSvJp1pw== X-Received: by 2002:a05:622a:1304:b0:343:470:62dc with SMTP id v4-20020a05622a130400b00343047062dcmr6519337qtk.270.1660373680646; Fri, 12 Aug 2022 23:54:40 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:40 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:20 -0400 Message-Id: <20220813065433.27319-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/services/configuration.scm (maybe-value-set?): New procedure. * doc/guix.texi (Complex Configurations): Document it. Remove comment showing usage of 'maybe-string' with a default value, which doesn't make sense. --- doc/guix.texi | 7 ++++++- gnu/services/configuration.scm | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 86cfe7d49c..039df29ebc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -38999,7 +38999,7 @@ to be a string, or left unspecified. (name ;; If set to a string, the `serialize-string' procedure will be used ;; to serialize the string. Otherwise this field is not serialized. - maybe-string ; equivalent to (maybe-string *unspecified*) + maybe-string "The name of this module.")) @end lisp @@ -39030,6 +39030,11 @@ whether its value is set or not. @end lisp @end deffn +@deffn (Scheme Procedure) maybe-value-set? @var{value} +Predicate to check whether a user explicitly specified the value of a +maybe field. +@end deffn + @deffn {Scheme Procedure} serialize-configuration @var{configuration} @ @var{fields} Return a G-expression that contains the values corresponding to the diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 3007e8de35..b41b4d2e62 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -57,6 +57,7 @@ (define-module (gnu services configuration) serialize-configuration define-maybe define-maybe/no-serialization + maybe-value-set? generate-documentation configuration->documentation empty-serializer @@ -300,6 +301,10 @@ (define-configuration stem (field field-type+def (define (empty-serializer field-name val) "") (define serialize-package empty-serializer) +(define (maybe-value-set? value) + "Predicate to check whether a 'maybe' value was explicitly provided." + (not (eq? 'unset value))) + ;; A little helper to make it easier to document all those fields. (define (generate-documentation documentation documentation-name) (define (str x) (object->string x)) From patchwork Sat Aug 13 06:54:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41591 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 6CB8D27BBEA; Sat, 13 Aug 2022 07:56:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 821D027BBE9 for ; Sat, 13 Aug 2022 07:56:16 +0100 (BST) Received: from localhost ([::1]:42434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4B-0004NV-Fx for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl30-0004LQ-NN for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41527) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl30-0006G9-DZ for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl30-0006oe-9O for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 02/14] gnu: accountsservice: Update to 22.08.8, enable doc and test suite. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369326123 (code B ref 57168); Sat, 13 Aug 2022 06:55:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:53 +0000 Received: from localhost ([127.0.0.1]:59496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2q-0006n1-HF for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:53 -0400 Received: from mail-qt1-f177.google.com ([209.85.160.177]:35724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2l-0006m9-Bl for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:49 -0400 Received: by mail-qt1-f177.google.com with SMTP id h22so2293348qtu.2 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=5QWfazHhvzcuJ4K9m5E+6fJLeDMKgT/medrbRQC3irE=; b=DXezXY9pDRie1/k9s/Npcs0dYMye9qfhPDx69lmfdFelA6K7lBGZbmgyX9PkJ3h0V7 BKIixv3sogkgc55XwYFtpDNtvSZ6icxck256Vk/+sixy7Q0sKR0XyFsUb+GLSbyAfuxq t3b0F7avJ2h3XCzbDsjIrogk9o9HanaPyVzQNf20ZF5IbuZ1JdpHH10QrpVW3LvECLFB 1iHw4BIp6+RVR27xYBhKEmTdX/L/vK7J7h2K3tUGBagbkVgprAdbO3f3aGYhm4JXhaL3 zU1zuzHMvD6OV3YMjI8KZgykE92zn2YCD3GJ1P4avZgfjhcXnLlFL8IOWgv+hEhzFuMX H1Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=5QWfazHhvzcuJ4K9m5E+6fJLeDMKgT/medrbRQC3irE=; b=7UoWF+p7Vqvdf8759FVrGTO7r0EG3pnYs++w8gHXOlXPSGM/G6hYIej+C3zJjBmYjj 8VnYPVDC19j0IH2SChdPQNi5dU5r2HRdFwmq4uFmUyosEI0THlpnt8P0erym3iCfoMkH Q7rAGcFAjXq24jtQeIWCB0JEztoVt14zuCA9fLo/wFD0iNe7nQZBwsmrPnZYzLq+iB7K I9x4Eio6uE1PAf5Z3NO9zjPkQqJec0p++GFfB17n4RnEobWjoqPfKxgRcXEYz/+LnODf 2J1s/jvWFuLU+5YOrfu5yYxkeLRBPITlZXgb9O7fSbauPkmcPAGo3nMnQs/R8bHFrCOa HnSQ== X-Gm-Message-State: ACgBeo3SSKwnx9979pdlbQd3kqTPk5Io81qXg7iTrPkOIpUkz5mBmdph n0yDkvigoapJQu2npAePxMhTy5+TOn0= X-Google-Smtp-Source: AA6agR46OaqUgFmUtBzoolJF9Iw8zMLTWTVb2qXNI9prxatWjNHSVbRxo8osnZVwqbgadLzaWmYyxQ== X-Received: by 2002:a05:622a:1dce:b0:31f:13cd:489c with SMTP id bn14-20020a05622a1dce00b0031f13cd489cmr6580723qtb.599.1660373681482; Fri, 12 Aug 2022 23:54:41 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:40 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:21 -0400 Message-Id: <20220813065433.27319-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/freedesktop.scm (accountsservice): Update to 22.08.8. [tests?]: Delete argument. [configure-flags]: Remove obsolete "-Dsystemd" flag. Add "-Ddocbook=true" and "-Dgtk_doc=true". [phases]{patch-docbook-references}: New phase. {patch-/bin/cat}: Delete and merge into... [patch-paths]: ... this phase, renamed from pre-configure. Use search-input-file. [native-inputs]: Add docbook-xml-4.1.2, docbook-xsl, gtk-doc, libxml2, libxslt, python-dbusmock, python-pygobject, vala and xmlto. --- gnu/packages/freedesktop.scm | 85 +++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 037a247243..8ebd0e5359 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -27,7 +27,7 @@ ;;; Copyright © 2021 Robby Zambito ;;; Copyright © 2021, 2022 Maxime Devos ;;; Copyright © 2021 John Kehayias -;;; Copyright © 2021, 2021 Maxim Cournoyer +;;; Copyright © 2021, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2022 Daniel Meißner ;;; Copyright © 2022 muradm ;;; @@ -1435,7 +1435,7 @@ (define-public udisks (define-public accountsservice (package (name "accountsservice") - (version "0.6.55") + (version "22.08.8") (source (origin (method url-fetch) @@ -1443,45 +1443,62 @@ (define-public accountsservice "accountsservice/accountsservice-" version ".tar.xz")) (sha256 - (base32 "16wwd633jak9ajyr1f1h047rmd09fhf3kzjz6g5xjsz0lwcj8azz")))) + (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch")))) (build-system meson-build-system) (arguments - `(#:tests? #f ; XXX: tests require DocBook 4.1.2 - #:configure-flags + `(#:configure-flags '("--localstatedir=/var" - "-Dsystemdsystemunitdir=/tmp/empty" - "-Dsystemd=false" - "-Delogind=true") + "-Delogind=true" + "-Ddocbook=true" + "-Dgtk_doc=true" + "-Dsystemdsystemunitdir=/tmp/empty") #:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-/bin/cat - (lambda _ - (substitute* "src/user.c" - (("/bin/cat") (which "cat"))))) - (add-before - 'configure 'pre-configure - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "meson_post_install.py" - (("in dst_dirs") "in []")) - (let ((shadow (assoc-ref inputs "shadow"))) - (substitute* '("src/user.c" "src/daemon.c") - (("/usr/sbin/usermod") - (string-append shadow "/sbin/usermod")) - (("/usr/sbin/useradd") - (string-append shadow "/sbin/useradd")) - (("/usr/sbin/userdel") - (string-append shadow "/sbin/userdel")) - (("/usr/bin/passwd") - (string-append shadow "/bin/passwd")) - (("/usr/bin/chage") - (string-append shadow "/bin/chage"))))))))) + (add-after 'unpack 'patch-docbook-references + ;; Having XML_CATALOG_FILES set is not enough; xmlto does not seem + ;; to honor it. + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (find-files "." "\\.xml(\\.in)?$") + (("http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd") + (search-input-file inputs "share/xml/dbus-1/introspect.dtd")) + (("http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd") + (search-input-file inputs "xml/dtd/docbook/docbookx.dtd"))))) + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "meson_post_install.py" + (("in dst_dirs") "in []")) + (substitute* '("src/user.c" "src/daemon.c") + (("/bin/cat") + (search-input-file inputs "bin/cat")) + (("/usr/sbin/usermod") + (search-input-file inputs "sbin/usermod")) + (("/usr/sbin/useradd") + (search-input-file inputs "sbin/useradd")) + (("/usr/sbin/userdel") + (search-input-file inputs "sbin/userdel")) + (("/usr/bin/passwd") + (search-input-file inputs "bin/passwd")) + (("/usr/bin/chage") + (search-input-file inputs "bin/chage")))))))) (native-inputs - `(("glib:bin" ,glib "bin") ; for gdbus-codegen, etc. - ("gobject-introspection" ,gobject-introspection) - ("intltool" ,intltool) - ("pkg-config" ,pkg-config))) + (list docbook-xml-4.1.2 + docbook-xsl + `(,glib "bin") ; for gdbus-codegen, etc. + gobject-introspection + gtk-doc + intltool + libxml2 ;for XML_CATALOG_FILES + libxslt + pkg-config + python-dbusmock + python-pygobject + vala + xmlto)) (inputs - (list dbus elogind polkit shadow)) + (list dbus + elogind + polkit + shadow)) (home-page "https://www.freedesktop.org/wiki/Software/AccountsService/") (synopsis "D-Bus interface for user account query and manipulation") (description From patchwork Sat Aug 13 06:54:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41596 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 E5D8D27BBEA; Sat, 13 Aug 2022 07:56:45 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 62DE527BBE9 for ; Sat, 13 Aug 2022 07:56:45 +0100 (BST) Received: from localhost ([::1]:44036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4e-0005dC-Ez for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl32-0004LU-R2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41528) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl30-0006GG-Rv for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl30-0006ol-MJ for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 03/14] gnu: accountsservice: Provide a means to locate extensions. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369426137 (code B ref 57168); Sat, 13 Aug 2022 06:55:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:54 +0000 Received: from localhost ([127.0.0.1]:59500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2r-0006nI-H6 for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:54 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]:41911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2m-0006mA-2m for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:50 -0400 Received: by mail-qt1-f181.google.com with SMTP id c20so2283975qtw.8 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=OFy/XpNwdYperVaJc3PNBDp3Ic3SuFkYjOztPEosXpQ=; b=EHuqUZtQKOwC7A5sPNtmfkMMNhC/qVFw9ZdAji+pWZAxgK0MHcPK0TsEx7AX6jcWQo n/UOKi7anL4NmlVCoW2j2KYExOAF4ARnFq+dh9MHnNwbeq4ZyGDxzNLr3LZ3UxcRa9mz VDDNKF5XBlt2/qiY1BWCoNMLsUkS8LA27s3TDId0jnlagAkAyFwihH7YqhS1wBJJZydV kWo+fVEnu1jxde9LaYz7DxpM6AKIyH8n1ZbTtODslt487wwAeOfGOrjOq/qIpVq20kcz zX7vGVz+YKGAy0KIrAryywNb2YmYzrKJrjLc70/YMUrNe3fFsnNq1tgVgqytiUHF6Vq+ 9XRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=OFy/XpNwdYperVaJc3PNBDp3Ic3SuFkYjOztPEosXpQ=; b=scme8f3gK8Q4TbL5m4Te8NDVFUcgL48EN8Krn8BYBDrEh5AdAqL1NVkQ8J7y6EAQTc kASUFa0iAAz/pdpz6lTmqV1uzgiND0MQ/wEsUkXLk1JUSF59K/4M+lRzQbrBXVsd70a6 7ijkzJTb20f8ca9zz5jTTovEQ1/7uUxPgjGOVFPMyMGZ+KvYfn4f44EfXTaXiGIsORF7 fxfj2fLkh7NMgWPRNbZ6PfNHohX3+tPsoLsxFw1GslAEONwOtYJI53gCeaf/f7isHNaR RZdo2rVOfAssb8c0ec44mBOxxryBCKu9lLc33gIdeNsYLoELrrIEy8vYNiVwQvTCxOW7 nXhQ== X-Gm-Message-State: ACgBeo2s92hB9YAdky2p44DBN9xUVPyHjBrskTFuPyCgT3fLWqndw3JP fO+J5jH1s+GeWSWg5mmZgdb/eKLpMCo= X-Google-Smtp-Source: AA6agR47vvik7YEfewQ/XEvtuL9QUK7WMI0muyE/yfylm5a3aQSXCFIsPWf8IDuTHVlm8EjZHHD7JQ== X-Received: by 2002:a05:622a:1989:b0:344:52ff:66e6 with SMTP id u9-20020a05622a198900b0034452ff66e6mr407783qtc.76.1660373682477; Fri, 12 Aug 2022 23:54:42 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:41 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:22 -0400 Message-Id: <20220813065433.27319-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/patches/accountsservice-extensions.patch: New patch. * gnu/packages/freedesktop.scm (accountsservice)[source]: Apply it. [phases]{wrap-with-xdg-data-dirs}: New phase. --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 12 +++++++-- .../patches/accountsservice-extensions.patch | 25 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/accountsservice-extensions.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2d32d85d47..c2a33fa7d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -840,6 +840,7 @@ dist_patch_DATA = \ %D%/packages/patches/abseil-cpp-fix-strerror_test.patch \ %D%/packages/patches/adb-add-libraries.patch \ %D%/packages/patches/adb-libssl_11-compatibility.patch \ + %D%/packages/patches/accountsservice-extensions.patch \ %D%/packages/patches/aegis-constness-error.patch \ %D%/packages/patches/aegis-perl-tempdir1.patch \ %D%/packages/patches/aegis-perl-tempdir2.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 8ebd0e5359..ab6fb480a7 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -1443,7 +1443,8 @@ (define-public accountsservice "accountsservice/accountsservice-" version ".tar.xz")) (sha256 - (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch")))) + (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch")) + (patches (search-patches "accountsservice-extensions.patch")))) (build-system meson-build-system) (arguments `(#:configure-flags @@ -1479,7 +1480,14 @@ (define-public accountsservice (("/usr/bin/passwd") (search-input-file inputs "bin/passwd")) (("/usr/bin/chage") - (search-input-file inputs "bin/chage")))))))) + (search-input-file inputs "bin/chage"))))) + (add-after 'install 'wrap-with-xdg-data-dirs + ;; This is to allow accountsservice finding extensions, which + ;; should be installed to the system profile. + (lambda* (#:key outputs #:allow-other-keys) + (wrap-program (search-input-file outputs "libexec/accounts-daemon") + '("XDG_DATA_DIRS" prefix + ("/run/current-system/profile/share")))))))) (native-inputs (list docbook-xml-4.1.2 docbook-xsl diff --git a/gnu/packages/patches/accountsservice-extensions.patch b/gnu/packages/patches/accountsservice-extensions.patch new file mode 100644 index 0000000000..2cfab580e3 --- /dev/null +++ b/gnu/packages/patches/accountsservice-extensions.patch @@ -0,0 +1,25 @@ +Patch from NixOS retrieved from +https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch. + +diff --git a/src/extensions.c b/src/extensions.c +index 038dcb2..830465d 100644 +--- a/src/extensions.c ++++ b/src/extensions.c +@@ -121,16 +121,7 @@ daemon_read_extension_directory (GHashTable *ifaces, + continue; + } + +- /* Ensure it looks like "../../dbus-1/interfaces/${name}" */ +- const gchar * const prefix = "../../dbus-1/interfaces/"; +- if (g_str_has_prefix (symlink, prefix) && g_str_equal (symlink + strlen (prefix), name)) { +- daemon_read_extension_file (ifaces, filename); +- } +- else { +- g_warning ("Found accounts service vendor extension symlink %s, but it must be exactly " +- "equal to '../../dbus-1/interfaces/%s' for forwards-compatibility reasons.", +- filename, name); +- } ++ daemon_read_extension_file (ifaces, filename); + } + + g_dir_close (dir); From patchwork Sat Aug 13 06:54:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41603 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 2E7D727BBEA; Sat, 13 Aug 2022 07:57:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B173B27BBE9 for ; Sat, 13 Aug 2022 07:57:49 +0100 (BST) Received: from localhost ([::1]:45800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl5g-0006sU-Q9 for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:57:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl42-0004lt-2t for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41557) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl41-0006Xd-Q2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl41-0006sV-ML for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 04/14] gnu: lightdm-gtk-greeter: Add GDK_PIXBUF_MODULE_FILE to wrapper. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037371926329 (code B ref 57168); Sat, 13 Aug 2022 06:56:05 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:19 +0000 Received: from localhost ([127.0.0.1]:59531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl3H-0006qW-8m for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:19 -0400 Received: from mail-qt1-f172.google.com ([209.85.160.172]:33771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2m-0006mC-Ps for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:02 -0400 Received: by mail-qt1-f172.google.com with SMTP id cb8so2307007qtb.0 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=SiNyWpxATwf0sF/RZTUrR5B5l8BzdgAdcDGMs+9W7NY=; b=fwlcypSPLgY+KpRvuj8NdBnQ+X5+RPpIs7EeYI71fSFvCDWz6TMjWC1qQOu9B7sB55 vDoEBqgsk1+KRd1eRzCA1ydn44wbtR8BF2Nsy00PCh15cXUvpsN25B1rMmZM/K21g9Ey HP3HuS0KsO69PmOFLgIti9raTslwVLBhuWVczAhczlTaFphwO9mmv+zAiyoEj3n6li7P JxGZAfLn69F75Nmi+IKRFwDK0DyAq8YKDi03WVJB3QNsNiD3KSny21sciQB3McgrstnB 11e9j2+UqY3jDr2wprLFDgUGL1VmemtBH11FplUWEcKybCEXKzRkhESN7veD6Vz0NUjk a2NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=SiNyWpxATwf0sF/RZTUrR5B5l8BzdgAdcDGMs+9W7NY=; b=7fco30W05uOUxPcD5lPBNt7mTtkwzV4/KkCP8mAKSHiIm6lxKtkNQ1tu0aNMHNQcS7 p5YOPwlnjg+qk24y+le4DS5G3ueJpOW0w+dtO4VqNxSz6DhIL4CsHhGg3kW4ycMHaPDs ja4emmPQL3cDgRPtlFbZ6JEaikCrCUcTWjHYrNAK9EF/1wE3NREgb6ZT4/ZVJrJpjDjt td7SaQVYSZsVvelK8my8cbqnjIAM+nmRcop3mT3RrD+DKspVNwze9D5xYI5L0AzWnjpa CbFTgJswlCqLaZ2PyWkny1kIaPqo4noemb59ED7s3BS7WQXWiFr9MugprDauuyXZsrtK 028w== X-Gm-Message-State: ACgBeo3TDgnKbExhtBY8VrQZ0UeI5gzUTr+huhSJajlUTLvNDQQqYKTD fFs/nc7mr/ILU7WDegamaOPVmG0Ax2Q= X-Google-Smtp-Source: AA6agR4SFuYwu09K2G9YlqIjh75Vy0UhnoZgfMWj0eUG7TF9DdE1M9weS3UKxCZ8+4IOKUsPO6REew== X-Received: by 2002:a05:622a:189e:b0:31e:eecb:2af7 with SMTP id v30-20020a05622a189e00b0031eeecb2af7mr6644442qtc.392.1660373683212; Fri, 12 Aug 2022 23:54:43 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:42 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:23 -0400 Message-Id: <20220813065433.27319-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/display-managers.scm (lightdm-gtk-greeter) [build-system]: Use glib-or-gtk-build-system. [phases]{wrap-program}: Add GDK_PIXBUF_MODULE_FILE to wrapper. [inputs]: Add librsvg. --- gnu/packages/display-managers.scm | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 6c1c5b6c25..53002f2122 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -37,6 +37,7 @@ (define-module (gnu packages display-managers) #:use-module (guix build-system cmake) #:use-module (guix build-system qt) #:use-module (guix build-system gnu) + #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system trivial) #:use-module (guix packages) #:use-module (guix utils) @@ -347,7 +348,7 @@ (define-public lightdm-gtk-greeter (sha256 (base32 "04q62mvr97l9gv8h37hfarygqc7p0498ig7xclcg4kxkqw0b7yxy")))) - (build-system gnu-build-system) + (build-system glib-or-gtk-build-system) (arguments (list #:configure-flags @@ -376,6 +377,14 @@ (define-public lightdm-gtk-greeter (glib #$(this-package-input "glib"))) (wrap-program (search-input-file outputs "sbin/lightdm-gtk-greeter") + ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is + ;; available at all times even outside of profiles, such as + ;; when used in the lightdm-service-type. Otherwise, it + ;; wouldn't be able to display its own icons. + `("GDK_PIXBUF_MODULE_FILE" = + (,(search-input-file + inputs + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) `("XDG_DATA_DIRS" ":" prefix ,(cons "/run/current-system/profile/share" (map (lambda (pkg) @@ -388,12 +397,13 @@ (define-public lightdm-gtk-greeter (native-inputs (list exo intltool pkg-config xfce4-dev-tools)) (inputs - (list bash-minimal ;for wrap-program + (list at-spi2-core + bash-minimal ;for wrap-program + gtk+ + guile-3.0 + librsvg lightdm - shared-mime-info - at-spi2-core - glib - gtk+)) + shared-mime-info)) (synopsis "GTK+ greeter for LightDM") (home-page "https://github.com/xubuntu/lightdm-gtk-greeter") (description "This package provides a LightDM greeter implementation using From patchwork Sat Aug 13 06:54:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41595 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 3ADB927BBEA; Sat, 13 Aug 2022 07:56:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7079027BBE9 for ; Sat, 13 Aug 2022 07:56:33 +0100 (BST) Received: from localhost ([::1]:43280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4S-00056C-Ki for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0004kj-0S for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl3y-0006Wq-O2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl3y-0006rX-Hb for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 05/14] gnu: lightdm-gtk-greeter: Use the glib-or-gtk-wrap phase as-is. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370426250 (code B ref 57168); Sat, 13 Aug 2022 06:56:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:04 +0000 Received: from localhost ([127.0.0.1]:59514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl31-0006p6-IX for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:41902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2n-0006mE-S0 for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:52 -0400 Received: by mail-qt1-f170.google.com with SMTP id c20so2284000qtw.8 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=NfxYnVMBDKwC3S3wtETK/t09AnB2xGS/W9uiZamrKD0=; b=ZrLX+amxdgNLSe4HIlMKqCerpS1zpDkEx3rWNhgNdA0hvCcGhBvnWGJ9pweWsKrAVT W+lMB6KVfW4PMzFeqZxXpGZPnhB10S/Dl6e0uJbRAUXFM8aLwFwUnChgAeynUeARg7V5 BTGkUX+pSbxRt5KuoHkcCvQvS65QABfxgYVm+AyJHsilRb34bEiU6P6qxQdhU1AzSBgH ZeYs47pvsja4wD3PiWuhc11MV6D5niCaxmSWjHtsYbI1UMZyLJj3Owqk3JhiMdAn2HCS ni8in7Jbz2oA44Fend5zkRVfifWRuHd6OcXseEnnjt/aJms+2I0LkHyIgQM5zwBsGQXi M7gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=NfxYnVMBDKwC3S3wtETK/t09AnB2xGS/W9uiZamrKD0=; b=7vPXd5QPLcdDV0uMPJPoK16cFkQnWRArMCwsl9lV7lBwwOQxY8YaSoOOVYm9Mh2sVf 95F84V1We9qxQfTJpsZ6rY6sMFiu9iIAWa+Cp9HdOyzZhnaIcOdWith9Oyy0VMSYvENX j5fNttE7yBsyliwNTkkihStQdU/GjguWAiyy8TXet/GNqrc6VBb42VX4zVRrZ6K78Y1X 4VUTpZvCNM3YIZ1wNQ4EVMij2/FSSR0y0XZVAYLVlq3ql1Y9tfEqGAxS4SWf1OKpQ9RG rO+lq2u3Rh67r8Td0kS2oOPQpirkpZP9T3KDdO/P7LhlIBQpujV4ES3t6/d6N8w+eOeO LqJw== X-Gm-Message-State: ACgBeo3XIbn+6IGrQVnNE6GUm8vBnxexcBIbad/Di+HGnuMAGXruae68 /TOPVFSEcATP0yW6mEIcuD4EW4ydGSg= X-Google-Smtp-Source: AA6agR7e1kIzEC8ObqJ19/rdUfarR8p5VmzrUsdCuryifLYxLWgGMZ04a5z+QmIc8ixzALbdx2Z7gg== X-Received: by 2002:ac8:5e52:0:b0:338:ce27:7a9d with SMTP id i18-20020ac85e52000000b00338ce277a9dmr6596490qtx.559.1660373684092; Fri, 12 Aug 2022 23:54:44 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:43 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:24 -0400 Message-Id: <20220813065433.27319-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/display-managers.scm (lightdm-gtk-greeter) [configure-flags]: Install binaries to bin/, so the wrap phase of glib-or-gtk handles them. [phases]{wrap-program}: Delete. {custom-wrap}: New phase, wrapping the wrapper with a few extra environment variables. --- gnu/packages/display-managers.scm | 54 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 53002f2122..11d5c519ea 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -54,6 +54,7 @@ (define-module (gnu packages display-managers) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) #:use-module (gnu packages linux) @@ -353,6 +354,9 @@ (define-public lightdm-gtk-greeter (list #:configure-flags #~(list "--disable-indicator-services-command" ;requires upstart + ;; Put the binary under /bin rather than /sbin, so that it gets + ;; wrapped by the glib-or-gtk-wrap phase. + (string-append "--sbindir=" #$output "/bin") (string-append "--enable-at-spi-command=" (search-input-file %build-inputs "libexec/at-spi-bus-launcher"))) @@ -367,35 +371,29 @@ (define-public lightdm-gtk-greeter (("Exec=lightdm-gtk-greeter") (string-append "Exec=" (search-input-file - outputs "sbin/lightdm-gtk-greeter")))))) - (add-after 'fix-.desktop-file 'wrap-program - ;; Mimic glib-or-gtk build system which doesn't wrap files in - ;; /sbin. - (lambda* (#:key outputs inputs #:allow-other-keys) - (let ((gtk #$(this-package-input "gtk+")) - (shared-mime-info #$(this-package-input "shared-mime-info")) - (glib #$(this-package-input "glib"))) - (wrap-program (search-input-file - outputs "sbin/lightdm-gtk-greeter") - ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is - ;; available at all times even outside of profiles, such as - ;; when used in the lightdm-service-type. Otherwise, it - ;; wouldn't be able to display its own icons. - `("GDK_PIXBUF_MODULE_FILE" = - (,(search-input-file - inputs - "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) - `("XDG_DATA_DIRS" ":" prefix - ,(cons "/run/current-system/profile/share" - (map (lambda (pkg) - (string-append pkg "/share")) - (list gtk shared-mime-info glib)))) - `("GTK_PATH" ":" prefix (,gtk)) - `("GIO_EXTRA_MODULES" ":" prefix (,gtk)) - '("XCURSOR_PATH" ":" prefix - ("/run/current-system/profile/share/icons"))))))))) + outputs "bin/lightdm-gtk-greeter")))))) + (add-after 'glib-or-gtk-wrap 'custom-wrap + (lambda* (#:key outputs #:allow-other-keys) + (wrap-script (search-input-file + outputs "bin/lightdm-gtk-greeter") + ;; Wrap GDK_PIXBUF_MODULE_FILE, so that the SVG loader is + ;; available at all times even outside of profiles, such as + ;; when used in the lightdm-service-type. Otherwise, it + ;; wouldn't be able to display its own icons. + `("GDK_PIXBUF_MODULE_FILE" = + (,(search-input-file + outputs + "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"))) + `("XDG_DATA_DIRS" ":" prefix + (,(string-append "/run/current-system/profile/share:" + (getenv "XDG_DATA_DIRS")))) + '("XCURSOR_PATH" ":" prefix + ("/run/current-system/profile/share/icons")))))))) (native-inputs - (list exo intltool pkg-config xfce4-dev-tools)) + (list exo + intltool + pkg-config + xfce4-dev-tools)) (inputs (list at-spi2-core bash-minimal ;for wrap-program From patchwork Sat Aug 13 06:54:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41598 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 2C68B27BBEB; Sat, 13 Aug 2022 07:57:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E196F27BBE9 for ; Sat, 13 Aug 2022 07:56:59 +0100 (BST) Received: from localhost ([::1]:44506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4s-0005yX-OK for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl32-0004LV-R2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl31-0006GH-Fh for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl31-0006p0-BJ for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 06/14] gnu: lightdm-gtk-greeter: Enable libklavier support. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369526144 (code B ref 57168); Sat, 13 Aug 2022 06:55:03 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:55 +0000 Received: from localhost ([127.0.0.1]:59503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2s-0006nW-FK for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:54 -0400 Received: from mail-qk1-f173.google.com ([209.85.222.173]:37773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2o-0006mG-Nh for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:51 -0400 Received: by mail-qk1-f173.google.com with SMTP id a15so1886765qko.4 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=+ce0xz9h/Yob//ZB5er9Wnh9oJOn4OTnCX5JF3NtDgw=; b=LiAnOzG2PYRBHuLg+QMhQ+jeaRhhjJMhQrmCTH3HzCcGnUclteGI+2JvL/Cujo+kKN diJ137MWoRx0InBSG/2m/chcU8wDV36UGAPAecavT2Sm1PLHx3SDazzW5DD6hTjMiddO sUBNVLRaN5VsjWnXBnis3lLyLhpQRc1Nz9Bo6ygRERX0ORdiOKxtXlOXd8Z8Ik9YJdc1 4HrQ0W0Cv7XKnuhXBdgzq1BfZhfJRYoArJQTT5vBCgts920AIXmpPYycviFFgx1RB0EQ OcjzkTCqQbLNHsgCymLMUcTar7GDTgXpgCpDrFrpAO/1L4WWaHAfIj60MngriMZWEhrk BJWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=+ce0xz9h/Yob//ZB5er9Wnh9oJOn4OTnCX5JF3NtDgw=; b=pBJqlKTqv5ZlzmGNrKAPDfxBraLeGkZvnPyQCK6BaB4MEC9MwBf0lSSB2+sG1wdea/ 7quaRvqhCENbtq/cIOaJHRJGZncFTSFqGrinP60Ipu7E4gXG3CmdSWawxKCXM/PP+JAS Gl/ZPMzx/PE5NZEZnV8ef4cooYz+LYyDRYtJ5tf+Mf/m9JhJ3WX4dzM9BUICqMnSZkoA devl0s3bzMYrrgLux3GvcnRHre1Q3VEv5WD8hmNBCAtn0OHJ+Af16k213md3RS9j7u97 X3Wunef4bMHxZESIcDfSAe8oxwWeoEHjyvtdPGUpOV3uKn4AL8cycBRx91qnuFxYdwu6 XQhQ== X-Gm-Message-State: ACgBeo1QJdoBx0n6FOOBHzQ6jTBgeERsX9O1G2x+auMkgO5YoESXI7vx AT5klYBEr/YmOY1kUBe1nuqlgJcKluo= X-Google-Smtp-Source: AA6agR5V5NK2gQZWIZEhB/dT5vKU82FaGMoowHttpVB/TC0ZxI7V92P72i/mgx9sJv1X5mRtLgRCYQ== X-Received: by 2002:a05:620a:25d0:b0:6b8:9dec:6c12 with SMTP id y16-20020a05620a25d000b006b89dec6c12mr5349115qko.634.1660373684957; Fri, 12 Aug 2022 23:54:44 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:44 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:25 -0400 Message-Id: <20220813065433.27319-6-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/display-managers.scm (lightdm-gtk-greeter) [configure-flags]: Add '--with-libxklavier'. [inputs]: Add libxklavier. --- gnu/packages/display-managers.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 11d5c519ea..e8f7f68c46 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -357,6 +357,7 @@ (define-public lightdm-gtk-greeter ;; Put the binary under /bin rather than /sbin, so that it gets ;; wrapped by the glib-or-gtk-wrap phase. (string-append "--sbindir=" #$output "/bin") + (string-append "--with-libxklavier") (string-append "--enable-at-spi-command=" (search-input-file %build-inputs "libexec/at-spi-bus-launcher"))) @@ -400,6 +401,7 @@ (define-public lightdm-gtk-greeter gtk+ guile-3.0 librsvg + libxklavier lightdm shared-mime-info)) (synopsis "GTK+ greeter for LightDM") From patchwork Sat Aug 13 06:54:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41593 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 E762C27BBEB; Sat, 13 Aug 2022 07:56:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 889B227BBE9 for ; Sat, 13 Aug 2022 07:56:32 +0100 (BST) Received: from localhost ([::1]:43214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4R-00052t-Jc for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl32-0004LW-Rl for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl31-0006GJ-UL for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl31-0006p8-Q2 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:55:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 07/14] gnu: lightdm-gtk-greeter: Adjust default config file path. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037369526156 (code B ref 57168); Sat, 13 Aug 2022 06:55:03 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:54:55 +0000 Received: from localhost ([127.0.0.1]:59505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2s-0006nd-Vq for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:55 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:37426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2p-0006mI-FE for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:52 -0400 Received: by mail-qt1-f173.google.com with SMTP id l5so2290426qtv.4 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=wvlB1B3EF2YpB3FYyPKW0WvJy0NKo+gH+22KddR8qbQ=; b=mfMp3DWi76LyGYDF5T3VEtJC+iIMNy5EApXAbG3/nYE4aPbOJOX4uVJge8xXfHicBo EpZuj9k926HUoBVeZJ2E00ZmsHYIwxGynUPgZYjRdXXwhq9wjt/gXeWnfrozWBS4tZKn AzIkxBFfownffGXwQHqM9Fk9NhUd/9I6Uvl8yUGtxo4/y/AkhKw0W6snNTeCq6WCITZ2 luPVns1U5WgMEQO+C815HttpFsafaed0Wc/2YpE/7xht6cYvXT2buM2TfrSdekg3lgLU z0Q+dmKDPHSWDZZlz3W+Zh2aEsC8JmJO1X1d4BHzroukiZdoOMQvgv1rtMyPKFDENAVW oxuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=wvlB1B3EF2YpB3FYyPKW0WvJy0NKo+gH+22KddR8qbQ=; b=QWWvWnl+I//82uNydxkrVE4Vy58u+EDzjnsfU+nivy1kAfetUSpapEYrSa9rQbh/5M QHpuCxjfDEWPC1Sr633YDjP2PMseJGly8l+ojPKTEQoZoAAKMOnhilgAkTWk5+11KMc0 LsoWq7URSGlubKXxZ1gHLP58T0nHqT0He2yhIIvh+ViYNXWJqPxbTHYPaJrRf52u//2i qVR2fSGPoCZ1dpwpX7ot6+EA8i77luAiIjEnvUchCDv1zKSogbYNtF4Dli5YLMTgCi+S xx/uvD1bNys8KlljrOlm/S+FOWYUdLibhcRDmuCWa2pLBWNBD8F3Ygna7mmkD+bTpxEI shGg== X-Gm-Message-State: ACgBeo0vn9W+Brky/NY4DNC406WTrkclk8/izs2AQ5ghjnZPkMIFu5zA j0132PWH3iehFGwDJE6DirbrA8pJhwM= X-Google-Smtp-Source: AA6agR5ieAq3ZzwBGdMNP6RDlWJJK863bzyiOBsLWOE7vWg8mLfXrEIk4P+amhGUx428GVpq0cVCPQ== X-Received: by 2002:a05:622a:589:b0:342:fd8c:9786 with SMTP id c9-20020a05622a058900b00342fd8c9786mr6412519qtb.150.1660373685774; Fri, 12 Aug 2022 23:54:45 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:45 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:26 -0400 Message-Id: <20220813065433.27319-7-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/display-managers.scm (lightdm-gtk-greeter) [phases]{customize-default-config-path}: New phase. --- gnu/packages/display-managers.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index e8f7f68c46..6fbefafe7d 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -364,6 +364,14 @@ (define-public lightdm-gtk-greeter #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'customize-default-config-path + (lambda _ + (substitute* "src/Makefile.in" + ;; Have the default config directory sourced from + ;; /etc/lightdm/lightdm-gtk-greeter.conf, which is where the + ;; lightdm service writes it. + (("\\$\\(sysconfdir)/lightdm/lightdm-gtk-greeter.conf") + "/etc/lightdm/lightdm-gtk-greeter.conf")))) (add-after 'install 'fix-.desktop-file (lambda* (#:key outputs #:allow-other-keys) (substitute* (search-input-file From patchwork Sat Aug 13 06:54:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41597 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 4982227BBEA; Sat, 13 Aug 2022 07:56:46 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2184727BBE9 for ; Sat, 13 Aug 2022 07:56:46 +0100 (BST) Received: from localhost ([::1]:44074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4f-0005ec-9g for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0004kl-AY for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0006Wy-1f for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl3y-0006re-Tq for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 08/14] gnu: lightdm-gtk-greeter: Adjust --enable-at-spi-command value. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370426263 (code B ref 57168); Sat, 13 Aug 2022 06:56:02 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:04 +0000 Received: from localhost ([127.0.0.1]:59517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl32-0006pR-AA for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:04 -0400 Received: from mail-qt1-f174.google.com ([209.85.160.174]:33775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2q-0006mJ-6k for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:52 -0400 Received: by mail-qt1-f174.google.com with SMTP id cb8so2307053qtb.0 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=wcdqDEnN7c30CickQdWV01shvvnQTlhNNZ5/H55Xl/0=; b=b7FcOCy3brY7FamuW5jsBCfAAV7tMp4PzoGAnU9qLc1h2SJSvcEAOC84bhh5B9iJbB jroWp1DtQYiKqGxjIPU94xS8wakDEE5POCKMmJ3B49AulzvwgBKOyVIi6+OoUa6enyH2 zxaS6ADthBcMgAURSkvLIH596CvVfUYvUNa7Esvced7/mdq+VJUh0mmuo7snvppx3yeJ zSWgPaJRX8iL67qeEYX/limYWyXPR24C6dGlxy74TvA17LyezOwc+d3wmHq4Do2ZcnyG jjP16ks1nIiPDMKQcDaGkYQXLFwxaKIMb4ThiWxDRF8sWWAJD19yPj+4YlrH4OKoahTN NOLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=wcdqDEnN7c30CickQdWV01shvvnQTlhNNZ5/H55Xl/0=; b=ODenWMeyJ+xfxzMDDVs7R65v3C+EylK/IIthYISxOmhB+n3PALcq3bobmEFMIy8/nE RrniJq/k7jR6Nct1owLU8cp1kpbZEXtLmqyB4D1hPatot3Vl4xntTjMoSQ0jJy8v61Q8 Qp9zzML4faIHjqxk0SaDpRmBbJakn7OEeSLNidOzEjurT/FwCjPRf9XioteC382KnK+B aBpA8C1vIqGQdZ44cnVv7CN+Xczt1l5ISnKIrEEq7nKY/wRAzOgFA+P1mup0JKB55xB3 HE4PIqEOVkFYhettzAP1VvuILuVtHwXcQwmLfIDWFXiaKIybTLz5f1RS1IBOhyfYsr+/ oXSA== X-Gm-Message-State: ACgBeo2VUt3SOhFPeuDQd5WFDWT2Pei3LC3AfXSjIM/RrAV5jxjUaOV3 KQFqdyxDAi+l1Y8WqCuQF5KKyHwDCHI= X-Google-Smtp-Source: AA6agR5NjbwZiHZnUiiVKVtZ47JDGR6ExuA2i9493edOA3C6XFUMD3KscVAcvbeCQ4CGMccXSxpjSQ== X-Received: by 2002:ac8:5b4d:0:b0:33f:4f21:59cb with SMTP id n13-20020ac85b4d000000b0033f4f2159cbmr6640675qtw.472.1660373686566; Fri, 12 Aug 2022 23:54:46 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:46 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:27 -0400 Message-Id: <20220813065433.27319-8-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/display-managers.scm (lightdm-gtk-greeter) [configure-flags]: Add the '--launch-immediately' option to the at-spi-bus-launcher to match what is used in the source. --- gnu/packages/display-managers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 6fbefafe7d..d6cf9445c6 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -360,8 +360,8 @@ (define-public lightdm-gtk-greeter (string-append "--with-libxklavier") (string-append "--enable-at-spi-command=" (search-input-file - %build-inputs "libexec/at-spi-bus-launcher"))) - + %build-inputs "libexec/at-spi-bus-launcher") + " --launch-immediately")) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'customize-default-config-path From patchwork Sat Aug 13 06:54:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41599 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 BBB5127BBE9; Sat, 13 Aug 2022 07:57:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 04E7727BBEA for ; Sat, 13 Aug 2022 07:57:00 +0100 (BST) Received: from localhost ([::1]:44528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4t-0005zG-1g for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0004lA-Mu for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0006X3-Cp for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl3z-0006rm-9A for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 09/14] gnu: lightdm: Apply patch to fix a problem with VNC integration. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370526271 (code B ref 57168); Sat, 13 Aug 2022 06:56:03 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:05 +0000 Received: from localhost ([127.0.0.1]:59519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl32-0006pY-M6 for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:05 -0400 Received: from mail-qv1-f48.google.com ([209.85.219.48]:34742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2r-0006mQ-7h for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:54 -0400 Received: by mail-qv1-f48.google.com with SMTP id u8so2112095qvv.1 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=hbNsSepCui1ieEk+lBI2a/+3WrLTiGxHmvFEkJJ0TpA=; b=OAvUZTbqSInzilItegBuz3Aw/nCXD8QR4FY19PGNL083QCD9jxciGcndkPpLrIl4ZF 4+oOVALDBU9oXWI+q9inf+tT5pdEcRkOCYGOScsdWfb9b7F+BWHM52oVid1lkbaUJHYu LW3WajFZTfV+RwwRpi8HKEuUYoGcwaY7THXxFN0Z9cHxJs8NEbqT2z5hWUdSg9LHcgLv Tc4KEKwQlZ4NzASoRCK4qmWsa9alkU4kDQTTyZQsMFMeyGoKQGuL9KdCdeKEMN0jI8FO Lh9cmqEcNjDtdfaJGotuyStvDilK1rODt+ps4QjXqKILeUMV2fUoK0D2u1Zyn48Ub9fG J8CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=hbNsSepCui1ieEk+lBI2a/+3WrLTiGxHmvFEkJJ0TpA=; b=EZlJohQWor8J8yC5ayHWVnyKQS9Ywr35dWubkOoB3v3ILgEi0WxDee1jC46jIhkYWm dw6a31OKr1HyR6xIbqm2LB/BsDcQNB7X4VyVd+5W8Pug0u125bNDSXu0jke+2ta4GpTE 9Srhmp/Md62a2yh6+tKoo5u7AzKn8t3XJbOgdgMJgGwESLiYo9O4v6Gto+uN29b8cZKS dMCpaxNOhJyZMNlSJf4WDy1hj/pN3WjhTR7QnwaGMBqodeuJ79iZs82ncU4cHukRvSnM uKRqScVi+3diD840lbiScde4a9ZWSOWX95/w9KVvn/CWOxE2UN3da5asW8tNJxbJLDmA OCIQ== X-Gm-Message-State: ACgBeo2OR27nF9kKu3mHMrWFsOQ5o8rBT1rlpUmDJNDQEqinzdT4r9ei zB65Ri+utjKZPiqZ24QYo3jbbLyvtsg= X-Google-Smtp-Source: AA6agR5k2dqHTpHyu2ndpMseRcpRLr9lHPH+PI4YFs9M8fHrqYzyrVTZywtLRhT4PBAch5rIH7R43g== X-Received: by 2002:a05:6214:2aac:b0:474:8b64:8f56 with SMTP id js12-20020a0562142aac00b004748b648f56mr6339399qvb.0.1660373687437; Fri, 12 Aug 2022 23:54:47 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:46 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:28 -0400 Message-Id: <20220813065433.27319-9-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/patches/lightdm-vncserver-check.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/display-managers.scm (lightdm): Apply it. --- gnu/local.mk | 1 + gnu/packages/display-managers.scm | 7 +- .../patches/lightdm-vncserver-check.patch | 66 +++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/lightdm-vncserver-check.patch diff --git a/gnu/local.mk b/gnu/local.mk index c2a33fa7d1..b1b0f7ac36 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1355,6 +1355,7 @@ dist_patch_DATA = \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ + %D%/packages/patches/lightdm-vncserver-check.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \ %D%/packages/patches/kiki-level-selection-crash.patch \ diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index d6cf9445c6..022e0509aa 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -268,7 +268,8 @@ (define-public lightdm (file-name (git-file-name name version)) (sha256 (base32 - "1wr60c946p8jz9kb8zi4cd8d4mkcy7infbvlfzwajiglc22nblxn")))) + "1wr60c946p8jz9kb8zi4cd8d4mkcy7infbvlfzwajiglc22nblxn")) + (patches (search-patches "lightdm-vncserver-check.patch")))) (build-system gnu-build-system) (arguments '(#:parallel-tests? #f ; fails when run in parallel @@ -303,8 +304,8 @@ (define-public lightdm (unsetenv "LC_ALL")))))) (inputs (list audit - bash-minimal ;for cross-compilation - coreutils-minimal ;ditto + bash-minimal ;for cross-compilation + coreutils-minimal ;ditto linux-pam shadow ;for sbin/nologin libgcrypt diff --git a/gnu/packages/patches/lightdm-vncserver-check.patch b/gnu/packages/patches/lightdm-vncserver-check.patch new file mode 100644 index 0000000000..0e31ff3d68 --- /dev/null +++ b/gnu/packages/patches/lightdm-vncserver-check.patch @@ -0,0 +1,66 @@ +Honor the Xvnc command specified in the config instead of using a hard-coded +default. + +Submitted upstream at: https://github.com/canonical/lightdm/pull/265 + +diff --git a/src/lightdm.c b/src/lightdm.c +index 74f9ff2d..0ccfcd78 100644 +--- a/src/lightdm.c ++++ b/src/lightdm.c +@@ -349,27 +349,42 @@ start_display_manager (void) + /* Start the VNC server */ + if (config_get_boolean (config_get_instance (), "VNCServer", "enabled")) + { +- g_autofree gchar *path = g_find_program_in_path ("Xvnc"); +- if (path) ++ /* Validate that a the VNC command is available. */ ++ g_autofree gchar *command = config_get_string (config_get_instance (), "VNCServer", "command"); ++ if (command) + { +- vnc_server = vnc_server_new (); +- if (config_has_key (config_get_instance (), "VNCServer", "port")) ++ g_auto(GStrv) tokens = g_strsplit (command, " ", 2); ++ if (!g_find_program_in_path (tokens[0])) + { +- gint port = config_get_integer (config_get_instance (), "VNCServer", "port"); +- if (port > 0) +- vnc_server_set_port (vnc_server, port); ++ g_warning ("Can't start VNC server; command '%s' not found", tokens[0]); ++ return; + } +- g_autofree gchar *listen_address = config_get_string (config_get_instance (), "VNCServer", "listen-address"); +- vnc_server_set_listen_address (vnc_server, listen_address); +- g_signal_connect (vnc_server, VNC_SERVER_SIGNAL_NEW_CONNECTION, G_CALLBACK (vnc_connection_cb), NULL); +- +- g_debug ("Starting VNC server on TCP/IP port %d", vnc_server_get_port (vnc_server)); +- vnc_server_start (vnc_server); + } + else +- g_warning ("Can't start VNC server, Xvnc is not in the path"); ++ { ++ /* Fallback to 'Xvnc'. */ ++ if (!g_find_program_in_path ("Xvnc")) { ++ g_warning ("Can't start VNC server; 'Xvnc' command not found"); ++ return; ++ } ++ } ++ ++ vnc_server = vnc_server_new (); ++ if (config_has_key (config_get_instance (), "VNCServer", "port")) ++ { ++ gint port = config_get_integer (config_get_instance (), "VNCServer", "port"); ++ if (port > 0) ++ vnc_server_set_port (vnc_server, port); ++ } ++ g_autofree gchar *listen_address = config_get_string (config_get_instance (), "VNCServer", "listen-address"); ++ vnc_server_set_listen_address (vnc_server, listen_address); ++ g_signal_connect (vnc_server, VNC_SERVER_SIGNAL_NEW_CONNECTION, G_CALLBACK (vnc_connection_cb), NULL); ++ ++ g_debug ("Starting VNC server on TCP/IP port %d", vnc_server_get_port (vnc_server)); ++ vnc_server_start (vnc_server); + } + } ++ + static void + service_ready_cb (DisplayManagerService *service) + { From patchwork Sat Aug 13 06:54:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41592 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 1F93627BBEA; Sat, 13 Aug 2022 07:56:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 867F327BBE9 for ; Sat, 13 Aug 2022 07:56:28 +0100 (BST) Received: from localhost ([::1]:42950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4N-0004rx-KK for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl40-0004lb-0i for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl3z-0006XB-O7 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl3z-0006ru-Kt for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 10/14] gnu: lightdm: Apply patch to allow using VNC options. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370526278 (code B ref 57168); Sat, 13 Aug 2022 06:56:03 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:05 +0000 Received: from localhost ([127.0.0.1]:59521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl33-0006pf-Ab for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:05 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:40894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2s-0006mS-0N for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:55 -0400 Received: by mail-qt1-f170.google.com with SMTP id w28so2281798qtc.7 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=aafW7GtVYueUUsJ81sY7vs+OgnLPr2pUKlETGK1rv8A=; b=H4El266QxiApjOme2EfyMp00q6dtoZDMdBRA5gVN0xqsjtNCFIznpoisWOChjYUFOe aGGiFf2mdIk1SC2At4MTCdgbsqz1hvpzLssA5PETi++AwXTYXDZZMVTpON5UoINU3vom 8XFQlFMNtTg8fHPuAYDn0Ib1Bl3LmL86B7lcKCCpGNwbwUyjBUBM9vxw8NhCaQ2AF/J9 NVQLmZzbKjPjpFiRJwW4y34snCCvEKWLeUk7IVT6zmvJiOTLCsFpE+g7kEHo6LgPk/Ay g9lLOyFkRRd11kOkvL4SY62Uc7qIjwUMQgOi7exKetvvBn7qA1p1xdD4m+C4khAC4iMm F8zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=aafW7GtVYueUUsJ81sY7vs+OgnLPr2pUKlETGK1rv8A=; b=1DYn8BenBXBOkRgQN3xnr2pT6o3oYmWzIgs/zilR64pXvz68BBs9ABgtSVSXAdgMnv D2+2saorVJqxZTNJagZjcdHKLHYaE3B8jC16LknUNRzH/FlLGpCsChVHBBZ3J288RTDr dufaNeDXqrT5+stiHg14FPRxH5uUAmW3ls2wqxeN2cryZdEUszfJSI8z+NRNN8nxjiHo FU8o29BaRfryIOLHDIqhSDobSZaQpr8so8E2qcnkKkh+G8v5MH7dsyg643RhC/c6t13t 8ideGDk8zo4fLvpmfM1PGLMaq70NVqXqVoz0esaS6rFL7mKP8BLQJcbR3e1Rzy7Ohnpw WZZg== X-Gm-Message-State: ACgBeo2CcWpOBd81cko3ThuevF294XTZ+TjcXYKGVAwrqZYcFSdkjHNy FwPYPAXw8AGKi8PAJItMXTVky9BXd8Q= X-Google-Smtp-Source: AA6agR7VCnoUDPiOHx4vhG4OVzo6dMRxO/JVtU47Cpjakup974STDs2DqbMdDKDPDfsRZVn+fRubTA== X-Received: by 2002:ac8:5e54:0:b0:343:6345:d165 with SMTP id i20-20020ac85e54000000b003436345d165mr6509334qtx.634.1660373688408; Fri, 12 Aug 2022 23:54:48 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:47 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:29 -0400 Message-Id: <20220813065433.27319-10-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/patches/lightdm-arguments-ordering.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/display-managers.scm (lightdm): Apply it. --- gnu/local.mk | 1 + gnu/packages/display-managers.scm | 3 +- .../patches/lightdm-arguments-ordering.patch | 54 +++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lightdm-arguments-ordering.patch diff --git a/gnu/local.mk b/gnu/local.mk index b1b0f7ac36..a6be7cc423 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1355,6 +1355,7 @@ dist_patch_DATA = \ %D%/packages/patches/librime-fix-build-with-gcc10.patch \ %D%/packages/patches/libvirt-add-install-prefix.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ + %D%/packages/patches/lightdm-arguments-ordering.patch \ %D%/packages/patches/lightdm-vncserver-check.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \ diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 022e0509aa..2a0a72d145 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -269,7 +269,8 @@ (define-public lightdm (sha256 (base32 "1wr60c946p8jz9kb8zi4cd8d4mkcy7infbvlfzwajiglc22nblxn")) - (patches (search-patches "lightdm-vncserver-check.patch")))) + (patches (search-patches "lightdm-arguments-ordering.patch" + "lightdm-vncserver-check.patch")))) (build-system gnu-build-system) (arguments '(#:parallel-tests? #f ; fails when run in parallel diff --git a/gnu/packages/patches/lightdm-arguments-ordering.patch b/gnu/packages/patches/lightdm-arguments-ordering.patch new file mode 100644 index 0000000000..c3b513a19a --- /dev/null +++ b/gnu/packages/patches/lightdm-arguments-ordering.patch @@ -0,0 +1,54 @@ +When providing the VNCServer command as 'Xvnc -SecurityTypes None', +the formatted command line used would look like: + + Xvnc -SecurityTypes None :1 -auth /var/run/lightdm/root/:1 + +which is invalid (the display number must appear first). + +Submitted upstream at: https://github.com/canonical/lightdm/pull/265 + + src/x-server-local.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/src/x-server-local.c b/src/x-server-local.c +index 7c4ab870..6c540d18 100644 +--- a/src/x-server-local.c ++++ b/src/x-server-local.c +@@ -463,14 +463,20 @@ x_server_local_start (DisplayServer *display_server) + l_debug (display_server, "Logging to %s", log_file); + + g_autofree gchar *absolute_command = get_absolute_command (priv->command); ++ g_auto(GStrv) tokens = g_strsplit (absolute_command, " ", 2); ++ const gchar* binary = tokens[0]; ++ const gchar *extra_options = tokens[1]; ++ + if (!absolute_command) + { + l_debug (display_server, "Can't launch X server %s, not found in path", priv->command); + stopped_cb (priv->x_server_process, X_SERVER_LOCAL (server)); + return FALSE; + } +- g_autoptr(GString) command = g_string_new (absolute_command); ++ g_autoptr(GString) command = g_string_new (binary); + ++ /* The display argument must be given first when the X server used ++ * is Xvnc. */ + g_string_append_printf (command, " :%d", priv->display_number); + + if (priv->config_file) +@@ -513,6 +519,12 @@ x_server_local_start (DisplayServer *display_server) + if (X_SERVER_LOCAL_GET_CLASS (server)->add_args) + X_SERVER_LOCAL_GET_CLASS (server)->add_args (server, command); + ++ /* Any extra user options provided via the VNCServer 'command' ++ * config option are appended last, so the user can override any ++ * of the above. */ ++ if (extra_options) ++ g_string_append_printf (command, " %s", extra_options); ++ + process_set_command (priv->x_server_process, command->str); + + l_debug (display_server, "Launching X Server"); +-- +2.36.1 + From patchwork Sat Aug 13 06:54:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41602 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 8FE2327BBEA; Sat, 13 Aug 2022 07:57:39 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EA32827BBE9 for ; Sat, 13 Aug 2022 07:57:38 +0100 (BST) Received: from localhost ([::1]:45434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl5W-0006bx-4N for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:57:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl40-0004lc-Ez for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl40-0006XG-68 for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl40-0006s1-2J for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 11/14] gnu: lightdm: Apply patch to fix color depth issue with VNC. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370626285 (code B ref 57168); Sat, 13 Aug 2022 06:56:04 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:06 +0000 Received: from localhost ([127.0.0.1]:59523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl33-0006pn-Pi for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:06 -0400 Received: from mail-qv1-f42.google.com ([209.85.219.42]:34738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2s-0006md-VF for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:55 -0400 Received: by mail-qv1-f42.google.com with SMTP id u8so2112118qvv.1 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=0EhSoD5z09HK2l/sMRi09K5qC2EJjihZg1tjGBBmbHs=; b=FFNAmNohZeoEAS+prtuDssWd9hT00wdU5EABZZaLFxV2dFfo4w42YOkTd4roTCvM13 nNX/HVsEy4QJmu6K4jxY1uVeYczZoPMOUbGahOGxP/Xfu9YHhUnUgVqBkQq3wE76kSgc ffCUjI6IWg+wUWzZGfwD3rZ8AuYH0usn/HfmaXVsuCcQC7sdJQEwFiBNHbaccGQeU5Qw Xl77QGNKexv971oASQ+6ijEbqCjZmcDidKkeLI/K+0XX2/6+4oCyhJ66kIesb2djyGwQ o94bJ3El873fCzxNDVsm09UJZRa0UQ4O7Dw+f9OOPU/WSVB6buFIiFXXT2dYTLHqZqEN rbdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=0EhSoD5z09HK2l/sMRi09K5qC2EJjihZg1tjGBBmbHs=; b=e5JnpUGCAP18YQHhO5f71U3TMfvuaueenam8hkXwBsiy57iNSrbH1HHL+x5Sf8sFBg QDcBUHlKg4WNT0OpcUWywnsqdsv0ayK+0DnB5ObO7wH4zAecCUbNREwvvdzsQBWr8z26 cAI9DvM8gWz7MOlhlZ4qGk+Vs6KkdUG3SPRdHJuGuImWvp+FK7TfZ95EuQA4vl9iFOoY PoaL1VkNL7viDMydbHRIQUnHORNouVMW/dSxoma2YcaZzX7hxE2lGummf26oNwSvdN8B dbWsThIIyTyboaVssr13ybd7dJ/V2hk3kLtFFJF+2SY200l8ljORqHpNVkGqfPDe0X1C hnbg== X-Gm-Message-State: ACgBeo2khUv8pekkBqYTl8JqBdWdf/ObV5JZBE1d3ZivXXJh3Zu4RDPV 2YHUddlHCcDdLqVEWPL7FawbQNe012k= X-Google-Smtp-Source: AA6agR6JvwbRJZsUA8rd8wBKe4Vb+65M0QvgXUuToCJ4nAMHmo6QrsGR8lv1FaeaS2m4NtOuXNW7gg== X-Received: by 2002:a05:6214:20ad:b0:478:a967:560 with SMTP id 13-20020a05621420ad00b00478a9670560mr6505182qvd.58.1660373689309; Fri, 12 Aug 2022 23:54:49 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:48 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:30 -0400 Message-Id: <20220813065433.27319-11-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/patches/lightdm-vnc-color-depth.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/display-managers.scm (lightdm): Apply it. --- gnu/local.mk | 1 + gnu/packages/display-managers.scm | 3 +- .../patches/lightdm-vnc-color-depth.patch | 81 +++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lightdm-vnc-color-depth.patch diff --git a/gnu/local.mk b/gnu/local.mk index a6be7cc423..e0c6d6fba1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1357,6 +1357,7 @@ dist_patch_DATA = \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/lightdm-arguments-ordering.patch \ %D%/packages/patches/lightdm-vncserver-check.patch \ + %D%/packages/patches/lightdm-vnc-color-depth.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ %D%/packages/patches/kdiagram-Fix-missing-link-libraries.patch \ %D%/packages/patches/kiki-level-selection-crash.patch \ diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm index 2a0a72d145..137bd2739e 100644 --- a/gnu/packages/display-managers.scm +++ b/gnu/packages/display-managers.scm @@ -270,7 +270,8 @@ (define-public lightdm (base32 "1wr60c946p8jz9kb8zi4cd8d4mkcy7infbvlfzwajiglc22nblxn")) (patches (search-patches "lightdm-arguments-ordering.patch" - "lightdm-vncserver-check.patch")))) + "lightdm-vncserver-check.patch" + "lightdm-vnc-color-depth.patch")))) (build-system gnu-build-system) (arguments '(#:parallel-tests? #f ; fails when run in parallel diff --git a/gnu/packages/patches/lightdm-vnc-color-depth.patch b/gnu/packages/patches/lightdm-vnc-color-depth.patch new file mode 100644 index 0000000000..cd69977d6a --- /dev/null +++ b/gnu/packages/patches/lightdm-vnc-color-depth.patch @@ -0,0 +1,81 @@ +There is no longer support for 8 bit color depth in TigerVNC (see: +https://github.com/TigerVNC/tigervnc/commit/e86d8720ba1e79b486ca29a5c2b27fa25811e6a2); +using it causes a fatal error. + +Submitted upstream at: https://github.com/canonical/lightdm/pull/265. + +diff --git a/data/lightdm.conf b/data/lightdm.conf +index 0df38429..60e3e8b4 100644 +--- a/data/lightdm.conf ++++ b/data/lightdm.conf +@@ -160,4 +160,4 @@ + #listen-address= + #width=1024 + #height=768 +-#depth=8 ++#depth=24 +diff --git a/src/x-server-xvnc.c b/src/x-server-xvnc.c +index 68340d53..27ca4454 100644 +--- a/src/x-server-xvnc.c ++++ b/src/x-server-xvnc.c +@@ -127,7 +127,7 @@ x_server_xvnc_init (XServerXVNC *server) + XServerXVNCPrivate *priv = x_server_xvnc_get_instance_private (server); + priv->width = 1024; + priv->height = 768; +- priv->depth = 8; ++ priv->depth = 24; + } + + static void +diff --git a/tests/scripts/vnc-command.conf b/tests/scripts/vnc-command.conf +index 0f1e25fd..335956d9 100644 +--- a/tests/scripts/vnc-command.conf ++++ b/tests/scripts/vnc-command.conf +@@ -19,7 +19,7 @@ command=Xvnc -option + #?VNC-CLIENT CONNECT + + # Xvnc server starts +-#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=TRUE ++#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=TRUE + + # Daemon connects when X server is ready + #?*XVNC-0 INDICATE-READY +diff --git a/tests/scripts/vnc-guest.conf b/tests/scripts/vnc-guest.conf +index 431bb244..ce2b97db 100644 +--- a/tests/scripts/vnc-guest.conf ++++ b/tests/scripts/vnc-guest.conf +@@ -21,7 +21,7 @@ user-session=default + #?VNC-CLIENT CONNECT + + # Xvnc server starts +-#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE ++#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE + + # Daemon connects when X server is ready + #?*XVNC-0 INDICATE-READY +diff --git a/tests/scripts/vnc-login.conf b/tests/scripts/vnc-login.conf +index cdfe17b8..f0d65b7f 100644 +--- a/tests/scripts/vnc-login.conf ++++ b/tests/scripts/vnc-login.conf +@@ -21,7 +21,7 @@ user-session=default + #?VNC-CLIENT CONNECT + + # Xvnc server starts +-#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE ++#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE + + # Daemon connects when X server is ready + #?*XVNC-0 INDICATE-READY +diff --git a/tests/scripts/vnc-open-file-descriptors.conf b/tests/scripts/vnc-open-file-descriptors.conf +index 753c84dd..e5d35730 100644 +--- a/tests/scripts/vnc-open-file-descriptors.conf ++++ b/tests/scripts/vnc-open-file-descriptors.conf +@@ -21,7 +21,7 @@ user-session=default + #?VNC-CLIENT CONNECT + + # Xvnc server starts +-#?XVNC-0 START GEOMETRY=1024x768 DEPTH=8 OPTION=FALSE ++#?XVNC-0 START GEOMETRY=1024x768 DEPTH=24 OPTION=FALSE + + # Daemon connects when X server is ready + #?*XVNC-0 INDICATE-READY From patchwork Sat Aug 13 06:54:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41600 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 C066527BBEA; Sat, 13 Aug 2022 07:57:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8073027BBE9 for ; Sat, 13 Aug 2022 07:57:26 +0100 (BST) Received: from localhost ([::1]:44962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl5J-0006Ha-Kz for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:57:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl40-0004ld-TI for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl40-0006XN-KA for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl40-0006s9-Gv for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 12/14] marionette: Improve the error message of 'wait-for-screen-text'. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037370726292 (code B ref 57168); Sat, 13 Aug 2022 06:56:04 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:07 +0000 Received: from localhost ([127.0.0.1]:59525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl34-0006pu-Ar for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:07 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:37428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2t-0006me-Ji for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:56 -0400 Received: by mail-qt1-f173.google.com with SMTP id l5so2290475qtv.4 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=lYIPm5H8inivgn+bMnETzC0DXbRlDUBED5e7T2NHB64=; b=jtG0Abm32F/YEJEvGuEoAzt3oguXQuFvQ/06JAuB+RqZpsLHQJ++vFL00MBwFoL0WK XxtMcOpS/4/ugumMLqZJhVtRLSiAz4gkRIpoNoLEbjFOYlh8CUSHgsm3jbJ9cspPNczh acc4BMWp35KjXgR8ciIpOPFHpUO9JOEt/k99gX2xPXwL7KfaA0jXqD+Rg7UxFYX01tP1 KUq5S4pf5Q1WfoAZ2ABX9bnOX+1+FQQXOm2SGEHK5NtZ2JaVPVTRjzBvpgLA8tR1ebyU YdLslmlvNG7SRjfV4ugZwCu7boRRArgxcTeUVwD14Eu8oxR7Io5F85dxQTSaXrUGDGUl xV7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=lYIPm5H8inivgn+bMnETzC0DXbRlDUBED5e7T2NHB64=; b=707IemnSCbN4Q421neN+e9XEnHH8V2kK2wlAMcDW2tH0InCbRIcHHNTVNuM1Q368fJ UUqHPnDIS5SfNpHRpdX4V+zhEd9tP0JKYnFDjyRqKmcQBsy166c3yTMITR1446ZnvnSQ 3mYcQxgMfclpUPdoD12w+hxqSbHLXCyrKKOzrL8DDptJ4Z50L9GUjgl964i8LU4deEzA NUntNM8I0BPVsXWBMYb7fwjddvATE8FrKi4gbzq4LKcO54WBi8leXhmv073HVgoZeabW r90h//63ysqT+227UZifCw9SVgY3L6+QsjPuVtJ1gx5m9GIIMTPmp52+MRhxfgCKh9x3 6Xxw== X-Gm-Message-State: ACgBeo0cq71394cUKtSdB/kOm2ZMuphzfcMn1F/VxQJIG3MjcIQ2C8kp /6xmXMKBLfLZ/RItYR+mzMcJ2b+QNT4= X-Google-Smtp-Source: AA6agR4YWDXlWxZT54Z/jCA6+ouU2/KQM1w1w1aQokyq1COrNcVdlU/U9n+wFO+lZ2rMNkMWJG+Ikg== X-Received: by 2002:a05:622a:1701:b0:343:74dd:5d1e with SMTP id h1-20020a05622a170100b0034374dd5d1emr4976196qtk.6.1660373690043; Fri, 12 Aug 2022 23:54:50 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:49 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:31 -0400 Message-Id: <20220813065433.27319-12-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/build/marionette.scm (wait-for-screen-text): Return the last OCR'd text when the predicate fails to match instead of the not useful predicate object. --- gnu/build/marionette.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm index 4f409166db..24170bbd30 100644 --- a/gnu/build/marionette.scm +++ b/gnu/build/marionette.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016-2022 Ludovic Courtès ;;; Copyright © 2018 Chris Marusich +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -308,13 +309,14 @@ (define start (define end (+ start timeout)) - (let loop () + (let loop ((last-text #f)) (if (> (car (gettimeofday)) end) - (error "'wait-for-screen-text' timeout" predicate) - (or (predicate (marionette-screen-text marionette #:ocrad ocrad)) - (begin - (sleep 1) - (loop)))))) + (error "'wait-for-screen-text' timeout" 'ocr-text: last-text) + (let ((text (marionette-screen-text marionette #:ocrad ocrad))) + (or (predicate text) + (begin + (sleep 1) + (loop text))))))) (define %qwerty-us-keystrokes ;; Maps "special" characters to their keystrokes. From patchwork Sat Aug 13 06:54:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41601 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 E3BDF27BBEA; Sat, 13 Aug 2022 07:57:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1A02427BBE9 for ; Sat, 13 Aug 2022 07:57:27 +0100 (BST) Received: from localhost ([::1]:44974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl5K-0006I7-4V for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:57:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl41-0004le-AL for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl41-0006XS-1t for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl40-0006sG-TV for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 13/14] build: marionette: Add support for Tesseract OCR. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037371726314 (code B ref 57168); Sat, 13 Aug 2022 06:56:04 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:17 +0000 Received: from localhost ([127.0.0.1]:59527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl3E-0006qK-CB for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:16 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:37425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2u-0006mm-GX for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:57 -0400 Received: by mail-qt1-f169.google.com with SMTP id l5so2290489qtv.4 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=uH4/lopng/rk2T53vxacOtpaTcRgrf2BmyAmhXDjo2M=; b=URX7JfQP1CFe/yROBtsH8s2Nf1QuRpa+qvJQLiokFwjlUiq+0hgrpmxvjzqPrPpIaG wpXL9UIsa9290nX2kO9rNs5JMWzpfoaMUH+as8sWhDiBXxLH7nUqIvQHmfLUEvbzGiu+ jmR1dTscKEqQLbjcnCJ8Nvvlwifq1Y/le2tLSnzkOZJdQwih4Ma5jI4X8Gzq2UnZ+YCL TbBSXy8tkxQ5/W0NRqyWK5miMErbrvntqa7R3vdI+BlkXT6+8AZDzs51BNSxIO3QvnPF dgIvp5crlIduq03ia7rv8rhyCUqIqyWLDHToCy8JiuoTQOnu+gSyPC29V5xMdEvNG9gL 31og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=uH4/lopng/rk2T53vxacOtpaTcRgrf2BmyAmhXDjo2M=; b=gNqOndeqEvPJVLh/Wn4MetFBLjSU3sZLvYbrf6CMBjR2o5MF2Cqf4HTWcd8h2tUVcq KDRSsJzL7S367mPNIJ/eGR/Fb95pC+9NQEcq+UsFzAZaZCmofr+gmyqvk1KKnlKBsnlG 7OFgCoie6tzjrnZggK9d8vvPktqJfUlhkOBGFI1mJfTNrhVvLrTKx6jWejQeNKieTppc cIm2GQ9+Jd/iGLttA5kHih6w0yWW3GOPlKQp+gqWTYSkAFEAlKG2yK9XEHft7z3GEfee brtqmNUr098YVsPb7rct8qeNecIAIT+JV+U5ecHlgzSZ0dmLUZRg/BmMbkhTO/ztTGrc MJNA== X-Gm-Message-State: ACgBeo0risKJd4ory1bDEQWdWFbfOnAdqfcfkOynz9Cdi9OLMNaxk2px JZQlf1r4UJ7yTXOaFjNehQYv+5QQEqg= X-Google-Smtp-Source: AA6agR56h42kj3feEd0Q3sUKPI22jbUV/QVUVzHNyCgBG4UcE8GJStUaJgnAIL4CwVfEY6ipNR3vmQ== X-Received: by 2002:a05:622a:1a05:b0:343:87eb:c686 with SMTP id f5-20020a05622a1a0500b0034387ebc686mr2573306qtb.643.1660373690788; Fri, 12 Aug 2022 23:54:50 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:50 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:32 -0400 Message-Id: <20220813065433.27319-13-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/build/marionette.scm (invoke-ocrad-ocr): New procedure. (invoke-tesseract-ocr): Likewise. (marionette-screen-text): Rename the #:ocrad argument to #:ocr. Dispatch the matching OCR invocation procedure. (wait-for-screen-text): Rename the #:ocrad argument to #:ocr. * gnu/tests/base.scm (run-basic-test): Adjust accordingly. * gnu/tests/install.scm (enter-luks-passphrase): Likewise. (enter-luks-passphrase-for-home): Likewise. --- gnu/build/marionette.scm | 67 +++++++++++++++++++++++----------------- gnu/tests/base.scm | 4 +-- gnu/tests/install.scm | 8 ++--- 3 files changed, 45 insertions(+), 34 deletions(-) diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm index 24170bbd30..06b699bd7b 100644 --- a/gnu/build/marionette.scm +++ b/gnu/build/marionette.scm @@ -268,39 +268,50 @@ (define (marionette-control command marionette) ;; The "quit" command terminates QEMU immediately, with no output. (unless (string=? command "quit") (wait-for-monitor-prompt monitor))))) -(define* (marionette-screen-text marionette - #:key - (ocrad "ocrad")) - "Take a screenshot of MARIONETTE, perform optical character -recognition (OCR), and return the text read from the screen as a string. Do -this by invoking OCRAD (file name for GNU Ocrad's command)" - (define (random-file-name) - (string-append "/tmp/marionette-screenshot-" - (number->string (random (expt 2 32)) 16) - ".ppm")) - - (let ((image (random-file-name))) +(define* (invoke-ocrad-ocr image #:key (ocrad "ocrad")) + "Invoke the OCRAD command on image, and return the recognized text." + (let* ((pipe (open-pipe* OPEN_READ ocrad "-i" "-s" "10" image)) + (text (get-string-all pipe))) + (unless (zero? (close-pipe pipe)) + (error "'ocrad' failed" ocrad)) + text)) + +(define* (invoke-tesseract-ocr image #:key (tesseract "tesseract")) + "Invoke the TESSERACT command on IMAGE, and return the recognized text." + (let* ((output-basename (tmpnam)) + (output-basename* (string-append output-basename ".txt"))) (dynamic-wind (const #t) (lambda () - (marionette-control (string-append "screendump " image) - marionette) - - ;; Tell Ocrad to invert the image colors (make it black on white) and - ;; to scale the image up, which significantly improves the quality of - ;; the result. In spite of this, be aware that OCR confuses "y" and - ;; "V" and sometimes erroneously introduces white space. - (let* ((pipe (open-pipe* OPEN_READ ocrad - "-i" "-s" "10" image)) - (text (get-string-all pipe))) - (unless (zero? (close-pipe pipe)) - (error "'ocrad' failed" ocrad)) - text)) + (let ((exit-val (status:exit-val + (system* tesseract image output-basename)))) + (unless (zero? exit-val) + (error "'tesseract' failed" tesseract)) + (call-with-input-file output-basename* get-string-all))) (lambda () - (false-if-exception (delete-file image)))))) + (false-if-exception (delete-file output-basename)) + (false-if-exception (delete-file output-basename*)))))) + +(define* (marionette-screen-text marionette #:key (ocr "ocrad")) + "Take a screenshot of MARIONETTE, perform optical character +recognition (OCR), and return the text read from the screen as a string. Do +this by invoking OCR, which should be the file name of GNU Ocrad's +@command{ocrad} or Tesseract OCR's @command{tesseract} command." + (define image (string-append (tmpnam) ".ppm")) + ;; Use the QEMU Monitor to save an image of the screen to the host. + (marionette-control (string-append "screendump " image) marionette) + ;; Process it via the OCR. + (cond + ((string-contains ocr "ocrad") + (invoke-ocrad-ocr image #:ocrad ocr)) + ((string-contains ocr "tesseract") + (invoke-tesseract-ocr image #:tesseract ocr)) + (else (error "unsupported ocr command")))) (define* (wait-for-screen-text marionette predicate - #:key (timeout 30) (ocrad "ocrad")) + #:key + (ocr "ocrad") + (timeout 30)) "Wait for TIMEOUT seconds or until the screen text on MARIONETTE matches PREDICATE, whichever comes first. Raise an error when TIMEOUT is exceeded." (define start @@ -312,7 +323,7 @@ (define end (let loop ((last-text #f)) (if (> (car (gettimeofday)) end) (error "'wait-for-screen-text' timeout" 'ocr-text: last-text) - (let ((text (marionette-screen-text marionette #:ocrad ocrad))) + (let ((text (marionette-screen-text marionette #:ocr ocr))) (or (predicate text) (begin (sleep 1) diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 353d6d415a..636b127fb8 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -341,7 +341,7 @@ (define (user-owned? file) (wait-for-screen-text marionette (lambda (text) (string-contains text "Password")) - #:ocrad + #:ocr #$(file-append ocrad "/bin/ocrad")) (marionette-type (string-append password "\n\n") marionette)) @@ -510,7 +510,7 @@ (define (entry->list entry) (test-assert "screen text" (let ((text (marionette-screen-text marionette - #:ocrad + #:ocr #$(file-append ocrad "/bin/ocrad")))) ;; Check whether the welcome message and shell prompt are diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index fbb97d451c..4e0e274e66 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -784,7 +784,7 @@ (define (bios-boot-screen? text) ;; At this point we have no choice but to use OCR to determine ;; when the passphrase should be entered. (wait-for-screen-text #$marionette passphrase-prompt? - #:ocrad #$ocrad) + #:ocr #$ocrad) (marionette-type #$(string-append %luks-passphrase "\n") #$marionette) @@ -792,7 +792,7 @@ (define (bios-boot-screen? text) ;; we can then be sure we match the "Enter passphrase" prompt from ;; 'cryptsetup', in the initrd. (wait-for-screen-text #$marionette (negate bios-boot-screen?) - #:ocrad #$ocrad + #:ocr #$ocrad #:timeout 20))) (test-assert "enter LUKS passphrase for the initrd" @@ -800,7 +800,7 @@ (define (bios-boot-screen? text) ;; XXX: Here we use OCR as well but we could instead use QEMU ;; '-serial stdio' and run it in an input pipe, (wait-for-screen-text #$marionette passphrase-prompt? - #:ocrad #$ocrad + #:ocr #$ocrad #:timeout 60) (marionette-type #$(string-append %luks-passphrase "\n") #$marionette) @@ -999,7 +999,7 @@ (define (passphrase-prompt? text) ;; XXX: Here we use OCR as well but we could instead use QEMU ;; '-serial stdio' and run it in an input pipe, (wait-for-screen-text #$marionette passphrase-prompt? - #:ocrad #$ocrad + #:ocr #$ocrad #:timeout 120) (marionette-type #$(string-append %luks-passphrase "\n") #$marionette) From patchwork Sat Aug 13 06:54:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 41594 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 E839927BBEB; Sat, 13 Aug 2022 07:56:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C161827BBEA for ; Sat, 13 Aug 2022 07:56:30 +0100 (BST) Received: from localhost ([::1]:43070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMl4P-0004x6-T8 for patchwork@mira.cbaines.net; Sat, 13 Aug 2022 02:56:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMl41-0004lo-MH for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMl41-0006XX-CW for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oMl41-0006sN-8f for guix-patches@gnu.org; Sat, 13 Aug 2022 02:56:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57168] [PATCH 14/14] services: Add lightdm-service-type. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Aug 2022 06:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57168 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57168@debbugs.gnu.org Cc: Ricardo Wurmus , Maxim Cournoyer , L p R n d n Received: via spool by 57168-submit@debbugs.gnu.org id=B57168.166037371926323 (code B ref 57168); Sat, 13 Aug 2022 06:56:05 +0000 Received: (at 57168) by debbugs.gnu.org; 13 Aug 2022 06:55:19 +0000 Received: from localhost ([127.0.0.1]:59529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl3F-0006qN-08 for submit@debbugs.gnu.org; Sat, 13 Aug 2022 02:55:19 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:37426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oMl2q-0006mI-Vx for 57168@debbugs.gnu.org; Sat, 13 Aug 2022 02:54:57 -0400 Received: by mail-qt1-f173.google.com with SMTP id l5so2290515qtv.4 for <57168@debbugs.gnu.org>; Fri, 12 Aug 2022 23:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=U9XDYIy0xFVKSnksKXDz7VUrBi9f3JVfYB/isXVDGyE=; b=O0NGmjVnyVBuXay+4Gdp525BIY5GFQUhv9e7F0PvIeifXRYReXWKcrgGG0yEhRpIiS 2dQaxl9u4FMc6fp+XSoqRJjNHiVvzc8G/ISnj8fjfikfG1S6isrAeCNiKG2DqSYw4TnA TjiszadG/VVlOdnVbbpEUX+guCmpo1y8HfafVAs3kCGfcDr8cL+f5lnFJiqOm/a4dU2M 3cnnPZU43+8L++bf93RMmqVf6sGft4lPRHEiPIsdgpZ+LMEzo3g9L1xe8iPJb5WYy0QA JxAWo8Y4D+bpSrPACw/PtTVRZjnDgVzRX91o8nNcQcOCO00JEFBGO0RZzFmkyFyY1uVN xYXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=U9XDYIy0xFVKSnksKXDz7VUrBi9f3JVfYB/isXVDGyE=; b=iWN8ipmUizpowS8DcU575fv1yx7ade6aZRVbO1zFiETafBWto55PpP0/jZEg7Zycm7 EyzI62E0yK3rru2jzmsCohi/ygeORQRUrg6ScrOGSqaQULA3Jkvavr5IO3VAfhtsxMgX EO3mc30PCq1jbXAqI//8ave1gXx/uEDFSfGkNjr1rAibKV4MXO0J89zoEyTse9PPtFv7 sBbDzFBvfruIvzYw5tNLPHdTxqqZJcvA5XRjHMqles2nEUIff+fvSqDqnYTbXLpW3BZK KXz9S3ppgo/5EIsb2WiQCt23QDmI/9Poh0zELURz8UULfdh18RopnhFMsU99PmhFzch0 EwvQ== X-Gm-Message-State: ACgBeo2iJ2dkAGWODhyDyd/B+A5zf3tGOlvJmxVL4RXTcVikRcENIZGl MfOPzFzEECMcuNB1sm/QjFJkcfp1JN4= X-Google-Smtp-Source: AA6agR6ULM47/M/h/KolKlWh3temWBq2pING49Cy3UqLiuO8TCYQLhrYEGz72R6Adi8+h3j+Mrl1lA== X-Received: by 2002:a05:622a:512:b0:343:6f1:a026 with SMTP id l18-20020a05622a051200b0034306f1a026mr6417746qtx.323.1660373691701; Fri, 12 Aug 2022 23:54:51 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-125-72.b2b2c.ca. [205.233.125.72]) by smtp.gmail.com with ESMTPSA id s12-20020a05620a29cc00b006b6757a11fcsm3734441qkp.36.2022.08.12.23.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 23:54:51 -0700 (PDT) From: Maxim Cournoyer Date: Sat, 13 Aug 2022 02:54:33 -0400 Message-Id: <20220813065433.27319-14-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220813065433.27319-1-maxim.cournoyer@gmail.com> References: <20220813065433.27319-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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/services/lightdm.scm: New service. * tests/services/lightdm.scm: Test it. * doc/guix.texi (X Window): Document it. * gnu/local.mk (GNU_SYSTEM_MODULES): Register it. Co-authored-by: L p R n d n Co-authored-by: Ricardo Wurmus --- Makefile.am | 1 + doc/guix.texi | 202 +++++++++++ gnu/local.mk | 1 + gnu/services/lightdm.scm | 687 +++++++++++++++++++++++++++++++++++++ gnu/tests/lightdm.scm | 161 +++++++++ tests/services/lightdm.scm | 52 +++ 6 files changed, 1104 insertions(+) create mode 100644 gnu/services/lightdm.scm create mode 100644 gnu/tests/lightdm.scm create mode 100644 tests/services/lightdm.scm diff --git a/Makefile.am b/Makefile.am index 8df8222573..502ca73866 100644 --- a/Makefile.am +++ b/Makefile.am @@ -533,6 +533,7 @@ SCM_TESTS = \ tests/services.scm \ tests/services/file-sharing.scm \ tests/services/configuration.scm \ + tests/services/lightdm.scm \ tests/services/linux.scm \ tests/services/telephony.scm \ tests/sets.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index 039df29ebc..596bb15288 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -21267,6 +21267,208 @@ Relogin after logout. @end table @end deftp +@cindex lightdm, graphical login manager +@cindex display manager, lightdm +@defvr {Scheme Variable} lightdm-service-type +This is the type of the service to run the +@url{https://github.com/canonical/lightdm,LightDM display manager}. Its +value must be a @code{lightdm-configuration} record, which is documented +below. Among its distinguishing features are TigerVNC integration for +easily remoting your desktop as well as support for the XDMCP protocol, +which can be used by remote clients to start a session from the login +manager. + +In its most basic form, it can be used simply as: + +@lisp +(service lightdm-service-type) +@end lisp + +A more elaborate example making use of the VNC capabilities and enabling +more features and verbose logs could look like: + +@lisp +(service lightdm-service-type + (lightdm-configuration + (allow-empty-passwords? #t) + (xdmcp? #t) + (vnc-server? #t) + (vnc-server-command + (file-append tigervnc-server "/bin/Xvnc" + " -SecurityTypes None")) + (seats + (list (lightdm-seat-configuration + (name "*") + (user-session "ratpoison")))))) +@end lisp +@end defvr + +@c The LightDM service documentation can be auto-generated via the +@c 'generate-doc' procedure at the bottom of the (gnu services lightdm) +@c module. +@c %start of fragment +@deftp {Data Type} lightdm-configuration +Available @code{lightdm-configuration} fields are: + +@table @asis +@item @code{lightdm} (default: @code{lightdm}) (type: file-like) +The lightdm package to use. + +@item @code{allow-empty-passwords?} (default: @code{#f}) (type: boolean) +Whether users not having a password set can login. + +@item @code{debug?} (default: @code{#f}) (type: boolean) +Enable verbose output. + +@item @code{xorg-configuration} (type: xorg-configuration) +The default Xorg server configuration to use to generate the Xorg server +start script. It can be refined per seat via the @code{xserver-command} +of the @code{} record, if desired. + +@item @code{greeters} (type: list-of-greeter-configurations) +The LightDM greeter configurations specifying the greeters to use. + +@item @code{seats} (type: list-of-seat-configurations) +The seat configurations to use. A LightDM seat is akin to a user. + +@item @code{xdmcp?} (default: @code{#f}) (type: boolean) +Whether a XDMCP server should listen on port UDP 177. + +@item @code{xdmcp-listen-address} (type: maybe-string) +The host or IP address the XDMCP server listens for incoming +connections. When unspecified, listen on for any hosts/IP addresses. + +@item @code{vnc-server?} (default: @code{#f}) (type: boolean) +Whether a VNC server is started. + +@item @code{vnc-server-command} (type: file-like) +The Xvnc command to use for the VNC server, it's possible to provide +extra options not otherwise exposed along the command, for example to +disable security: + +@lisp +(vnc-server-command (file-append tigervnc-server "/bin/Xvnc" + " -SecurityTypes None" )) +@end lisp + +Or to set a PasswordFile for the classic (unsecure) VncAuth +mecanism: + +@lisp +(vnc-server-command (file-append tigervnc-server "/bin/Xvnc" + " -PasswordFile /var/lib/lightdm/.vnc/passwd")) +@end lisp + +The password file should be manually created using the +@command{vncpasswd} command. Note that LightDM will create new sessions +for VNC users, which means they need to authenticate in the same way as +local users would. + +@item @code{vnc-server-listen-address} (type: maybe-string) +The host or IP address the VNC server listens for incoming connections. +When unspecified, listen for any hosts/IP addresses. + +@item @code{vnc-server-port} (default: @code{5900}) (type: number) +The TCP port the VNC server should listen to. + +@item @code{extra-config} (default: @code{()}) (type: list-of-strings) +Extra configuration values to append to the LightDM configuration file. + +@end table +@end deftp + + +@c %end of fragment +@c %start of fragment + +@deftp {Data Type} lightdm-gtk-greeter-configuration +Available @code{lightdm-gtk-greeter-configuration} fields are: + +@table @asis +@item @code{lightdm-gtk-greeter} (default: @code{lightdm-gtk-greeter}) (type: file-like) +The lightdm-gtk-greeter package to use. + +@item @code{assets} @ +(default: @code{(adwaita-icon-theme gnome-themes-extrahicolor-icon-theme)}) @ +(type: list-of-file-likes) +The list of packages complementing the greeter, such as package +providing icon themes. + +@item @code{theme-name} (default: @code{"Adwaita"}) (type: string) +The name of the theme to use. + +@item @code{icon-theme-name} (default: @code{"Adwaita"}) (type: string) +The name of the icon theme to use. + +@item @code{cursor-theme-name} (default: @code{"Adwaita"}) (type: string) +The name of the cursor theme to use. + +@item @code{cursor-theme-size} (default: @code{16}) (type: number) +The size to use for the the cursor theme. + +@item @code{allow-debugging?} (type: maybe-boolean) +Set to #t to enable debug log level. + +@item @code{background} (type: file-like) +The background image to use. + +@item @code{at-spi-enabled?} (default: @code{#f}) (type: boolean) +Enable accessibility support through the Assistive Technology Service +Provider Interface (AT-SPI). + +@item @code{a11y-states} @ +(default: @code{(contrast font keyboard reader)}) (type: list-of-a11y-states) +The accessibility features to enable, given as list of symbols. + +@item @code{reader} (type: maybe-file-like) +The command to use to launch a screen reader. + +@item @code{extra-config} (default: @code{()}) (type: list-of-strings) +Extra configuration values to append to the LightDM GTK Greeter +configuration file. + +@end table +@end deftp + +@c %end of fragment +@c %start of fragment + +@deftp {Data Type} lightdm-seat-configuration +Available @code{lightdm-seat-configuration} fields are: + +@table @asis +@item @code{name} (type: seat-name) +The name of the seat. An asterisk (*) can be used in the name to apply +the seat configuration to all the seat names it matches. + +@item @code{user-session} (type: maybe-string) +The session to use by default. The session name must be provided as a +lowercase string, such as @code{"gnome"}, @code{"ratpoison"}, etc. + +@item @code{type} (default: @code{local}) (type: seat-type) +The type of the seat, either the @code{local} or @code{xremote} symbol. + +@item @code{autologin-user} (type: maybe-string) +The username to automatically log in with by default. + +@item @code{greeter-session} @ +(default: @code{lightdm-gtk-greeter}) (type: greeter-session) +The greeter session to use, specified as a symbol. Currently, only +@code{lightdm-gtk-greeter} is supported. + +@item @code{xserver-command} (type: maybe-file-like) +The Xorg server command to run. + +@item @code{session-wrapper} (type: file-like) +The xinitrc session wrapper to use. + +@item @code{extra-config} (default: @code{()}) (type: list-of-strings) +Extra configuration values to append to the seat configuration section. + +@end table +@end deftp +@c %end of fragment + @cindex Xorg, configuration @deftp {Data Type} xorg-configuration diff --git a/gnu/local.mk b/gnu/local.mk index e0c6d6fba1..69847cdfc2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -660,6 +660,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/guix.scm \ %D%/services/hurd.scm \ %D%/services/kerberos.scm \ + %D%/services/lightdm.scm \ %D%/services/linux.scm \ %D%/services/lirc.scm \ %D%/services/virtualization.scm \ diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm new file mode 100644 index 0000000000..07f2e808dd --- /dev/null +++ b/gnu/services/lightdm.scm @@ -0,0 +1,687 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019, 2020 L p R n d n +;;; Copyright © 2020 Ricardo Wurmus +;;; Copyright © 2022 Maxim Cournoyer +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services lightdm) + #:use-module (gnu artwork) + #:use-module (gnu packages admin) + #:use-module (gnu packages display-managers) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gnome) + #:use-module (gnu packages vnc) + #:use-module (gnu packages xorg) + #:use-module (gnu services configuration) + #:use-module (gnu services dbus) + #:use-module (gnu services desktop) + #:use-module (gnu services shepherd) + #:use-module (gnu services xorg) + #:use-module (gnu services) + #:use-module (gnu system pam) + #:use-module (gnu system shadow) + #:use-module (guix diagnostics) + #:use-module (guix gexp) + #:use-module (guix i18n) + #:use-module (guix records) + #:use-module (ice-9 format) + #:use-module (ice-9 match) + #:use-module (oop goops) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (lightdm-seat-configuration + lightdm-seat-configuration? + lightdm-seat-configuration-name + lightdm-seat-configuration-type + lightdm-seat-configuration-user-session + lightdm-seat-configuration-autologin-user + lightdm-seat-configuration-greeter-session + lightdm-seat-configuration-xserver-command + lightdm-seat-configuration-session-wrapper + lightdm-seat-configuration-extra-config + + lightdm-gtk-greeter-configuration + lightdm-gtk-greeter-configuration? + lightdm-gtk-greeter-configuration-lightdm-gtk-greeter + lightdm-gtk-greeter-configuration-assets + lightdm-gtk-greeter-configuration-theme-name + lightdm-gtk-greeter-configuration-icon-theme-name + lightdm-gtk-greeter-configuration-cursor-theme-name + lightdm-gtk-greeter-configuration-allow-debug + lightdm-gtk-greeter-configuration-background + lightdm-gtk-greeter-configuration-a11y-states + lightdm-gtk-greeter-configuration-reader + lightdm-gtk-greeter-configuration-extra-config + + lightdm-configuration + lightdm-configuration? + lightdm-configuration-lightdm + lightdm-configuration-allow-empty-passwords? + lightdm-configuration-xorg-configuration + lightdm-configuration-greeters + lightdm-configuration-seats + lightdm-configuration-xdmcp? + lightdm-configuration-xdmcp-listen-address + lightdm-configuration-vnc-server? + lightdm-configuration-vnc-server-command + lightdm-configuration-vnc-server-listen-address + lightdm-configuration-vnc-server-port + lightdm-configuration-extra-config + + lightdm-service-type)) + +;;; +;;; Greeters. +;;; + +(define list-of-file-likes? + (list-of file-like?)) + +(define %a11y-states '(contrast font keyboard reader)) + +(define (a11y-state? value) + (memq value %a11y-states)) + +(define list-of-a11y-states? + (list-of a11y-state?)) + +(define-maybe boolean) + +(define (serialize-boolean name value) + (define (strip-trailing-? name) + ;; field? -> field + (let ((str (symbol->string name))) + (if (string-suffix? "?" str) + (string-drop-right str 1) + str))) + (format #f "~a=~:[false~;true~]~%" (strip-trailing-? name) value)) + +(define-maybe file-like) + +(define (serialize-file-like name value) + #~(format #f "~a=~a~%" '#$name #$value)) + +(define (serialize-list-of-a11y-states name value) + (format #f "~a=~a~%" name (string-join (map symbol->string value) ";"))) + +(define (serialize-string name value) + (format #f "~a=~a~%" name value)) + +(define (serialize-number name value) + (format #f "~a=~a~%" name value)) + +(define (serialize-list-of-strings _ value) + (string-join value "\n")) + +(define-configuration lightdm-gtk-greeter-configuration + (lightdm-gtk-greeter + (file-like lightdm-gtk-greeter) + "The lightdm-gtk-greeter package to use." + empty-serializer) + (assets + (list-of-file-likes (list adwaita-icon-theme + gnome-themes-extra + ;; FIXME: hicolor-icon-theme should be in the + ;; packages of the desktop templates. + hicolor-icon-theme)) + "The list of packages complementing the greeter, such as package providing +icon themes." + empty-serializer) + (theme-name + (string "Adwaita") + "The name of the theme to use.") + (icon-theme-name + (string "Adwaita") + "The name of the icon theme to use.") + (cursor-theme-name + (string "Adwaita") + "The name of the cursor theme to use.") + (cursor-theme-size + (number 16) + "The size to use for the the cursor theme.") + (allow-debugging? + maybe-boolean + "Set to #t to enable debug log level.") + (background + (file-like (file-append %artwork-repository + "/backgrounds/guix-checkered-16-9.svg")) + "The background image to use.") + ;; FIXME: This should be enabled by default, but it currently doesn't work, + ;; failing to connect to D-Bus, causing the login to fail. + (at-spi-enabled? + (boolean #f) + "Enable accessibility support through the Assistive Technology Service +Provider Interface (AT-SPI).") + (a11y-states + (list-of-a11y-states %a11y-states) + "The accessibility features to enable, given as list of symbols.") + (reader + maybe-file-like + "The command to use to launch a screen reader.") + (extra-config + (list-of-strings '()) + "Extra configuration values to append to the LightDM GTK Greeter +configuration file.")) + +(define (strip-class-name-brackets name) + "Remove the '<<' and '>>' brackets from NAME, a symbol." + (let ((name* (symbol->string name))) + (if (and (string-prefix? "<<" name*) + (string-suffix? ">>" name*)) + (string->symbol (string-drop (string-drop-right name* 2) 2)) + (error "unexpected class name" name*)))) + +(define (config->name config) + "Return the constructor name (a symbol) from CONFIG." + (strip-class-name-brackets (class-name (class-of config)))) + +(define (greeter-configuration->greeter-fields config) + "Return the fields of CONFIG, a greeter configuration." + (match config + ;; Note: register any new greeter configuration here. + ((? lightdm-gtk-greeter-configuration?) + lightdm-gtk-greeter-configuration-fields))) + +(define (greeter-configuration->packages config) + "Return the list of greeter packages, including assets, used by CONFIG, a +greeter configuration." + (match config + ;; Note: register any new greeter configuration here. + ((? lightdm-gtk-greeter-configuration?) + (cons (lightdm-gtk-greeter-configuration-lightdm-gtk-greeter config) + (lightdm-gtk-greeter-configuration-assets config))))) + +;;; TODO: Implement directly in (gnu services configuration), perhaps by +;;; making the FIELDS argument optional. +(define (serialize-configuration* config) + "Like `serialize-configuration', but not requiring to provide a FIELDS +argument." + (define fields (greeter-configuration->greeter-fields config)) + (serialize-configuration config fields)) + +(define (greeter-configuration->conf-name config) + "Return the file name of CONFIG, a greeter configuration." + (format #f "~a.conf" (greeter-configuration->greeter-session config))) + +(define (greeter-configuration->file config) + "Serialize CONFIG into a file under the output directory, so that it can be +easily added to XDG_CONF_DIRS." + (computed-file + (greeter-configuration->conf-name config) + #~(begin + (call-with-output-file #$output + (lambda (port) + (format port (string-append + "[greeter]\n" + #$(serialize-configuration* config)))))))) + + +;;; +;;; Seats. +;;; + +(define seat-name? string?) + +(define (serialize-seat-name _ value) + (format #f "[Seat:~a]~%" value)) + +(define (seat-type? type) + (memq type '(local xremote))) + +(define (serialize-seat-type name value) + (format #f "~a=~a~%" name value)) + +(define-maybe seat-type) + +(define (greeter-session? value) + (memq value '(lightdm-gtk-greeter))) + +(define (serialize-greeter-session name value) + (format #f "~a=~a~%" name value)) + +(define-maybe greeter-session) + +(define-maybe string) + +;;; Note: all the fields except for the seat name should be 'maybe's, since +;;; the real default value is set by the %lightdm-seat-default define later, +;;; and this avoids repeating ourselves in the serialized configuration file. +(define-configuration lightdm-seat-configuration + (name + seat-name + "The name of the seat. An asterisk (*) can be used in the name +to apply the seat configuration to all the seat names it matches.") + (user-session + maybe-string + "The session to use by default. The session name must be provided as a +lowercase string, such as @code{\"gnome\"}, @code{\"ratpoison\"}, etc.") + (type + (seat-type 'local) + "The type of the seat, either the @code{local} or @code{xremote} symbol.") + (autologin-user + maybe-string + "The username to automatically log in with by default.") + (greeter-session + (greeter-session 'lightdm-gtk-greeter) + "The greeter session to use, specified as a symbol. Currently, only +@code{lightdm-gtk-greeter} is supported.") + ;; Note: xserver-command must be lazily computed, so that it can be + ;; overridden via 'lightdm-configuration-xorg-configuration'. + (xserver-command + maybe-file-like + "The Xorg server command to run.") + (session-wrapper + (file-like (xinitrc)) + "The xinitrc session wrapper to use.") + (extra-config + (list-of-strings '()) + "Extra configuration values to append to the seat configuration section.")) + +(define (greeter-session->greater-configuration-pred identifier) + "Return the predicate to check if a configuration is of the type specifying +a greeter identified by IDENTIFIER." + (match identifier + ;; Note: register any new greeter identifier here. + ('lightdm-gtk-greeter + lightdm-gtk-greeter-configuration?))) + +(define (greeter-configuration->greeter-session config) + "Given CONFIG, a greeter configuration object, return its identifier, +a symbol." + (let ((suffix "-configuration") + (greeter-conf-name (config->name config))) + (string->symbol (string-drop-right (symbol->string greeter-conf-name) + (string-length suffix))))) + +(define list-of-seat-configurations? + (list-of lightdm-seat-configuration?)) + + +;;; +;;; LightDM. +;;; + +(define (greeter-configuration? config) + (or (lightdm-gtk-greeter-configuration? config) + ;; Note: register any new greeter configuration here. + )) + +(define (list-of-greeter-configurations? greeter-configs) + (and ((list-of greeter-configuration?) greeter-configs) + ;; Greeter configurations must also not be provided more than once. + (let* ((types (map (cut (compose class-name class-of) <>) + greeter-configs)) + (dupes (filter (lambda (type) + (< 1 (count (cut eq? type <>) types))) + types))) + (unless (null? dupes) + (leave (G_ "duplicate greeter configurations: ~a~%") dupes))))) + +(define-configuration/no-serialization lightdm-configuration + (lightdm + (file-like lightdm) + "The lightdm package to use.") + (allow-empty-passwords? + (boolean #f) + "Whether users not having a password set can login.") + (debug? + (boolean #f) + "Enable verbose output.") + (xorg-configuration + (xorg-configuration (xorg-configuration)) + "The default Xorg server configuration to use to generate the Xorg server +start script. It can be refined per seat via the @code{xserver-command} of +the @code{} record, if desired.") + (greeters + (list-of-greeter-configurations (list (lightdm-gtk-greeter-configuration))) + "The LightDM greeter configurations specifying the greeters to use.") + (seats + (list-of-seat-configurations (list (lightdm-seat-configuration + (name "*")))) + "The seat configurations to use. A LightDM seat is akin to a user.") + (xdmcp? + (boolean #f) + "Whether a XDMCP server should listen on port UDP 177.") + (xdmcp-listen-address + maybe-string + "The host or IP address the XDMCP server listens for incoming connections. +When unspecified, listen on for any hosts/IP addresses.") + (vnc-server? + (boolean #f) + "Whether a VNC server is started.") + (vnc-server-command + (file-like (file-append tigervnc-server "bin/Xvnc")) + "The Xvnc command to use for the VNC server, it's possible to provide extra +options not otherwise exposed along the command, for example to disable +security: +@lisp +(vnc-server-command + (file-append tigervnc-server \"/bin/Xvnc\" + \" -SecurityTypes None\" )) +@end lisp + +Or to set a PasswordFile for the classic (unsecure) VncAuth mecanism: +@lisp +(vnc-server-command + (file-append tigervnc-server \"/bin/Xvnc\" + \" -PasswordFile /var/lib/lightdm/.vnc/passwd\")) +@end lisp +The password file should be manually created using the @command{vncpasswd} +command. + +Note that LightDM will create new sessions for VNC users, which means they +need to authenticate in the same way as local users would. +") + (vnc-server-listen-address + maybe-string + "The host or IP address the VNC server listens for incoming connections. +When unspecified, listen for any hosts/IP addresses.") + (vnc-server-port + (number 5900) + "The TCP port the VNC server should listen to.") + (extra-config + (list-of-strings '()) + "Extra configuration values to append to the LightDM configuration file.")) + +(define (lightdm-configuration->greeters-config-dir config) + "Return a directory containing all the serialized greeter configurations +from CONFIG, a object." + (file-union "etc-lightdm" + (append-map (lambda (g) + `((,(greeter-configuration->conf-name g) + ,(greeter-configuration->file g)))) + (lightdm-configuration-greeters config)))) + +(define (lightdm-configuration->packages config) + "Return all the greeter packages and their assets defined in CONFIG, a + object, as well as the lightdm package itself." + (cons (lightdm-configuration-lightdm config) + (append-map greeter-configuration->packages + (lightdm-configuration-greeters config)))) + +(define (validate-lightdm-configuration config) + "Sanity check CONFIG, a record instance." + ;; This is required to make inter-field validations, such as between the + ;; seats and greeters. + (let* ((seats (lightdm-configuration-seats config)) + (greeter-sessions (delete-duplicates + (map lightdm-seat-configuration-greeter-session + seats) + eq?)) + (greeter-configurations (lightdm-configuration-greeters config)) + (missing-greeters + (filter-map + (lambda (id) + (define pred (greeter-session->greater-configuration-pred id)) + (if (find pred greeter-configurations) + #f ;happy path + id)) + greeter-sessions))) + (unless (null? missing-greeters) + (leave (G_ "no greeter configured for seat greeter sessions: ~a~%") + missing-greeters)))) + +(define (lightdm-configuration-file config) + (match-record config + (xorg-configuration seats + xdmcp? xdmcp-listen-address + vnc-server? vnc-server-command vnc-server-listen-address vnc-server-port + extra-config) + (apply + mixed-text-file + "lightdm.conf" " +# +# General configuration +# +[LightDM] +greeter-user=lightdm +sessions-directory=/run/current-system/profile/share/xsessions\ +:/run/current-system/profile/share/wayland-sessions +remote-sessions-directory=/run/current-system/profile/share/remote-sessions +" + #~(string-join '#$extra-config "\n") + " +# +# XDMCP Server configuration +# +[XDMCPServer] +enabled=" (if xdmcp? "true" "false") "\n" +(if (maybe-value-set? xdmcp-listen-address) + (format #f "xdmcp-listen-address=~a" xdmcp-listen-address) + "") " + +# +# VNC Server configuration +# +[VNCServer] +enabled=" (if vnc-server? "true" "false") " +command=" vnc-server-command " +port=" (number->string vnc-server-port) "\n" +(if (maybe-value-set? vnc-server-listen-address) + (format #f "vnc-server-listen-address=~a" vnc-server-listen-address) + "") " + +# +# Seat configuration. +# +" + (map (lambda (seat) + ;; This complication exists to propagate a default value for + ;; the 'xserver-command' field of the seats. Having a + ;; 'xorg-configuration' field at the root of the + ;; lightdm-configuration enables the use of + ;; 'set-xorg-configuration' and can be more convenient. + (let ((seat* (if (maybe-value-set? + (lightdm-seat-configuration-xserver-command seat)) + seat + (lightdm-seat-configuration + (inherit seat) + (xserver-command (xorg-start-command + xorg-configuration)))))) + (serialize-configuration seat* + lightdm-seat-configuration-fields))) + seats)))) + +(define %lightdm-accounts + (list (user-group (name "lightdm") (system? #t)) + (user-account + (name "lightdm") + (group "lightdm") + (system? #t) + (comment "LightDM user") + (home-directory "/var/lib/lightdm") + (shell (file-append shadow "/sbin/nologin"))))) + +(define %lightdm-activation + ;; Ensure /var/lib/lightdm is owned by the "lightdm" user. Adapted from the + ;; %gdm-activation. + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (define (ensure-ownership directory) + (let* ((lightdm (getpwnam "lightdm")) + (uid (passwd:uid lightdm)) + (gid (passwd:gid lightdm)) + (st (stat directory #f))) + ;; Recurse into directory only if it has wrong ownership. + (when (and st + (or (not (= uid (stat:uid st))) + (not (= gid (stat:gid st))))) + (for-each (lambda (file) + (chown file uid gid)) + (find-files "directory" + #:directories? #t))))) + + (when (not (stat "/var/lib/lightdm-data" #f)) + (mkdir-p "/var/lib/lightdm-data")) + (for-each ensure-ownership + '("/var/lib/lightdm" + "/var/lib/lightdm-data"))))) + +(define (lightdm-pam-service config) + "Return a PAM service for @command{lightdm}." + (unix-pam-service "lightdm" + #:login-uid? #t + #:allow-empty-passwords? + (lightdm-configuration-allow-empty-passwords? config))) + +(define (lightdm-greeter-pam-service) + "Return a PAM service for @command{lightdm-greeter}." + (pam-service + (name "lightdm-greeter") + (auth (list + ;; Load environment from /etc/environment and ~/.pam_environment. + (pam-entry (control "required") (module "pam_env.so")) + ;; Always let the greeter start without authentication. + (pam-entry (control "required") (module "pam_permit.so")))) + ;; No action required for account management + (account (list (pam-entry (control "required") (module "pam_permit.so")))) + ;; Prohibit changing password. + (password (list (pam-entry (control "required") (module "pam_deny.so")))) + ;; Setup session. + (session (list (pam-entry (control "required") (module "pam_unix.so")))))) + +(define (lightdm-autologin-pam-service) + "Return a PAM service for @command{lightdm-autologin}}." + (pam-service + (name "lightdm-autologin") + (auth + (list + ;; Block login if user is globally disabled. + (pam-entry (control "required") (module "pam_nologin.so")) + (pam-entry (control "required") (module "pam_succeed_if.so") + (arguments (list "uid >= 1000"))) + ;; Allow access without authentication. + (pam-entry (control "required") (module "pam_permit.so")))) + ;; Stop autologin if account requires action. + (account (list (pam-entry (control "required") (module "pam_unix.so")))) + ;; Prohibit changing password. + (password (list (pam-entry (control "required") (module "pam_deny.so")))) + ;; Setup session. + (session (list (pam-entry (control "required") (module "pam_unix.so")))))) + +(define (lightdm-pam-services config) + (list (lightdm-pam-service config) + (lightdm-greeter-pam-service) + (lightdm-autologin-pam-service))) + +(define (lightdm-shepherd-service config) + "Return a for LightDM using CONFIG." + + (validate-lightdm-configuration config) + + (define lightdm-command + #~(list #$(file-append (lightdm-configuration-lightdm config) + "/sbin/lightdm") + #$@(if (lightdm-configuration-debug? config) + #~("--debug") + #~()) + "--config" + #$(lightdm-configuration-file config))) + + (define lightdm-paths + (let ((lightdm (lightdm-configuration-lightdm config))) + #~(string-join + '#$(map (lambda (dir) + (file-append lightdm dir)) + '("/bin" "/sbin" "/libexec")) + ":"))) + + (define greeters-config-dir + (lightdm-configuration->greeters-config-dir config)) + + (define data-dirs + ;; LightDM itself needs to be in XDG_DATA_DIRS for the accountsservice + ;; interface it provides to be picked up. The greeters must also be in + ;; XDG_DATA_DIRS to be found. + (let ((packages (lightdm-configuration->packages config))) + #~(string-join '#$(map (cut file-append <> "/share") packages) + ":"))) + + (list + (shepherd-service + (documentation "LightDM display manager") + (requirement '(dbus-system user-processes host-name)) + (provision '(lightdm display-manager xorg-server)) + (respawn? #f) + (start + #~(lambda () + ;; Note: sadly, environment variables defined for 'lightdm' are + ;; cleared and/or overridden by /etc/profile by its spawned greeters, + ;; so an out-of-band means such as /etc is required. + (fork+exec-command #$lightdm-command + ;; Lightdm needs itself in its PATH. + #:environment-variables + (list + ;; It knows to look for greeter configurations in + ;; XDG_CONFIG_DIRS... + (string-append "XDG_CONFIG_DIRS=" + #$greeters-config-dir) + ;; ... and for greeter .desktop files as well as + ;; lightdm accountsservice interface in + ;; XDG_DATA_DIRS. + (string-append "XDG_DATA_DIRS=" + #$data-dirs) + (string-append "PATH=" #$lightdm-paths))))) + (stop #~(make-kill-destructor))))) + +(define lightdm-service-type + (handle-xorg-configuration + lightdm-configuration + (service-type + (name 'lightdm) + (default-value (lightdm-configuration)) + (extensions + (list (service-extension pam-root-service-type lightdm-pam-services) + (service-extension shepherd-root-service-type + lightdm-shepherd-service) + (service-extension activation-service-type + (const %lightdm-activation)) + (service-extension dbus-root-service-type + (compose list lightdm-configuration-lightdm)) + (service-extension polkit-service-type + (compose list lightdm-configuration-lightdm)) + (service-extension account-service-type + (const %lightdm-accounts)) + ;; Add 'lightdm' to the system profile, so that its + ;; 'share/accountsservice' D-Bus service extension directory can be + ;; found via the 'XDG_DATA_DIRS=/run/current-system/profile/share' + ;; environment variable set in the wrapper of the + ;; libexec/accounts-daemon binary of the accountsservice package. + ;; This daemon is spawned by D-Bus, and there's little we can do to + ;; affect its environment. For more reading, see: + ;; https://github.com/NixOS/nixpkgs/issues/45059. + (service-extension profile-service-type + lightdm-configuration->packages) + ;; This is needed for the greeter itself to find its configuration, + ;; because XDG_CONF_DIRS gets overridden by /etc/profile. + (service-extension + etc-service-type + (lambda (config) + `(("lightdm" + ,(lightdm-configuration->greeters-config-dir config))))))) + (description "Run @code{lightdm}, the LightDM graphical login manager.")))) + + +;;; +;;; Generate documentation. +;;; +(define (generate-doc) + (configuration->documentation 'lightdm-configuration) + (configuration->documentation 'lightdm-gtk-greeter-configuration) + (configuration->documentation 'lightdm-seat-configuration)) diff --git a/gnu/tests/lightdm.scm b/gnu/tests/lightdm.scm new file mode 100644 index 0000000000..c9f3101d8c --- /dev/null +++ b/gnu/tests/lightdm.scm @@ -0,0 +1,161 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Maxim Cournoyer . +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu tests lightdm) + #:use-module (gnu bootloader) + #:use-module (gnu bootloader grub) + #:use-module (gnu packages) + #:use-module (gnu packages ocr) + #:use-module (gnu packages ratpoison) + #:use-module (gnu packages vnc) + #:use-module (gnu packages xorg) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu services dbus) + #:use-module (gnu services desktop) + #:use-module (gnu services networking) + #:use-module (gnu services lightdm) + #:use-module (gnu services ssh) + #:use-module (gnu services xorg) + #:use-module (gnu system) + #:use-module (gnu system file-systems) + #:use-module (gnu system shadow) + #:use-module (gnu system vm) + #:use-module (gnu tests) + #:use-module (guix gexp) + #:use-module (guix modules) + #:use-module (srfi srfi-1) + #:export (%test-lightdm)) + + +(define minimal-desktop-services + (list polkit-wheel-service + (service upower-service-type) + (accountsservice-service) + (service polkit-service-type) + (elogind-service) + (dbus-service) + x11-socket-directory-service)) + +(define %lightdm-os + (operating-system + (inherit %simple-os) + (packages (cons* ocrad ratpoison xterm %base-packages)) + (services + (cons* (service lightdm-service-type + (lightdm-configuration + (allow-empty-passwords? #t) + (debug? #t) + (xdmcp? #t) + (vnc-server? #t) + (vnc-server-command + (file-append tigervnc-server "/bin/Xvnc" + " -SecurityTypes None")) + (greeters (list (lightdm-gtk-greeter-configuration + (allow-debugging? #t)))) + (seats (list (lightdm-seat-configuration + (name "*") + (user-session "ratpoison")))))) + + ;; For debugging. + (service dhcp-client-service-type) + (service openssh-service-type + (openssh-configuration + (permit-root-login #t) + (allow-empty-passwords? #t))) + (append minimal-desktop-services + (remove (lambda (service) + (eq? (service-kind service) guix-service-type)) + %base-services)))))) + +(define (run-lightdm-test) + "Run tests in %LIGHTDM-OS." + + (define os (marionette-operating-system + %lightdm-os + #:imported-modules (source-module-closure + '((gnu services herd))))) + + (define vm (virtual-machine os)) + + (define test + (with-imported-modules (source-module-closure + '((gnu build marionette))) + #~(begin + (use-modules (gnu build marionette) + (srfi srfi-26) + (srfi srfi-64)) + + (let ((marionette (make-marionette (list #$vm)))) + + (test-runner-current (system-test-runner #$output)) + (test-begin "lightdm") + + (test-assert "service is running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'lightdm)) + marionette)) + + (test-assert "service can be stopped" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (stop-service 'lightdm)) + marionette)) + + (test-assert "service can be restarted" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (restart-service 'lightdm)) + marionette)) + + (test-assert "login screen is displayed" + ;; GNU Ocrad fails to recognize the "Log In" button text, so use + ;; Tesseract. + (wait-for-screen-text marionette + (cut string-contains <> "Log In") + #:ocr #$(file-append tesseract-ocr + "/bin/tesseract"))) + + (test-assert "can connect to TCP port 5900 on IPv4" + (wait-for-tcp-port 5900 marionette)) + + ;; The VNC server fails to listen to IPv6 due to "Error binding to + ;; address [::]:5900: Address already in use" (see: + ;; https://github.com/canonical/lightdm/issues/266). + (test-expect-fail 1) + (test-assert "can connect to TCP port 5900 on IPv6" + (wait-for-tcp-port 5900 marionette + #:address + `(make-socket-address + AF_INET6 + (inet-pton AF_INET6 "::1") + 5900))) + + (test-end))))) + + (gexp->derivation "lightdm-test" test)) + +(define %test-lightdm + (system-test + (name "lightdm") + (description "Basic tests for the LightDM service.") + (value (run-lightdm-test)))) diff --git a/tests/services/lightdm.scm b/tests/services/lightdm.scm new file mode 100644 index 0000000000..283df2befc --- /dev/null +++ b/tests/services/lightdm.scm @@ -0,0 +1,52 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Maxim Cournoyer +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (tests services lightdm) + #:use-module (guix diagnostics) + #:use-module (gnu services lightdm) + #:use-module (srfi srfi-64)) + +;;; Tests for the (gnu services lightdm) module. + +;;; Access some internals for whitebox testing. +(define validate-lightdm-configuration (@@ (gnu services lightdm) + validate-lightdm-configuration)) + +(test-begin "lightdm-service") + +(test-equal "error on missing greeter" + 'ok + (catch 'quit + (lambda () + (validate-lightdm-configuration (lightdm-configuration (greeters '())))) + (lambda _ + 'ok))) + +(test-equal "error when a greeter has multiple configurations" + 'ok + (catch 'quit + (lambda () + (lightdm-configuration + (greeters (list (lightdm-gtk-greeter-configuration + (theme-name "boring")) + (lightdm-gtk-greeter-configuration + (theme-name "blue")))))) + (lambda _ + 'ok))) + +(test-end "lightdm-service")