Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eed30dfa5c87
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1ec5d8249c70
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jan 11, 2020

  1. 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
    ```
    flokli authored and bjornfor committed Jan 11, 2020
    Copy the full SHA
    1ec5d82 View commit details
Showing with 44 additions and 3 deletions.
  1. +25 −0 pkgs/tools/filesystems/davfs2/0001-umount_davfs-substitute-ps-command.patch
  2. +19 −3 pkgs/tools/filesystems/davfs2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 0cb1321c4cbb2978318ddad73c9ee6f2a19c55c8 Mon Sep 17 00:00:00 2001
From: Florian Klink <flokli@flokli.de>
Date: Sat, 11 Jan 2020 21:06:33 +0100
Subject: [PATCH] umount_davfs: substitute ps command

---
src/umount_davfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/umount_davfs.c b/src/umount_davfs.c
index b7019c3..a278679 100644
--- a/src/umount_davfs.c
+++ b/src/umount_davfs.c
@@ -157,7 +157,7 @@ main(int argc, char *argv[])
}
fclose(file);

- char *ps_command = ne_concat("ps -p ", pid, NULL);
+ char *ps_command = ne_concat("@ps@ -p ", pid, NULL);
FILE *ps_in = popen(ps_command, "r");
if (!ps_in) {
error(0, 0,
--
2.24.1

22 changes: 19 additions & 3 deletions pkgs/tools/filesystems/davfs2/default.nix
Original file line number Diff line number Diff line change
@@ -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;