Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | From 8327383e262e1e7f32750a8a2d3dd708195b0f53 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Stewart <alex.stewart@ni.com> |
| 3 | Date: Wed, 14 Dec 2022 03:05:45 -0600 |
| 4 | Subject: [PATCH] daemon: PATH-expand the sftp backend ssh client |
| 5 | |
| 6 | Meson is currently configured to search the gvfs builder's PATH for an |
| 7 | ssh client, and hardcode its fullpath as the canonical ssh client for |
| 8 | the gvfs sftp backend. |
| 9 | |
| 10 | This setup breaks in cases where the builder has a different ssh client |
| 11 | from the final runtime root, or where the client's pathes differ. |
| 12 | Builders using OpenEmbedded or buildroot workspaces are particularly |
| 13 | affected. |
| 14 | |
| 15 | Instead, set SSH_PROGRAM to `ssh` so that it gets PATH-expanded at |
| 16 | runtime. |
| 17 | |
| 18 | Closes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/465 |
| 19 | Signed-off-by: Alex Stewart <alex.stewart@ni.com> |
| 20 | |
| 21 | Upstream-Status: Accepted |
| 22 | * https://gitlab.gnome.org/GNOME/gvfs/-/merge_requests/157 |
| 23 | * Expect upstream merge in GNOME 44 |
| 24 | |
| 25 | --- |
| 26 | daemon/meson.build | 2 +- |
| 27 | meson.build | 4 ---- |
| 28 | 2 files changed, 1 insertion(+), 5 deletions(-) |
| 29 | |
| 30 | diff --git a/daemon/meson.build b/daemon/meson.build |
| 31 | index e20ada29..72a16890 100644 |
| 32 | --- a/daemon/meson.build |
| 33 | +++ b/daemon/meson.build |
| 34 | @@ -256,7 +256,7 @@ if enable_sftp |
| 35 | '-DDEFAULT_BACKEND_TYPE=sftp', |
| 36 | '-DBACKEND_TYPES="sftp", G_VFS_TYPE_BACKEND_SFTP,', |
| 37 | '-DMAX_JOB_THREADS=1', |
| 38 | - '-DSSH_PROGRAM="@0@"'.format(ssh.full_path()), |
| 39 | + '-DSSH_PROGRAM="ssh"', |
| 40 | ] |
| 41 | |
| 42 | programs += {'gvfsd-sftp': {'sources': sources, 'dependencies': deps, 'c_args': cflags}} |
| 43 | diff --git a/meson.build b/meson.build |
| 44 | index 7fd67427..a84c0104 100644 |
| 45 | --- a/meson.build |
| 46 | +++ b/meson.build |
| 47 | @@ -457,10 +457,6 @@ endif |
| 48 | |
| 49 | # *** SFTP backend *** |
| 50 | enable_sftp = get_option('sftp') |
| 51 | -if enable_sftp |
| 52 | - ssh = find_program('ssh', required: false) |
| 53 | - assert(ssh.found(), 'SFTP backend requested but a ssh client is required') |
| 54 | -endif |
| 55 | |
| 56 | # *** Enable development utils *** |
| 57 | enable_devel_utils = get_option('devel_utils') |
| 58 | -- |
| 59 | 2.38.1 |
| 60 | |