Update to unison-2.52.0
This release introduces a new wire protocol, a new archive format, and feature negotiation. In particular, once two machines have been upgraded to unison-2.52.0 or later, it is possible to use unison compiled with different ocaml versions. Summary of changes can be found at https://github.com/bcpierce00/unison/blob/v2.52.0/NEWS.md. This release is compatible with: - unison 2.52 or newer. You do not have to pay any attention to OCaml compiler versions - unison 2.51 if both versions are compiled with same OCaml compiler version - unison 2.48 if both versions are compiled with same OCaml compiler version Comments and OK sthen@
This commit is contained in:
parent
2f03e0f904
commit
a91e2c8bb0
@ -1,11 +0,0 @@
|
|||||||
VER= 2.48.15
|
|
||||||
REV= v4
|
|
||||||
REVISION= 9
|
|
||||||
GH_TAGNAME= v${VER}${REV}
|
|
||||||
PKGNAME= unison-${VER}${REV:S/^v/pl/}
|
|
||||||
|
|
||||||
PORTROACH= limit:^2\.4
|
|
||||||
|
|
||||||
DOCS= BUGS.txt
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
|
@ -1,2 +0,0 @@
|
|||||||
SHA256 (unison-2.48.15v4.tar.gz) = +MfpgmNLvh7WUQ/ls2tsXFXAbK792v3Z7cCIEjBf3uw=
|
|
||||||
SIZE (unison-2.48.15v4.tar.gz) = 1911781
|
|
@ -1,39 +0,0 @@
|
|||||||
Fix rare SIGSEGV when transferring large replicas.
|
|
||||||
Fix a theoretical integer overflow.
|
|
||||||
|
|
||||||
References:
|
|
||||||
https://github.com/bcpierce00/unison/commit/c1ddff13aa96b124680cce61673129aeb563dbf7
|
|
||||||
https://github.com/bcpierce00/unison/commit/f59663d67f4593a5bc1e554058fe6864751e805e
|
|
||||||
|
|
||||||
Thanks to Alex Markley and OCaml developers
|
|
||||||
--- bytearray_stubs.c.orig Mon May 23 18:40:05 2016
|
|
||||||
+++ bytearray_stubs.c Sun Mar 12 20:41:53 2017
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
|
|
||||||
#include "caml/intext.h"
|
|
||||||
#include "caml/bigarray.h"
|
|
||||||
+#include "caml/memory.h"
|
|
||||||
|
|
||||||
CAMLprim value ml_marshal_to_bigarray(value v, value flags)
|
|
||||||
{
|
|
||||||
@@ -21,15 +22,18 @@ CAMLprim value ml_marshal_to_bigarray(value v, value f
|
|
||||||
|
|
||||||
CAMLprim value ml_unmarshal_from_bigarray(value b, value ofs)
|
|
||||||
{
|
|
||||||
+ CAMLparam1(b); /* Holds [b] live until unmarshalling completes. */
|
|
||||||
+ value result;
|
|
||||||
struct caml_bigarray *b_arr = Bigarray_val(b);
|
|
||||||
- return input_value_from_block (Array_data (b_arr, ofs),
|
|
||||||
+ result = input_value_from_block (Array_data (b_arr, ofs),
|
|
||||||
b_arr->dim[0] - Long_val(ofs));
|
|
||||||
+ CAMLreturn(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
CAMLprim value ml_blit_string_to_bigarray
|
|
||||||
(value s, value i, value a, value j, value l)
|
|
||||||
{
|
|
||||||
- char *src = String_val(s) + Int_val(i);
|
|
||||||
+ char *src = String_val(s) + Long_val(i);
|
|
||||||
char *dest = Array_data(Bigarray_val(a), j);
|
|
||||||
memcpy(dest, src, Long_val(l));
|
|
||||||
return Val_unit;
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: files.ml
|
|
||||||
--- files.ml.orig
|
|
||||||
+++ 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
|
|
@ -1,14 +0,0 @@
|
|||||||
Index: recon.ml
|
|
||||||
--- recon.ml.orig
|
|
||||||
+++ recon.ml
|
|
||||||
@@ -651,9 +651,7 @@ 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)
|
|
||||||
- pathUpdatesList
|
|
||||||
+ List.sort Path.compare pathUpdatesList
|
|
||||||
|
|
||||||
let rec enterPath p1 p2 t =
|
|
||||||
match Path.deconstruct p1, Path.deconstruct p2 with
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: system/system_generic.ml
|
|
||||||
--- system/system_generic.ml.orig
|
|
||||||
+++ 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 source dest = Unix.link source dest
|
|
||||||
let openfile = Unix.openfile
|
|
||||||
let opendir f =
|
|
||||||
let h = Unix.opendir f in
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: test.ml
|
|
||||||
--- test.ml.orig
|
|
||||||
+++ test.ml
|
|
||||||
@@ -370,8 +370,6 @@ let test() =
|
|
||||||
check "4" R2 (Dir ["x", File "foo"]);
|
|
||||||
);
|
|
||||||
|
|
||||||
- (raise (Util.Fatal "Skipping some tests -- remove me!\n") : unit);
|
|
||||||
-
|
|
||||||
if bothRootsLocal then
|
|
||||||
runtest "backups 1 (local)" ["backup = Name *"] (fun() ->
|
|
||||||
put R1 (Dir []); put R2 (Dir []); sync();
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: uigtk2.ml
|
|
||||||
--- uigtk2.ml.orig
|
|
||||||
+++ uigtk2.ml
|
|
||||||
@@ -94,7 +94,7 @@ let icon =
|
|
||||||
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 =
|
|
@ -1,16 +0,0 @@
|
|||||||
ocaml 4.12 compat
|
|
||||||
|
|
||||||
Index: uutil.ml
|
|
||||||
--- uutil.ml.orig
|
|
||||||
+++ uutil.ml
|
|
||||||
@@ -34,9 +34,7 @@ let myNameAndVersion = myName ^ " " ^ myVersion
|
|
||||||
|
|
||||||
let hash2 x y = (17 * x + 257 * y) land 0x3FFFFFFF
|
|
||||||
|
|
||||||
-external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"
|
|
||||||
-
|
|
||||||
-let hash x = hash_param 10 100 x
|
|
||||||
+let hash = Hashtbl.hash
|
|
||||||
|
|
||||||
(*****************************************************************************)
|
|
||||||
(* File sizes *)
|
|
@ -1,27 +0,0 @@
|
|||||||
+-----------------------------------------------------------------------
|
|
||||||
| Running ${PKGSTEM} on OpenBSD
|
|
||||||
+-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Unison uses native OCaml marshalling in its prococol. This
|
|
||||||
means that unison might not work when the OCaml versions of
|
|
||||||
two instances are out of sync. Assuming that both ends are
|
|
||||||
OpenBSD and under control by the user, pkg_add(1) can be used
|
|
||||||
to sync unison and ocaml.
|
|
||||||
|
|
||||||
Another way to work around this limitation of unison is to use
|
|
||||||
the OPAM OCaml package manager to build unison with the same
|
|
||||||
version of the OCaml compiler on all machines:
|
|
||||||
|
|
||||||
doas pkg_add opam
|
|
||||||
export OPAMROOT=~/opam_unison
|
|
||||||
opam init --no-setup --compiler ocaml-base-compiler.4.09.0
|
|
||||||
opam install unison lablgtk # To build without the gui, remove lablgtk
|
|
||||||
$(opam var bin)/unison
|
|
||||||
|
|
||||||
Common issue
|
|
||||||
=============
|
|
||||||
Unison sometimes reports chown() failures that are actually
|
|
||||||
failures to change group ownership. This can occur when a user
|
|
||||||
does not belong to the specified group and is the owner of the
|
|
||||||
file, or is not the superuser. Issue can be addressed by setting
|
|
||||||
the option 'group' to 'false'.
|
|
@ -1,3 +0,0 @@
|
|||||||
GH_TAGNAME= v2.51.5
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
|
@ -1,2 +0,0 @@
|
|||||||
SHA256 (unison-2.51.5.tar.gz) = fodjcZkuv4kLYPMt+ICpinX+jEfAa3sq4q02vkgBPoM=
|
|
||||||
SIZE (unison-2.51.5.tar.gz) = 1385407
|
|
@ -1,8 +0,0 @@
|
|||||||
Unison is a file-synchronization tool for Unix and Windows. It allows
|
|
||||||
two replicas of a collection of files and directories to be stored on
|
|
||||||
different hosts (or different disks on the same host), modified
|
|
||||||
separately, and then brought up to date by propagating the changes in
|
|
||||||
each replica to the other.
|
|
||||||
|
|
||||||
Flavors:
|
|
||||||
no_x11 - build without X support
|
|
@ -1,7 +0,0 @@
|
|||||||
@option is-branch
|
|
||||||
@conflict unison-*
|
|
||||||
@bin bin/unison
|
|
||||||
share/doc/pkg-readmes/${PKGSTEM}
|
|
||||||
share/doc/unison/
|
|
||||||
share/doc/unison/NEWS
|
|
||||||
share/doc/unison/README
|
|
@ -1,27 +0,0 @@
|
|||||||
+-----------------------------------------------------------------------
|
|
||||||
| Running ${PKGSTEM} on OpenBSD
|
|
||||||
+-----------------------------------------------------------------------
|
|
||||||
|
|
||||||
Unison uses native OCaml marshalling in its prococol. This
|
|
||||||
means that unison might not work when the OCaml versions of
|
|
||||||
two instances are out of sync. Assuming that both ends are
|
|
||||||
OpenBSD and under control by the user, pkg_add(1) can be used
|
|
||||||
to sync unison and ocaml.
|
|
||||||
|
|
||||||
Another way to work around this limitation of unison is to use
|
|
||||||
the OPAM OCaml package manager to build unison with the same
|
|
||||||
version of the OCaml compiler on all machines:
|
|
||||||
|
|
||||||
doas pkg_add opam
|
|
||||||
export OPAMROOT=~/opam_unison
|
|
||||||
opam init --no-setup --compiler ocaml-base-compiler.4.09.0
|
|
||||||
opam install unison lablgtk # To build without the gui, remove lablgtk
|
|
||||||
$(opam var bin)/unison
|
|
||||||
|
|
||||||
Common issue
|
|
||||||
=============
|
|
||||||
Unison sometimes reports chown() failures that are actually
|
|
||||||
failures to change group ownership. This can occur when a user
|
|
||||||
does not belong to the specified group and is the owner of the
|
|
||||||
file, or is not the superuser. Issue can be addressed by setting
|
|
||||||
the option 'group' to 'false'.
|
|
@ -1,7 +1,64 @@
|
|||||||
SUBDIR =
|
COMMENT = multi-platform file synchronization tool
|
||||||
SUBDIR += 2.4x
|
|
||||||
SUBDIR += 2.4x,no_x11
|
|
||||||
SUBDIR += 2.5x
|
|
||||||
SUBDIR += 2.5x,no_x11
|
|
||||||
|
|
||||||
.include <bsd.port.subdir.mk>
|
GH_ACCOUNT = bcpierce00
|
||||||
|
GH_PROJECT = unison
|
||||||
|
GH_TAGNAME = v2.52.0
|
||||||
|
|
||||||
|
CATEGORIES = net
|
||||||
|
|
||||||
|
HOMEPAGE = https://www.cis.upenn.edu/~bcpierce/unison/
|
||||||
|
|
||||||
|
MAINTAINER = Bjorn Ketelaars <bket@openbsd.org>
|
||||||
|
|
||||||
|
# GPLv3
|
||||||
|
PERMIT_PACKAGE = Yes
|
||||||
|
|
||||||
|
WANTLIB = c m util
|
||||||
|
|
||||||
|
MODULES = lang/ocaml
|
||||||
|
MODOCAML_RUNDEP = if-not-native
|
||||||
|
|
||||||
|
TEST_DEPENDS = emacs->=24:editors/emacs
|
||||||
|
|
||||||
|
USE_GMAKE = Yes
|
||||||
|
|
||||||
|
# CFLAGS _must_ be empty. This is an OCaml compiler.
|
||||||
|
MAKE_FLAGS = NATIVE=${MODOCAML_NATIVE:S/Yes/true/:S/No/false/} \
|
||||||
|
OCAMLOPT=ocamlopt.opt \
|
||||||
|
CFLAGS=
|
||||||
|
|
||||||
|
FLAVORS = no_x11
|
||||||
|
FLAVOR ?=
|
||||||
|
|
||||||
|
.if ${FLAVOR:Mno_x11}
|
||||||
|
MAKE_FLAGS += UISTYLE=text
|
||||||
|
.else
|
||||||
|
WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
|
||||||
|
WANTLIB += Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
|
||||||
|
WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
|
||||||
|
WANTLIB += harfbuzz intl pango-1.0 pangocairo-1.0 pangoft2-1.0
|
||||||
|
WANTLIB += z
|
||||||
|
BUILD_DEPENDS += x11/lablgtk2
|
||||||
|
LIB_DEPENDS += x11/gtk+2
|
||||||
|
MAKE_FLAGS += UISTYLE=gtk2
|
||||||
|
.endif
|
||||||
|
|
||||||
|
FLAVOR_COMMA = ${FLAVOR_EXT:S/-/,/g}
|
||||||
|
SUBST_VARS = FLAVOR_COMMA
|
||||||
|
|
||||||
|
# Avoid multiple all:: entries and use the real target entry.
|
||||||
|
ALL_TARGET = unison
|
||||||
|
TEST_TARGET = selftest
|
||||||
|
|
||||||
|
PORTHOME = ${WRKDIR}
|
||||||
|
WRKDIST = ${WRKDIR}/${DISTNAME}/src
|
||||||
|
DOCS = NEWS.md README.md
|
||||||
|
|
||||||
|
# Avoid the nightmare of their Makefile install target.
|
||||||
|
# Do not use INSTALL_PROGRAM, as the bytecode version must not be stripped!
|
||||||
|
do-install:
|
||||||
|
${INSTALL_SCRIPT} ${WRKSRC}/unison ${PREFIX}/bin
|
||||||
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/unison
|
||||||
|
@cd ${WRKSRC}/.. && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/unison
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
COMMENT= multi-platform file synchronization tool
|
|
||||||
|
|
||||||
GH_ACCOUNT= bcpierce00
|
|
||||||
GH_PROJECT= unison
|
|
||||||
|
|
||||||
CATEGORIES= net
|
|
||||||
|
|
||||||
HOMEPAGE= https://www.cis.upenn.edu/~bcpierce/unison/
|
|
||||||
|
|
||||||
MAINTAINER= Bjorn Ketelaars <bket@openbsd.org>
|
|
||||||
|
|
||||||
# GPLv3
|
|
||||||
PERMIT_PACKAGE= Yes
|
|
||||||
|
|
||||||
WANTLIB= c m util
|
|
||||||
|
|
||||||
MODULES= lang/ocaml
|
|
||||||
MODOCAML_RUNDEP= if-not-native
|
|
||||||
|
|
||||||
TEST_DEPENDS+= emacs->=24:editors/emacs
|
|
||||||
|
|
||||||
# CFLAGS _must_ be empty. This is an OCaml compiler.
|
|
||||||
MAKE_FLAGS= NATIVE=${MODOCAML_NATIVE:S/Yes/true/:S/No/false/} \
|
|
||||||
OCAMLOPT=ocamlopt.opt \
|
|
||||||
CFLAGS=
|
|
||||||
|
|
||||||
USE_GMAKE= Yes
|
|
||||||
|
|
||||||
FLAVORS= no_x11
|
|
||||||
FLAVOR?=
|
|
||||||
|
|
||||||
.if ${FLAVOR:Mno_x11}
|
|
||||||
MAKE_FLAGS+= UISTYLE=text
|
|
||||||
.else
|
|
||||||
BUILD_DEPENDS+= x11/lablgtk2
|
|
||||||
LIB_DEPENDS+= x11/gtk+2
|
|
||||||
MAKE_FLAGS+= UISTYLE=gtk2
|
|
||||||
WANTLIB+= X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
|
|
||||||
WANTLIB+= Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
|
|
||||||
WANTLIB+= gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
|
|
||||||
WANTLIB+= harfbuzz intl pango-1.0 pangocairo-1.0 pangoft2-1.0
|
|
||||||
WANTLIB+= z
|
|
||||||
.endif
|
|
||||||
|
|
||||||
FLAVOR_COMMA= ${FLAVOR_EXT:S/-/,/g}
|
|
||||||
SUBST_VARS= FLAVOR_COMMA
|
|
||||||
|
|
||||||
# Avoid multiple all:: entries and use the real target entry.
|
|
||||||
ALL_TARGET= unison
|
|
||||||
|
|
||||||
TEST_TARGET= selftest
|
|
||||||
|
|
||||||
PORTHOME= ${WRKDIR}
|
|
||||||
|
|
||||||
WRKDIST= ${WRKDIR}/${DISTNAME}/src
|
|
||||||
|
|
||||||
DOCS+= NEWS README
|
|
||||||
|
|
||||||
# Avoid the nightmare of their Makefile install target.
|
|
||||||
# Do not use INSTALL_PROGRAM, as the bytecode version must not be stripped!
|
|
||||||
do-install:
|
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/unison ${PREFIX}/bin
|
|
||||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/unison
|
|
||||||
@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/unison
|
|
@ -1,11 +1,9 @@
|
|||||||
@option is-branch
|
@pkgpath net/unison/2.4x${FLAVOR_COMMA}
|
||||||
@conflict unison-*
|
@pkgpath net/unison/2.5x${FLAVOR_COMMA}
|
||||||
@pkgpath net/unison/stable${FLAVOR_COMMA}
|
|
||||||
@pkgpath net/unison/snapshot${FLAVOR_COMMA}
|
@pkgpath net/unison/snapshot${FLAVOR_COMMA}
|
||||||
@pkgpath net/unison${FLAVOR_COMMA}
|
@pkgpath net/unison/stable${FLAVOR_COMMA}
|
||||||
@bin bin/unison
|
@bin bin/unison
|
||||||
share/doc/pkg-readmes/${PKGSTEM}
|
share/doc/pkg-readmes/${PKGSTEM}
|
||||||
share/doc/unison/
|
share/doc/unison/
|
||||||
share/doc/unison/BUGS.txt
|
share/doc/unison/NEWS.md
|
||||||
share/doc/unison/NEWS
|
share/doc/unison/README.md
|
||||||
share/doc/unison/README
|
|
28
net/unison/README
Normal file
28
net/unison/README
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
+-----------------------------------------------------------------------
|
||||||
|
| Running ${PKGSTEM} on OpenBSD
|
||||||
|
+-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
This version of unison is compatible with:
|
||||||
|
- unison 2.52 or newer. You do not have to pay any attention to OCaml
|
||||||
|
compiler versions.
|
||||||
|
- unison 2.51 if both versions are compiled with same OCaml compiler
|
||||||
|
version.
|
||||||
|
- unison 2.48 if both versions are compiled with same OCaml compiler
|
||||||
|
version.
|
||||||
|
|
||||||
|
It is possible to use the OPAM OCaml package manager to build unison
|
||||||
|
with the same version of the OCaml compiler on all machines:
|
||||||
|
|
||||||
|
doas pkg_add opam
|
||||||
|
export OPAMROOT=~/opam_unison
|
||||||
|
opam init --no-setup --compiler ocaml-base-compiler.4.09.0
|
||||||
|
opam install unison lablgtk # To build without the gui, remove lablgtk
|
||||||
|
$(opam var bin)/unison
|
||||||
|
|
||||||
|
Common issue
|
||||||
|
=============
|
||||||
|
Unison sometimes reports chown() failures that are actually failures to
|
||||||
|
change group ownership. This can occur when a user does not belong to
|
||||||
|
the specified group and is the owner of the file, or is not the
|
||||||
|
superuser. Issue can be addressed by setting the option 'group' to
|
||||||
|
'false'.
|
2
net/unison/distinfo
Normal file
2
net/unison/distinfo
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
SHA256 (unison-2.52.0.tar.gz) = oROJlxISkVMo/mkQHJJzexdmRZXEMY68uNo2flumNUA=
|
||||||
|
SIZE (unison-2.52.0.tar.gz) = 1354200
|
Loading…
Reference in New Issue
Block a user