Index: head/devel/got/Makefile =================================================================== --- head/devel/got/Makefile (revision 552862) +++ head/devel/got/Makefile (revision 552863) @@ -1,31 +1,31 @@ # $FreeBSD$ PORTNAME= got -PORTVERSION= 0.42 +PORTVERSION= 0.43 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 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 run-test: @(cd ${WRKSRC}/regress && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} regress) .include Index: head/devel/got/distinfo =================================================================== --- head/devel/got/distinfo (revision 552862) +++ head/devel/got/distinfo (revision 552863) @@ -1,3 +1,3 @@ -TIMESTAMP = 1601492035 -SHA256 (got-0.42.tar.gz) = d5b976942cc630026fda401b903860bcd145a187d64231e062b57a6bc8a63d67 -SIZE (got-0.42.tar.gz) = 444954 +TIMESTAMP = 1603279167 +SHA256 (got-0.43.tar.gz) = 64ecad392a32243ab3252371ba27916f5e6fce8b41f37be7c727a6c2ff30de49 +SIZE (got-0.43.tar.gz) = 445698 Index: head/devel/got/files/patch-regress_cmdline_rm.sh =================================================================== --- head/devel/got/files/patch-regress_cmdline_rm.sh (revision 552862) +++ head/devel/got/files/patch-regress_cmdline_rm.sh (nonexistent) @@ -1,20 +0,0 @@ ---- regress/cmdline/rm.sh.orig 2020-09-15 22:43:33 UTC -+++ regress/cmdline/rm.sh -@@ -239,7 +239,7 @@ test_rm_directory() { - return 1 - fi - -- (cd $testroot/wt && ls -l > $testroot/stdout) -+ (cd $testroot/wt && ls -l | sed '/^total/d' > $testroot/stdout) - - echo -n '' > $testroot/stdout.expected - -@@ -251,7 +251,7 @@ test_rm_directory() { - return 1 - fi - -- (cd $testroot/wt && ls -l > $testroot/stdout) -+ (cd $testroot/wt && ls -l | sed '/^total/d' > $testroot/stdout) - - echo -n '' > $testroot/stdout.expected - Property changes on: head/devel/got/files/patch-regress_cmdline_rm.sh ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/got/files/patch-regress_cmdline_import.sh =================================================================== --- head/devel/got/files/patch-regress_cmdline_import.sh (revision 552862) +++ head/devel/got/files/patch-regress_cmdline_import.sh (nonexistent) @@ -1,38 +0,0 @@ ---- regress/cmdline/import.sh.orig 2020-09-13 18:20:00 UTC -+++ regress/cmdline/import.sh -@@ -18,7 +18,7 @@ - - test_import_basic() { - local testname=import_basic -- local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` -+ local testroot=`mktemp -d ${TMPDIR-/tmp}/got-test-$testname-XXXXXXXX` - - got init $testroot/repo - -@@ -170,7 +170,7 @@ test_import_requires_new_branch() { - - test_import_ignores() { - local testname=import_ignores -- local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` -+ local testroot=`mktemp -d ${TMPDIR-/tmp}/got-test-$testname-XXXXXXXX` - - got init $testroot/repo - -@@ -200,7 +200,7 @@ test_import_ignores() { - - test_import_empty_dir() { - local testname=import_empty_dir -- local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` -+ local testroot=`mktemp -d ${TMPDIR-/tmp}/got-test-$testname-XXXXXXXX` - - got init $testroot/repo - -@@ -243,7 +243,7 @@ test_import_empty_dir() { - - test_import_symlink() { - local testname=import_symlink -- local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` -+ local testroot=`mktemp -d ${TMPDIR-/tmp}/got-test-$testname-XXXXXXXX` - - got init $testroot/repo - Property changes on: head/devel/got/files/patch-regress_cmdline_import.sh ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/got/files/openbsd-compat/basename.c =================================================================== --- head/devel/got/files/openbsd-compat/basename.c (revision 552862) +++ head/devel/got/files/openbsd-compat/basename.c (nonexistent) @@ -1,65 +0,0 @@ -/* $OpenBSD: basename.c,v 1.16 2019/01/25 00:19:25 millert Exp $ */ - -/* - * Copyright (c) 1997, 2004 Todd C. Miller - * - * 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 - -char * -basename(const char *path) -{ - static char bname[PATH_MAX]; - size_t len; - const char *endp, *startp; - - /* Empty or NULL string gets treated as "." */ - if (path == NULL || *path == '\0') { - bname[0] = '.'; - bname[1] = '\0'; - return (bname); - } - - /* Strip any trailing slashes */ - endp = path + strlen(path) - 1; - while (endp > path && *endp == '/') - endp--; - - /* All slashes becomes "/" */ - if (endp == path && *endp == '/') { - bname[0] = '/'; - bname[1] = '\0'; - return (bname); - } - - /* Find the start of the base */ - startp = endp; - while (startp > path && *(startp - 1) != '/') - startp--; - - len = endp - startp + 1; - if (len >= sizeof(bname)) { - errno = ENAMETOOLONG; - return (NULL); - } - memcpy(bname, startp, len); - bname[len] = '\0'; - return (bname); -} Property changes on: head/devel/got/files/openbsd-compat/basename.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/got/files/openbsd-compat/dirname.c =================================================================== --- head/devel/got/files/openbsd-compat/dirname.c (revision 552862) +++ head/devel/got/files/openbsd-compat/dirname.c (nonexistent) @@ -1,71 +0,0 @@ -/* $OpenBSD: dirname.c,v 1.16 2019/01/25 00:19:25 millert Exp $ */ - -/* - * Copyright (c) 1997, 2004 Todd C. Miller - * - * 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 - -/* A slightly modified copy of this file exists in libexec/ld.so */ - -char * -dirname(const char *path) -{ - static char dname[PATH_MAX]; - size_t len; - const char *endp; - - /* Empty or NULL string gets treated as "." */ - if (path == NULL || *path == '\0') { - dname[0] = '.'; - dname[1] = '\0'; - return (dname); - } - - /* Strip any trailing slashes */ - endp = path + strlen(path) - 1; - while (endp > path && *endp == '/') - endp--; - - /* Find the start of the dir */ - while (endp > path && *endp != '/') - endp--; - - /* Either the dir is "/" or there are no slashes */ - if (endp == path) { - dname[0] = *endp == '/' ? '/' : '.'; - dname[1] = '\0'; - return (dname); - } else { - /* Move forward past the separating slashes */ - do { - endp--; - } while (endp > path && *endp == '/'); - } - - len = endp - path + 1; - if (len >= sizeof(dname)) { - errno = ENAMETOOLONG; - return (NULL); - } - memcpy(dname, path, len); - dname[len] = '\0'; - return (dname); -} Property changes on: head/devel/got/files/openbsd-compat/dirname.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -on \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/got/files/openbsd-compat/Makefile =================================================================== --- head/devel/got/files/openbsd-compat/Makefile (revision 552862) +++ head/devel/got/files/openbsd-compat/Makefile (revision 552863) @@ -1,15 +1,13 @@ LIB= openbsd-compat INTERNALLIB= -SRCS= basename.c \ - dirname.c \ - freezero.c \ +SRCS= freezero.c \ getdtablecount.c \ imsg.c \ imsg-buffer.c \ open.c \ recallocarray.c CFLAGS+= -I${.CURDIR} .include Index: head/devel/got/files/openbsd-compat/openbsd-compat.h =================================================================== --- head/devel/got/files/openbsd-compat/openbsd-compat.h (revision 552862) +++ head/devel/got/files/openbsd-compat/openbsd-compat.h (revision 552863) @@ -1,87 +1,76 @@ /* * Compatibility mappings for system headers and * prototypes for functions in libopenbsd-compat. */ #ifndef _OPENBSD_COMPAT_H_ #define _OPENBSD_COMPAT_H_ /* * */ #define __dead __dead2 /* * */ #define SIMPLEQ_HEAD(name, type) \ STAILQ_HEAD(name, type) #define SIMPLEQ_HEAD_INITIALIZER(head) \ STAILQ_HEAD_INITIALIZER(head) #define SIMPLEQ_ENTRY(type) \ STAILQ_ENTRY(type) #define SIMPLEQ_FIRST(head) \ STAILQ_FIRST(head) #define SIMPLEQ_END(head) \ NULL #define SIMPLEQ_EMPTY(head) \ STAILQ_EMPTY(head) #define SIMPLEQ_NEXT(elm, field) \ STAILQ_NEXT(elm, field) #define SIMPLEQ_FOREACH(var, head, field) \ STAILQ_FOREACH(var, head, field) #define SIMPLEQ_FOREACH_SAFE(var, head, field, tvar) \ STAILQ_FOREACH_SAFE(var, head, field, tvar) #define SIMPLEQ_INIT(head) \ STAILQ_INIT(head) #define SIMPLEQ_INSERT_HEAD(head, elm, field) \ STAILQ_INSERT_HEAD(head, elm, field) #define SIMPLEQ_INSERT_TAIL(head, elm, field) \ STAILQ_INSERT_TAIL(head, elm, field) #define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) \ STAILQ_INSERT_AFTER(head, listelm, elm, field) #define SIMPLEQ_REMOVE_HEAD(head, field) \ STAILQ_REMOVE_HEAD(head, field) #define SIMPLEQ_REMOVE_AFTER(head, elm, field) \ STAILQ_REMOVE_AFTER(head, elm, field) #define SIMPLEQ_CONCAT(head1, head2) \ STAILQ_CONCAT(head1, head2) /* * */ #define open(...) open_posix(__VA_ARGS__) #define openat(...) openat_posix(__VA_ARGS__) int open_posix(const char *path, int flags, ...); int openat_posix(int fd, const char *path, int flags, ...); /* - * - */ -#undef basename -#undef dirname -#define basename(path) basename_const(path) -#define dirname(path) dirname_const(path) - -char *basename(const char *); -char *dirname(const char *); - -/* * */ void freezero(void *, size_t); void *recallocarray(void *, size_t, size_t, size_t); /* * */ int getdtablecount(void); /* void -> int */ #define closefrom(fd) (closefrom(fd), 0) #define pledge(promises, execpromises) 0 #define unveil(path, permissions) 0 #endif /* _OPENBSD_COMPAT_H_ */ Index: head/devel/got/files/patch-regress_cmdline_Makefile =================================================================== --- head/devel/got/files/patch-regress_cmdline_Makefile (revision 552862) +++ head/devel/got/files/patch-regress_cmdline_Makefile (revision 552863) @@ -1,10 +1,10 @@ ---- regress/cmdline/Makefile.orig 2020-08-09 09:17:05 UTC +--- regress/cmdline/Makefile.orig 2020-10-21 11:24:20 UTC +++ regress/cmdline/Makefile -@@ -78,4 +78,6 @@ fetch: +@@ -80,4 +80,6 @@ fetch: tree: - ./tree.sh -q + ./tree.sh -q -r "$(GOT_TEST_ROOT)" -.include +regress: ${REGRESS_TARGETS} .PHONY .SILENT + +.include Index: head/devel/got/files/patch-regress_cmdline_common.sh =================================================================== --- head/devel/got/files/patch-regress_cmdline_common.sh (revision 552862) +++ head/devel/got/files/patch-regress_cmdline_common.sh (revision 552863) @@ -1,32 +1,23 @@ --- regress/cmdline/common.sh.orig 2020-09-13 18:20:00 UTC +++ regress/cmdline/common.sh @@ -24,6 +24,20 @@ export GOT_LOG_DEFAULT_LIMIT=0 export MALLOC_OPTIONS=S +# compat wrapper +sed() +( + for i; do + arg=$1 + shift + case $arg in + -i) set - "$@" "$arg" '' ;; + *) set - "$@" "$arg" ;; + esac + done + exec sed "$@" +) + git_init() { git init -q "$1" -@@ -168,7 +182,7 @@ test_init() - echo "No test name provided" >&2 - return 1 - fi -- local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX` -+ local testroot=`mktemp -d ${TMPDIR-/tmp}/got-test-$testname-XXXXXXXX` - mkdir $testroot/repo - git_init $testroot/repo - if [ -z "$no_tree" ]; then