On Tue 17/04/2018 22:54, Björn Ketelaars wrote:
> On Tue 10/04/2018 05:20, Björn Ketelaars wrote:
> > On Tue 03/04/2018 20:28, Björn Ketelaars wrote:
> > > unison received an update to 2.51.2. An overview on what has changed can
> > > be found at https://github.com/bcpierce00/unison/releases. Noticeable is
> > > that this version breaks compatibility with older versions.
> > > 
> > > Tested OK on amd64, and make test runs successfully.
> > > 
> > > Response MAINTAINER: 'fine, ok giovanni@'.
> > > 
> > > Additional comments/OKs?
> > 
> > Ping!
> 
> Ping!?

New diff:

As discussed on #porters; updating unison to 2.5x means that current
looses compatibility with 6.3. For some users this could be an issue.
Solution could be to have multiple versions in ports, as was the case in
the past.

Diff below does the following:
- Support both 2.4x and 2.5x by splitting into 2.4x and 2.5x
  subdirecties and using "@option is-branch
- Concerning 2.4x: HOMEPAGE has been changed to use https, WANTLIB has
  been regenerated, and REVISION has been bumped
- As discussed with giovanni@, take over maintainership

All versions/flavors have been build tested. All versions/flavors pass
make test. Unison 2.51.2 has been running here for the last few weeks
without any issues.

Comments/OKs?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/unison/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    21 Dec 2017 15:31:48 -0000      1.14
+++ Makefile    24 Apr 2018 17:30:46 -0000
@@ -1,70 +1,9 @@
-# $OpenBSD: Makefile,v 1.14 2017/12/21 15:31:48 giovanni Exp $
+# $OpenBSD$
 
-COMMENT=       multi-platform file synchronization tool
-CATEGORIES=    net
+SUBDIR =
+SUBDIR += 2.4x
+SUBDIR += 2.4x,no_x11
+SUBDIR += 2.5x
+SUBDIR += 2.5x,no_x11
 
-REV=           v3
-VER=           2.48.15
-GH_ACCOUNT=    bcpierce00
-GH_PROJECT=    unison
-GH_TAGNAME=    v${VER}${REV}
-DISTNAME=      ${GH_TAGNAME}
-PKGNAME=       ${GH_PROJECT}-${VER}
-
-HOMEPAGE=      http://www.cis.upenn.edu/~bcpierce/unison/
-MAINTAINER=    Giovanni Bechis <giova...@openbsd.org>
-
-# GPLv3
-PERMIT_PACKAGE_CDROM=  Yes
-
-WANTLIB=       c curses m pthread util
-
-MODULES=       lang/ocaml
-
-USE_GMAKE=     Yes
-
-FLAVORS=       no_x11
-FLAVOR?=
-
-FLAVOR_COMMA=   ${FLAVOR_EXT:S/-/,/g}
-SUBST_VARS=     FLAVOR_COMMA
-
-.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 fontconfig freetype
-WANTLIB += gio-2.0 glib-2.0 gobject-2.0 intl pango-1.0
-WANTLIB += pangocairo-1.0 pangoft2-1.0 gdk_pixbuf-2.0
-WANTLIB += gdk-x11-2.0 gtk-x11-2.0 atk-1.0 cairo z
-.endif
-
-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=
-
-TEST_TARGET=   selftest
-PORTHOME=      ${WRKDIR}
-
-# Avoid multiple all:: entries and use the real target entry.
-ALL_TARGET=    unison
-
-DOCS=          BUGS.txt NEWS README
-
-WRKDIST=       ${WRKDIR}/${PKGNAME}${REV}/src
-
-# 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>
+.include <bsd.port.subdir.mk>
Index: Makefile.inc
===================================================================
RCS file: Makefile.inc
diff -N Makefile.inc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ Makefile.inc        24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,60 @@
+# $OpenBSD$
+
+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 <b...@openbsd.org>
+
+# GPLv3
+PERMIT_PACKAGE_CDROM=  Yes
+
+WANTLIB=       c m util
+
+MODULES=       lang/ocaml
+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+=      intl pango-1.0 pangocairo-1.0 pangoft2-1.0 z
+.endif
+
+FLAVOR_COMMA=   ${FLAVOR_EXT:S/-/,/g}
+SUBST_VARS=     FLAVOR_COMMA
+
+TEST_TARGET=   selftest
+PORTHOME=      ${WRKDIR}
+
+# Avoid multiple all:: entries and use the real target entry.
+ALL_TARGET=    unison
+
+DOCS=          BUGS.txt 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
Index: distinfo
===================================================================
RCS file: distinfo
diff -N distinfo
--- distinfo    21 Dec 2017 15:31:48 -0000      1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-SHA256 (v2.48.15v3.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI=
-SIZE (v2.48.15v3.tar.gz) = 1911724
Index: 2.4x/Makefile
===================================================================
RCS file: 2.4x/Makefile
diff -N 2.4x/Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/Makefile       24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,12 @@
+# $OpenBSD$
+
+REV=           v3
+VER=           2.48.15
+REVISION=      0
+GH_TAGNAME=    v${VER}${REV}
+DISTNAME=      ${GH_TAGNAME}
+PKGNAME=       ${GH_PROJECT}-${VER}
+ 
+WRKDIST=       ${WRKDIR}/${PKGNAME}${REV}/src
+
+.include <bsd.port.mk>
Index: 2.4x/distinfo
===================================================================
RCS file: 2.4x/distinfo
diff -N 2.4x/distinfo
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/distinfo       24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,2 @@
+SHA256 (v2.48.15v3.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI=
+SIZE (v2.48.15v3.tar.gz) = 1911724
Index: 2.4x/patches/patch-bytearray_stubs_c
===================================================================
RCS file: 2.4x/patches/patch-bytearray_stubs_c
diff -N 2.4x/patches/patch-bytearray_stubs_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/patches/patch-bytearray_stubs_c        24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,41 @@
+$OpenBSD: patch-bytearray_stubs_c,v 1.1 2017/03/13 22:25:14 giovanni Exp $
+
+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;
Index: 2.4x/patches/patch-test_ml
===================================================================
RCS file: 2.4x/patches/patch-test_ml
diff -N 2.4x/patches/patch-test_ml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/patches/patch-test_ml  24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-test_ml,v 1.1 2017/12/21 15:31:48 giovanni Exp $
+
+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();
Index: 2.4x/pkg/DESCR
===================================================================
RCS file: 2.4x/pkg/DESCR
diff -N 2.4x/pkg/DESCR
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/pkg/DESCR      24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,8 @@
+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
Index: 2.4x/pkg/PLIST
===================================================================
RCS file: 2.4x/pkg/PLIST
diff -N 2.4x/pkg/PLIST
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/pkg/PLIST      24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,9 @@
+@comment $OpenBSD$
+@option is-branch
+@conflict unison-*
+@bin bin/unison
+share/doc/pkg-readmes/${FULLPKGNAME}
+share/doc/unison/
+share/doc/unison/BUGS.txt
+share/doc/unison/NEWS
+share/doc/unison/README
Index: 2.4x/pkg/README
===================================================================
RCS file: 2.4x/pkg/README
diff -N 2.4x/pkg/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.4x/pkg/README     24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,12 @@
+$OpenBSD: README,v 1.1 2014/10/17 06:22:08 chrisz Exp $
+
++-----------------------------------------------------------------------
+| Running ${FULLPKGNAME} 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.
+One way to work around this limitation of unison is to use
+the OPAM OCaml package and compiler manager to sync the
+OCaml versions on your machines.
Index: 2.5x/Makefile
===================================================================
RCS file: 2.5x/Makefile
diff -N 2.5x/Makefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/Makefile       24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,7 @@
+# $OpenBSD$
+ 
+GH_TAGNAME=    v2.51.2
+ 
+WRKDIST=       ${WRKDIR}/${PKGNAME}/src
+
+.include <bsd.port.mk>
Index: 2.5x/distinfo
===================================================================
RCS file: 2.5x/distinfo
diff -N 2.5x/distinfo
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/distinfo       24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,2 @@
+SHA256 (unison-2.51.2.tar.gz) = ou/L6rZRvm32nMmyUwEaB5Vey5H7QHohlxlFEZeEnV4=
+SIZE (unison-2.51.2.tar.gz) = 1398790
Index: 2.5x/patches/patch-uicommon_ml
===================================================================
RCS file: 2.5x/patches/patch-uicommon_ml
diff -N 2.5x/patches/patch-uicommon_ml
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/patches/patch-uicommon_ml      24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: uicommon.ml
+--- uicommon.ml.orig
++++ uicommon.ml
+@@ -494,7 +494,7 @@ let promptForRoots getFirstRoot getSecondRoot =
+ (* ---- *)
+ 
+ let makeTempDir pattern =
+-  let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d 
%s.XXXXXX || mktemp -d -t %s) 2>/dev/null" pattern pattern) in
++  let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d 
%s.XXXXXX || mktemp -d -t %s.XXXXXX) 2>/dev/null" pattern pattern) in
+   let path = input_line ic in
+   ignore (Unix.close_process_in ic);
+   path
Index: 2.5x/pkg/DESCR
===================================================================
RCS file: 2.5x/pkg/DESCR
diff -N 2.5x/pkg/DESCR
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/pkg/DESCR      24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,8 @@
+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
Index: 2.5x/pkg/PLIST
===================================================================
RCS file: 2.5x/pkg/PLIST
diff -N 2.5x/pkg/PLIST
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/pkg/PLIST      24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,9 @@
+@comment $OpenBSD$
+@option is-branch
+@conflict unison-*
+@bin bin/unison
+share/doc/pkg-readmes/${FULLPKGNAME}
+share/doc/unison/
+share/doc/unison/BUGS.txt
+share/doc/unison/NEWS
+share/doc/unison/README
Index: 2.5x/pkg/README
===================================================================
RCS file: 2.5x/pkg/README
diff -N 2.5x/pkg/README
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ 2.5x/pkg/README     24 Apr 2018 17:30:46 -0000
@@ -0,0 +1,12 @@
+$OpenBSD: README,v 1.1 2014/10/17 06:22:08 chrisz Exp $
+
++-----------------------------------------------------------------------
+| Running ${FULLPKGNAME} 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.
+One way to work around this limitation of unison is to use
+the OPAM OCaml package and compiler manager to sync the
+OCaml versions on your machines.
Index: patches/patch-bytearray_stubs_c
===================================================================
RCS file: patches/patch-bytearray_stubs_c
diff -N patches/patch-bytearray_stubs_c
--- patches/patch-bytearray_stubs_c     13 Mar 2017 22:25:14 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-$OpenBSD: patch-bytearray_stubs_c,v 1.1 2017/03/13 22:25:14 giovanni Exp $
-
-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;
Index: patches/patch-test_ml
===================================================================
RCS file: patches/patch-test_ml
diff -N patches/patch-test_ml
--- patches/patch-test_ml       21 Dec 2017 15:31:48 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-test_ml,v 1.1 2017/12/21 15:31:48 giovanni Exp $
-
-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();
Index: pkg/DESCR
===================================================================
RCS file: pkg/DESCR
diff -N pkg/DESCR
--- pkg/DESCR   17 Oct 2014 06:22:08 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -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
Index: pkg/PLIST
===================================================================
RCS file: pkg/PLIST
diff -N pkg/PLIST
--- pkg/PLIST   17 Oct 2014 06:22:08 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.4 2014/10/17 06:22:08 chrisz Exp $
-@pkgpath net/unison/stable${FLAVOR_COMMA}
-@pkgpath net/unison/snapshot${FLAVOR_COMMA}
-@bin bin/unison
-share/doc/pkg-readmes/${FULLPKGNAME}
-share/doc/unison/
-share/doc/unison/BUGS.txt
-share/doc/unison/NEWS
-share/doc/unison/README
Index: pkg/README
===================================================================
RCS file: pkg/README
diff -N pkg/README
--- pkg/README  17 Oct 2014 06:22:08 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: README,v 1.1 2014/10/17 06:22:08 chrisz Exp $
-
-+-----------------------------------------------------------------------
-| Running ${FULLPKGNAME} 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.
-One way to work around this limitation of unison is to use
-the OPAM OCaml package and compiler manager to sync the
-OCaml versions on your machines.

Reply via email to