From patchwork Thu Dec 29 14:55:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 8678 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 B89E727BBE9; Thu, 29 Dec 2022 14:56:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FROM_SUSPICIOUS_NTLD, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E398627BBE9 for ; Thu, 29 Dec 2022 14:56:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAuKB-0004bJ-W6; Thu, 29 Dec 2022 09:56:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuKA-0004aq-MY for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAuKA-0006J7-Dl for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAuKA-00085S-8O for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60406] [PATCH 1/2] gnu: Add libdwarf. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60406 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60406@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Cc: 60406@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167232571330241 (code B ref -1); Thu, 29 Dec 2022 14:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 14:55:13 +0000 Received: from localhost ([127.0.0.1]:59660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAuJM-0007rg-S6 for submit@debbugs.gnu.org; Thu, 29 Dec 2022 09:55:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:46864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAuJK-0007rS-QW for submit@debbugs.gnu.org; Thu, 29 Dec 2022 09:55:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuJK-0004XM-Jz for guix-patches@gnu.org; Thu, 29 Dec 2022 09:55:10 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuJI-000610-Jp for guix-patches@gnu.org; Thu, 29 Dec 2022 09:55:10 -0500 Received: (Authenticated sender: mail@ambrevar.xyz) by mail.gandi.net (Postfix) with ESMTPSA id 77B25E0002; Thu, 29 Dec 2022 14:55:05 +0000 (UTC) From: Pierre Neidhardt In-Reply-To: <874jteqn67.fsf@ambrevar.xyz> References: <874jteqn67.fsf@ambrevar.xyz> Date: Thu, 29 Dec 2022 15:55:04 +0100 Message-ID: <87y1qqp8dz.fsf@ambrevar.xyz> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=mail@ambrevar.xyz; helo=relay4-d.mail.gandi.net 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, FROM_SUSPICIOUS_NTLD=0.498, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/elf.scm (libdwarf): New variable. --- gnu/packages/elf.scm | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 8cc2ff3637..7f2865f17f 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -31,7 +31,7 @@ (define-module (gnu packages elf) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) + #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+ lgpl2.1 gpl2 bsd-2)) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) @@ -282,3 +282,26 @@ (define-public patchelf (properties '((release-monitoring-url . "https://github.com/NixOS/patchelf/releases"))) (license gpl3+))) + +(define-public libdwarf + (package + (name "libdwarf") + (version "0.5.0") + (source (origin + (method url-fetch) + (uri (string-append "https://www.prevanders.net/libdwarf-" + version ".tar.xz")) + (sha256 + (base32 + "1a8j05z0rxf5ab9p5av2hqz6kxl8hfgar8h1387a0zric0n85yhi")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-shared"))) + (native-inputs (list python)) + (inputs (list elfutils)) + (home-page "https://www.prevanders.net/dwarf.html") + (synopsis "Handle DWARF debugging information") + (description "@code{libdwarf} is a library that handles the DWARF +debugging information format.") + ;; See https://www.prevanders.net/dwarflicense.html: + (license (list lgpl2.1 gpl2 bsd-2)))) From patchwork Thu Dec 29 14:55:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 8679 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 D1CFB27BBED; Thu, 29 Dec 2022 14:56:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FROM_SUSPICIOUS_NTLD, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EEFD627BBE9 for ; Thu, 29 Dec 2022 14:56:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAuKC-0004bd-9b; Thu, 29 Dec 2022 09:56:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuKB-0004b1-9h for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pAuKA-0006JI-QC for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pAuKA-00085h-Mt for guix-patches@gnu.org; Thu, 29 Dec 2022 09:56:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60406] [PATCH 2/2] gnu: Add dwarfs. Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Dec 2022 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60406 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60406@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Cc: 60406@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167232574530538 (code B ref -1); Thu, 29 Dec 2022 14:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 14:55:45 +0000 Received: from localhost ([127.0.0.1]:59902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAuJs-0007w3-KE for submit@debbugs.gnu.org; Thu, 29 Dec 2022 09:55:45 -0500 Received: from lists.gnu.org ([209.51.188.17]:56584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAuJq-0007vf-VV for submit@debbugs.gnu.org; Thu, 29 Dec 2022 09:55:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuJq-0004a5-OS for guix-patches@gnu.org; Thu, 29 Dec 2022 09:55:42 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAuJo-0006B8-Ho for guix-patches@gnu.org; Thu, 29 Dec 2022 09:55:42 -0500 Received: (Authenticated sender: mail@ambrevar.xyz) by mail.gandi.net (Postfix) with ESMTPSA id 03AE2C0007; Thu, 29 Dec 2022 14:55:37 +0000 (UTC) From: Pierre Neidhardt In-Reply-To: <874jteqn67.fsf@ambrevar.xyz> References: <874jteqn67.fsf@ambrevar.xyz> Date: Thu, 29 Dec 2022 15:55:37 +0100 Message-ID: <87v8lup8d2.fsf@ambrevar.xyz> MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.198; envelope-from=mail@ambrevar.xyz; helo=relay6-d.mail.gandi.net 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, FROM_SUSPICIOUS_NTLD=0.498, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/file-systems.scm (dwarfs): New variable. --- gnu/packages/file-systems.scm | 100 ++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index 3d45634169..e268c52f06 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -46,26 +46,36 @@ (define-module (gnu packages file-systems) #:use-module (gnu packages admin) #:use-module (gnu packages attr) #:use-module (gnu packages autotools) + #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) + #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages datastructures) + #:use-module (gnu packages digest) #:use-module (gnu packages documentation) #:use-module (gnu packages docbook) + #:use-module (gnu packages elf) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) #:use-module (gnu packages guile) + #:use-module (gnu packages jemalloc) #:use-module (gnu packages kerberos) + #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) + #:use-module (gnu packages libunwind) #:use-module (gnu packages linux) + #:use-module (gnu packages maths) + #:use-module (gnu packages man) #:use-module (gnu packages nfs) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages openldap) @@ -73,6 +83,8 @@ (define-module (gnu packages file-systems) #:use-module (gnu packages perl) #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages popt) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) @@ -1790,3 +1802,91 @@ (define-public fuse-overlayfs (description "This package provides an implementation of overlay+shiftfs in FUSE for rootless containers.") (license license:gpl3))) + +(define-public dwarfs + (package + (name "dwarfs") + (version "0.6.2") + (source (origin + (method url-fetch) + ;; The release archive is needed so that version.h is included. + (uri (string-append "https://github.com/mhx/dwarfs/releases/download/v" + version "/dwarfs-" version ".tar.xz")) + (sha256 + (base32 + "1kncxf85gsj3anck8ccjmxn2azp5ifqbgkiky2kharmvphkbmfcv")) + (snippet + #~(begin + (use-modules (guix build utils)) + ;; Prefer system libraries instead of submodules. + ;; TODO: Package fbthrift. + ;; TODO: Can we use Guix own folly? There is no CMake option for it. + ;; TODO: Package parallel-hashmap. + (for-each delete-file-recursively + '(;; "fbthrift" + ;; "folly" + ;; "parallel-hashmap" + "xxHash" + "zstd")))))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f ; TODO: 1 test fails because 'modprobe fuse' needs privileged access. + #:configure-flags + (list "-DPREFER_SYSTEM_ZSTD=ON" + "-DPREFER_SYSTEM_XXHASH=ON" + "-DPREFER_SYSTEM_GTEST=ON" + "-DWITH_TESTS=ON" + ;; Disable man pages since ronn fails to run without hpricot. + "-DWITH_MAN_PAGES=OFF"))) + (native-inputs + (list + ;; FIXME: Building with ronn fail because hpricot is missing. + ;; ronn + folly googletest libdwarf libevent pkg-config)) + (inputs + (list + boost + double-conversion + fmt + fuse-3 + gflags + jemalloc + libarchive + libunwind + lz4 + openssl + xxhash + xz + `(,zstd "lib"))) + (home-page "https://github.com/mhx/dwarfs") + (synopsis "Fast high compression read-only file system") + (description "DwarFS is a read-only file system with a focus on achieving +very high compression ratios in particular for very redundant data. + +DwarFS also doesn't compromise on speed and for some cases it is on par with +or performs better than SquashFS. For the primary use case, DwarFS +compression is an order of magnitude better than SquashFS compression, it's 6 +times faster to build the file system, it's typically faster to access files +on DwarFS and it uses less CPU resources. + +Distinct features of DwarFS are: + +@itemize + +@item Clustering of files by similarity using a similarity hash function. This +makes it easier to exploit the redundancy across file boundaries. + +@item Segmentation analysis across file system blocks in order to reduce the +size of the uncompressed file system. This saves memory when using the +compressed file system and thus potentially allows for higher cache hit rates +as more data can be kept in the cache. + +@item Highly multi-threaded implementation. Both the file system creation tool +as well as the FUSE driver are able to make good use of the many cores of your +system. + +@item Optional experimental Python scripting support to provide custom +filtering and ordering functionality. + +@end itemize\n") + (license license:gpl3)))