linuxPackages.apfs: unstable-2022-10-20 -> 0.3.0

https://github.com/linux-apfs/linux-apfs-rw/releases/tag/v0.3.0

I also added a `longDescription` and modified the test to verify the checksum on all metadata nodes now that it works.
This commit is contained in:
Luflosi 2023-01-31 14:17:35 +01:00
parent ab3f67309f
commit eaf43be84c
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0
2 changed files with 18 additions and 8 deletions

View file

@ -21,9 +21,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
with subtest("Enable case sensitivity and normalization sensitivity"):
machine.succeed(
"mkapfs -s -z /dev/vdb",
# Triggers a bug, see https://github.com/linux-apfs/linux-apfs-rw/issues/15
# "mount -o cknodes,readwrite /dev/vdb /tmp/mnt",
"mount -o readwrite /dev/vdb /tmp/mnt",
"mount -o cknodes,readwrite /dev/vdb /tmp/mnt",
"echo 'Hello World 1' > /tmp/mnt/test.txt",
"[ ! -f /tmp/mnt/TeSt.TxT ] || false", # Test case sensitivity
"echo 'Hello World 1' | diff - /tmp/mnt/test.txt",
@ -36,13 +34,13 @@ import ./make-test-python.nix ({ pkgs, ... }: {
with subtest("Disable case sensitivity and normalization sensitivity"):
machine.succeed(
"mkapfs /dev/vdb",
"mount -o readwrite /dev/vdb /tmp/mnt",
"mount -o cknodes,readwrite /dev/vdb /tmp/mnt",
"echo 'bla bla bla' > /tmp/mnt/Test.txt",
"echo -n 'Hello World' > /tmp/mnt/test.txt",
"echo ' 1' >> /tmp/mnt/TEST.TXT",
"umount /tmp/mnt",
"apfsck /dev/vdb",
"mount -o readwrite /dev/vdb /tmp/mnt",
"mount -o cknodes,readwrite /dev/vdb /tmp/mnt",
"echo 'Hello World 1' | diff - /tmp/mnt/TeSt.TxT", # Test case insensitivity
"echo 'Hello World 2' > /tmp/mnt/\u0061\u0301.txt",
"echo 'Hello World 2' | diff - /tmp/mnt/\u0061\u0301.txt",

View file

@ -5,15 +5,18 @@
, nixosTests
}:
let
tag = "0.3.0";
in
stdenv.mkDerivation {
pname = "apfs";
version = "unstable-2022-10-20-${kernel.version}";
version = "${tag}-${kernel.version}";
src = fetchFromGitHub {
owner = "linux-apfs";
repo = "linux-apfs-rw";
rev = "e6eb67c92d425d395eac1c4403629391bdd5064d";
sha256 = "sha256-6rv5qZCjOqt0FaNFhA3tYg6/SdssvoT8kPVhalajgOo=";
rev = "v${tag}";
sha256 = "sha256-ABFqkiIJuFapFsUIFHfw8+TujePZm7ZX/qHuFO2KdnQ=";
};
hardeningDisable = [ "pic" ];
@ -29,6 +32,15 @@ stdenv.mkDerivation {
meta = with lib; {
description = "APFS module for linux";
longDescription = ''
The Apple File System (APFS) is the copy-on-write filesystem currently
used on all Apple devices. This module provides a degree of experimental
support on Linux.
If you make use of the write support, expect data corruption.
Read-only support is somewhat more complete, with sealed volumes,
snapshots, and all the missing compression algorithms recently added.
Encryption is still not in the works though.
'';
homepage = "https://github.com/linux-apfs/linux-apfs-rw";
license = licenses.gpl2Only;
platforms = platforms.linux;