From nobody Wed Oct 02 07:52:37 2024 X-Original-To: dev-commits-ports-main@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 4XJRqT62HHz5Y81q; Wed, 02 Oct 2024 07:52:37 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJRqT5L4Vz4jRH; Wed, 2 Oct 2024 07:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727855557; 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=dLb42Kx1gDUEUm7czjDXPKG0d0n8Z39zM8NcqFZFJ70=; b=hyO1i43KU9qKcGZJKg50ejSIKE4bBNa9LwkZQWA0IMn0O9h87ZtPZ9Bu9JTLvPwqMafISM wZdF4SGpKWQJ8q15LaIyLOL4dSMSJQi2EWPYTeJex32OLEZJPkdsuG5pFYxkvPUB4ra4RK G1MskR/lyl2UoFnKI7sV1osxSXsxbu/6MgcpGfm4eWKW2jTTy9i/OfYXVSbNPlxkUg/nrS cUOJS5sdroB7eE6lE/Lwqz3BsnVcftO3rEcZcJfFkTUhuVSJXurQmCMs1XDwenTbgfMDbJ Bb7UMQYHATE0hW3FDX/wmyg4TqHPUUpnroZX1TcxTKHR+MbeJB9qDBb1jhdZRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727855557; 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=dLb42Kx1gDUEUm7czjDXPKG0d0n8Z39zM8NcqFZFJ70=; b=p4QnSIXg/yozQDx5FUcjJNuy1EhjT761pm1xYDwsRrM6DnosZFrQoPJLvGGTVzla5z7Chx UGnf80NRGHcn9Wq43jchjUQxN1pHCHroPkn0XxzmEk+vyfqCKcLsq8wSUYH7O7U1iAITx6 tJ3wX3703/8GRutS0yXSeRgCOrrTisV52FNv9ZBrQIKq4m9rpS6BGplOm7utzEcNsEHoP/ BVKaQ2TimvfrQBsBibe3x/8xa5uN54skUnP9/lB7QhPXNUlA2Ez7ZVOWHHhMCq72uwlj37 LS3IjWcx3bU/g/3+Q31DhVDGwFEcdWLD314tp5K6md7I+mtUXwdiKvuR1icO3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727855557; a=rsa-sha256; cv=none; b=tVgE0DA7K2EgTQ6PwYCjIJSbOPwJk5MR2mP7UYCWP2HTW8fYNQkk/klPq1qAEOtq/napAB iDjScMZkuOK1O73vRqXXYyAqpuA3Ntl6oFi9SiKJgIQAWiQbgbDVlS4O2vRgHasgLZE4Eo mTuEIqNx/ky4zu/UJHR9rYfMoU+S+QtoBjvfN8BeS2gkPAUVTguIli3gkoRH7QaVyhS2z/ mPAFy3gwQNTBexBmZK5RE2hb/6k3Drbfvorws28I3LZUXtHIhjUb1ZmPCvtxvyYBOJ+loR 6H/Z8WUwd/fuJtIjeJLIpDLuvCMKAZHqPxtAyMwnfH2dmNcKSCuP8g88EDukQg== 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 4XJRqT4r9Tz1CcW; Wed, 2 Oct 2024 07:52:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4927qbGa035335; Wed, 2 Oct 2024 07:52:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4927qbqB035332; Wed, 2 Oct 2024 07:52:37 GMT (envelope-from git) Date: Wed, 2 Oct 2024 07:52:37 GMT Message-Id: <202410020752.4927qbqB035332@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Emanuel Haupt Subject: git: 230cb49ccce5 - main - sysutils/fusefs-mergerfs: Add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ehaupt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 230cb49ccce5a79985875ad16e36da0b8f9e8c52 Auto-Submitted: auto-generated The branch main has been updated by ehaupt: URL: https://cgit.FreeBSD.org/ports/commit/?id=230cb49ccce5a79985875ad16e36da0b8f9e8c52 commit 230cb49ccce5a79985875ad16e36da0b8f9e8c52 Author: Emanuel Haupt AuthorDate: 2024-10-02 07:52:13 +0000 Commit: Emanuel Haupt CommitDate: 2024-10-02 07:52:32 +0000 sysutils/fusefs-mergerfs: Add new port mergerfs is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. It is similar to mhddfs, unionfs, and aufs. --- sysutils/Makefile | 1 + sysutils/fusefs-mergerfs/Makefile | 27 ++++++++++++++++++++ sysutils/fusefs-mergerfs/distinfo | 3 +++ .../files/patch-libfuse_lib_cpu.hpp | 16 ++++++++++++ .../fusefs-mergerfs/files/patch-libfuse_lib_fuse.c | 14 +++++++++++ .../files/patch-libfuse_util_fusermount.c | 15 +++++++++++ .../files/patch-src_fs__readahead.cpp | 14 +++++++++++ .../files/patch-src_fs__umount2.hpp | 17 +++++++++++++ .../fusefs-mergerfs/files/patch-tools_preload.c | 29 ++++++++++++++++++++++ sysutils/fusefs-mergerfs/pkg-descr | 3 +++ 10 files changed, 139 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 6df31a304e66..5420cdcc9da9 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -457,6 +457,7 @@ SUBDIR += fusefs-libs SUBDIR += fusefs-libs3 SUBDIR += fusefs-lkl + SUBDIR += fusefs-mergerfs SUBDIR += fusefs-mhddfs SUBDIR += fusefs-mp3fs SUBDIR += fusefs-nbt diff --git a/sysutils/fusefs-mergerfs/Makefile b/sysutils/fusefs-mergerfs/Makefile new file mode 100644 index 000000000000..023c4618a341 --- /dev/null +++ b/sysutils/fusefs-mergerfs/Makefile @@ -0,0 +1,27 @@ +PORTNAME= mergerfs +DISTVERSION= 2.40.2 +CATEGORIES= sysutils +PKGNAMEPREFIX= fusefs- + +MAINTAINER= ehaupt@FreeBSD.org +COMMENT= Featureful FUSE based union filesystem +WWW= https://github.com/trapexit/mergerfs + +LICENSE= ISCL +LICENSE_FILE= ${WRKSRC}/LICENSE + +NOT_FOR_ARCHS= i386 + +USES= fuse gmake localbase:ldflags +USE_GITHUB= yes +GH_ACCOUNT= trapexit + +PLIST_FILES= bin/mergerfs \ + lib/mergerfs/preload.so \ + share/man/man1/mergerfs.1.gz + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mergerfs \ + ${STAGEDIR}${PREFIX}/lib/mergerfs/preload.so + +.include diff --git a/sysutils/fusefs-mergerfs/distinfo b/sysutils/fusefs-mergerfs/distinfo new file mode 100644 index 000000000000..37bfb871ee16 --- /dev/null +++ b/sysutils/fusefs-mergerfs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1727772197 +SHA256 (trapexit-mergerfs-2.40.2_GH0.tar.gz) = b4f45e635f29b0a8ba1727e6c1f503356d47943a14af8b4586d3e36350f82464 +SIZE (trapexit-mergerfs-2.40.2_GH0.tar.gz) = 743230 diff --git a/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_cpu.hpp b/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_cpu.hpp new file mode 100644 index 000000000000..953ff7e2e86b --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_cpu.hpp @@ -0,0 +1,16 @@ +--- libfuse/lib/cpu.hpp.orig 2024-02-29 20:41:22 UTC ++++ libfuse/lib/cpu.hpp +@@ -5,8 +5,12 @@ + #endif + + #include ++#ifdef __FreeBSD__ ++#define sched_getaffinity(pid, size, set) 0 ++#define pthread_setaffinity_np(thread, size, set) 0 ++#else + #include +- ++#endif + #include + #include + #include diff --git a/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_fuse.c b/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_fuse.c new file mode 100644 index 000000000000..cdbfe55e710c --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-libfuse_lib_fuse.c @@ -0,0 +1,14 @@ +--- libfuse/lib/fuse.c.orig 2024-02-29 20:41:22 UTC ++++ libfuse/lib/fuse.c +@@ -48,8 +48,10 @@ + #include + #include + +-#ifdef HAVE_MALLOC_TRIM ++#ifdef __linux__ + #include ++#else ++#define malloc_trim(x) ((void)(x)) + #endif + + #define FUSE_UNKNOWN_INO UINT64_MAX diff --git a/sysutils/fusefs-mergerfs/files/patch-libfuse_util_fusermount.c b/sysutils/fusefs-mergerfs/files/patch-libfuse_util_fusermount.c new file mode 100644 index 000000000000..7657ee4ce378 --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-libfuse_util_fusermount.c @@ -0,0 +1,15 @@ +--- libfuse/util/fusermount.c.orig 2024-02-29 20:41:22 UTC ++++ libfuse/util/fusermount.c +@@ -28,7 +28,12 @@ + #include + #include + #include ++#ifdef __linux__ + #include ++#else ++#define sched_getaffinity(pid, size, set) 0 ++#define pthread_setaffinity_np(thread, size, set) 0 ++#endif + + #define FUSE_COMMFD_ENV "_FUSE_COMMFD" + diff --git a/sysutils/fusefs-mergerfs/files/patch-src_fs__readahead.cpp b/sysutils/fusefs-mergerfs/files/patch-src_fs__readahead.cpp new file mode 100644 index 000000000000..3bb873358455 --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-src_fs__readahead.cpp @@ -0,0 +1,14 @@ +--- src/fs_readahead.cpp.orig 2024-02-29 20:41:22 UTC ++++ src/fs_readahead.cpp +@@ -25,7 +25,11 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + + namespace l + { diff --git a/sysutils/fusefs-mergerfs/files/patch-src_fs__umount2.hpp b/sysutils/fusefs-mergerfs/files/patch-src_fs__umount2.hpp new file mode 100644 index 000000000000..ce291a314c01 --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-src_fs__umount2.hpp @@ -0,0 +1,17 @@ +--- src/fs_umount2.hpp.orig 2024-02-29 20:41:22 UTC ++++ src/fs_umount2.hpp +@@ -19,7 +19,14 @@ + #pragma once + + #include ++#ifdef __linux__ + #include ++#else ++#include ++#include ++#define umount2(target, flags) unmount(target, flags) ++#define MNT_DETACH 0 ++#endif + + #include + diff --git a/sysutils/fusefs-mergerfs/files/patch-tools_preload.c b/sysutils/fusefs-mergerfs/files/patch-tools_preload.c new file mode 100644 index 000000000000..a9a3ad06b3c3 --- /dev/null +++ b/sysutils/fusefs-mergerfs/files/patch-tools_preload.c @@ -0,0 +1,29 @@ +--- tools/preload.c.orig 2024-02-29 20:41:22 UTC ++++ tools/preload.c +@@ -25,10 +25,25 @@ + #include + #include + #include +-#include ++#include ++#ifdef __linux__ ++#define S_IFMT S_IFMT ++#define S_IFREG S_IFREG ++#else ++#define S_IFMT 0 ++#define S_IFREG 0 ++#endif + #include + #include + #include ++ ++#ifdef __linux__ ++#define O_TMPFILE O_TMPFILE ++#define O_PATH O_PATH ++#else ++#define O_TMPFILE 0 ++#define O_PATH 0 ++#endif + + typedef char IOCTL_BUF[4096]; + #define IOCTL_APP_TYPE 0xDF diff --git a/sysutils/fusefs-mergerfs/pkg-descr b/sysutils/fusefs-mergerfs/pkg-descr new file mode 100644 index 000000000000..cff399af2600 --- /dev/null +++ b/sysutils/fusefs-mergerfs/pkg-descr @@ -0,0 +1,3 @@ +mergerfs is a union filesystem geared towards simplifying storage and +management of files across numerous commodity storage devices. It is +similar to mhddfs, unionfs, and aufs.