diff --git a/devel/got/Makefile b/devel/got/Makefile index 7259df61504e..1d3b9bd1be06 100644 --- a/devel/got/Makefile +++ b/devel/got/Makefile @@ -1,34 +1,33 @@ PORTNAME= got -PORTVERSION= 0.72 -PORTREVISION= 1 +PORTVERSION= 0.73 CATEGORIES= devel MASTER_SITES= https://gameoftrees.org/releases/ MAINTAINER= naddy@FreeBSD.org COMMENT= Game of Trees version control system LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENCE USES= uidfix CONFLICTS_INSTALL= p5-App-GitGot # Insert #include "openbsd-compat.h" into each source file, # after the <...> includes and before the "..." ones. n= ${.newline} post-extract: @${FIND} ${WRKSRC} -name '*.[cy]' -exec \ ${REINPLACE_CMD} '1,/^#include "/{ \ /^#include "/i\$n#include "openbsd-compat.h"\$n$n}' \ {} + ${CP} -R ${FILESDIR}/openbsd-compat ${WRKSRC} # The regression test suite requires: # installed got # installed git # ssh to 127.0.0.1 regress: @(cd ${WRKSRC}/regress && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} regress) .include diff --git a/devel/got/distinfo b/devel/got/distinfo index 6608d901e4ea..700fda3a7bca 100644 --- a/devel/got/distinfo +++ b/devel/got/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1655574650 -SHA256 (got-0.72.tar.gz) = 8be46f3184ab0abcd4d8be9659e791a6a764e7e00abc320e66bd63b580e303fc -SIZE (got-0.72.tar.gz) = 622448 +TIMESTAMP = 1656945056 +SHA256 (got-0.73.tar.gz) = 9b2046c6989d914ff93a042df7f5e97f81de7337d3bc8a8e9ef91784c2090c48 +SIZE (got-0.73.tar.gz) = 644344 diff --git a/devel/got/files/openbsd-compat/freezero.c b/devel/got/files/openbsd-compat/freezero.c index 2f6c0c35de59..d2938666c4f0 100644 --- a/devel/got/files/openbsd-compat/freezero.c +++ b/devel/got/files/openbsd-compat/freezero.c @@ -1,25 +1,27 @@ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include +void freezero(void *, size_t); + void freezero(void *ptr, size_t sz) { explicit_bzero(ptr, sz); free(ptr); } diff --git a/devel/got/files/openbsd-compat/recallocarray.c b/devel/got/files/openbsd-compat/recallocarray.c index d93abd2da5fd..c81a4e7130fd 100644 --- a/devel/got/files/openbsd-compat/recallocarray.c +++ b/devel/got/files/openbsd-compat/recallocarray.c @@ -1,80 +1,82 @@ /* $OpenBSD: recallocarray.c,v 1.1 2017/03/06 18:44:21 otto Exp $ */ /* * Copyright (c) 2008, 2017 Otto Moerbeek * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include #include #include #include #include +void *recallocarray(void *, size_t, size_t, size_t); + /* * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW */ #define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) void * recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size) { size_t oldsize, newsize; void *newptr; if (ptr == NULL) return calloc(newnmemb, size); if ((newnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && newnmemb > 0 && SIZE_MAX / newnmemb < size) { errno = ENOMEM; return NULL; } newsize = newnmemb * size; if ((oldnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && oldnmemb > 0 && SIZE_MAX / oldnmemb < size) { errno = EINVAL; return NULL; } oldsize = oldnmemb * size; /* * Don't bother too much if we're shrinking just a bit, * we do not shrink for series of small steps, oh well. */ if (newsize <= oldsize) { size_t d = oldsize - newsize; if (d < oldsize / 2 && d < getpagesize()) { memset((char *)ptr + newsize, 0, d); return ptr; } } newptr = malloc(newsize); if (newptr == NULL) return NULL; if (newsize > oldsize) { memcpy(newptr, ptr, oldsize); memset((char *)newptr + oldsize, 0, newsize - oldsize); } else memcpy(newptr, ptr, newsize); explicit_bzero(ptr, oldsize); free(ptr); return newptr; } diff --git a/devel/got/files/patch-gotadmin_Makefile b/devel/got/files/patch-gotadmin_Makefile index e35e667ab932..ad34cefb8344 100644 --- a/devel/got/files/patch-gotadmin_Makefile +++ b/devel/got/files/patch-gotadmin_Makefile @@ -1,11 +1,11 @@ ---- gotadmin/Makefile.orig 2021-10-04 10:08:55 UTC +--- gotadmin/Makefile.orig 2022-07-03 11:08:45 UTC +++ gotadmin/Makefile -@@ -24,8 +24,4 @@ DPADD = ${LIBZ} ${LIBUTIL} +@@ -25,8 +25,4 @@ DPADD = ${LIBZ} ${LIBUTIL} NOMAN = Yes .endif -realinstall: - ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \ - -m ${BINMODE} ${PROG} ${BINDIR}/${PROG} - .include diff --git a/devel/got/files/patch-lib_sigs.c b/devel/got/files/patch-lib_sigs.c new file mode 100644 index 000000000000..8681646adb9d --- /dev/null +++ b/devel/got/files/patch-lib_sigs.c @@ -0,0 +1,11 @@ +--- lib/sigs.c.orig 2022-07-04 14:54:12 UTC ++++ lib/sigs.c +@@ -206,7 +206,7 @@ got_tag_write_signed_data(BUF *buf, struct got_tag_obj + got_date_format_gmtoff(gmtoff, sizeof(gmtoff), + got_object_tag_get_tagger_gmtoff(tag)); + if (asprintf(&tagger, "%s %lld %s", got_object_tag_get_tagger(tag), +- got_object_tag_get_tagger_time(tag), gmtoff) == -1) { ++ (long long)got_object_tag_get_tagger_time(tag), gmtoff) == -1) { + err = got_error_from_errno("asprintf"); + goto done; + } diff --git a/devel/got/files/patch-libexec_got-read-pack_got-read-pack.c b/devel/got/files/patch-libexec_got-read-pack_got-read-pack.c index 89bde218d824..926785d07069 100644 --- a/devel/got/files/patch-libexec_got-read-pack_got-read-pack.c +++ b/devel/got/files/patch-libexec_got-read-pack_got-read-pack.c @@ -1,22 +1,22 @@ ---- libexec/got-read-pack/got-read-pack.c.orig 2022-06-19 18:47:42 UTC +--- libexec/got-read-pack/got-read-pack.c.orig 2022-07-04 14:48:30 UTC +++ libexec/got-read-pack/got-read-pack.c @@ -14,6 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include #include -@@ -1646,6 +1647,11 @@ main(int argc, char *argv[]) +@@ -1917,6 +1918,11 @@ main(int argc, char *argv[]) /* revoke access to most system calls */ if (pledge("stdio recvfd", NULL) == -1) { err = got_error_from_errno("pledge"); + got_privsep_send_error(&ibuf, err); + return 1; + } + if (cap_enter() == -1) { + err = got_error_from_errno("cap_enter"); got_privsep_send_error(&ibuf, err); return 1; } diff --git a/devel/got/files/patch-libexec_got-read-patch_got-read-patch.c b/devel/got/files/patch-libexec_got-read-patch_got-read-patch.c index bc70e9c4f84b..6bdec6c59be9 100644 --- a/devel/got/files/patch-libexec_got-read-patch_got-read-patch.c +++ b/devel/got/files/patch-libexec_got-read-patch_got-read-patch.c @@ -1,22 +1,22 @@ ---- libexec/got-read-patch/got-read-patch.c.orig 2022-06-19 18:47:42 UTC +--- libexec/got-read-patch/got-read-patch.c.orig 2022-07-04 14:48:30 UTC +++ libexec/got-read-patch/got-read-patch.c @@ -35,6 +35,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include #include -@@ -487,6 +488,11 @@ main(int argc, char **argv) +@@ -578,6 +579,11 @@ main(int argc, char **argv) /* revoke access to most system calls */ if (pledge("stdio recvfd", NULL) == -1) { err = got_error_from_errno("pledge"); + got_privsep_send_error(&ibuf, err); + return 1; + } + if (cap_enter() == -1) { + err = got_error_from_errno("cap_enter"); got_privsep_send_error(&ibuf, err); return 1; } diff --git a/devel/got/files/patch-regress_cmdline_Makefile b/devel/got/files/patch-regress_cmdline_Makefile index bb51b0909783..c11c9f731001 100644 --- a/devel/got/files/patch-regress_cmdline_Makefile +++ b/devel/got/files/patch-regress_cmdline_Makefile @@ -1,10 +1,10 @@ ---- regress/cmdline/Makefile.orig 2021-10-04 10:11:31 UTC +--- regress/cmdline/Makefile.orig 2022-05-10 11:21:59 UTC +++ regress/cmdline/Makefile -@@ -93,4 +93,6 @@ cleanup: +@@ -97,4 +97,6 @@ cleanup: ./cleanup.sh -q -r "$(GOT_TEST_ROOT)" -.include +regress: ${REGRESS_TARGETS} .PHONY .SILENT + +.include diff --git a/devel/got/files/patch-regress_cmdline_commit.sh b/devel/got/files/patch-regress_cmdline_commit.sh index 82497661191a..d3187079463d 100644 --- a/devel/got/files/patch-regress_cmdline_commit.sh +++ b/devel/got/files/patch-regress_cmdline_commit.sh @@ -1,11 +1,11 @@ ---- regress/cmdline/commit.sh.orig 2022-02-08 10:47:01 UTC +--- regress/cmdline/commit.sh.orig 2022-07-02 13:23:44 UTC +++ regress/cmdline/commit.sh -@@ -1376,7 +1376,7 @@ test_commit_prepared_logmsg() { +@@ -1380,7 +1380,7 @@ test_commit_prepared_logmsg() { cat > $testroot/editor.sh < +.include