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 +