about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2024-03-17 16:53:49 +0000
committerGitHub <noreply@github.com>2024-03-17 16:53:49 +0000
commit84fcbb0b14dcfc6ac6beef9cf0be4d83b1206650 (patch)
tree1cf966076a6a7dcd18fc2267afdc0aaaf54b1494 /pkgs/tools
parentd1e78a174315b9072577bc6b65334535ed88c09c (diff)
parenta6d61a96676d1b4ca2ba9edcb8c8dda4b4662fbd (diff)
Merge pull request #294644 from simonhollingshead/bcache-tools108
bcache-tools: 1.0.7 -> 1.0.8
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch30
-rw-r--r--pkgs/tools/filesystems/bcache-tools/default.nix4
2 files changed, 12 insertions, 22 deletions
diff --git a/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch b/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
index c6cf79785b739..bdf78dcc3cd4b 100644
--- a/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
+++ b/pkgs/tools/filesystems/bcache-tools/bcache-udev-modern.patch
@@ -1,15 +1,15 @@
 This patch does two things:
-1) Drops probe-bcache, so now new util-linux detecting functionality is used.
-2) Drops bcache-register, using kmod (built in udev) and moving registering device
-   into rule using 'sh'.
-This reduces things that need to be present in initrd, replacing them with already
-existing functionality and reducing overall initrd size.
+1) Drops probe-bcache, so now util-linux detecting functionality is used.
+2) Drops bcache-register, moving registering device functionality into rule
+   using 'sh'.
+This reduces things that need to be present in initrd, replacing them with
+already existing functionality and reducing overall initrd size.
 
 diff --git a/69-bcache.rules b/69-bcache.rules
-index 5d28e70..6a52893 100644
+index 9cc7f0d..6a52893 100644
 --- a/69-bcache.rules
 +++ b/69-bcache.rules
-@@ -10,15 +10,11 @@ KERNEL=="fd*|sr*", GOTO="bcache_end"
+@@ -10,16 +10,11 @@ KERNEL=="fd*|sr*", GOTO="bcache_end"
  # It recognised bcache (util-linux 2.24+)
  ENV{ID_FS_TYPE}=="bcache", GOTO="bcache_backing_found"
  # It recognised something else; bail
@@ -22,31 +22,21 @@ index 5d28e70..6a52893 100644
 +GOTO="bcache_backing_end"
  
  LABEL="bcache_backing_found"
+ RUN{builtin}+="kmod load bcache"
 -RUN+="bcache-register $tempnode"
-+RUN{builtin}+="kmod load bcache"
 +RUN+="/bin/sh -c 'echo $tempnode > /sys/fs/bcache/register_quiet'"
  LABEL="bcache_backing_end"
  
  # Cached devices: symlink
 diff --git a/Makefile b/Makefile
-index 3f8d87b..15638a7 100644
+index c824ae3..c5f7309 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -9,7 +9,7 @@ all: make-bcache probe-bcache bcache-super-show
+@@ -9,7 +9,6 @@ all: make-bcache probe-bcache bcache-super-show bcache-register
  
  install: make-bcache probe-bcache bcache-super-show
  	$(INSTALL) -m0755 make-bcache bcache-super-show	$(DESTDIR)${PREFIX}/sbin/
 -	$(INSTALL) -m0755 probe-bcache bcache-register		$(DESTDIR)$(UDEVLIBDIR)/
-+#	$(INSTALL) -m0755 probe-bcache bcache-register		$(DESTDIR)$(UDEVLIBDIR)/
  	$(INSTALL) -m0644 69-bcache.rules	$(DESTDIR)$(UDEVLIBDIR)/rules.d/
  	$(INSTALL) -m0644 -- *.8 $(DESTDIR)${PREFIX}/share/man/man8/
  	$(INSTALL) -D -m0755 initramfs/hook	$(DESTDIR)/usr/share/initramfs-tools/hooks/bcache
-diff --git a/bcache-register b/bcache-register
-index 9b592bc..75b4faf 100755
---- a/bcache-register
-+++ b/bcache-register
-@@ -1,4 +1,3 @@
- #!/bin/sh
--/sbin/modprobe -qba bcache
- test -f /sys/fs/bcache/register_quiet && echo "$1" > /sys/fs/bcache/register_quiet
- 
diff --git a/pkgs/tools/filesystems/bcache-tools/default.nix b/pkgs/tools/filesystems/bcache-tools/default.nix
index 58f6a05992e90..9cd8199005b94 100644
--- a/pkgs/tools/filesystems/bcache-tools/default.nix
+++ b/pkgs/tools/filesystems/bcache-tools/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "bcache-tools";
-  version = "1.0.7";
+  version = "1.0.8";
 
   src = fetchFromGitHub {
     owner = "g2p";
     repo = "bcache-tools";
     rev = "v${version}";
-    hash = "sha256-Ors2xXRrVTf8Cq3BYnSVSfJy/nyGjT5BGLSNpxOcHR4=";
+    hash = "sha256-6gy0ymecMgEHXbwp/nXHlrUEeDFnmFXWZZPlzP292g4=";
   };
 
   nativeBuildInputs = [ pkg-config ];