From patchwork Sun May 24 08:54:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lars-Dominik Braun X-Patchwork-Id: 22326 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 6CD4727BBE1; Sun, 24 May 2020 10:50:10 +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,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 ESMTP id AFCC227BBE3 for ; Sun, 24 May 2020 10:50:08 +0100 (BST) Received: from localhost ([::1]:55744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcnGi-0006ks-9P for patchwork@mira.cbaines.net; Sun, 24 May 2020 05:50:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcnGc-0006kW-Ox for guix-patches@gnu.org; Sun, 24 May 2020 05:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcnGc-0004TN-Fv for guix-patches@gnu.org; Sun, 24 May 2020 05:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcnGc-00070z-Cn for guix-patches@gnu.org; Sun, 24 May 2020 05:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41501] [PATCH] Add mergerfs/mergerfs-tools Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 May 2020 09:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41501 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41501@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159031376626901 (code B ref -1); Sun, 24 May 2020 09:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2020 09:49:26 +0000 Received: from localhost ([127.0.0.1]:36504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcnG1-0006zo-Kg for submit@debbugs.gnu.org; Sun, 24 May 2020 05:49:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:44162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcmPN-0005fn-C7 for submit@debbugs.gnu.org; Sun, 24 May 2020 04:55:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPN-0003hH-3u for guix-patches@gnu.org; Sun, 24 May 2020 04:55:01 -0400 Received: from luma.6xq.net ([78.47.253.203]:60132) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcmPK-0005Ey-Mb for guix-patches@gnu.org; Sun, 24 May 2020 04:55:00 -0400 Received: from localhost (dynamic-2a01-0c23-782e-8e00-b650-0a22-b1a6-ba51.c23.pool.telefonica.de [IPv6:2a01:c23:782e:8e00:b650:a22:b1a6:ba51]) by luma.6xq.net (Postfix) with ESMTPSA id 33601C027F for ; Sun, 24 May 2020 10:54:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=6xq.net; s=20120712; t=1590310489; bh=BIG8UGAQ/0a6FkSrN4q8yauzBAsxr+58N7crnjO05Wk=; h=Date:From:To:Subject:From; b=WIRutft/H00VDyJ0y8A/Z2q0HZYYy9uUlcBNx56Tx9kWarfTXdBeoJSQ4i3XgM8MG 7ZNFfDPQY08icImfOH4mXf0BJZtHZ19LQmkF7vj/tFNRT2hU+ZJ/eix+p7u3OvuMoa 1ZMxnzKc9rwsXoOPTiRJHVpr4vmRsUzEGtgTlL2o= Date: Sun, 24 May 2020 10:54:48 +0200 From: Lars-Dominik Braun Message-ID: <20200524085448.GA1363@noor.fritz.box> MIME-Version: 1.0 Content-Disposition: inline Received-SPF: pass client-ip=78.47.253.203; envelope-from=lars@6xq.net; helo=luma.6xq.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/24 04:54:49 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Sun, 24 May 2020 05:49:24 -0400 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" X-getmail-retrieved-from-mailbox: Patches Hi, the attached patch series adds mergerfs, an union file system, and associated tools mergerfs-tools. I’ve been running it for a while now and it seems to be stable. Unfortunately I’m not able to mount it in the system configuration via (file-system (device "/storage/disk*") (mount-point "/storage/pool") (type "mergerfs") (flags '('allow_other, 'use_ino, "moveonenospc=true", "category.create=mfs")) (check? #f)) because device is a pattern and not an actual file system path. Cheers, Lars From 529a3aa70ab1a3079f2c5ab20fb776e92e2ba1cf Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 24 May 2020 09:53:30 +0200 Subject: [PATCH 1/2] gnu: Add mergerfs. * gnu/packages/storage.scm (mergerfs): New variable. --- gnu/packages/storage.scm | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index 481ffade5c..b8090c7eaa 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -23,6 +23,7 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages assembly) @@ -248,3 +249,53 @@ storage protocols (S3, NFS, and others) through the RADOS gateway.") license:cc-by-sa3.0 ;documentation license:bsd-3 ;isa-l,jerasure,++ license:expat)))) ;civetweb,java bindings + +(define-public mergerfs + (package + (name "mergerfs") + (version "2.29.0") + ;; mergerfs bundles a heavily modified copy of libfuse + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/trapexit/mergerfs/releases/download/" + version "/mergerfs-" version ".tar.gz")) + (sha256 + (base32 + "17gizw4vgbqqjd2ykkfpp276942jb5qclp0lkiwkmq1yjgyjqfmk")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests exist + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (setenv "CC" "gcc") + ;; These were copied from the package libfuse + (substitute* '("libfuse/lib/mount_util.c" "libfuse/util/mount_util.c") + (("/bin/(u?)mount" _ maybe-u) + (string-append (assoc-ref inputs "util-linux") + "/bin/" maybe-u "mount"))) + (substitute* '("libfuse/util/mount.mergerfs.c") + (("/bin/sh") + (which "sh"))) + ;; The Makefile does not allow overriding PREFIX via make variables + (substitute* '("Makefile" "libfuse/Makefile") + (("= /usr/local") (string-append "= " (assoc-ref outputs "out"))) + ;; cannot chown as build user + (("chown root:root") "true")) + #t))))) + (inputs `(("util-linux" ,util-linux))) + (home-page "https://github.com/trapexit/mergerfs") + (synopsis + "Featureful union filesystem") + (description + "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.") + (license (list + ;; mergerfs + license:isc + ;; imported libfuse code + license:gpl2 license:lgpl2.0)))) -- 2.26.2