Author: ludo
Date: Thu Mar 1 23:07:56 2012
New Revision: 32732
URL: https://nixos.org/websvn/nix/?rev=32732&sc=1
Log:
SMBFS: Disable byte-range locking in Samba's TDB.
Added:
nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch
Modified:
nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/default.nix
Modified: nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/default.nix Thu Mar 1
22:22:24 2012 (r32731)
+++ nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/default.nix Thu Mar 1
23:07:56 2012 (r32732)
@@ -2,6 +2,9 @@
let
date = "2011-11-14";
+ samba_patched = stdenv.lib.overrideDerivation samba (attrs: {
+ patches = attrs.patches ++ [ ./samba-without-byte-range-locks.patch ];
+ });
in
stdenv.mkDerivation rec {
name = "smbfs-${date}";
@@ -19,7 +22,7 @@
s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g'
'';
- buildInputs = [ hurd machHeaders samba ];
+ buildInputs = [ hurd machHeaders samba_patched ];
installPhase =
'' mkdir -p "$out/hurd"
Added:
nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++
nixpkgs/trunk/pkgs/os-specific/gnu/smbfs/samba-without-byte-range-locks.patch
Thu Mar 1 23:07:56 2012 (r32732)
@@ -0,0 +1,14 @@
+Since GNU/Hurd doesn't support byte-range file locks, shamelessly
+disable them to allow the SMB client library to work (it uses TDB
+to access /etc/samba/private/secrets.tdb, for instance.)
+
+--- samba/lib/tdb/common/lock.c 2010-02-08 16:12:57.000000000 +0100
++++ samba/lib/tdb/common/lock.c 2012-03-01 23:39:02.000000000 +0100
+@@ -48,7 +48,7 @@ int tdb_brlock(struct tdb_context *tdb,
+ struct flock fl;
+ int ret;
+
+- if (tdb->flags & TDB_NOLOCK) {
++ if (1) {
+ return 0;
+ }
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits