davfs2: substitute ps command

umount.davfs2 uses ps to get a process list to terminate gracefully.

On NixOS, this currently fails:

```
sh: ps: command not found
/run/current-system/sw/bin/umount.davfs:
  can't find mount.davfs-process with pid 4085;
  trying to unmount anyway.
  you propably have to remove /var/run/mount.davfs/root-x.pid manually
sh: umount: command not found
```

Fix this by patching ${procps}/bin/ps into the ps_command.

Afterwards:

```
umount.davfs: waiting for mount.davfs (pid 4106) to terminate gracefully .. OK
```
This commit is contained in:
Florian Klink
2020-01-12 00:01:59 +01:00
committed by Bjørn Forsman
parent eed30dfa5c
commit 1ec5d8249c
2 changed files with 44 additions and 3 deletions
+19 -3
View File
@@ -1,4 +1,10 @@
{ stdenv, fetchurl, neon, zlib }:
{ stdenv
, fetchurl
, neon
, procps
, substituteAll
, zlib
}:
stdenv.mkDerivation rec {
name = "davfs2-1.5.6";
@@ -10,11 +16,21 @@ stdenv.mkDerivation rec {
buildInputs = [ neon zlib ];
patches = [ ./isdir.patch ./fix-sysconfdir.patch ];
patches = [
./isdir.patch
./fix-sysconfdir.patch
(substituteAll {
src = ./0001-umount_davfs-substitute-ps-command.patch;
ps = "${procps}/bin/ps";
})
];
configureFlags = [ "--sysconfdir=/etc" ];
makeFlags = ["sbindir=$(out)/sbin" "ssbindir=$(out)/sbin"];
makeFlags = [
"sbindir=$(out)/sbin"
"ssbindir=$(out)/sbin"
];
meta = {
homepage = https://savannah.nongnu.org/projects/davfs2;