From eaf43be84c13c2efef18f4ea7d2c9eba2e3cd137 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 31 Jan 2023 14:17:35 +0100 Subject: [PATCH] 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. --- nixos/tests/apfs.nix | 8 +++----- pkgs/os-specific/linux/apfs/default.nix | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/nixos/tests/apfs.nix b/nixos/tests/apfs.nix index a8841fe93046..ac0459b57e9c 100644 --- a/nixos/tests/apfs.nix +++ b/nixos/tests/apfs.nix @@ -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", diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix index da0660ad1139..e6961684d0e4 100644 --- a/pkgs/os-specific/linux/apfs/default.nix +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -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;