From a91e2c8bb0e1335d945b2e0d320b621442ffa012 Mon Sep 17 00:00:00 2001 From: bket Date: Mon, 21 Mar 2022 04:26:59 +0000 Subject: [PATCH] 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@ --- net/unison/2.4x/Makefile | 11 --- net/unison/2.4x/distinfo | 2 - .../2.4x/patches/patch-bytearray_stubs_c | 39 ----------- net/unison/2.4x/patches/patch-files_ml | 12 ---- net/unison/2.4x/patches/patch-recon_ml | 14 ---- .../patches/patch-system_system_generic_ml | 12 ---- net/unison/2.4x/patches/patch-test_ml | 12 ---- net/unison/2.4x/patches/patch-uigtk2_ml | 12 ---- net/unison/2.4x/patches/patch-uutil_ml | 16 ----- net/unison/2.4x/pkg/README | 27 -------- net/unison/2.5x/Makefile | 3 - net/unison/2.5x/distinfo | 2 - net/unison/2.5x/pkg/DESCR | 8 --- net/unison/2.5x/pkg/PLIST | 7 -- net/unison/2.5x/pkg/README | 27 -------- net/unison/{2.4x/pkg => }/DESCR | 0 net/unison/Makefile | 69 +++++++++++++++++-- net/unison/Makefile.inc | 64 ----------------- net/unison/{2.4x/pkg => }/PLIST | 12 ++-- net/unison/README | 28 ++++++++ net/unison/distinfo | 2 + 21 files changed, 98 insertions(+), 281 deletions(-) delete mode 100644 net/unison/2.4x/Makefile delete mode 100644 net/unison/2.4x/distinfo delete mode 100644 net/unison/2.4x/patches/patch-bytearray_stubs_c delete mode 100644 net/unison/2.4x/patches/patch-files_ml delete mode 100644 net/unison/2.4x/patches/patch-recon_ml delete mode 100644 net/unison/2.4x/patches/patch-system_system_generic_ml delete mode 100644 net/unison/2.4x/patches/patch-test_ml delete mode 100644 net/unison/2.4x/patches/patch-uigtk2_ml delete mode 100644 net/unison/2.4x/patches/patch-uutil_ml delete mode 100644 net/unison/2.4x/pkg/README delete mode 100644 net/unison/2.5x/Makefile delete mode 100644 net/unison/2.5x/distinfo delete mode 100644 net/unison/2.5x/pkg/DESCR delete mode 100644 net/unison/2.5x/pkg/PLIST delete mode 100644 net/unison/2.5x/pkg/README rename net/unison/{2.4x/pkg => }/DESCR (100%) delete mode 100644 net/unison/Makefile.inc rename net/unison/{2.4x/pkg => }/PLIST (51%) create mode 100644 net/unison/README create mode 100644 net/unison/distinfo diff --git a/net/unison/2.4x/Makefile b/net/unison/2.4x/Makefile deleted file mode 100644 index 306c1ed8167..00000000000 --- a/net/unison/2.4x/Makefile +++ /dev/null @@ -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 diff --git a/net/unison/2.4x/distinfo b/net/unison/2.4x/distinfo deleted file mode 100644 index bfef528235a..00000000000 --- a/net/unison/2.4x/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (unison-2.48.15v4.tar.gz) = +MfpgmNLvh7WUQ/ls2tsXFXAbK792v3Z7cCIEjBf3uw= -SIZE (unison-2.48.15v4.tar.gz) = 1911781 diff --git a/net/unison/2.4x/patches/patch-bytearray_stubs_c b/net/unison/2.4x/patches/patch-bytearray_stubs_c deleted file mode 100644 index 0a6fb0791bf..00000000000 --- a/net/unison/2.4x/patches/patch-bytearray_stubs_c +++ /dev/null @@ -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; diff --git a/net/unison/2.4x/patches/patch-files_ml b/net/unison/2.4x/patches/patch-files_ml deleted file mode 100644 index 8332d9e4312..00000000000 --- a/net/unison/2.4x/patches/patch-files_ml +++ /dev/null @@ -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 diff --git a/net/unison/2.4x/patches/patch-recon_ml b/net/unison/2.4x/patches/patch-recon_ml deleted file mode 100644 index 8aa6d5a6d28..00000000000 --- a/net/unison/2.4x/patches/patch-recon_ml +++ /dev/null @@ -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 diff --git a/net/unison/2.4x/patches/patch-system_system_generic_ml b/net/unison/2.4x/patches/patch-system_system_generic_ml deleted file mode 100644 index c0e74c7cf66..00000000000 --- a/net/unison/2.4x/patches/patch-system_system_generic_ml +++ /dev/null @@ -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 diff --git a/net/unison/2.4x/patches/patch-test_ml b/net/unison/2.4x/patches/patch-test_ml deleted file mode 100644 index 709cedef588..00000000000 --- a/net/unison/2.4x/patches/patch-test_ml +++ /dev/null @@ -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(); diff --git a/net/unison/2.4x/patches/patch-uigtk2_ml b/net/unison/2.4x/patches/patch-uigtk2_ml deleted file mode 100644 index 67236bbae9b..00000000000 --- a/net/unison/2.4x/patches/patch-uigtk2_ml +++ /dev/null @@ -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 = diff --git a/net/unison/2.4x/patches/patch-uutil_ml b/net/unison/2.4x/patches/patch-uutil_ml deleted file mode 100644 index 101ef8bede7..00000000000 --- a/net/unison/2.4x/patches/patch-uutil_ml +++ /dev/null @@ -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 *) diff --git a/net/unison/2.4x/pkg/README b/net/unison/2.4x/pkg/README deleted file mode 100644 index 71178de8682..00000000000 --- a/net/unison/2.4x/pkg/README +++ /dev/null @@ -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'. diff --git a/net/unison/2.5x/Makefile b/net/unison/2.5x/Makefile deleted file mode 100644 index 6cbe06fa43f..00000000000 --- a/net/unison/2.5x/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -GH_TAGNAME= v2.51.5 - -.include diff --git a/net/unison/2.5x/distinfo b/net/unison/2.5x/distinfo deleted file mode 100644 index abbb4a7f896..00000000000 --- a/net/unison/2.5x/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (unison-2.51.5.tar.gz) = fodjcZkuv4kLYPMt+ICpinX+jEfAa3sq4q02vkgBPoM= -SIZE (unison-2.51.5.tar.gz) = 1385407 diff --git a/net/unison/2.5x/pkg/DESCR b/net/unison/2.5x/pkg/DESCR deleted file mode 100644 index d55c9d37b4d..00000000000 --- a/net/unison/2.5x/pkg/DESCR +++ /dev/null @@ -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 diff --git a/net/unison/2.5x/pkg/PLIST b/net/unison/2.5x/pkg/PLIST deleted file mode 100644 index 964d847170d..00000000000 --- a/net/unison/2.5x/pkg/PLIST +++ /dev/null @@ -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 diff --git a/net/unison/2.5x/pkg/README b/net/unison/2.5x/pkg/README deleted file mode 100644 index 71178de8682..00000000000 --- a/net/unison/2.5x/pkg/README +++ /dev/null @@ -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'. diff --git a/net/unison/2.4x/pkg/DESCR b/net/unison/DESCR similarity index 100% rename from net/unison/2.4x/pkg/DESCR rename to net/unison/DESCR diff --git a/net/unison/Makefile b/net/unison/Makefile index f904bfe434c..f1253315569 100644 --- a/net/unison/Makefile +++ b/net/unison/Makefile @@ -1,7 +1,64 @@ -SUBDIR = -SUBDIR += 2.4x -SUBDIR += 2.4x,no_x11 -SUBDIR += 2.5x -SUBDIR += 2.5x,no_x11 +COMMENT = multi-platform file synchronization tool -.include +GH_ACCOUNT = bcpierce00 +GH_PROJECT = unison +GH_TAGNAME = v2.52.0 + +CATEGORIES = net + +HOMEPAGE = https://www.cis.upenn.edu/~bcpierce/unison/ + +MAINTAINER = Bjorn Ketelaars + +# 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 diff --git a/net/unison/Makefile.inc b/net/unison/Makefile.inc deleted file mode 100644 index e6195c96705..00000000000 --- a/net/unison/Makefile.inc +++ /dev/null @@ -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 - -# 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 diff --git a/net/unison/2.4x/pkg/PLIST b/net/unison/PLIST similarity index 51% rename from net/unison/2.4x/pkg/PLIST rename to net/unison/PLIST index 4dec94d3e98..5d1ac297288 100644 --- a/net/unison/2.4x/pkg/PLIST +++ b/net/unison/PLIST @@ -1,11 +1,9 @@ -@option is-branch -@conflict unison-* -@pkgpath net/unison/stable${FLAVOR_COMMA} +@pkgpath net/unison/2.4x${FLAVOR_COMMA} +@pkgpath net/unison/2.5x${FLAVOR_COMMA} @pkgpath net/unison/snapshot${FLAVOR_COMMA} -@pkgpath net/unison${FLAVOR_COMMA} +@pkgpath net/unison/stable${FLAVOR_COMMA} @bin bin/unison share/doc/pkg-readmes/${PKGSTEM} share/doc/unison/ -share/doc/unison/BUGS.txt -share/doc/unison/NEWS -share/doc/unison/README +share/doc/unison/NEWS.md +share/doc/unison/README.md diff --git a/net/unison/README b/net/unison/README new file mode 100644 index 00000000000..486568a163a --- /dev/null +++ b/net/unison/README @@ -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'. diff --git a/net/unison/distinfo b/net/unison/distinfo new file mode 100644 index 00000000000..f275d6b9478 --- /dev/null +++ b/net/unison/distinfo @@ -0,0 +1,2 @@ +SHA256 (unison-2.52.0.tar.gz) = oROJlxISkVMo/mkQHJJzexdmRZXEMY68uNo2flumNUA= +SIZE (unison-2.52.0.tar.gz) = 1354200