apfsprogs: build apfs-snap
Build the apfs-snap tool, which was added some time ago. Also add a NixOS test for it.
This commit is contained in:
parent
58e7a9dc42
commit
2e3134c536
@ -48,5 +48,18 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
"umount /tmp/mnt",
|
||||
"apfsck /dev/vdb",
|
||||
)
|
||||
with subtest("Snapshots"):
|
||||
machine.succeed(
|
||||
"mkapfs /dev/vdb",
|
||||
"mount -o cknodes,readwrite /dev/vdb /tmp/mnt",
|
||||
"echo 'Hello World' > /tmp/mnt/test.txt",
|
||||
"apfs-snap /tmp/mnt snap-1",
|
||||
"rm /tmp/mnt/test.txt",
|
||||
"umount /tmp/mnt",
|
||||
"mount -o cknodes,readwrite,snap=snap-1 /dev/vdb /tmp/mnt",
|
||||
"echo 'Hello World' | diff - /tmp/mnt/test.txt",
|
||||
"umount /tmp/mnt",
|
||||
"apfsck /dev/vdb",
|
||||
)
|
||||
'';
|
||||
})
|
||||
|
@ -17,6 +17,7 @@ stdenv.mkDerivation {
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make -C apfs-snap $makeFlags
|
||||
make -C apfsck $makeFlags
|
||||
make -C mkapfs $makeFlags
|
||||
runHook postBuild
|
||||
@ -24,6 +25,7 @@ stdenv.mkDerivation {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
make -C apfs-snap install DESTDIR="$out" $installFlags
|
||||
make -C apfsck install DESTDIR="$out" $installFlags
|
||||
make -C mkapfs install DESTDIR="$out" $installFlags
|
||||
runHook postInstall
|
||||
|
Loading…
Reference in New Issue
Block a user