git: 57445751afe2 - main - devel/got: update to 0.53

Christian Weisgerber naddy at FreeBSD.org
Wed Jun 23 15:50:00 UTC 2021


The branch main has been updated by naddy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=57445751afe284e2bcb57e0d2ab43dcf10963a60

commit 57445751afe284e2bcb57e0d2ab43dcf10963a60
Author:     Christian Weisgerber <naddy at FreeBSD.org>
AuthorDate: 2021-06-23 15:45:49 +0000
Commit:     Christian Weisgerber <naddy at FreeBSD.org>
CommitDate: 2021-06-23 15:49:52 +0000

    devel/got: update to 0.53
    
    User-visible changes:
    - add a gotadmin utility with info, pack, indexpack, and listpack commands
    - do not update symlinks which are already up-to-date
    - fix 3-way merge of files which lack a final \n
    - avoid an error in tog(1) while the terminal window is being resized
    - catch invalid reference names passed to 'got ref -l'
    - fix unrelated changes being merged by got cherrypick/backout/rebase/histedit
    - new -I option for 'got status' to show files which match an ignore pattern
---
 devel/got/Makefile                             |   2 +-
 devel/got/distinfo                             |   6 +-
 devel/got/files/patch-Makefile                 |   6 +-
 devel/got/files/patch-gotadmin_Makefile        |  13 ++++
 devel/got/files/patch-lib_repository__admin.c  |  10 +++
 devel/got/files/patch-lib_worktree.c           | 102 -------------------------
 devel/got/files/patch-regress_cmdline_Makefile |   8 +-
 devel/got/pkg-plist                            |   2 +
 8 files changed, 36 insertions(+), 113 deletions(-)

diff --git a/devel/got/Makefile b/devel/got/Makefile
index 9ac3da6f51ae..db091d23e0f4 100644
--- a/devel/got/Makefile
+++ b/devel/got/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	got
-PORTVERSION=	0.52
+PORTVERSION=	0.53
 CATEGORIES=	devel
 MASTER_SITES=	https://gameoftrees.org/releases/
 
diff --git a/devel/got/distinfo b/devel/got/distinfo
index 4dba46472de5..6c5916f0fe07 100644
--- a/devel/got/distinfo
+++ b/devel/got/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1617736627
-SHA256 (got-0.52.tar.gz) = 625875685cbed6637cf99dc93df3ca2fa9128519752fe8cc5bd509b50a46e8b7
-SIZE (got-0.52.tar.gz) = 494359
+TIMESTAMP = 1624457436
+SHA256 (got-0.53.tar.gz) = 2401652e959457ddba67eef93a31b3dd6efea89198a3c02eebc964edb03961f3
+SIZE (got-0.53.tar.gz) = 519143
diff --git a/devel/got/files/patch-Makefile b/devel/got/files/patch-Makefile
index 303104208994..3743115e5c72 100644
--- a/devel/got/files/patch-Makefile
+++ b/devel/got/files/patch-Makefile
@@ -1,8 +1,8 @@
---- Makefile.orig	2020-09-09 15:30:46 UTC
+--- Makefile.orig	2021-04-10 22:50:22 UTC
 +++ Makefile
 @@ -1,4 +1,4 @@
--SUBDIR = libexec got tog
-+SUBDIR = openbsd-compat libexec got tog
+-SUBDIR = libexec got tog gotadmin
++SUBDIR = openbsd-compat libexec got tog gotadmin
  
  .PHONY: release dist
  
diff --git a/devel/got/files/patch-gotadmin_Makefile b/devel/got/files/patch-gotadmin_Makefile
new file mode 100644
index 000000000000..7df973f9ff27
--- /dev/null
+++ b/devel/got/files/patch-gotadmin_Makefile
@@ -0,0 +1,13 @@
+--- gotadmin/Makefile.orig	2021-06-22 19:37:49 UTC
++++ gotadmin/Makefile
+@@ -24,10 +24,6 @@ DPADD = ${LIBZ} ${LIBUTIL}
+ NOMAN = Yes
+ .endif
+ 
+-realinstall:
+-	${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
+-	-m ${BINMODE} ${PROG} ${BINDIR}/${PROG}
+-
+ dist:
+ 	mkdir ../got-${GOT_VERSION}/${PROG}
+ 	cp ${SRCS} ${MAN} ../got-${GOT_VERSION}/${PROG}
diff --git a/devel/got/files/patch-lib_repository__admin.c b/devel/got/files/patch-lib_repository__admin.c
new file mode 100644
index 000000000000..347d9f4d0a78
--- /dev/null
+++ b/devel/got/files/patch-lib_repository__admin.c
@@ -0,0 +1,10 @@
+--- lib/repository_admin.c.orig	2021-06-23 15:24:57 UTC
++++ lib/repository_admin.c
+@@ -22,6 +22,7 @@
+ #include <sys/wait.h>
+ 
+ #include <dirent.h>
++#include <endian.h>
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdint.h>
diff --git a/devel/got/files/patch-lib_worktree.c b/devel/got/files/patch-lib_worktree.c
deleted file mode 100644
index a8fe9ecc7731..000000000000
--- a/devel/got/files/patch-lib_worktree.c
+++ /dev/null
@@ -1,102 +0,0 @@
-https://git.gameoftrees.org/gitweb/?p=got.git;a=commitdiff;h=c6e8a8268ec4f4240d51dcfd54d05c5370060747
-
---- lib/worktree.c.orig	2021-04-06 19:21:25 UTC
-+++ lib/worktree.c
-@@ -1246,14 +1246,16 @@ install_blob(struct got_worktree *worktree, const char
-  * safe location in the work tree!
-  */
- static const struct got_error *
--replace_existing_symlink(const char *ondisk_path, const char *target_path,
--    size_t target_len)
-+replace_existing_symlink(int *did_something, const char *ondisk_path,
-+    const char *target_path, size_t target_len)
- {
- 	const struct got_error *err = NULL;
- 	ssize_t elen;
- 	char etarget[PATH_MAX];
- 	int fd;
- 
-+	*did_something = 0;
-+
- 	/*
- 	 * "Bad" symlinks (those pointing outside the work tree or into the
- 	 * .got directory) are installed in the work tree as a regular file
-@@ -1277,6 +1279,7 @@ replace_existing_symlink(const char *ondisk_path, cons
- 			return NULL; /* nothing to do */
- 	}
- 
-+	*did_something = 1;
- 	err = update_symlink(ondisk_path, target_path, target_len);
- 	if (fd != -1 && close(fd) == -1 && err == NULL)
- 		err = got_error_from_errno2("close", ondisk_path);
-@@ -1398,7 +1401,6 @@ install_symlink(int *is_bad_symlink, struct got_worktr
- 
- 	if (*is_bad_symlink) {
- 		/* install as a regular file */
--		*is_bad_symlink = 1;
- 		got_object_blob_rewind(blob);
- 		err = install_blob(worktree, ondisk_path, path,
- 		    GOT_DEFAULT_FILE_MODE, GOT_DEFAULT_FILE_MODE, blob,
-@@ -1409,20 +1411,26 @@ install_symlink(int *is_bad_symlink, struct got_worktr
- 
- 	if (symlink(target_path, ondisk_path) == -1) {
- 		if (errno == EEXIST) {
-+			int symlink_replaced;
- 			if (path_is_unversioned) {
- 				err = (*progress_cb)(progress_arg,
- 				    GOT_STATUS_UNVERSIONED, path);
- 				goto done;
- 			}
--			err = replace_existing_symlink(ondisk_path,
--			    target_path, target_len);
-+			err = replace_existing_symlink(&symlink_replaced,
-+			    ondisk_path, target_path, target_len);
- 			if (err)
- 				goto done;
- 			if (progress_cb) {
--				err = (*progress_cb)(progress_arg,
--				    reverting_versioned_file ?
--				    GOT_STATUS_REVERT : GOT_STATUS_UPDATE,
--				    path);
-+				if (symlink_replaced) {
-+					err = (*progress_cb)(progress_arg,
-+					    reverting_versioned_file ?
-+					    GOT_STATUS_REVERT :
-+					    GOT_STATUS_UPDATE, path);
-+				} else {
-+					err = (*progress_cb)(progress_arg,
-+					    GOT_STATUS_EXISTS, path);
-+				}
- 			}
- 			goto done; /* Nothing else to do. */
- 		}
-@@ -1930,11 +1938,19 @@ update_blob(struct got_worktree *worktree,
- 		goto done;
- 	}
- 
--	if (ie && status != GOT_STATUS_MISSING &&
--	    (te->mode & S_IXUSR) == (sb.st_mode & S_IXUSR)) {
-+	if (ie && status != GOT_STATUS_MISSING && S_ISREG(sb.st_mode) &&
-+	    (S_ISLNK(te->mode) ||
-+	    (te->mode & S_IXUSR) == (sb.st_mode & S_IXUSR))) {
-+		/*
-+		 * This is a regular file or an installed bad symlink.
-+		 * If the file index indicates that this file is already
-+		 * up-to-date with respect to the repository we can skip
-+		 * updating contents of this file.
-+		 */
- 		if (got_fileindex_entry_has_commit(ie) &&
- 		    memcmp(ie->commit_sha1, worktree->base_commit_id->sha1,
- 		    SHA1_DIGEST_LENGTH) == 0) {
-+			/* Same commit. */
- 			err = sync_timestamps(worktree->root_fd,
- 			    path, status, ie, &sb);
- 			if (err)
-@@ -1946,6 +1962,7 @@ update_blob(struct got_worktree *worktree,
- 		if (got_fileindex_entry_has_blob(ie) &&
- 		    memcmp(ie->blob_sha1, te->id.sha1,
- 		    SHA1_DIGEST_LENGTH) == 0) {
-+			/* Different commit but the same blob. */
- 			err = sync_timestamps(worktree->root_fd,
- 			    path, status, ie, &sb);
- 			goto done;
diff --git a/devel/got/files/patch-regress_cmdline_Makefile b/devel/got/files/patch-regress_cmdline_Makefile
index 11d7899d9faf..445ae5377614 100644
--- a/devel/got/files/patch-regress_cmdline_Makefile
+++ b/devel/got/files/patch-regress_cmdline_Makefile
@@ -1,8 +1,8 @@
---- regress/cmdline/Makefile.orig	2020-10-21 11:24:20 UTC
+--- regress/cmdline/Makefile.orig	2021-06-22 19:37:49 UTC
 +++ regress/cmdline/Makefile
-@@ -80,4 +80,6 @@ fetch:
- tree:
- 	./tree.sh -q -r "$(GOT_TEST_ROOT)"
+@@ -83,4 +83,6 @@ tree:
+ pack:
+ 	./pack.sh -q -r "$(GOT_TEST_ROOT)"
  
 -.include <bsd.regress.mk>
 +regress: ${REGRESS_TARGETS} .PHONY .SILENT
diff --git a/devel/got/pkg-plist b/devel/got/pkg-plist
index f5107f44ec1b..1d2131116994 100644
--- a/devel/got/pkg-plist
+++ b/devel/got/pkg-plist
@@ -1,4 +1,5 @@
 bin/got
+bin/gotadmin
 bin/tog
 libexec/got-fetch-pack
 libexec/got-index-pack
@@ -11,6 +12,7 @@ libexec/got-read-pack
 libexec/got-read-tag
 libexec/got-read-tree
 man/man1/got.1.gz
+man/man1/gotadmin.1.gz
 man/man1/tog.1.gz
 man/man5/git-repository.5.gz
 man/man5/got-worktree.5.gz


More information about the dev-commits-ports-main mailing list