On Fri, Dec 02, 2022 at 09:55:08PM +0000, Klemens Nanni wrote:
> Upstream suggested to fix this in the 1.1.x branch, so here we go.
> This borg PR is just a recommit of the actual msgpack-python commits.
> 
> Unbreaks sparc64/ports-gcc and keeps working on amd64/base-clang.
> 
> Anyone up for tests on other big-endian base-clang architectures?
> octeon and macppc (big-endian base-clang) work without the fix, so it
> looks like big-endian sparc64 which has base-clang but keeps using
> ports-gcc is the only architecture needing this.
> 
> borg 1.1.18 is the last 1.1.x release, but upstream suggested a PR for
> completeness.
> 
> borg 1.2.2 suffers the same but uses net/py-msgpack rather than its own
> bundled version;  same fix applies but I'd like to commit separately as
> this will effect all py3-msgpack consumers.
> 
> Feedback? OK?

Both msgpack-python and borgbackup upstreams merged the relevant fixes,
here's the standalone borg 1.1.18 fix now that the PR dust settled.

I'll commit this with OK bket once someone gave this a try on some big
endian base-clang arch (macppc, powerpc64, riscv64), i.e. big endian,
but not sparc64 ports-gcc, or I came around to testing one of those.

diff --git a/sysutils/borgbackup/1.1/Makefile b/sysutils/borgbackup/1.1/Makefile
index 0c79ffa68e6..afab957a774 100644
--- a/sysutils/borgbackup/1.1/Makefile
+++ b/sysutils/borgbackup/1.1/Makefile
@@ -1,10 +1,18 @@
 PORTROACH =            limit:^1\.1\.
 
 MODPY_EGG_VERSION =    1.1.18
-REVISION =             2
+REVISION =             3
 
 WANTLIB =              ${COMPILER_LIBCXX} b2 m
 
 LIB_DEPENDS =          security/libb2
 
+# same cherry-pick as in net/py-msgpack (used by borg 1.2.x), see details in
+# https://github.com/borgbackup/borg/pull/6149#issuecomment-1335632116 ff.
+MASTER_SITES0 =                https://github.com/borgbackup/borg/
+# merged "fix msgpack runtime on big-endian OpenBSD/sparc64"
+# https://github.com/borgbackup/borg/pull/7181
+PATCHFILES =           ${PKGSTEM}-msgpack-fix-big-endian-{pull/}7181.patch:0
+PATCH_DIST_STRIP =     -p1
+
 .include <bsd.port.mk>
diff --git a/sysutils/borgbackup/1.1/distinfo b/sysutils/borgbackup/1.1/distinfo
index 8e499846d07..1294dbd8192 100644
--- a/sysutils/borgbackup/1.1/distinfo
+++ b/sysutils/borgbackup/1.1/distinfo
@@ -1,2 +1,4 @@
 SHA256 (borgbackup-1.1.18.tar.gz) = 
XLpf59tNCJRLRn7BHvwBdoelErDZjM8K0aqcQylmUnU=
+SHA256 (borgbackup-msgpack-fix-big-endian-7181.patch) = 
li9NhN0ARAsKffKO7Umhe+MKoo4uVcBcQOaAj+hpLo0=
 SIZE (borgbackup-1.1.18.tar.gz) = 3854385
+SIZE (borgbackup-msgpack-fix-big-endian-7181.patch) = 5633

Reply via email to