From patchwork Fri Sep 23 05:00: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: 42861 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 574E727BBEA; Fri, 23 Sep 2022 06:04:42 +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 4942727BBEB for ; Fri, 23 Sep 2022 06:04:41 +0100 (BST) Received: from localhost ([::1]:45954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obarg-0004E7-Cd for patchwork@mira.cbaines.net; Fri, 23 Sep 2022 01:04:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obapA-0003V7-Cj for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obapA-00025j-4f for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obapA-00054s-07 for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58014] [PATCH 05/15] gnu: tigervnc-server: Patch and wrap vncserver script. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Sep 2022 05:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58014 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58014@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58014-submit@debbugs.gnu.org id=B58014.166390928119356 (code B ref 58014); Fri, 23 Sep 2022 05:02:03 +0000 Received: (at 58014) by debbugs.gnu.org; 23 Sep 2022 05:01:21 +0000 Received: from localhost ([127.0.0.1]:39011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obaoT-000526-0o for submit@debbugs.gnu.org; Fri, 23 Sep 2022 01:01:21 -0400 Received: from mail-qv1-f43.google.com ([209.85.219.43]:40467) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obaoO-00051L-6J for 58014@debbugs.gnu.org; Fri, 23 Sep 2022 01:01:16 -0400 Received: by mail-qv1-f43.google.com with SMTP id m9so8342003qvv.7 for <58014@debbugs.gnu.org>; Thu, 22 Sep 2022 22:01:16 -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:subject:date; bh=RGBlvct8Jsz7Wmbi67KCUBu0t4ZTYYCVMdDoXMnWAS4=; b=qOE18y7rqZ8+Fo0lZN1/UWgjMFZIMlrisNEtzj5F9Zsil+GNVn57qku2XNW0XEYijk lZbWtpbXMTqrr+Kz0Bhvu9iwpPD8Y5pnfIiTNaSr2Xar6rFDz6ZgNs8VhGb8UuY0hPoz Sa0pQ2wdczHlkiu7XnKiTw8oAKMHZO6/H1lclaAcG//65wjdTIjTGjSRQ35c/lv73wZX xmFwLICNFoLtfg8XG7o9c30kUnHGD8tyOykuiQFTGJ3Jg8DQmc7T+2CKV/AzIbKVfqdm 9j7BibKSGjV2T6YAEMHeCCTueccEMIpgRjZeQAlfebJOSKLNA4nfGYG9wzWh0dWK/eh4 oJAw== 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 :subject:date; bh=RGBlvct8Jsz7Wmbi67KCUBu0t4ZTYYCVMdDoXMnWAS4=; b=JNNx0VZNMFkqANsq5xFd0VcWbH+Y26Dv0sedexf+BTlNdHlC8zomCZguiEIotqa9lA kwEr6JRLnKjUeEfnQhhmZxExAECDGNfy6IgUpgHYf0dGDG3YnJOm7aJ/GDfg1YtzPB39 1xRi2ZkF5aMBGugK6uI2QppSrdpMsM7ctVDCjsqF4EFcJ8b4Yflb6nYvPBLkZESMNhW2 b409f977prxVAahTuuKI4hFyN2IEXdX0HuD03p/bEEZ9JAJoYa9cJQylsvgnsjPYZtyw rMgvg85gkmJ3VzGHhBew7clbuXtAdIxa+hmudAFS7YwZhTBGaRgTkOYlbHxwN/H2g7vm Uc3g== X-Gm-Message-State: ACrzQf2g+MaQnKReBPVoXV/toi3ZkP65OIn9mIyXtHGlS0BIc+SUw3NI B5OBeqC+3E2y0s66EjFpHFmavMUMQBU= X-Google-Smtp-Source: AMsMyM6GFPZe52MJ9yoPDAvZ2OvG2MX2uipwC3ULKMQSmliD/hqZ9TK7ZibbNVH5R0aJBOlmkojaBQ== X-Received: by 2002:a05:6214:d0b:b0:4ad:8161:3d0a with SMTP id 11-20020a0562140d0b00b004ad81613d0amr4703691qvh.95.1663909269590; Thu, 22 Sep 2022 22:01:09 -0700 (PDT) Received: from localhost.localdomain ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id de4-20020a05620a370400b006bbb07ebd83sm5263534qkb.108.2022.09.22.22.01.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 22:01:09 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 23 Sep 2022 01:00:32 -0400 Message-Id: <20220923050042.29893-5-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923050042.29893-1-maxim.cournoyer@gmail.com> References: <20220923050042.29893-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/vnc.scm (tigervnc-server): [phases]{patch-paths, wrap-vncserver}: New phases. [inputs]: Add font-alias, guile-3.0, util-linux and xinit. --- gnu/packages/vnc.scm | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/gnu/packages/vnc.scm b/gnu/packages/vnc.scm index 3731f63846..8bbccfb498 100644 --- a/gnu/packages/vnc.scm +++ b/gnu/packages/vnc.scm @@ -289,6 +289,31 @@ (define-public tigervnc-server (substitute* "tigervnc-client/unix/vncserver/tigervnc.pam" (("pam_systemd.so") "pam_elogind.so")))) + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "tigervnc-client/unix/vncserver/vncserver.in" + (("`mcookie`") + (format #f "`~a`" (search-input-file inputs "bin/mcookie"))) + ;; Adjust the places where the vncserver script looks for + ;; X11 fonts. + (("'/usr/share/X11/fonts'" all) + (format #f "'~a', '~a', ~a" + "/run/current-system/profile/share/fonts/X11" + (string-append #$(this-package-input "font-alias") + "share/fonts/X11") + all)) + ;; Adjust the location used to locate of the .desktop files. + (("/usr/share/xsessions") + "/run/current-system/profile/share/xsessions") + ;; Do not require a system-provided Xsession shell script, + ;; as Guix System has none. This causes the foreach loop to + ;; iterate an empty list (disabled). + (("\"/etc/X11/xinit/Xsession\", \"/etc/X11/Xsession\"") + "()") + (("if \\(not defined \\$Xsession)") + "if (0)") + (("@cmd, \\$Xsession,") + "@cmd,")))) (add-before 'build 'build-tigervnc (lambda* (#:key parallel-build? #:allow-other-keys) (mkdir-p "tigervnc-client/build") @@ -309,7 +334,16 @@ (define-public tigervnc-server (invoke "make" "-C" "tigervnc-client/build/unix" "install"))) (replace 'install (lambda _ - (invoke "make" "install"))))))) + (invoke "make" "install"))) + (add-after 'install 'wrap-vncserver + (lambda* (#:key inputs outputs #:allow-other-keys) + (wrap-script (search-input-file outputs "libexec/vncserver") + (list "PATH" 'prefix + (map (lambda (p) + (dirname (search-input-file inputs p))) + '("bin/uname" + "bin/xauth" + "bin/xinit")))))))))) (native-inputs (modify-inputs (append (package-native-inputs xorg-server) (package-native-inputs tigervnc-client)) @@ -324,7 +358,13 @@ (define-public tigervnc-server (inputs (modify-inputs (append (package-inputs xorg-server) (package-inputs tigervnc-client)) - (prepend perl coreutils xauth))) + (prepend coreutils + font-alias + guile-3.0 + perl + util-linux + xauth + xinit))) (propagated-inputs (modify-inputs (package-propagated-inputs xorg-server) (prepend xauth)))