devel/git: Update to 2.38.0

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Renato Botelho
2022-10-03 17:50:18 -03:00
parent b098de65c5
commit 4807b6c44b
5 changed files with 43 additions and 140 deletions
+3 -5
View File
@@ -1,5 +1,5 @@
PORTNAME= git
DISTVERSION= 2.37.3
DISTVERSION= 2.38.0
CATEGORIES= devel
MASTER_SITES= KERNEL_ORG/software/scm/git
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@@ -118,6 +118,7 @@ PERL_MAKE_ARGS_OFF= NO_PERL=1
GITWEB_IMPLIES= PERL
GITWEB_RUN_DEPENDS= p5-CGI>=0:www/p5-CGI
GITWEB_MAKE_ARGS_OFF= NO_GITWEB=1
PCRE2_LIB_DEPENDS= libpcre2-8.so:devel/pcre2
PCRE2_CONFIGURE_WITH= libpcre
@@ -218,7 +219,6 @@ post-patch:
@${REINPLACE_CMD} -e '/git-cvsexportcommit.perl/d; \
/git-cvsimport.perl/d; \
/git-cvsserver.perl/d; \
/documented,gitcvs-migration/d; \
s/git-cvsserver//' \
${WRKSRC}/Makefile
.endif
@@ -239,9 +239,7 @@ post-patch-CONTRIB-on:
@${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL}," \
${WRKSRC}/contrib/diff-highlight/Makefile
post-patch-GITWEB-off:
@${REINPLACE_CMD} -e '/$$(MAKE) -C gitweb install/d' \
${WRKSRC}/Makefile
post-patch-GITWEB-on:
@${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL}," \
${WRKSRC}/t/lib-gitweb.sh
+7 -7
View File
@@ -1,10 +1,10 @@
TIMESTAMP = 1662131766
SHA256 (git-2.37.3.tar.xz) = 814641d7f61659cfbc17825d0462499ca1403e39ff53d76a8512050e6483e87a
SIZE (git-2.37.3.tar.xz) = 6987464
SHA256 (git-manpages-2.37.3.tar.xz) = 9c5373549ae6131d4fc7bc04f6e064e33f5038710aacfb65c95e78e479927414
SIZE (git-manpages-2.37.3.tar.xz) = 510096
SHA256 (git-htmldocs-2.37.3.tar.xz) = abbc43fe994622bc414d4d1282a84ebe665e49fe03ea944a67a9b905821874c2
SIZE (git-htmldocs-2.37.3.tar.xz) = 1447620
TIMESTAMP = 1664821157
SHA256 (git-2.38.0.tar.xz) = 923eade26b1814de78d06bda8e0a9f5da8b7c4b304b3f9050ffb464f0310320a
SIZE (git-2.38.0.tar.xz) = 7086664
SHA256 (git-manpages-2.38.0.tar.xz) = 4820d9056a8bfe0d54d48464b715da2e30212645ac4d7021f850d3c56136d6e3
SIZE (git-manpages-2.38.0.tar.xz) = 553512
SHA256 (git-htmldocs-2.38.0.tar.xz) = 704826a1bc8c80505f85658724f71be1a84373a784e8f982bdf60fcbb2d1d6ad
SIZE (git-htmldocs-2.38.0.tar.xz) = 1478392
SHA256 (0001-refs-extract-packed_refs_delete_refs-to-allow-contro.patch) = c9c6b619d43ee49ac9beff22ec722a2a8a6a704a8039dc3de4dbfa1f89f77d34
SIZE (0001-refs-extract-packed_refs_delete_refs-to-allow-contro.patch) = 5453
SHA256 (0002-refs-allow-passing-flags-when-beginning-transactions.patch) = 95df2fc83975b5fb0f1ba871163cb9e28319639eea34d1eb5d74dd15ed64f78e
+10 -9
View File
@@ -1,6 +1,6 @@
--- Makefile.orig 2021-10-29 22:46:52 UTC
--- Makefile.orig 2022-10-02 23:02:46 UTC
+++ Makefile
@@ -517,16 +517,16 @@ GIT-VERSION-FILE: FORCE
@@ -542,17 +542,17 @@ bindir = $(prefix)/bin
prefix = $(HOME)
bindir = $(prefix)/bin
@@ -12,8 +12,9 @@
mergetoolsdir = $(gitexecdir)/mergetools
sharedir = $(prefix)/share
-gitwebdir = $(sharedir)/gitweb
-perllibdir = $(sharedir)/perl5
+gitwebdir = $(sharedir)/examples/git/gitweb
gitwebstaticdir = $(gitwebdir)/static
-perllibdir = $(sharedir)/perl5
+perllibdir = %%SITE_PERL%%
localedir = $(sharedir)/locale
template_dir = share/git-core/templates
@@ -22,7 +23,7 @@
ETC_GITCONFIG = $(sysconfdir)/gitconfig
ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes
lib = lib
@@ -551,8 +551,8 @@ DIFF = diff
@@ -577,8 +577,8 @@ INSTALL = install
TAR = tar
FIND = find
INSTALL = install
@@ -31,9 +32,9 @@
+TCL_PATH ?= tclsh
+TCLTK_PATH ?= wish
XGETTEXT = xgettext
MSGCAT = msgcat
MSGFMT = msgfmt
CURL_CONFIG = curl-config
@@ -1465,9 +1465,9 @@ EXTLIBS += -lz
@@ -1539,9 +1539,9 @@ ifndef NO_OPENSSL
ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
@@ -46,7 +47,7 @@
else
OPENSSL_LINK =
endif
@@ -2371,7 +2371,7 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
@@ -2442,7 +2442,7 @@ else # NO_PERL
chmod +x $@+ && \
mv $@+ $@
else # NO_PERL
@@ -55,7 +56,7 @@
$(QUIET_GEN) \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
@@ -2387,7 +2387,7 @@ ifndef NO_PYTHON
@@ -2458,7 +2458,7 @@ $(SCRIPT_PYTHON_GEN): % : %.py
$(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
$(SCRIPT_PYTHON_GEN): % : %.py
$(QUIET_GEN) \
@@ -64,7 +65,7 @@
$< >$@+ && \
chmod +x $@+ && \
mv $@+ $@
@@ -3015,7 +3015,7 @@ install: all
@@ -3238,7 +3238,7 @@ install: all
$(INSTALL) $(SCRIPTS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) $(INSTALL_STRIP) $(install_bindir_xprograms) '$(DESTDIR_SQ)$(bindir_SQ)'
-112
View File
@@ -1,112 +0,0 @@
[PATCH v2] gc: use temporary file for editing crontab
While cron is specified by POSIX, there are a wide variety of
implementations in use. On FreeBSD, the cron implementation requires a
file name argument: if the user wants to edit standard input, they must
specify "-". However, this notation is not specified by POSIX, allowing
the possibility that making such a change may break other, less common
implementations.
Since POSIX tells us that cron must accept a file name argument, let's
solve this problem by specifying a temporary file instead. This will
ensure that we work with the vast majority of implementations.
Note that because delete_tempfile closes the file for us, we should not
call fclose here on the handle, since doing so will introduce a double
free.
Reported-by: Renato Botelho <garga@FreeBSD.org>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
diff --git builtin/gc.c builtin/gc.c
index eeff2b760e..0d9e6dabef 100644
--- builtin/gc.c
+++ builtin/gc.c
@@ -2065,6 +2065,7 @@ static int crontab_update_schedule(int run_maintenance, int fd)
struct child_process crontab_edit = CHILD_PROCESS_INIT;
FILE *cron_list, *cron_in;
struct strbuf line = STRBUF_INIT;
+ struct tempfile *tmpedit = NULL;
get_schedule_cmd(&cmd, NULL);
strvec_split(&crontab_list.args, cmd);
@@ -2079,6 +2080,17 @@ static int crontab_update_schedule(int run_maintenance, int fd)
/* Ignore exit code, as an empty crontab will return error. */
finish_command(&crontab_list);
+ tmpedit = mks_tempfile_t(".git_cron_edit_tmpXXXXXX");
+ if (!tmpedit) {
+ result = error(_("failed to create crontab temporary file"));
+ goto out;
+ }
+ cron_in = fdopen_tempfile(tmpedit, "w");
+ if (!cron_in) {
+ result = error(_("failed to open temporary file"));
+ goto out;
+ }
+
/*
* Read from the .lock file, filtering out the old
* schedule while appending the new schedule.
@@ -2086,19 +2098,6 @@ static int crontab_update_schedule(int run_maintenance, int fd)
cron_list = fdopen(fd, "r");
rewind(cron_list);
- strvec_split(&crontab_edit.args, cmd);
- crontab_edit.in = -1;
- crontab_edit.git_cmd = 0;
-
- if (start_command(&crontab_edit))
- return error(_("failed to run 'crontab'; your system might not support 'cron'"));
-
- cron_in = fdopen(crontab_edit.in, "w");
- if (!cron_in) {
- result = error(_("failed to open stdin of 'crontab'"));
- goto done_editing;
- }
-
while (!strbuf_getline_lf(&line, cron_list)) {
if (!in_old_region && !strcmp(line.buf, BEGIN_LINE))
in_old_region = 1;
@@ -2132,14 +2131,22 @@ static int crontab_update_schedule(int run_maintenance, int fd)
}
fflush(cron_in);
- fclose(cron_in);
- close(crontab_edit.in);
-done_editing:
+ strvec_split(&crontab_edit.args, cmd);
+ strvec_push(&crontab_edit.args, get_tempfile_path(tmpedit));
+ crontab_edit.git_cmd = 0;
+
+ if (start_command(&crontab_edit)) {
+ result = error(_("failed to run 'crontab'; your system might not support 'cron'"));
+ goto out;
+ }
+
if (finish_command(&crontab_edit))
result = error(_("'crontab' died"));
else
fclose(cron_list);
+out:
+ delete_tempfile(&tmpedit);
return result;
}
diff --git t/helper/test-crontab.c t/helper/test-crontab.c
index e7c0137a47..2942543046 100644
--- t/helper/test-crontab.c
+++ t/helper/test-crontab.c
@@ -17,8 +17,8 @@ int cmd__crontab(int argc, const char **argv)
if (!from)
return 0;
to = stdout;
- } else if (argc == 2) {
- from = stdin;
+ } else if (argc == 3) {
+ from = fopen(argv[2], "r");
to = fopen(argv[1], "w");
} else
return error("unknown arguments");
+23 -7
View File
@@ -3,6 +3,7 @@ bin/git-receive-pack
bin/git-shell
bin/git-upload-archive
bin/git-upload-pack
bin/scalar
etc/bash_completion.d/git-completion.bash
%%PERL%%%%SITE_PERL%%/FromCPAN/Error.pm
%%PERL%%%%SITE_PERL%%/FromCPAN/Mail/Address.pm
@@ -61,6 +62,7 @@ libexec/git-core/git-credential-cache--daemon
libexec/git-core/git-credential-store
libexec/git-core/git-daemon
libexec/git-core/git-describe
libexec/git-core/git-diagnose
libexec/git-core/git-diff
libexec/git-core/git-diff-files
libexec/git-core/git-diff-index
@@ -185,6 +187,7 @@ libexec/git-core/git-var
libexec/git-core/git-verify-commit
libexec/git-core/git-verify-pack
libexec/git-core/git-verify-tag
libexec/git-core/git-version
libexec/git-core/git-web--browse
libexec/git-core/git-whatchanged
libexec/git-core/git-worktree
@@ -212,6 +215,7 @@ libexec/git-core/mergetools/tortoisemerge
libexec/git-core/mergetools/vimdiff
libexec/git-core/mergetools/winmerge
libexec/git-core/mergetools/xxdiff
libexec/git-core/scalar
man/man1/git-add.1.gz
man/man1/git-am.1.gz
man/man1/git-annotate.1.gz
@@ -246,6 +250,7 @@ man/man1/git-credential-store.1.gz
man/man1/git-credential.1.gz
man/man1/git-daemon.1.gz
man/man1/git-describe.1.gz
man/man1/git-diagnose.1.gz
man/man1/git-diff-files.1.gz
man/man1/git-diff-index.1.gz
man/man1/git-diff-tree.1.gz
@@ -365,11 +370,23 @@ man/man1/git-worktree.1.gz
man/man1/git-write-tree.1.gz
man/man1/git.1.gz
man/man1/gitweb.1.gz
man/man1/scalar.1.gz
man/man5/gitattributes.5.gz
man/man5/gitformat-bundle.5.gz
man/man5/gitformat-chunk.5.gz
man/man5/gitformat-commit-graph.5.gz
man/man5/gitformat-index.5.gz
man/man5/gitformat-pack.5.gz
man/man5/gitformat-signature.5.gz
man/man5/githooks.5.gz
man/man5/gitignore.5.gz
man/man5/gitmailmap.5.gz
man/man5/gitmodules.5.gz
man/man5/gitprotocol-capabilities.5.gz
man/man5/gitprotocol-common.5.gz
man/man5/gitprotocol-http.5.gz
man/man5/gitprotocol-pack.5.gz
man/man5/gitprotocol-v2.5.gz
man/man5/gitrepository-layout.5.gz
man/man5/gitweb.conf.5.gz
man/man7/gitcli.7.gz
@@ -716,6 +733,7 @@ man/man7/gitworkflows.7.gz
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.37.1.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.37.2.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.37.3.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.38.0.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.2.0.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.2.1.txt
%%HTMLDOCS%%%%DOCSDIR%%/RelNotes/2.2.2.txt
@@ -1223,7 +1241,12 @@ share/emacs/site-lisp/git/git.el
%%CONTRIB%%share/git-core/contrib/coccinelle/qsort.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/strbuf.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/swap.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/tests/free.c
%%CONTRIB%%share/git-core/contrib/coccinelle/tests/free.res
%%CONTRIB%%share/git-core/contrib/coccinelle/tests/unused.c
%%CONTRIB%%share/git-core/contrib/coccinelle/tests/unused.res
%%CONTRIB%%share/git-core/contrib/coccinelle/the_repository.pending.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/unused.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/xcalloc.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/xopen.cocci
%%CONTRIB%%share/git-core/contrib/coccinelle/xstrdup_or_null.cocci
@@ -1317,12 +1340,6 @@ share/emacs/site-lisp/git/git.el
%%CONTRIB%%share/git-core/contrib/remote-helpers/git-remote-hg
%%CONTRIB%%share/git-core/contrib/remotes2config.sh
%%CONTRIB%%share/git-core/contrib/rerere-train.sh
%%CONTRIB%%share/git-core/contrib/scalar/Makefile
%%CONTRIB%%share/git-core/contrib/scalar/README.md
%%CONTRIB%%share/git-core/contrib/scalar/scalar.c
%%CONTRIB%%share/git-core/contrib/scalar/scalar.txt
%%CONTRIB%%share/git-core/contrib/scalar/t/Makefile
%%CONTRIB%%share/git-core/contrib/scalar/t/t9099-scalar.sh
%%CONTRIB%%share/git-core/contrib/stats/git-common-hash
%%CONTRIB%%share/git-core/contrib/stats/mailmap.pl
%%CONTRIB%%share/git-core/contrib/stats/packinfo.pl
@@ -1376,5 +1393,4 @@ share/git-core/templates/info/exclude
%%NLS%%share/locale/vi/LC_MESSAGES/git.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/git.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/git.mo
%%CONTRIB%%@dir share/git-core/contrib/scalar/.depend
@dir share/git-core/templates/branches