Merge pull request #103453 from Ma27/dav-unison-sync

davfs2: 1.5.6 -> 1.6.0, unison: 2.51.2 -> 2.51.3
This commit is contained in:
Florian Klink 2020-11-11 20:28:48 +01:00 committed by GitHub
commit 4df6d2d432
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 51 additions and 108 deletions

View File

@ -64,7 +64,7 @@ mkDerivation rec {
description = "Nextcloud themed desktop client";
homepage = "https://nextcloud.com";
license = licenses.gpl2;
maintainers = with maintainers; [ caugner ma27 ];
maintainers = with maintainers; [ caugner ];
platforms = platforms.linux;
};
}

View File

@ -1,52 +0,0 @@
From 29fa058c3127f3b47c347dcaa4a94f4c0e888308 Mon Sep 17 00:00:00 2001
From: Jaap Boender <jaapb@kerguelen.org>
Date: Thu, 21 Mar 2019 12:26:51 +0000
Subject: [PATCH] Compatibility with OCaml 4.08
---
src/files.ml | 2 +-
src/recon.ml | 4 ++--
src/system/system_generic.ml | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/files.ml b/src/files.ml
index ba42ad57..5babf21e 100644
--- a/src/files.ml
+++ b/src/files.ml
@@ -722,7 +722,7 @@ let get_files_in_directory dir =
with End_of_file ->
dirh.System.closedir ()
end;
- Sort.list (<) !files
+ List.sort String.compare !files
let ls dir pattern =
Util.convertUnixErrorsToTransient
diff --git a/src/recon.ml b/src/recon.ml
index 5ed358d7..0df2cfe4 100644
--- a/src/recon.ml
+++ b/src/recon.ml
@@ -651,8 +651,8 @@ let rec reconcile
(* Sorts the paths so that they will be displayed in order *)
let sortPaths pathUpdatesList =
- Sort.list
- (fun (p1, _) (p2, _) -> Path.compare p1 p2 <= 0)
+ List.sort
+ Path.compare
pathUpdatesList
let rec enterPath p1 p2 t =
diff --git a/src/system/system_generic.ml b/src/system/system_generic.ml
index ed8e18f3..0e28a781 100755
--- a/src/system/system_generic.ml
+++ b/src/system/system_generic.ml
@@ -47,7 +47,7 @@ let open_out_gen = open_out_gen
let chmod = Unix.chmod
let chown = Unix.chown
let utimes = Unix.utimes
-let link = Unix.link
+let link s d = Unix.link s d
let openfile = Unix.openfile
let opendir f =
let h = Unix.opendir f in

View File

@ -6,12 +6,12 @@ let inherit (ocamlPackages) ocaml lablgtk; in
stdenv.mkDerivation (rec {
pname = "unison";
version = "2.51.2";
version = "2.51.3";
src = fetchFromGitHub {
owner = "bcpierce00";
repo = "unison";
rev = "v${version}";
sha256 = "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq";
sha256 = "sha256-42hmdMwOYSWGiDCmhuqtpCWtvtyD2l+kA/bhHD/Qh5Y=";
};
buildInputs = [ ocaml makeWrapper ncurses ];
@ -27,12 +27,6 @@ stdenv.mkDerivation (rec {
"UISTYLE=${if enableX11 then "gtk2" else "text"}"
] ++ stdenv.lib.optional (!ocaml.nativeCompilers) "NATIVE=false";
patches = [
# NOTE: Only needed until Unison 2.51.3 is released!
./4.08-compatibility.patch
./lablgtk.patch
];
preInstall = "mkdir -p $out/bin";
postInstall = if enableX11 then ''

View File

@ -1,31 +0,0 @@
From 2e7ea9481c6c3ff2ec513c39f73cfe15c0763c06 Mon Sep 17 00:00:00 2001
From: daviddavid <geiger.david68210@gmail.com>
Date: Mon, 26 Feb 2018 13:36:36 +0100
Subject: [PATCH] Fix for lablgtk >= 2.18.6
---
src/uigtk2.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/uigtk2.ml b/src/uigtk2.ml
index 2ba6d79..04c4da4 100644
--- a/src/uigtk2.ml
+++ b/src/uigtk2.ml
@@ -89,12 +89,12 @@ let fontItalic = lazy (Pango.Font.from_string "italic")
(* This does not work with the current version of Lablgtk, due to a bug
let icon =
GdkPixbuf.from_data ~width:48 ~height:48 ~has_alpha:true
- (Gpointer.region_of_string Pixmaps.icon_data)
+ (Gpointer.region_of_bytes Pixmaps.icon_data)
*)
let icon =
let p = GdkPixbuf.create ~width:48 ~height:48 ~has_alpha:true () in
Gpointer.blit
- (Gpointer.region_of_string Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
+ (Gpointer.region_of_bytes Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
p
let leftPtrWatch =
--
2.25.1

View File

@ -0,0 +1,42 @@
From 56873cf29974ff0dfc1ba1afb7022ce49e300835 Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Wed, 11 Nov 2020 11:58:25 +0100
Subject: [PATCH 2/2] Make sure that the setuid-wrapped `umount` is invoked
---
src/dav_fuse.c | 2 +-
src/umount_davfs.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dav_fuse.c b/src/dav_fuse.c
index 734bc1f..4501433 100644
--- a/src/dav_fuse.c
+++ b/src/dav_fuse.c
@@ -187,7 +187,7 @@ dav_fuse_loop(int device, char *mpoint, size_t bufsize, time_t idle_time,
unmounting = 1;
pid_t pid = fork();
if (pid == 0) {
- execl("/bin/umount", "umount", "-il", mountpoint, NULL);
+ execl("@wrapperDir@/umount", "umount", "-il", mountpoint, NULL);
_exit(EXIT_FAILURE);
}
}
diff --git a/src/umount_davfs.c b/src/umount_davfs.c
index b7019c3..75e3b4b 100644
--- a/src/umount_davfs.c
+++ b/src/umount_davfs.c
@@ -122,9 +122,9 @@ main(int argc, char *argv[])
char *umount_command = NULL;
if (mpoint) {
- umount_command = ne_concat("umount -i '", mpoint, "'", NULL);
+ umount_command = ne_concat("@wrapperDir@/umount -i '", mpoint, "'", NULL);
} else {
- umount_command = ne_concat("umount -i '", argv[optind], "'", NULL);
+ umount_command = ne_concat("@wrapperDir@/umount -i '", argv[optind], "'", NULL);
error(0, 0,
_("\n"
" can't evaluate PID file name;\n"
--
2.28.0

View File

@ -1,42 +1,32 @@
{ stdenv
, fetchurl
, fetchpatch
, autoreconfHook
, neon
, procps
, substituteAll
, zlib
, wrapperDir ? "/run/wrappers/bin"
}:
stdenv.mkDerivation rec {
name = "davfs2-1.5.6";
name = "davfs2-1.6.0";
src = fetchurl {
url = "mirror://savannah/davfs2/${name}.tar.gz";
sha256 = "00fqadhmhi2bmdar5a48nicmjcagnmaj9wgsvjr6cffmrz6pcx21";
sha256 = "sha256-LmtnVoW9kXdyvmDwmZrgmMgPef8g3BMej+xFR8u2O1A=";
};
nativeBuildInputs = [
autoreconfHook # neon-0.31.patch requires reconfiguration
];
buildInputs = [ neon zlib ];
patches = [
./isdir.patch
./fix-sysconfdir.patch
(substituteAll {
src = ./0001-umount_davfs-substitute-ps-command.patch;
ps = "${procps}/bin/ps";
})
# Fix build with neon 0.31
# http://savannah.nongnu.org/bugs/?58101
(fetchpatch {
name = "neon-0.31.patch";
url = "http://savannah.nongnu.org/bugs/download.php?file_id=48737";
sha256 = "117x9rql6wk230pl1nram3pp8svll9wzfs5nf407z4jnrdr1zm0j";
extraPrefix = ""; # empty means add 'a/' and 'b/'
(substituteAll {
src = ./0002-Make-sure-that-the-setuid-wrapped-umount-is-invoked.patch;
inherit wrapperDir;
})
];