logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 887f731a75aff6a8671d8215d133894893f1d150
parent b1c40f5ba1902a9524966cd6de9709486d895039
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  4 Nov 2019 17:42:19 -0800

sshfs: Update to 3.6.0

Diffstat:

Mpkg/sshfs/config.h2+-
Mpkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch44++++++++++++++++++++++----------------------
Mpkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch8++++----
Mpkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch12++++++------
Mpkg/sshfs/patch/0005-Use-standard-C-functions.patch38+++++++++++++++++++-------------------
Mpkg/sshfs/patch/0006-Add-missing-includes.patch8++++----
Mpkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch26+++++++++++++-------------
Mpkg/sshfs/patch/0008-Remove-remaining-uses-of-glib.patch8++++----
Dpkg/sshfs/patch/0009-Fix-poll.h-include.patch25-------------------------
Apkg/sshfs/patch/0009-Use-__VA_ARGS__-for-variadic-macros-arguments.patch27+++++++++++++++++++++++++++
Apkg/sshfs/patch/0010-Avoid-pointer-arithmetic-on-void.patch25+++++++++++++++++++++++++
Dpkg/sshfs/patch/0010-Use-__VA_ARGS__-for-variadic-macros-arguments.patch27---------------------------
Dpkg/sshfs/patch/0011-Avoid-pointer-arithmetic-on-void.patch25-------------------------
Apkg/sshfs/patch/0011-Avoid-statement-expression-in-container_of-macro.patch28++++++++++++++++++++++++++++
Dpkg/sshfs/patch/0012-Avoid-statement-expression-in-container_of-macro.patch28----------------------------
Mpkg/sshfs/sshfs.124++++++++++++++++++++++++
Mpkg/sshfs/ver2+-
17 files changed, 178 insertions(+), 179 deletions(-)

diff --git a/pkg/sshfs/config.h b/pkg/sshfs/config.h @@ -1,2 +1,2 @@ #define IDMAP_DEFAULT "none" -#define PACKAGE_VERSION "3.5.2" +#define PACKAGE_VERSION "3.6.0" diff --git a/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch b/pkg/sshfs/patch/0002-Use-a-compact-array-and-free-list-for-requests.patch @@ -1,4 +1,4 @@ -From 79ed189f6bdc16ff906095b7a84def50c88468d6 Mon Sep 17 00:00:00 2001 +From 9e0a40fee13134d47980f01c68ec3b10e0d31bc3 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 17:25:36 -0700 Subject: [PATCH] Use a compact array and free list for requests @@ -8,7 +8,7 @@ Subject: [PATCH] Use a compact array and free list for requests 1 file changed, 80 insertions(+), 46 deletions(-) diff --git a/sshfs.c b/sshfs.c -index 06a1ef3..d1280e8 100644 +index d4d624d..92b893e 100644 --- a/sshfs.c +++ b/sshfs.c @@ -171,6 +171,17 @@ struct request { @@ -29,7 +29,7 @@ index 06a1ef3..d1280e8 100644 struct sshfs_io { int num_reqs; pthread_cond_t finished; -@@ -251,7 +262,7 @@ struct sshfs { +@@ -253,7 +264,7 @@ struct sshfs { int slave; char *host; char *base_path; @@ -38,7 +38,7 @@ index 06a1ef3..d1280e8 100644 pthread_mutex_t lock; pthread_mutex_t lock_write; int processing_thread_started; -@@ -1162,12 +1173,6 @@ static int do_write(struct iovec *iov, size_t count) +@@ -1171,12 +1182,6 @@ static int do_write(struct iovec *iov, size_t count) return 0; } @@ -51,7 +51,7 @@ index 06a1ef3..d1280e8 100644 static void buf_to_iov(const struct buffer *buf, struct iovec *iov) { iov->iov_base = buf->p; -@@ -1260,6 +1265,43 @@ static void request_free(struct request *req) +@@ -1269,6 +1274,43 @@ static void request_free(struct request *req) g_free(req); } @@ -95,7 +95,7 @@ index 06a1ef3..d1280e8 100644 static void chunk_free(struct read_chunk *chunk) { while (!list_empty(&chunk->reqs)) { -@@ -1289,22 +1331,6 @@ static void chunk_put_locked(struct read_chunk *chunk) +@@ -1298,22 +1340,6 @@ static void chunk_put_locked(struct read_chunk *chunk) pthread_mutex_unlock(&sshfs.lock); } @@ -118,7 +118,7 @@ index 06a1ef3..d1280e8 100644 static int process_one_request(void) { int res; -@@ -1321,8 +1347,7 @@ static int process_one_request(void) +@@ -1330,8 +1356,7 @@ static int process_one_request(void) return -1; pthread_mutex_lock(&sshfs.lock); @@ -128,7 +128,7 @@ index 06a1ef3..d1280e8 100644 if (req == NULL) fprintf(stderr, "request %i not found\n", id); else { -@@ -1334,7 +1359,7 @@ static int process_one_request(void) +@@ -1343,7 +1368,7 @@ static int process_one_request(void) sshfs.outstanding_len <= sshfs.max_outstanding_len) { pthread_cond_broadcast(&sshfs.outstanding_cond); } @@ -137,7 +137,7 @@ index 06a1ef3..d1280e8 100644 } pthread_mutex_unlock(&sshfs.lock); if (req != NULL) { -@@ -1395,6 +1420,9 @@ static void close_conn(void) +@@ -1404,6 +1429,9 @@ static void close_conn(void) static void *process_requests(void *data_) { @@ -147,7 +147,7 @@ index 06a1ef3..d1280e8 100644 (void) data_; while (1) { -@@ -1405,7 +1433,20 @@ static void *process_requests(void *data_) +@@ -1414,7 +1442,20 @@ static void *process_requests(void *data_) pthread_mutex_lock(&sshfs.lock); sshfs.processing_thread_started = 0; close_conn(); @@ -169,7 +169,7 @@ index 06a1ef3..d1280e8 100644 sshfs.connver ++; sshfs.outstanding_len = 0; pthread_cond_broadcast(&sshfs.outstanding_cond); -@@ -1553,7 +1594,6 @@ static int sftp_error_to_errno(uint32_t error) +@@ -1562,7 +1603,6 @@ static int sftp_error_to_errno(uint32_t error) static void sftp_detect_uid() { int flags; @@ -177,7 +177,7 @@ index 06a1ef3..d1280e8 100644 uint32_t replid; uint8_t type; struct buffer buf; -@@ -1563,7 +1603,7 @@ static void sftp_detect_uid() +@@ -1572,7 +1612,7 @@ static void sftp_detect_uid() buf_init(&buf, 5); buf_add_string(&buf, "."); buf_to_iov(&buf, &iov[0]); @@ -186,7 +186,7 @@ index 06a1ef3..d1280e8 100644 goto out; buf_clear(&buf); if (sftp_read(&type, &buf) == -1) -@@ -1574,7 +1614,7 @@ static void sftp_detect_uid() +@@ -1583,7 +1623,7 @@ static void sftp_detect_uid() } if (buf_get_uint32(&buf, &replid) == -1) goto out; @@ -195,7 +195,7 @@ index 06a1ef3..d1280e8 100644 fprintf(stderr, "bad reply ID\n"); goto out; } -@@ -1609,7 +1649,6 @@ out: +@@ -1618,7 +1658,6 @@ out: static int sftp_check_root(const char *base_path) { int flags; @@ -203,7 +203,7 @@ index 06a1ef3..d1280e8 100644 uint32_t replid; uint8_t type; struct buffer buf; -@@ -1621,7 +1660,7 @@ static int sftp_check_root(const char *base_path) +@@ -1630,7 +1669,7 @@ static int sftp_check_root(const char *base_path) buf_init(&buf, 0); buf_add_string(&buf, remote_dir); buf_to_iov(&buf, &iov[0]); @@ -212,7 +212,7 @@ index 06a1ef3..d1280e8 100644 goto out; buf_clear(&buf); if (sftp_read(&type, &buf) == -1) -@@ -1632,7 +1671,7 @@ static int sftp_check_root(const char *base_path) +@@ -1641,7 +1680,7 @@ static int sftp_check_root(const char *base_path) } if (buf_get_uint32(&buf, &replid) == -1) goto out; @@ -221,7 +221,7 @@ index 06a1ef3..d1280e8 100644 fprintf(stderr, "bad reply ID\n"); goto out; } -@@ -1822,7 +1861,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1831,7 +1870,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, struct request **reqp) { int err; @@ -229,7 +229,7 @@ index 06a1ef3..d1280e8 100644 struct request *req = g_new0(struct request, 1); req->want_reply = want_reply; -@@ -1833,8 +1871,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1842,8 +1880,6 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, pthread_mutex_lock(&sshfs.lock); if (begin_func) begin_func(req); @@ -238,7 +238,7 @@ index 06a1ef3..d1280e8 100644 err = start_processing_thread(); if (err) { pthread_mutex_unlock(&sshfs.lock); -@@ -1845,21 +1881,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1854,21 +1890,24 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, while (sshfs.outstanding_len > sshfs.max_outstanding_len) pthread_cond_wait(&sshfs.outstanding_cond, &sshfs.lock); @@ -267,7 +267,7 @@ index 06a1ef3..d1280e8 100644 pthread_mutex_unlock(&sshfs.lock); if (!rmed && !want_reply) { -@@ -2032,7 +2071,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle) +@@ -2041,7 +2080,7 @@ static int sftp_readdir_send(struct request **req, struct buffer *handle) static int sshfs_req_pending(struct request *req) { @@ -276,7 +276,7 @@ index 06a1ef3..d1280e8 100644 return 1; else return 0; -@@ -3300,11 +3339,6 @@ static int processing_init(void) +@@ -3312,11 +3351,6 @@ static int processing_init(void) pthread_mutex_init(&sshfs.lock, NULL); pthread_mutex_init(&sshfs.lock_write, NULL); pthread_cond_init(&sshfs.outstanding_cond, NULL); @@ -289,5 +289,5 @@ index 06a1ef3..d1280e8 100644 } -- -2.21.0 +2.24.0 diff --git a/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch b/pkg/sshfs/patch/0003-Use-bool-instead-of-gboolean.patch @@ -1,4 +1,4 @@ -From 6e76c7d8affb3911fcb2fb25052f20791476e179 Mon Sep 17 00:00:00 2001 +From 0ce03feec7e6efd23674fdb0d810f34c2ad79bf9 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 17:28:40 -0700 Subject: [PATCH] Use bool instead of gboolean @@ -8,7 +8,7 @@ Subject: [PATCH] Use bool instead of gboolean 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshfs.c b/sshfs.c -index d1280e8..e86bf96 100644 +index 92b893e..391afdd 100644 --- a/sshfs.c +++ b/sshfs.c @@ -18,6 +18,7 @@ @@ -19,7 +19,7 @@ index d1280e8..e86bf96 100644 #include <stdio.h> #include <stdlib.h> #include <unistd.h> -@@ -1893,7 +1894,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1902,7 +1903,7 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, err = -EIO; if (sftp_send_iov(type, req->id, iov, count) == -1) { @@ -29,5 +29,5 @@ index d1280e8..e86bf96 100644 pthread_mutex_lock(&sshfs.lock); rmed = !!request_table_lookup(&sshfs.reqtab, req->id); -- -2.21.0 +2.24.0 diff --git a/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch b/pkg/sshfs/patch/0004-Use-struct-list_head-instead-of-GList.patch @@ -1,4 +1,4 @@ -From ea71f225b4e7e732f2e7b724fff26f72d5aa7c62 Mon Sep 17 00:00:00 2001 +From 3ed67a49b1daf016a2cffaad89fdfb2b4a89892c Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 17:30:20 -0700 Subject: [PATCH] Use struct list_head instead of GList @@ -8,10 +8,10 @@ Subject: [PATCH] Use struct list_head instead of GList 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sshfs.c b/sshfs.c -index e86bf96..3505777 100644 +index 391afdd..9c074a3 100644 --- a/sshfs.c +++ b/sshfs.c -@@ -2081,14 +2081,14 @@ static int sshfs_req_pending(struct request *req) +@@ -2090,14 +2090,14 @@ static int sshfs_req_pending(struct request *req) static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, fuse_fill_dir_t filler) { @@ -29,7 +29,7 @@ index e86bf96..3505777 100644 while (!done || outstanding) { struct request *req; struct buffer name; -@@ -2103,16 +2103,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, +@@ -2112,16 +2112,14 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, break; } @@ -49,7 +49,7 @@ index e86bf96..3505777 100644 outstanding--; if (done) { -@@ -2151,7 +2149,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, +@@ -2160,7 +2158,7 @@ static int sftp_readdir_async(struct buffer *handle, void *buf, off_t offset, } } } @@ -59,5 +59,5 @@ index e86bf96..3505777 100644 return err; } -- -2.21.0 +2.24.0 diff --git a/pkg/sshfs/patch/0005-Use-standard-C-functions.patch b/pkg/sshfs/patch/0005-Use-standard-C-functions.patch @@ -1,4 +1,4 @@ -From 57c0228a88925225425674b34644b139e2560e64 Mon Sep 17 00:00:00 2001 +From af353da1558da816a014983d3abaafaa4929e04c Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 17:42:29 -0700 Subject: [PATCH] Use standard C functions @@ -8,10 +8,10 @@ Subject: [PATCH] Use standard C functions 1 file changed, 55 insertions(+), 36 deletions(-) diff --git a/sshfs.c b/sshfs.c -index 3505777..8f8d67b 100644 +index 9c074a3..17f7d6a 100644 --- a/sshfs.c +++ b/sshfs.c -@@ -665,25 +665,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path) +@@ -671,25 +671,25 @@ static inline void buf_add_path(struct buffer *buf, const char *path) if (sshfs.base_path[0]) { if (path[1]) { if (sshfs.base_path[strlen(sshfs.base_path)-1] != '/') { @@ -47,7 +47,7 @@ index 3505777..8f8d67b 100644 } static int buf_check_get(struct buffer *buf, size_t len) -@@ -1263,7 +1263,7 @@ static void request_free(struct request *req) +@@ -1272,7 +1272,7 @@ static void request_free(struct request *req) { buf_free(&req->reply); sem_destroy(&req->ready); @@ -56,7 +56,7 @@ index 3505777..8f8d67b 100644 } static int request_table_insert(struct request_table *reqtab, struct request *req) -@@ -1311,9 +1311,9 @@ static void chunk_free(struct read_chunk *chunk) +@@ -1320,9 +1320,9 @@ static void chunk_free(struct read_chunk *chunk) rreq = list_entry(chunk->reqs.prev, struct read_req, list); list_del(&rreq->list); buf_free(&rreq->data); @@ -68,7 +68,7 @@ index 3505777..8f8d67b 100644 } static void chunk_put(struct read_chunk *chunk) -@@ -1862,8 +1862,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, +@@ -1871,8 +1871,10 @@ static int sftp_request_send(uint8_t type, struct iovec *iov, size_t count, struct request **reqp) { int err; @@ -80,7 +80,7 @@ index 3505777..8f8d67b 100644 req->want_reply = want_reply; req->end_func = end_func; req->data = data; -@@ -2567,8 +2569,10 @@ static int sshfs_open_common(const char *path, mode_t mode, +@@ -2579,8 +2581,10 @@ static int sshfs_open_common(const char *path, mode_t mode, if (fi->flags & O_APPEND) pflags |= SSH_FXF_APPEND; @@ -93,7 +93,7 @@ index 3505777..8f8d67b 100644 list_init(&sf->write_reqs); pthread_cond_init(&sf->write_finished, NULL); /* Assume random read after open */ -@@ -2612,7 +2616,7 @@ static int sshfs_open_common(const char *path, mode_t mode, +@@ -2624,7 +2628,7 @@ static int sshfs_open_common(const char *path, mode_t mode, } else { if (sshfs.dir_cache) cache_invalidate(path); @@ -102,7 +102,7 @@ index 3505777..8f8d67b 100644 } buf_free(&buf); return err; -@@ -2679,7 +2683,7 @@ static void sshfs_file_put(struct sshfs_file *sf) +@@ -2691,7 +2695,7 @@ static void sshfs_file_put(struct sshfs_file *sf) { sf->refs--; if (!sf->refs) @@ -111,7 +111,7 @@ index 3505777..8f8d67b 100644 } static void sshfs_file_get(struct sshfs_file *sf) -@@ -2749,9 +2753,11 @@ static void sshfs_read_begin(struct request *req) +@@ -2761,9 +2765,11 @@ static void sshfs_read_begin(struct request *req) static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size, off_t offset) { @@ -124,7 +124,7 @@ index 3505777..8f8d67b 100644 pthread_cond_init(&chunk->sio.finished, NULL); list_init(&chunk->reqs); chunk->size = size; -@@ -2765,7 +2771,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size, +@@ -2777,7 +2783,9 @@ static struct read_chunk *sshfs_send_read(struct sshfs_file *sf, size_t size, struct read_req *rreq; size_t bsize = size < sshfs.max_read ? size : sshfs.max_read; @@ -135,7 +135,7 @@ index 3505777..8f8d67b 100644 rreq->sio = &chunk->sio; rreq->size = bsize; buf_init(&rreq->data, 0); -@@ -2836,7 +2844,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size) +@@ -2848,7 +2856,7 @@ static int wait_chunk(struct read_chunk *chunk, char *buf, size_t size) size -= rreq->res; list_del(&rreq->list); buf_free(&rreq->data); @@ -144,7 +144,7 @@ index 3505777..8f8d67b 100644 } } -@@ -3459,9 +3467,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, +@@ -3473,9 +3481,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, switch (key) { case FUSE_OPT_KEY_OPT: if (is_ssh_opt(arg)) { @@ -157,7 +157,7 @@ index 3505777..8f8d67b 100644 return 0; } /* Pass through */ -@@ -3530,9 +3539,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, +@@ -3544,9 +3553,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, case KEY_PORT: @@ -170,7 +170,7 @@ index 3505777..8f8d67b 100644 return 0; case KEY_COMPRESS: -@@ -3540,9 +3550,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, +@@ -3554,9 +3564,10 @@ static int sshfs_opt_proc(void *data, const char *arg, int key, return 0; case KEY_CONFIGFILE: @@ -183,7 +183,7 @@ index 3505777..8f8d67b 100644 return 0; default: -@@ -3718,17 +3729,19 @@ static char *find_base_path(void) +@@ -3732,17 +3743,19 @@ static char *find_base_path(void) static char *fsname_escape_commas(char *fsnameold) { @@ -205,7 +205,7 @@ index 3505777..8f8d67b 100644 return fsname; } -@@ -4065,15 +4078,20 @@ int main(int argc, char *argv[]) +@@ -4083,15 +4096,20 @@ int main(int argc, char *argv[]) else sshfs.max_outstanding_len = ~0; @@ -230,7 +230,7 @@ index 3505777..8f8d67b 100644 ssh_add_arg(sshfs.host); if (sshfs.sftp_server) sftp_server = sshfs.sftp_server; -@@ -4100,10 +4118,11 @@ int main(int argc, char *argv[]) +@@ -4118,10 +4136,11 @@ int main(int argc, char *argv[]) sshfs.max_write = 65536; fsname = fsname_escape_commas(fsname); @@ -246,5 +246,5 @@ index 3505777..8f8d67b 100644 if(sshfs.dir_cache) sshfs.op = cache_wrap(&sshfs_oper); -- -2.21.0 +2.24.0 diff --git a/pkg/sshfs/patch/0006-Add-missing-includes.patch b/pkg/sshfs/patch/0006-Add-missing-includes.patch @@ -1,4 +1,4 @@ -From 82b0a628df4a8190fc7db8342f8360f6da8c7067 Mon Sep 17 00:00:00 2001 +From 7327c2ae180ccdafb879f4181e6a6f636c23816d Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 18:21:02 -0700 Subject: [PATCH] Add missing includes @@ -10,7 +10,7 @@ sys/param.h for MIN 1 file changed, 2 insertions(+) diff --git a/sshfs.c b/sshfs.c -index 2e7429b..04f1892 100644 +index 17f7d6a..42ff750 100644 --- a/sshfs.c +++ b/sshfs.c @@ -19,6 +19,7 @@ @@ -26,9 +26,9 @@ index 2e7429b..04f1892 100644 #include <sys/utsname.h> #include <sys/mman.h> +#include <sys/param.h> - #include <sys/poll.h> + #include <poll.h> #include <netinet/in.h> #include <netinet/tcp.h> -- -2.13.2 +2.24.0 diff --git a/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch b/pkg/sshfs/patch/0007-Disable-uidmap-and-gidmap-support.patch @@ -1,4 +1,4 @@ -From f84f7e6e19be3001a31c4505f5d5e6e8d887943a Mon Sep 17 00:00:00 2001 +From 71731981d5d726647ca768a643479e7ad757868b Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 18:24:16 -0700 Subject: [PATCH] Disable uidmap and gidmap support @@ -8,7 +8,7 @@ Subject: [PATCH] Disable uidmap and gidmap support 1 file changed, 16 insertions(+) diff --git a/sshfs.c b/sshfs.c -index 3cdf2e9..95589bf 100644 +index 42ff750..472f98c 100644 --- a/sshfs.c +++ b/sshfs.c @@ -248,10 +248,12 @@ struct sshfs { @@ -24,7 +24,7 @@ index 3cdf2e9..95589bf 100644 unsigned max_read; unsigned max_write; unsigned ssh_ver; -@@ -382,7 +384,9 @@ enum { +@@ -384,7 +386,9 @@ enum { enum { IDMAP_NONE, IDMAP_USER, @@ -34,7 +34,7 @@ index 3cdf2e9..95589bf 100644 }; enum { -@@ -403,7 +407,9 @@ static struct fuse_opt sshfs_opts[] = { +@@ -405,7 +409,9 @@ static struct fuse_opt sshfs_opts[] = { SSHFS_OPT("workaround=%s", workarounds, 0), SSHFS_OPT("idmap=none", idmap, IDMAP_NONE), SSHFS_OPT("idmap=user", idmap, IDMAP_USER), @@ -44,7 +44,7 @@ index 3cdf2e9..95589bf 100644 SSHFS_OPT("uidfile=%s", uid_file, 0), SSHFS_OPT("gidfile=%s", gid_file, 0), SSHFS_OPT("nomap=ignore", nomap, NOMAP_IGNORE), -@@ -548,6 +554,7 @@ static int list_empty(const struct list_head *head) +@@ -554,6 +560,7 @@ static int list_empty(const struct list_head *head) return head->next == head; } @@ -52,7 +52,7 @@ index 3cdf2e9..95589bf 100644 /* given a pointer to the uid/gid, and the mapping table, remap the * uid/gid, if necessary */ static inline int translate_id(uint32_t *id, GHashTable *map) -@@ -565,6 +572,7 @@ static inline int translate_id(uint32_t *id, GHashTable *map) +@@ -571,6 +578,7 @@ static inline int translate_id(uint32_t *id, GHashTable *map) abort(); } } @@ -60,7 +60,7 @@ index 3cdf2e9..95589bf 100644 static inline void buf_init(struct buffer *buf, size_t size) { -@@ -807,12 +815,14 @@ static int buf_get_attrs(struct buffer *buf, struct stat *stbuf, int *flagsp) +@@ -813,12 +821,14 @@ static int buf_get_attrs(struct buffer *buf, struct stat *stbuf, int *flagsp) if (gid == sshfs.remote_gid) gid = sshfs.local_gid; } @@ -75,7 +75,7 @@ index 3cdf2e9..95589bf 100644 memset(stbuf, 0, sizeof(struct stat)); stbuf->st_mode = mode; -@@ -2464,12 +2474,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid, +@@ -2473,12 +2483,14 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid, if (gid == sshfs.local_gid) gid = sshfs.remote_gid; } @@ -90,7 +90,7 @@ index 3cdf2e9..95589bf 100644 buf_init(&buf, 0); if (sf == NULL) -@@ -3768,6 +3780,7 @@ static int ssh_connect(void) +@@ -3782,6 +3794,7 @@ static int ssh_connect(void) return 0; } @@ -98,7 +98,7 @@ index 3cdf2e9..95589bf 100644 /* number of ':' separated fields in a passwd/group file that we care * about */ #define IDMAP_FIELDS 3 -@@ -3942,6 +3955,7 @@ static inline void load_gid_map(void) +@@ -3956,6 +3969,7 @@ static inline void load_gid_map(void) { read_id_map(sshfs.gid_file, &groupname_to_gid, "gid", &sshfs.gid_map, &sshfs.r_gid_map); } @@ -106,7 +106,7 @@ index 3cdf2e9..95589bf 100644 #ifdef __APPLE__ int main(int argc, char *argv[], __unused char *envp[], char **exec_path) -@@ -4034,6 +4048,7 @@ int main(int argc, char *argv[]) +@@ -4052,6 +4066,7 @@ int main(int argc, char *argv[]) if (sshfs.idmap == IDMAP_USER) sshfs.detect_uid = 1; @@ -114,7 +114,7 @@ index 3cdf2e9..95589bf 100644 else if (sshfs.idmap == IDMAP_FILE) { sshfs.uid_map = NULL; sshfs.gid_map = NULL; -@@ -4048,6 +4063,7 @@ int main(int argc, char *argv[]) +@@ -4066,6 +4081,7 @@ int main(int argc, char *argv[]) if (sshfs.gid_file) load_gid_map(); } @@ -123,5 +123,5 @@ index 3cdf2e9..95589bf 100644 free(sshfs.gid_file); -- -2.21.0 +2.24.0 diff --git a/pkg/sshfs/patch/0008-Remove-remaining-uses-of-glib.patch b/pkg/sshfs/patch/0008-Remove-remaining-uses-of-glib.patch @@ -1,4 +1,4 @@ -From cabb791c3fb5f73b12132f8236216f508d4612bb Mon Sep 17 00:00:00 2001 +From 08fa01f1e9cc564b9ace1872823fea40cd41d717 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 5 Jun 2016 18:24:31 -0700 Subject: [PATCH] Remove remaining uses of glib @@ -8,11 +8,11 @@ Subject: [PATCH] Remove remaining uses of glib 1 file changed, 1 deletion(-) diff --git a/sshfs.c b/sshfs.c -index e027265..b035d65 100644 +index 472f98c..a7bcc87 100644 --- a/sshfs.c +++ b/sshfs.c @@ -44,7 +44,6 @@ - #include <sys/poll.h> + #include <poll.h> #include <netinet/in.h> #include <netinet/tcp.h> -#include <glib.h> @@ -20,5 +20,5 @@ index e027265..b035d65 100644 #include <grp.h> #include <limits.h> -- -2.13.2 +2.24.0 diff --git a/pkg/sshfs/patch/0009-Fix-poll.h-include.patch b/pkg/sshfs/patch/0009-Fix-poll.h-include.patch @@ -1,25 +0,0 @@ -From a884734005e08d9e9f65d12c51a7795cab3da8a1 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 9 Jul 2017 02:20:20 -0700 -Subject: [PATCH] Fix poll.h include - ---- - sshfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sshfs.c b/sshfs.c -index b035d65..ab5bfd8 100644 ---- a/sshfs.c -+++ b/sshfs.c -@@ -41,7 +41,7 @@ - #include <sys/utsname.h> - #include <sys/mman.h> - #include <sys/param.h> --#include <sys/poll.h> -+#include <poll.h> - #include <netinet/in.h> - #include <netinet/tcp.h> - #include <pwd.h> --- -2.13.2 - diff --git a/pkg/sshfs/patch/0009-Use-__VA_ARGS__-for-variadic-macros-arguments.patch b/pkg/sshfs/patch/0009-Use-__VA_ARGS__-for-variadic-macros-arguments.patch @@ -0,0 +1,27 @@ +From cf28dec83d8e092b00490b6892dbb4c5f0b4f2f8 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Tue, 2 Jul 2019 19:50:44 -0700 +Subject: [PATCH] Use __VA_ARGS__ for variadic macros arguments + +--- + sshfs.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sshfs.c b/sshfs.c +index a7bcc87..fd7bccb 100644 +--- a/sshfs.c ++++ b/sshfs.c +@@ -485,8 +485,8 @@ static struct fuse_opt workaround_opts[] = { + FUSE_OPT_END + }; + +-#define DEBUG(format, args...) \ +- do { if (sshfs.debug) fprintf(stderr, format, args); } while(0) ++#define DEBUG(format, ...) \ ++ do { if (sshfs.debug) fprintf(stderr, format, __VA_ARGS__); } while(0) + + static const char *type_name(uint8_t type) + { +-- +2.24.0 + diff --git a/pkg/sshfs/patch/0010-Avoid-pointer-arithmetic-on-void.patch b/pkg/sshfs/patch/0010-Avoid-pointer-arithmetic-on-void.patch @@ -0,0 +1,25 @@ +From 79f62821ec98aca7cdd25a1bba7a8bdea59272e5 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Tue, 2 Jul 2019 19:52:43 -0700 +Subject: [PATCH] Avoid pointer arithmetic on `void *` + +--- + sshfs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sshfs.c b/sshfs.c +index fd7bccb..133b248 100644 +--- a/sshfs.c ++++ b/sshfs.c +@@ -1182,7 +1182,7 @@ static int do_write(struct iovec *iov, size_t count) + do { + if ((unsigned) res < iov->iov_len) { + iov->iov_len -= res; +- iov->iov_base += res; ++ iov->iov_base = (char *) iov->iov_base + res; + break; + } else { + res -= iov->iov_len; +-- +2.24.0 + diff --git a/pkg/sshfs/patch/0010-Use-__VA_ARGS__-for-variadic-macros-arguments.patch b/pkg/sshfs/patch/0010-Use-__VA_ARGS__-for-variadic-macros-arguments.patch @@ -1,27 +0,0 @@ -From 0b9ea41f9e4e30552ef3cce4fee512db99c4e3ed Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Tue, 2 Jul 2019 19:50:44 -0700 -Subject: [PATCH] Use __VA_ARGS__ for variadic macros arguments - ---- - sshfs.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/sshfs.c b/sshfs.c -index d682c8f..9c65cc4 100644 ---- a/sshfs.c -+++ b/sshfs.c -@@ -479,8 +479,8 @@ static struct fuse_opt workaround_opts[] = { - FUSE_OPT_END - }; - --#define DEBUG(format, args...) \ -- do { if (sshfs.debug) fprintf(stderr, format, args); } while(0) -+#define DEBUG(format, ...) \ -+ do { if (sshfs.debug) fprintf(stderr, format, __VA_ARGS__); } while(0) - - static const char *type_name(uint8_t type) - { --- -2.22.0 - diff --git a/pkg/sshfs/patch/0011-Avoid-pointer-arithmetic-on-void.patch b/pkg/sshfs/patch/0011-Avoid-pointer-arithmetic-on-void.patch @@ -1,25 +0,0 @@ -From 9d938bc129dfde5c497cc7f4b780ae4ebc6bfb81 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Tue, 2 Jul 2019 19:52:43 -0700 -Subject: [PATCH] Avoid pointer arithmetic on `void *` - ---- - sshfs.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sshfs.c b/sshfs.c -index 9c65cc4..c65fa73 100644 ---- a/sshfs.c -+++ b/sshfs.c -@@ -1173,7 +1173,7 @@ static int do_write(struct iovec *iov, size_t count) - do { - if ((unsigned) res < iov->iov_len) { - iov->iov_len -= res; -- iov->iov_base += res; -+ iov->iov_base = (char *) iov->iov_base + res; - break; - } else { - res -= iov->iov_len; --- -2.22.0 - diff --git a/pkg/sshfs/patch/0011-Avoid-statement-expression-in-container_of-macro.patch b/pkg/sshfs/patch/0011-Avoid-statement-expression-in-container_of-macro.patch @@ -0,0 +1,28 @@ +From 3f7a20f30c23aead6460e18fda27ba439b369045 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Tue, 2 Jul 2019 19:53:34 -0700 +Subject: [PATCH] Avoid statement expression in container_of macro + +--- + sshfs.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sshfs.c b/sshfs.c +index 133b248..8f974e2 100644 +--- a/sshfs.c ++++ b/sshfs.c +@@ -522,9 +522,8 @@ static const char *type_name(uint8_t type) + } + } + +-#define container_of(ptr, type, member) ({ \ +- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ +- (type *)( (char *)__mptr - offsetof(type,member) );}) ++#define container_of(ptr, type, member) ( \ ++ (type *)( (char *)(ptr) - offsetof(type,member) )) + + #define list_entry(ptr, type, member) \ + container_of(ptr, type, member) +-- +2.24.0 + diff --git a/pkg/sshfs/patch/0012-Avoid-statement-expression-in-container_of-macro.patch b/pkg/sshfs/patch/0012-Avoid-statement-expression-in-container_of-macro.patch @@ -1,28 +0,0 @@ -From 931911b42c5ec3ee6872a2ce2316554bca6a1af3 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Tue, 2 Jul 2019 19:53:34 -0700 -Subject: [PATCH] Avoid statement expression in container_of macro - ---- - sshfs.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/sshfs.c b/sshfs.c -index c65fa73..1532028 100644 ---- a/sshfs.c -+++ b/sshfs.c -@@ -516,9 +516,8 @@ static const char *type_name(uint8_t type) - } - } - --#define container_of(ptr, type, member) ({ \ -- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ -- (type *)( (char *)__mptr - offsetof(type,member) );}) -+#define container_of(ptr, type, member) ( \ -+ (type *)( (char *)(ptr) - offsetof(type,member) )) - - #define list_entry(ptr, type, member) \ - container_of(ptr, type, member) --- -2.22.0 - diff --git a/pkg/sshfs/sshfs.1 b/pkg/sshfs/sshfs.1 @@ -264,6 +264,30 @@ sets the interval for automatic cleaning of the directory cache. sets the interval for forced cleaning of the directory cache when full. .UNINDENT +.INDENT 0.0 +.TP +.BI \-o \ direct_io +This option disables the use of page cache (file content cache) in +the kernel for this filesystem. +This has several affects: +1. Each read() or write() system call will initiate one or more read or +.IP "System Message: ERROR/3 (sshfs.rst:, line 210)" +Unexpected indentation. +.INDENT 7.0 +.INDENT 3.5 +write operations, data will not be cached in the kernel. +.UNINDENT +.UNINDENT +.IP "System Message: WARNING/2 (sshfs.rst:, line 211)" +Block quote ends without a blank line; unexpected unindent. +.INDENT 7.0 +.IP 2. 3 +The return value of the read() and write() system calls will correspond +to the return values of the read and write operations. This is useful +for example if the file size is not known in advance (before reading it). +e.g. /proc filesystem +.UNINDENT +.UNINDENT .sp In addition, SSHFS accepts several options common to all FUSE file systems. These are described in the \fImount.fuse\fP manpage (look diff --git a/pkg/sshfs/ver b/pkg/sshfs/ver @@ -1 +1 @@ -3.5.2 r1 +3.6.0 r0