Work around gpg-agent issues in the test suite
GnuPG2 requires gpg-agent and tries to start it on demand. The agent uses a socket for communication and the path to this socket must be shorter than sun_path [108 characters, per unix(7)]. Adjust the location of the temporary directories used by the test suite by passing the --root option via GIT_TEST_OPTS. One potential downside to this is that we use mktemp to create the directory and this will differ between builds. If/when we want to make our builds entirely reproducible we will need to revisit this. With luck, gnupg will be better behaved by that time¹. An alternate solution I tested was to rename the two problematic tests (t5573 and t7612). This is a brittle solution as new tests may be added which cause the same path length issue for gpg-agent. Also drop the redundant killing of gpg-agent. This doesn't break anything but it can only slow the test suite (however slightly). ¹ A ticket was filed to improve gpg-agent's handling of long paths in GNUPGHOME (but it's nearly 2 years old): https://dev.gnupg.org/T2964.
This commit is contained in:
parent
a74fadafe7
commit
c9d5e18948
12
git.spec
12
git.spec
@ -778,6 +778,14 @@ export GIT_TEST_GIT_DAEMON=true
|
||||
export GIT_TEST_HTTPD=true
|
||||
export GIT_TEST_SVNSERVE=true
|
||||
|
||||
# Create tmpdir for test output and update GIT_TEST_OPTS
|
||||
# Also update GIT-BUILD-OPTIONS to keep make from any needless rebuilding
|
||||
testdir=$(mktemp -d -p /tmp git-t.XXXX)
|
||||
sed -i "s@^GIT_TEST_OPTS = .*@& --root=$testdir@" config.mak
|
||||
touch -r GIT-BUILD-OPTIONS ts
|
||||
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
|
||||
|
||||
@ -787,6 +795,9 @@ mv netrc contrib/credential/
|
||||
make -C contrib/credential/netrc/ test || \
|
||||
make -C contrib/credential/netrc/ testverbose
|
||||
|
||||
# Clean up test dir
|
||||
rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
|
||||
%if %{use_systemd}
|
||||
%post daemon
|
||||
%systemd_post git@.service
|
||||
@ -936,6 +947,7 @@ make -C contrib/credential/netrc/ testverbose
|
||||
- Add additional BuildRequires for i18n locales used in tests
|
||||
- Replace gitweb home-link with inline sed
|
||||
- Add gnupg2-smime and perl JSON BuildRequires for tests
|
||||
- Work around gpg-agent issues in the test suite
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user