all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: help-guix@gnu.org, Joshua Branson <jbranso@dismail.de>
Subject: Re: Packaging bcachefs
Date: Fri, 13 Dec 2019 16:32:11 +0100	[thread overview]
Message-ID: <87mubwi6mc.fsf@nckx> (raw)
In-Reply-To: <86h824i9cu.fsf@dismail.de>


[-- Attachment #1.1: Type: text/plain, Size: 1351 bytes --]

Joshua,

Joshua Branson 写道:
> It would be kind of cool to package bcachefs...but it might be a 
> little
> too premature for that.

I've been using bcachefs on Guix System for a bit over 3 months 
now, without any issues that weren't self-inflicted.  The other 
way 'round (/gnu/store on bcachefs) is currently not possible.

Of course you need a kustom kernel, but it should be trivial to 
apply the ~300 bcachefs patches (upstream/v5.3..bcachefs/master) 
on top of Linux-Libre.  I'd share my recipe but it's
a) not -Libre, even though I don't use & want any of the blobs, 
and
b) such an unholy union of other dodgy patches that it would make 
the bcachefs graft look much more difficult than it is.

I've attached my bcachefs-tools package below.  It works fine, I 
just need to finish the boring bits.  Now that I have a reason 
I'll probably do so and submit it soon.

To boot Guix System on bcachefs, we're missing the same thing as 
for JFS: Guile code to read its label & UUID.  But there's one big 
problem: GRUB can't read it.  At all[0].

Either we wait until GRUB grows bcachefs support, or somebody 
(:-)) needs to finally make Guix support kernels + initrds copied 
to a separate /boot partition.

Kind regards,

T G-R

[0]: 
https://lists.gnu.org/archive/html/bug-grub/2019-03/msg00000.html


[-- Attachment #1.2: 0001-XXX-gnu-Add-bcachefs-tools.patch --]
[-- Type: text/x-patch, Size: 3583 bytes --]

From f22d6bdfbf0f31c19936b817f8ffec7d4613650a Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Sun, 8 Dec 2019 00:40:28 +0100
Subject: [PATCH 1/4] XXX gnu: Add bcachefs-tools.

* gnu/packages/file-systems.scm (bcachefs-tools): New public variable.
---
 gnu/packages/file-systems.scm | 55 ++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 1594cac846..744bcf2b52 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
@@ -34,11 +34,13 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages onc-rpc)
@@ -47,8 +49,59 @@
   #:use-module (gnu packages readline)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages valgrind)
   #:use-module (gnu packages xml))
 
+(define-public bcachefs-tools
+  (let ((commit "f712a866a474d70bfbe3a43aad2b04ceec13ddd3")
+        (revision "0"))
+    (package
+      (name "bcachefs-tools")
+      (version (git-version "0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://evilpiepirate.org/git/bcachefs-tools.git")
+               (commit commit)))
+         (sha256
+          (base32 "01zwcqdw6kwdyji7c4307dzgiv67jjmjxpavxx2fq4661v3r7pfn"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+               "INITRAMFS_DIR=$(PREFIX)/share/initramfs-tools"
+               "CC=gcc"
+               "PYTEST=pytest")
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)          ; no configure switch
+           #:tests? #f)))               ; XXX 6 valgrind tests fail
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+
+         ;; libbcachefs/bkey_methods.c:84:41: error: initializer element is not constant
+         ("gcc" ,gcc-8)
+
+         ;; For tests.
+         ("python-pytest" ,python-pytest)
+         ("valgrind" ,valgrind)))
+      (inputs
+       `(("keyutils" ,keyutils)
+         ("libaio" ,libaio)
+         ("libscrypt" ,libscrypt)
+         ("libsodium" ,libsodium)
+         ("liburcu" ,liburcu)
+         ("util-linux" ,util-linux)     ; lib{blkid,uuid}
+         ("lz4" ,lz4)
+         ("zlib" ,zlib)
+         ("zstd:lib" ,zstd "lib")))
+      (home-page "https://bcachefs.org/")
+      (synopsis "")
+      (description
+       "")
+      (license license:gpl2+))))
+
 (define-public httpfs2
   (package
     (name "httpfs2")
-- 
2.23.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2019-12-13 15:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 22:31 jfs, jfsutils? Michael Zucchi
2019-12-11 22:38 ` Josh
2019-12-11 23:49   ` Michael Zucchi
2019-12-11 23:57 ` Tobias Geerinckx-Rice
2019-12-12  1:41   ` Tobias Geerinckx-Rice
2019-12-12  3:18     ` Michael Zucchi
2019-12-13 14:31       ` Joshua Branson
2019-12-13 16:07       ` Tobias Geerinckx-Rice
2019-12-13 16:23         ` Tobias Geerinckx-Rice
2019-12-14  1:15         ` Michael Zucchi
2019-12-30 23:38   ` Michael Zucchi
2019-12-31  0:42     ` Josh Marshall
2019-12-31  6:26       ` Michael Zucchi
2020-01-05 19:04         ` Gábor Boskovits
2020-01-06  7:20           ` Michael Zucchi
2019-12-13 14:33 ` Packing bcachefs " Joshua Branson
2019-12-13 15:32   ` Tobias Geerinckx-Rice [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mubwi6mc.fsf@nckx \
    --to=me@tobias.gr \
    --cc=help-guix@gnu.org \
    --cc=jbranso@dismail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.