From patchwork Tue May 11 15:29:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 29248 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 D1A8927BC82; Tue, 11 May 2021 16:30:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 26FE627BC81 for ; Tue, 11 May 2021 16:30:26 +0100 (BST) Received: from localhost ([::1]:51854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgUL3-0003x9-6x for patchwork@mira.cbaines.net; Tue, 11 May 2021 11:30:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgUKg-0003tF-3M for guix-patches@gnu.org; Tue, 11 May 2021 11:30:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgUKf-00065b-SW for guix-patches@gnu.org; Tue, 11 May 2021 11:30:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgUKf-00020x-O6 for guix-patches@gnu.org; Tue, 11 May 2021 11:30:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48326] [PATCH v5] gnu: Add remmina. References: <70f225a0-3e3d-062c-510d-83c98cad7521@raghavgururajan.name> In-Reply-To: <70f225a0-3e3d-062c-510d-83c98cad7521@raghavgururajan.name> Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 11 May 2021 15:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48326 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48326@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 48326-submit@debbugs.gnu.org id=B48326.16207469927706 (code B ref 48326); Tue, 11 May 2021 15:30:01 +0000 Received: (at 48326) by debbugs.gnu.org; 11 May 2021 15:29:52 +0000 Received: from localhost ([127.0.0.1]:37145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgUKS-00020A-Cx for submit@debbugs.gnu.org; Tue, 11 May 2021 11:29:52 -0400 Received: from out1.migadu.com ([91.121.223.63]:19601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgUKM-0001zx-Hy for 48326@debbugs.gnu.org; Tue, 11 May 2021 11:29:47 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1620746980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sstbsCgqL3giqrAFNWdXEW8Y0w8xoaHE6GG5XezAM5s=; b=elbq4qLleaFdvnoT3c00QWZxQXZCna7NfoNNU4lPXb14ebKdW7Qmnox6qE52K8IkR//TG5 09JWwiYo1crsgo/ef57Jw+w+30tlT77CErUPplnfQ7GMNsN6hDcC/tEM8f175EVVQ/dcpC kmqzZzVzO52CsoMgiUVdoJZ/ZOmOi+X6L3dxrLCeDj9q3CgI3lEI6ZP/4t5UKqjlTg46YG 4hdqyn1Ewzr0PZWYjYbcIV2KMcRW4q2ZpnOEoQgng99O3Jkjtg3Y0JoVPH2DqsnmGaDMF0 ZBv+IWbvkHjCLI4bVL3dWkzcI7s3mpc21driVdOnKdmmHrGYLi3j506/FRiGCQ== Date: Tue, 11 May 2021 11:29:37 -0400 Message-Id: <20210511152937.19853-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name 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" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches * gnu/packages/remmina.scm: New file. (remmina): New variable. * gnu/packages/patches/remmina-plugin-path.patch: New file. * gnu/local.mk (GNU_SYSTEM_MODULES,dist_path_DATA): Add them. --- gnu/local.mk | 2 + .../patches/remmina-plugin-path.patch | 79 +++++++++ gnu/packages/remmina.scm | 158 ++++++++++++++++++ 3 files changed, 239 insertions(+) create mode 100644 gnu/packages/patches/remmina-plugin-path.patch create mode 100644 gnu/packages/remmina.scm diff --git a/gnu/local.mk b/gnu/local.mk index c4bd88714c..c30de41d54 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -485,6 +485,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/readline.scm \ %D%/packages/rednotebook.scm \ %D%/packages/regex.scm \ + %D%/packages/remmina.scm \ %D%/packages/robotics.scm \ %D%/packages/rpc.scm \ %D%/packages/rrdtool.scm \ @@ -1644,6 +1645,7 @@ dist_patch_DATA = \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ + %D%/packages/patches/remmina-plugin-path.patch \ %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch \ diff --git a/gnu/packages/patches/remmina-plugin-path.patch b/gnu/packages/patches/remmina-plugin-path.patch new file mode 100644 index 0000000000..ce382be57a --- /dev/null +++ b/gnu/packages/patches/remmina-plugin-path.patch @@ -0,0 +1,79 @@ +From e6e3c454e380bc1e55a719907df43f73f491fca2 Mon Sep 17 00:00:00 2001 +From: Raghav Gururajan +Date: Mon, 10 May 2021 18:21:02 -0400 +Subject: [PATCH] [PATCH]: Change path variable for loading plugins. + +Remmina is coded to load plugins from path (REMMINA_RUNTIME_PLUGINDIR) +provided during compile-time. This causes cycle between outputs 'out' +and 'plugins'. Therefore, code it to load plugins from path +(REMMINA_PLUGIN_PATH) provided during run-time. +--- + CMakeLists.txt | 3 --- + config.h.in | 1 - + src/remmina_plugin_manager.c | 10 ++++++---- + 3 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 17a58b04..acbbe440 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -313,9 +313,6 @@ if(NOT REMMINA_LOCALEDIR) + endif() + if(NOT REMMINA_PLUGINDIR) + set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/remmina/plugins") +- if(NOT REMMINA_RUNTIME_PLUGINDIR) +- set(REMMINA_RUNTIME_PLUGINDIR "${REMMINA_PLUGINDIR}") +- endif() + endif() + if(NOT REMMINA_UIDIR) + set(REMMINA_UIDIR "${REMMINA_DATADIR}/remmina/ui") +diff --git a/config.h.in b/config.h.in +index e59bf78a..8e8da940 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -22,7 +22,6 @@ + + #define REMMINA_RUNTIME_DATADIR "${REMMINA_RUNTIME_DATADIR}" + #define REMMINA_RUNTIME_LOCALEDIR "${REMMINA_RUNTIME_LOCALEDIR}" +-#define REMMINA_RUNTIME_PLUGINDIR "${REMMINA_RUNTIME_PLUGINDIR}" + #define REMMINA_RUNTIME_UIDIR "${REMMINA_RUNTIME_UIDIR}" + #define REMMINA_RUNTIME_THEMEDIR "${REMMINA_RUNTIME_THEMEDIR}" + #define REMMINA_RUNTIME_EXTERNAL_TOOLS_DIR "${REMMINA_RUNTIME_EXTERNAL_TOOLS_DIR}" +diff --git a/src/remmina_plugin_manager.c b/src/remmina_plugin_manager.c +index a1b713a8..74e2c0f0 100644 +--- a/src/remmina_plugin_manager.c ++++ b/src/remmina_plugin_manager.c +@@ -294,7 +294,7 @@ void remmina_plugin_manager_init() + { + TRACE_CALL(__func__); + GDir *dir; +- const gchar *name, *ptr; ++ const gchar *remmina_plugin_path, *name, *ptr; + gchar *fullpath; + RemminaPlugin *plugin; + RemminaSecretPlugin *sp; +@@ -312,8 +312,10 @@ void remmina_plugin_manager_init() + return; + } + +- g_print("Load modules from %s\n", REMMINA_RUNTIME_PLUGINDIR); +- dir = g_dir_open(REMMINA_RUNTIME_PLUGINDIR, 0, NULL); ++ remmina_plugin_path = g_getenv("REMMINA_PLUGIN_PATH"); ++ ++ g_print("Load modules from %s\n", remmina_plugin_path); ++ dir = g_dir_open(remmina_plugin_path, 0, NULL); + + if (dir == NULL) + return; +@@ -323,7 +325,7 @@ void remmina_plugin_manager_init() + ptr++; + if (!remmina_plugin_manager_loader_supported(ptr)) + continue; +- fullpath = g_strdup_printf(REMMINA_RUNTIME_PLUGINDIR "/%s", name); ++ fullpath = g_strconcat(remmina_plugin_path, "/", name); + remmina_plugin_manager_load_plugin(fullpath); + g_free(fullpath); + } +-- +2.31.1 + diff --git a/gnu/packages/remmina.scm b/gnu/packages/remmina.scm new file mode 100644 index 0000000000..6b8b80653e --- /dev/null +++ b/gnu/packages/remmina.scm @@ -0,0 +1,158 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Raghav Gururajan +;;; +;;; 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 packages remmina) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build utils) + #:use-module (guix build-system cmake) + #:use-module (guix build-system glib-or-gtk) + #:use-module (gnu packages) + #:use-module (gnu packages avahi) + #:use-module (gnu packages crypto) + #:use-module (gnu packages cups) + #:use-module (gnu packages freedesktop) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages gtk) + #:use-module (gnu packages pcre) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages rdesktop) + #:use-module (gnu packages spice) + #:use-module (gnu packages ssh) + #:use-module (gnu packages tls) + #:use-module (gnu packages video) + #:use-module (gnu packages vnc) + #:use-module (gnu packages webkit) + #:use-module (gnu packages xorg)) + +(define-public remmina + (package + (name "remmina") + (version "1.4.16") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.com/Remmina/Remmina") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches + (search-patches + ;; To honor REMMINA_PLUGIN_PATH. + "remmina-plugin-path.patch")) + (sha256 + (base32 "09sjsgvh13jnhs6mhj9icyka0ad3qlnkbzvg7djj9rajzaf1y048")))) + (build-system cmake-build-system) + (outputs '("out" "plugins")) + (arguments + `(#:tests? #f ; No target + #:configure-flags + (list + ;; Install plugins in separate output. + (string-append "-DREMMINA_PLUGINDIR=" + (assoc-ref %outputs "plugins") + "/lib/remmina/plugins") + ;; Disable online version checking. + "-DWITH_NEWS=OFF") + #:imported-modules + (,@%cmake-build-system-modules + (guix build glib-or-gtk-build-system)) + #:modules + ((guix build cmake-build-system) + ((guix build glib-or-gtk-build-system) + #:prefix glib-or-gtk:) + (guix build utils)) + #:phases + (modify-phases %standard-phases + (add-after 'install 'wrap-progs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (name) + (let ((file (string-append out "/bin/" name)) + (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + (wrap-program file + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))) + '("remmina" "remmina-file-wrapper"))) + #t)) + (add-after 'wrap-progs 'glib-or-gtk-compile-schemas + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) + (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gtk+:bin" ,gtk+ "bin") + ("intl" ,intltool) + ("pkg-config" ,pkg-config))) + (inputs + `(("app-indicator" ,libappindicator) + ("atk" ,atk) + ("avahi" ,avahi) + ("cairo" ,cairo) + ("cups" ,cups) + ("ffmpeg" ,ffmpeg) + ("freerdp" ,freerdp) ; for rdp plugin + ("gcrypt" ,libgcrypt) + ("gdk-pixbuf" ,gdk-pixbuf+svg) + ("glib" ,glib) + ("gnome-keyring" ,gnome-keyring) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + ("gtk+" ,gtk+) + ("harfbuzz" ,harfbuzz) + ("json-glib" ,json-glib) + ("libsecret" ,libsecret) ; for secret plugin + ("libsoup" ,libsoup) + ("libssh" ,libssh) ; for ssh plugin + ("libvnc" ,libvnc) ; for vnc plugin + ("openssl" ,openssl) + ("pango" ,pango) + ("pcre" ,pcre) + ("shared-mime-info" ,shared-mime-info) + ("sodium" ,libsodium) + ("spice-client-gtk" ,spice-gtk) ; for spice plugin + ("telepathy" ,telepathy-glib) ; for telepathy plugin + ("vte" ,vte) + ("wayland" ,wayland) + ("webkitgtk" ,webkitgtk) ; for www plugin + ("x11" ,libx11) + ("xext" ,libxext) ; for xdmcp plugin + ("xdg-utils" ,xdg-utils) + ("xkbfile" ,libxkbfile))) ; for nx plugin + (propagated-inputs + `(("dconf" ,dconf))) + (native-search-paths + (list + ;; To load plugins when installed via 'plugins' output. + (search-path-specification + (variable "REMMINA_PLUGIN_PATH") + (files + (list + "lib/remmina/plugins"))))) + (search-paths native-search-paths) + (home-page "https://remmina.org/") + (synopsis "Remote Desktop Client") + (description "Remmina is a client to use other desktops remotely. +RDP, VNC, SPICE, NX, XDMCP, SSH and EXEC network protocols are supported.") + (license license:gpl2+)))