From nobody Wed Nov 24 20:56:26 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9C1251896AB8; Wed, 24 Nov 2021 20:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HztbH05qCz3hFW; Wed, 24 Nov 2021 20:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D50E010FA2; Wed, 24 Nov 2021 20:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AOKuQv5082115; Wed, 24 Nov 2021 20:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AOKuQH5082114; Wed, 24 Nov 2021 20:56:26 GMT (envelope-from git) Date: Wed, 24 Nov 2021 20:56:26 GMT Message-Id: <202111242056.1AOKuQH5082114@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Oleksii Samorukov Subject: git: d30a15797673 - main - sysutils/fusefs-exfat: Pass "automounted" option into kernel and remove user option List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: samm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d30a15797673e67199fe8a3fcbf437c5235237a9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637787387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0Tlh/EWyeofgXxqCdwDttpS/iNsx43AELA8+TUNu0s=; b=CFj1Ge4c3RTgqCE7iY6TDV+iux8zigkh22Gsegv1Q7laTp+0lA1blUuGS8Btdc3QRc15rr XQFvtQoL5cwG0mylArGOgcNiuWP6C6z3oBLXI2bVbft0wdfKK0ku0kxVpUvpG5ODP2hPrN P096izNwdVx1gxwQbpWbVEOgNidll1dAuOYDokDWBJLgGKuQxA3rs7lCCyGfvVvBG0D866 E7AILLlTGlnfufWYBXO/EAHXCUFFuN9dnGFfitok1ArSQwEVzTkaAwKu9uuAK2A4s0fzn2 MKDSZZVt2h4RLwNukCjWDTQXimZsgyRrjU/7XxRdEa1VbpwCybpZJGSMY/zDIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637787387; a=rsa-sha256; cv=none; b=nhPo/AZe8Z/ZTjy6bu/jl4atAcUSX2CAFN+BcO7/fLCZgBJGbGtanyfavpIJqbJQN7JYgV bUGEZBS3RfxFqY+JGTnkbrCBkDB9CAUYT1qKVg4IKexzNHbLBzh4rYJDfpypVfyh0Jftqc fFQGxobpxHzGBCUkKLf4ncf8AIm689idsloSLgnTg5NM1xYkLra5LoPlJ7q1SUeOSBd3Fd QfZQcdn0N1fid0AoajLRo/ECJ7H4r/TETmch/2bgrNqtg+AcfnBfUzYl/SML7joXQ0mYXG zXVGXkjnbX13+2nI9RPLKKGc1zUuPyu6UZ+AFPhSdkQB+lwaGxYxWFxluuhrlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by samm: URL: https://cgit.FreeBSD.org/ports/commit/?id=d30a15797673e67199fe8a3fcbf437c5235237a9 commit d30a15797673e67199fe8a3fcbf437c5235237a9 Author: Oleksii Samorukov AuthorDate: 2021-11-24 20:53:27 +0000 Commit: Oleksii Samorukov CommitDate: 2021-11-24 20:56:11 +0000 sysutils/fusefs-exfat: Pass "automounted" option into kernel and remove user option Based on upstream patches from the project repository PR: 255213 Reported by: fbsd@any.com.ru --- sysutils/fusefs-exfat/Makefile | 1 + sysutils/fusefs-exfat/files/patch-fuse_main.c | 25 +++++++++++++ sysutils/fusefs-exfat/files/patch-libexfat_exfat.h | 10 ++++++ sysutils/fusefs-exfat/files/patch-libexfat_mount.c | 42 ++++++++++++++++++++++ sysutils/fusefs-exfat/files/patch-libexfat_utils.c | 18 ++++++++++ 5 files changed, 96 insertions(+) diff --git a/sysutils/fusefs-exfat/Makefile b/sysutils/fusefs-exfat/Makefile index 9f874866eb38..8c9f4d9df17c 100644 --- a/sysutils/fusefs-exfat/Makefile +++ b/sysutils/fusefs-exfat/Makefile @@ -3,6 +3,7 @@ PORTNAME= exfat DISTVERSIONPREFIX= v DISTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= sysutils PKGNAMEPREFIX= fusefs- diff --git a/sysutils/fusefs-exfat/files/patch-fuse_main.c b/sysutils/fusefs-exfat/files/patch-fuse_main.c new file mode 100644 index 000000000000..aa2e853d16dd --- /dev/null +++ b/sysutils/fusefs-exfat/files/patch-fuse_main.c @@ -0,0 +1,25 @@ +--- fuse/main.c.orig 2021-11-24 20:45:02 UTC ++++ fuse/main.c +@@ -451,7 +451,7 @@ static char* add_ro_option(char* options, bool ro) + return ro ? add_option(options, "ro", NULL) : options; + } + +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) + static char* add_user_option(char* options) + { + struct passwd* pw; +@@ -492,12 +492,10 @@ static char* add_fuse_options(char* options, const cha + options = add_ro_option(options, ro); + if (options == NULL) + return NULL; +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) + options = add_user_option(options); + if (options == NULL) + return NULL; +-#endif +-#if defined(__linux__) + options = add_blksize_option(options, CLUSTER_SIZE(*ef.sb)); + if (options == NULL) + return NULL; diff --git a/sysutils/fusefs-exfat/files/patch-libexfat_exfat.h b/sysutils/fusefs-exfat/files/patch-libexfat_exfat.h new file mode 100644 index 000000000000..2b5d7cf8473e --- /dev/null +++ b/sysutils/fusefs-exfat/files/patch-libexfat_exfat.h @@ -0,0 +1,10 @@ +--- libexfat/exfat.h.orig 2018-09-15 05:03:24 UTC ++++ libexfat/exfat.h +@@ -201,6 +201,7 @@ le16_t exfat_calc_name_hash(const struct exfat* ef, co + void exfat_humanize_bytes(uint64_t value, struct exfat_human_bytes* hb); + void exfat_print_info(const struct exfat_super_block* sb, + uint32_t free_clusters); ++bool exfat_match_option(const char* options, const char* option_name); + + int utf16_to_utf8(char* output, const le16_t* input, size_t outsize, + size_t insize); diff --git a/sysutils/fusefs-exfat/files/patch-libexfat_mount.c b/sysutils/fusefs-exfat/files/patch-libexfat_mount.c new file mode 100644 index 000000000000..66d6096e3131 --- /dev/null +++ b/sysutils/fusefs-exfat/files/patch-libexfat_mount.c @@ -0,0 +1,42 @@ +--- libexfat/mount.c.orig 2018-09-15 05:03:24 UTC ++++ libexfat/mount.c +@@ -79,18 +79,6 @@ static int get_int_option(const char* options, const c + return strtol(p, NULL, base); + } + +-static bool match_option(const char* options, const char* option_name) +-{ +- const char* p; +- size_t length = strlen(option_name); +- +- for (p = strstr(options, option_name); p; p = strstr(p + 1, option_name)) +- if ((p == options || p[-1] == ',') && +- (p[length] == ',' || p[length] == '\0')) +- return true; +- return false; +-} +- + static void parse_options(struct exfat* ef, const char* options) + { + int opt_umask; +@@ -102,7 +90,7 @@ static void parse_options(struct exfat* ef, const char + ef->uid = get_int_option(options, "uid", 10, geteuid()); + ef->gid = get_int_option(options, "gid", 10, getegid()); + +- ef->noatime = match_option(options, "noatime"); ++ ef->noatime = exfat_match_option(options, "noatime"); + + switch (get_int_option(options, "repair", 10, 0)) + { +@@ -205,9 +193,9 @@ int exfat_mount(struct exfat* ef, const char* spec, co + + parse_options(ef, options); + +- if (match_option(options, "ro")) ++ if (exfat_match_option(options, "ro")) + mode = EXFAT_MODE_RO; +- else if (match_option(options, "ro_fallback")) ++ else if (exfat_match_option(options, "ro_fallback")) + mode = EXFAT_MODE_ANY; + else + mode = EXFAT_MODE_RW; diff --git a/sysutils/fusefs-exfat/files/patch-libexfat_utils.c b/sysutils/fusefs-exfat/files/patch-libexfat_utils.c new file mode 100644 index 000000000000..0bb23430d4a9 --- /dev/null +++ b/sysutils/fusefs-exfat/files/patch-libexfat_utils.c @@ -0,0 +1,18 @@ +--- libexfat/utils.c.orig 2018-09-15 05:03:24 UTC ++++ libexfat/utils.c +@@ -178,3 +178,15 @@ void exfat_print_info(const struct exfat_super_block* + exfat_humanize_bytes(avail_space, &hb); + printf("Available space %10"PRIu64" %s\n", hb.value, hb.unit); + } ++ ++bool exfat_match_option(const char* options, const char* option_name) ++{ ++ const char* p; ++ size_t length = strlen(option_name); ++ ++ for (p = strstr(options, option_name); p; p = strstr(p + 1, option_name)) ++ if ((p == options || p[-1] == ',') && ++ (p[length] == ',' || p[length] == '\0')) ++ return true; ++ return false; ++}