update to 2.36.0-rc0

The %_package_note_file definition added in 1dc07e7 (set path to linker
script in %_package_note_file, 2022-01-24) does not support release
candidates.  Fix it.

Add 'fsmonitor--daemon is not supported on this platform' and 'missing
!REFFILES' to  git.skip-test-patterns to match new test prerequisites
which are not relevant for our builds.

Adjust number of t5541 "push 2000 tags over http" test.  It was shifted
from 35 to 36 by upstream c36c62859a (tests: use "test_hook" for misc
"mkdir -p" and "chmod" cases, 2022-03-17).

Replace `%__make test` with `%__make -C t all` to avoid re-compiling in
%check.  This is an issue I have yet to fully diagnose.  I suspect that
it is related to the nice work Ævar Arnfjörð Bjarmason has done upstream
to improve the efficiency and correctness of the build process.  Work
around it for the moment.

Release notes:
https://github.com/git/git/raw/v2.36.0-rc0/Documentation/RelNotes/2.36.0.txt
This commit is contained in:
Todd Zullinger 2022-04-04 23:43:05 -04:00
parent 9e214cd4d0
commit 0b5afcebda
9 changed files with 120 additions and 216 deletions

View File

@ -0,0 +1,102 @@
From f3ea4bed2acb129db66c4c9a22dae71576d58066 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Wed, 6 Apr 2022 14:41:22 -0400
Subject: [PATCH] doc: replace "--" with {litdd} in credential-cache/fsmonitor
Asciidoc renders `--` as em-dash. This is not appropriate for command
names. It also breaks linkgit links to these commands.
Fix git-credential-cache--daemon and git-fsmonitor--daemon. The latter
was added 3248486920 (fsmonitor: document builtin fsmonitor, 2022-03-25)
and included several links. A check for broken links in the HTML docs
turned this up.
Manually inspecting the other Documentation/git-*--*.txt files turned up
the issue in git-credential-cache--daemon.
While here, quote `git credential-cache--daemon` in the synopsis to
match the vast majority of our other documentation.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/config/core.txt | 2 +-
Documentation/git-credential-cache--daemon.txt | 6 +++---
Documentation/git-fsmonitor--daemon.txt | 12 ++++++------
Documentation/git-update-index.txt | 2 +-
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt
index 889522956e45bb..e67392cc838499 100644
--- a/Documentation/config/core.txt
+++ b/Documentation/config/core.txt
@@ -63,7 +63,7 @@ core.protectNTFS::
core.fsmonitor::
If set to true, enable the built-in file system monitor
- daemon for this working directory (linkgit:git-fsmonitor--daemon[1]).
+ daemon for this working directory (linkgit:git-fsmonitor{litdd}daemon[1]).
+
Like hook-based file system monitors, the built-in file system monitor
can speed up Git commands that need to refresh the Git index
diff --git a/Documentation/git-credential-cache--daemon.txt b/Documentation/git-credential-cache--daemon.txt
index 7051c6bdf8f542..01e1c214dd82e1 100644
--- a/Documentation/git-credential-cache--daemon.txt
+++ b/Documentation/git-credential-cache--daemon.txt
@@ -1,5 +1,5 @@
-git-credential-cache--daemon(1)
-===============================
+git-credential-cache{litdd}daemon(1)
+====================================
NAME
----
@@ -8,7 +8,7 @@ git-credential-cache--daemon - Temporarily store user credentials in memory
SYNOPSIS
--------
[verse]
-git credential-cache--daemon [--debug] <socket>
+'git credential-cache{litdd}daemon' [--debug] <socket>
DESCRIPTION
-----------
diff --git a/Documentation/git-fsmonitor--daemon.txt b/Documentation/git-fsmonitor--daemon.txt
index 0fedf5a4565f79..cc142fb8612c72 100644
--- a/Documentation/git-fsmonitor--daemon.txt
+++ b/Documentation/git-fsmonitor--daemon.txt
@@ -1,5 +1,5 @@
-git-fsmonitor--daemon(1)
-========================
+git-fsmonitor{litdd}daemon(1)
+=============================
NAME
----
@@ -8,10 +8,10 @@ git-fsmonitor--daemon - A Built-in File System Monitor
SYNOPSIS
--------
[verse]
-'git fsmonitor--daemon' start
-'git fsmonitor--daemon' run
-'git fsmonitor--daemon' stop
-'git fsmonitor--daemon' status
+'git fsmonitor{litdd}daemon' start
+'git fsmonitor{litdd}daemon' run
+'git fsmonitor{litdd}daemon' stop
+'git fsmonitor{litdd}daemon' status
DESCRIPTION
-----------
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 64315e2e8c2d3f..5ea2f2c60e45a3 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -528,7 +528,7 @@ This feature is intended to speed up git operations for repos that have
large working directories.
It enables git to work together with a file system monitor (see
-linkgit:git-fsmonitor--daemon[1]
+linkgit:git-fsmonitor{litdd}daemon[1]
and the
"fsmonitor-watchman" section of linkgit:githooks[5]) that can
inform it as to what files have been modified. This enables git to avoid

View File

@ -1,47 +0,0 @@
From e155951262e6dea419db8b9010342b08b487f96a Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Thu, 25 Nov 2021 05:05:08 -0500
Subject: [PATCH] t/lib-gpg: use --with-colons when parsing gpgsm output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The output of `gpgsm -K` changed in gnupg-2.3¹, breaking the parsing
used by the GPGSM prereq.
Use the `--with-colons` options for stable, machine-parseable output.
This allows the grep/cut/tr pipeline (and the subsequent echo which
appends ' S relax') to be replaced with a single call to awk to create
the ${GNUPGHOME}/trustlist.txt file.
¹ https://dev.gnupg.org/rGe7d70923901e is the change in 2.3, while
https://dev.gnupg.org/rG9c57de75cf36 is the similar change in 2.2.
The latter says: Here in 2.2 we keep the string "fingerprint:" and no
not change it to "sha1 fpr" as we did in master (2.3). (sic)
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
t/lib-gpg.sh | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index a3f285f515..cbbf74e725 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -72,12 +72,10 @@ test_lazy_prereq GPGSM '
--passphrase-fd 0 --pinentry-mode loopback \
--import "$TEST_DIRECTORY"/lib-gpg/gpgsm_cert.p12 &&
- gpgsm --homedir "${GNUPGHOME}" -K |
- grep fingerprint: |
- cut -d" " -f4 |
- tr -d "\\n" >"${GNUPGHOME}/trustlist.txt" &&
+ gpgsm --homedir "${GNUPGHOME}" -K --with-colons |
+ awk -F ":" "/^fpr:/ {printf \"%s S relax\\n\", \$10}" \
+ >"${GNUPGHOME}/trustlist.txt" &&
- echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
-u committer@example.com -o /dev/null --sign -
'

View File

@ -1,31 +0,0 @@
From 93299b9b221da01d4055528f7c760d04ee83b82b Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Thu, 25 Nov 2021 08:07:32 -0500
Subject: [PATCH] t/lib-gpg: reload gpg components after updating trustlist
With gpgsm from gnupg-2.3, the changes to the trustlist.txt do not
appear to be picked up without refreshing the gpg-agent. Use the 'all'
keyword to reload all of the gpg components. The scdaemon is started as
a child of gpg-agent, for example.
We used to have a --kill at this spot, but I removed it in 2e285e7803
(t/lib-gpg: drop redundant killing of gpg-agent, 2019-02-07). It seems
like it might be necessary (again) for 2.3.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
t/lib-gpg.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index cbbf74e725..d675698a2d 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -75,6 +75,7 @@ test_lazy_prereq GPGSM '
gpgsm --homedir "${GNUPGHOME}" -K --with-colons |
awk -F ":" "/^fpr:/ {printf \"%s S relax\\n\", \$10}" \
>"${GNUPGHOME}/trustlist.txt" &&
+ (gpgconf --reload all || : ) &&
echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
-u committer@example.com -o /dev/null --sign -

View File

@ -1,40 +0,0 @@
From da340dd76714474126f73f6b53087da0ffd4e8d8 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Fri, 26 Nov 2021 21:11:54 -0500
Subject: [PATCH] t/lib-gpg: kill all gpg components, not just gpg-agent
The gpg-agent is one of several processes that newer releases of GnuPG
start automatically. Issue a kill to each of them to ensure they do not
affect separate tests. (Yes, the separate GNUPGHOME should do that
already. If we find that is case, we could drop the --kill entirely.)
In terms of compatibility, the 'all' keyword was added to the --kill &
--reload options in GnuPG 2.1.18. Debian and RHEL are often used as
indicators of how a change might affect older systems we often try to
support.
- Debian Strech (old old stable), which has limited security support
until June 2022, has GnuPG 2.1.18 (or 2.2.x in backports).
- CentOS/RHEL 7, which is supported until June 2024, has GnuPG
2.0.22, which lacks the --kill option, so the change won't have
any impact.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
t/lib-gpg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
index d675698a2d..2bb309a8c1 100644
--- a/t/lib-gpg.sh
+++ b/t/lib-gpg.sh
@@ -40,7 +40,7 @@ test_lazy_prereq GPG '
# > lib-gpg/ownertrust
mkdir "$GNUPGHOME" &&
chmod 0700 "$GNUPGHOME" &&
- (gpgconf --kill gpg-agent || : ) &&
+ (gpgconf --kill all || : ) &&
gpg --homedir "${GNUPGHOME}" --import \
"$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
gpg --homedir "${GNUPGHOME}" --import-ownertrust \

View File

@ -1,33 +0,0 @@
From d1efcac68414b80cc0fd7b7e3b4781f313d98697 Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Sat, 27 Nov 2021 05:31:13 -0500
Subject: [PATCH] t4202: match gpgsm output from GnuPG 2.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In GnuPG 2.3, the output from gpgsm when a certificate is not found
differs from that of earlier versions. This appears to be a bug¹, but
there are several releases in use now which have this output. Extend
the grep pattern to catch it rather than failing the test.
¹ https://lists.gnupg.org/pipermail/gnupg-devel/2021-November/034991.html
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
t/t4202-log.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/t4202-log.sh b/t/t4202-log.sh
index 7884e3d46b..c69f9ac469 100755
--- a/t/t4202-log.sh
+++ b/t/t4202-log.sh
@@ -1851,7 +1851,7 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss
git merge --no-ff -m msg signed_tag_x509_nokey &&
GNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual &&
grep "^|\\\ merged tag" actual &&
- grep "^| | gpgsm: certificate not found" actual
+ grep -Ei "^| | gpgsm:( failed to find the)? certificate:? not found" actual
'
test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' '

View File

@ -1,48 +0,0 @@
From edb5eafc9945b2d400c2d777a9750cee06ab500f Mon Sep 17 00:00:00 2001
From: Todd Zullinger <tmz@pobox.com>
Date: Sat, 27 Nov 2021 02:55:47 -0500
Subject: [PATCH] gpg-interface: match SIG_CREATED if it's the first line
In `sign_buffer_gpg`, "\n[GNUPG:] SIG_CREATED " in the gpg status output
is used to signal a successful signature. This fails if "SIG_CREATED"
is the first line in the gpg output, as is the case with `gpgsm` in
GnuPG 2.3.
In earlier versions of GnuPG, there was a debug line in the `gpgsm`
output which allowed the check in `sign_buffer_gpg` to work. This debug
line was removed from GnuPG in a6d2f3133 (sm: Replace some debug message
by log_error or log_info, 2020-04-21).
The result is the `gpgsm --status-fd` output for a signing operation
starts with "[GNUPG:] SIG_CREATED" and we mistakenly report "gpg failed
to sign the data" to the user. The `gpg` command has other `[GNUPG:]`
output for signing operations, so it is not affected by this issue.
It's best not to rely on something as subtle and out of our control as
the order if the gnupg status messages.
This likely went unnoticed because the GPGSM test prereq was failing for
a different reason with GnuPG 2.3. No tests failed, they were simply
skipped due to the missing GPGSM prereq.
Signed-off-by: Todd Zullinger <tmz@pobox.com>
---
gpg-interface.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gpg-interface.c b/gpg-interface.c
index 3e7255a2a9..d179dfb3ab 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -859,6 +859,12 @@ static int sign_buffer_gpg(struct strbuf *buffer, struct strbuf *signature,
bottom = signature->len;
+ /*
+ * Ensure gpg_status begins with a newline or we'll fail to match if
+ * the SIG_CREATED line is at the start of the gpg output.
+ */
+ strbuf_addch(&gpg_status, '\n');
+
/*
* When the username signingkey is bad, program could be terminated
* because gpg exits without reading and then write gets SIGPIPE.

View File

@ -1,5 +1,6 @@
expensive 2GB clone test; enable with GIT_TEST_CLONE_2GB=true
filesystem does not corrupt utf-8
fsmonitor--daemon is not supported on this platform
GIT_SKIP_TESTS
missing AUTOIDENT
missing CASE_INSENSITIVE_FS
@ -11,6 +12,7 @@ missing MINGW
missing NATIVE_CRLF
missing !PCRE
missing !PTHREADS
missing !REFFILES
missing RFC1991
missing RUNTIME_PREFIX
missing SYMLINKS_WINDOWS

View File

@ -76,15 +76,15 @@
%global _hardened_build 1
%endif
# Set path to the package-notes linker script
%global _package_note_file %{_builddir}/%{name}-%{version}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld
# Define for release candidates
#global rcrev .rc0
%global rcrev .rc0
# Set path to the package-notes linker script
%global _package_note_file %{_builddir}/%{name}-%{version}%{?rcrev}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld
Name: git
Version: 2.35.1
Release: 1%{?rcrev}%{?dist}
Version: 2.36.0
Release: 0.0%{?rcrev}%{?dist}
Summary: Fast Version Control System
License: GPLv2
URL: https://git-scm.com/
@ -116,12 +116,8 @@ Source99: print-failed-test-output
# https://bugzilla.redhat.com/490602
Patch0: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
# Fix a few tests and issues with gnupg-2.3
Patch1: 0001-t-lib-gpg-use-with-colons-when-parsing-gpgsm-output.patch
Patch2: 0002-t-lib-gpg-reload-gpg-components-after-updating-trust.patch
Patch3: 0003-t-lib-gpg-kill-all-gpg-components-not-just-gpg-agent.patch
Patch4: 0004-t4202-match-gpgsm-output-from-GnuPG-2.3.patch
Patch5: 0005-gpg-interface-match-SIG_CREATED-if-it-s-the-first-li.patch
# https://lore.kernel.org/git/20220406184122.4126898-1-tmz@pobox.com/
Patch1: https://github.com/git/git/commit/f3ea4bed2.patch#/0001-doc-replace-with-litdd-in-credential-cache-fsmonitor.patch
%if %{with docs}
# pod2man is needed to build Git.3pm
@ -826,9 +822,9 @@ GIT_SKIP_TESTS=""
#
# The following 2 tests use run_with_limited_cmdline, which calls ulimit -s 128
# to limit the maximum stack size.
# t5541.35 'push 2000 tags over http'
# t5541.36 'push 2000 tags over http'
# t5551.25 'clone the 2,000 tag repo to check OS command line overflow'
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.35 t5551.25"
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.36 t5551.25"
%endif
# endif aarch64 %%{arm} %%{power64}
@ -866,7 +862,7 @@ sed -i "s@\(GIT_TEST_OPTS='.*\)'@\1 --root=$testdir'@" GIT-BUILD-OPTIONS
touch -r ts GIT-BUILD-OPTIONS
# Run the tests
%__make test || ./print-failed-test-output
%__make -C t all || ./print-failed-test-output
# Run contrib/credential/netrc tests
mkdir -p contrib/credential
@ -1018,6 +1014,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
* Tue Apr 05 2022 Todd Zullinger <tmz@pobox.com> - 2.36.0-0.0.rc0
- update to 2.36.0-rc0
* Sat Jan 29 2022 Todd Zullinger <tmz@pobox.com> - 2.35.1-1
- update to 2.35.1

View File

@ -1,2 +1,2 @@
SHA512 (git-2.35.1.tar.xz) = 926c6813ef61931e1a1c43dfd7b15e20dc5878c1752876bd08f039249c9ed09f20f096b2f01947de9c9522c942e9fa8c1363d7d31a488bbe3f93c0cff31fcbcb
SHA512 (git-2.35.1.tar.sign) = 27adbb0628a18ae13ce76c2812c2f2a8a9da002105ca1f550a864ae769a27efa697ab7cbd8582e69be99d8731fe2f53895321c3a71990ffbcfe1e7f2064fd9b7
SHA512 (git-2.36.0.rc0.tar.xz) = 7417784582f17e9579fbae984a175af814ff6bd9b28b48d0405b8c4342566a4e138df0f544ee7fbccf25419a50c3848fb9d0830feb9848a2f41cae2c969989c4
SHA512 (git-2.36.0.rc0.tar.sign) = f1c8217687c993a32a3b8b38cde242440e6c3de4093dffd68bd9d483f103d20701856254e9bc92c2945c75405dd2c67e4c66076c05b469bbf4b21b7752888358