The `BuildRequires: systemd` was added in d7389e7 (use systemd instead
of xinetd (bz 737183), 2013-04-30). Since then, the systemd macros have
been split into a subpackage¹. Adjust our BuildRequires (with an
exception for EL-7).
Replace `Requires*: systemd` in git-daemon with %{?systemd_requires}.
¹ https://src.fedoraproject.org/rpms/systemd/c/c9030f0 (Split out the
rpm macros into systemd-rpm-macros subpackage, 2018-11-02),
From the release notes for 2.30.5¹:
This release contains minor fix-ups for the changes that went into
Git 2.30.3 and 2.30.4, addressing CVE-2022-29187.
* The safety check that verifies a safe ownership of the Git
worktree is now extended to also cover the ownership of the Git
directory (and the `.git` file, if there is any).
Carlo Marcelo Arenas Belón (1):
setup: tighten ownership checks post CVE-2022-24765
Additionally, from the release notes for 2.37.1²:
* Rewrite of "git add -i" in C that appeared in Git 2.25 didn't
correctly record a removed file to the index, which is an old
regression but has become widely known because the C version has
become the default in the latest release.
¹ https://github.com/git/git/raw/v2.37.1/Documentation/RelNotes/2.30.5.txt
² https://github.com/git/git/raw/v2.37.1/Documentation/RelNotes/2.37.1.txt
The emacs bcond support was added cdea01a (drop emacs-git stub for
fedora >= 34 (#1882360), 2020-10-10). Now that Fedora 34 is EOL, we no
longer need the conditional.
The GIT_SKIP_TESTS variable does not support brace expansion. It was my
mistake thinking that it did. List the tests to skip properly.
If we had a longer list and *really* wanted to use brace expansion, we
could do something like this:
GIT_SKIP_TESTS="$GIT_SKIP_TESTS $(echo t5300.{10,12,14} t5303.{5,7,11} t6300.{35,91,92})"
In this case, that's more characters _and_ more complexity, so it makes
no sense to use it. (Even if it were shorter, it doesn't necessarily
justify the extra complexity.)
Expand the list of tests to skip to cover those which fail due to the
earlier skipped tests.
Additionally, GIT_SKIP_TESTS is (unintentionally) set on systems other
than EL8. Fix the conditional to only skip these tests on s390x on EL8.
Per the release announcement¹, these patches...
address usability issues in the recent releases 'v2.35.2',
'v2.34.2', 'v2.33.2', 'v2.32.1', 'v2.31.2', and 'v2.30.3', where
each "safe" directory has to be listed on the safe.directory
configuration variables. A broader escape hatch has been added so
that the value '*' can be used to declare "my colleagues and their
repositories I may ever visit are all trustworthy".
¹ https://lore.kernel.org/git/xmqq1qy04iqa.fsf@gitster.g/
These tests fail on s390x, but only with EL8. They succeed on Fedora
and EL9. This suggests the issue is not with git. Skip them to avoid
blocking the Fedora releases which we care most about while still
allowing builds in COPR and elsewhere for all Fedora/EPEL releases.
Regarding CVE-2022-24765, the release announcement says:
On multi-user machines, Git users might find themselves
unexpectedly in a Git worktree, e.g. when another user created a
repository in `C:\.git`, in a mounted network drive or in a
scratch space. Merely having a Git-aware prompt that runs `git
status` (or `git diff`) and navigating to a directory which is
supposedly not a Git worktree, or opening such a directory in an
editor or IDE such as VS Code or Atom, will potentially run
commands defined by that other user.
The new `safe.directory` setting may be used in either the system or
global configuration to list directories which git should consider safe
even if they are owned by someone other than the current user.
Release notes:
https://github.com/git/git/raw/v2.36.0-rc2/Documentation/RelNotes/2.36.0.txt
The httpd package was slimmed down per rhbz#2070517. Use the new
httpd-core package for the test suite requirements on F37+.
While here, adjust a nearby '# endif' comment to match reality.
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
The package-notes feature¹ creates a linker script in %{buildsubdir}.
Unfortunately, %{buildsubdir} is not set in %prep, leaving us with an
incorrect path to the linker script. The build then fails with:
/usr/bin/ld: cannot open linker script file
/builddir/build/BUILD/.package_note-git-2.35.0-0.2.rc2.fc36.3.x86_64.ld:
No such file or directory
Set the path to the linker script via %_package_note_file, per
suggestion by Zbigniew Jędrzejewski-Szmek².
References:
¹ https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects
² https://bugzilla.redhat.com/2044028#c10
The scalar command is being worked on incrementally upstream.
As it matures, we may consider building and distributing it. Whether
that will happen before it graduates from contrib or not is anyone's
guess.
For the moment, remove it to avoid cruft in git-core-doc.
Git now requires C99 support and a zlib with uncompress2 by default.
On EL7, gcc-4.8.5 requires a flag to enable C99 support.
Compilation also fails without -fPIC on EL7, for reasons of which I am
not entirely clear. (I do not like making a change I cannot justify or
explain properly, but it is better than dropping EL7 support until I
have time to learn the reason(s).)
Update the %build_cflags macro when building on EL7 to enable C99
support and set -fPIC.
Define NO_UNCOMPRESS2 to use compat/zlib-uncompress2.c.
The git checkout command crashes when run multiple times, if
`.git/refs/remotes/origin/HEAD` is manually copied into
`.git/refs/heads/$branch-name`.
Strictly, this is repository corruption, but it has been silently
tolerated until upstream 9081a421 (checkout: fix "branch info" memory
leaks, 2021-11-16), which added some sanity checking of the data.
Loosen the check via Junio's upstream commit 519947b69a (checkout: avoid
BUG() when hitting a broken repository, 2022-01-21).
Add openssh-clients BuildRequires, for ssh-add. Upstream 350a2518c8
(ssh signing: support non ssh-* keytypes, 2021-11-19), added `ssh-add`
as a requirement of t7528-signed-commit-ssh's "sign commits using
literal public keys with ssh-agent" test.
Replace the openssh BR added in e8896ce (update to 2.34.0, 2021-11-15)
with openssh-clients. The latter requires the former.
Apply Taylor Blau's patch to fix a use-after-free bug in fmt-merge-msg¹.
Add `missing !LONG_IS_64BIT,EXPENSIVE` to git.skip-test-patterns. It is
used in t1051-large-conversion after upstream 596b5e77c9 (clean/smudge:
allow clean filters to process extremely large files, 2021-11-02).
Release notes:
https://github.com/git/git/raw/v2.35.0-rc0/Documentation/RelNotes/2.35.0.txt
¹ https://lore.kernel.org/git/CAHk-=whXPxWL7z3GiPkaDt+yygrRmagrYUnib7Lx=Vvrqx2ufg@mail.gmail.com/
The output of gpgsm changed slightly in gnupg-2.3, causing the git tests
for x509 signatures to be skipped. Update the tests to use the
machine-parseable --with-colons output.
It also appears that we need to reload the gpg-agent in order to pick up
the changes the test library makes to the trustlist.txt file. It might
be better to store that file with the other gpg files in the test suite
rather than generating it.
While we're at it, reload all the gpg components rather than just
gpg-agent. Adjust the earlier gpgconf kill to use the 'all' keyword as
well.
Next up, gpgsm removed a debug line from it's output which exposes a
problem in git's gpg-interface code. The git code presumes that the
'[GNUPG:] SIG_CREATED' line will follow a newline. That is no longer
true. The debug line was removed from GnuPG in a6d2f3133 (sm: Replace
some debug message by log_error or log_info, 2020-04-21).
Finally, a minor bug in gpgsm causes the error message returned when a
certificate is not found to differ from previous versions¹. Extend the
grep pattern in the test suite to catch both error messages.
¹ https://lists.gnupg.org/pipermail/gnupg-devel/2021-November/034991.html
Release notes:
https://github.com/git/git/raw/v2.34.0/Documentation/RelNotes/2.34.0.txt
Add `BuildRequires: openssh` for the `ssh-keygen` command; it is needed
to test the newly-added ssh signing support¹. Refer to the `gpg.format`
and `gpg.ssh.*` variables in git-config(1) for details.
[Unfortunately, openssh-8.7 has a bug in the requisite `ssh-keygen -Y
find-principals` command, which will limit the usefulness of this
feature on Fedora 35/36 until openssh is either rebased to 8.8 or the
patch² is backported. The git testsuite has been taught to skip the
tests when this bug is present, in upstream ca7a5bf4bd (t/lib-gpg: avoid
broken versions of ssh-keygen, 2021-11-10), but that won't help users
who try out this new feature. Hopefully we can get openssh-8.7 in
Fedora 35 & 36 patched or updated before too long.]
We have `Requires: openssh-clients` in git-core already. The
openssh-clients package requires openssh so we don't _need_ to add an
install-time requirement to ensure the `ssh-keygen` command is
available.
Ignore RUNTIME_PREFIX and SYMLINKS_WINDOWS test prerequisites when
looking for missing test suite BuildRequires³.
The RUNTIME_PREFIX prerequisite was added in b7d11a0f5d (tests: exercise
the RUNTIME_PREFIX feature, 2021-07-24)⁴. It is used to build binaries
which can be easily relocated, which we don't need in our builds.
The SYMLINKS_WINDOWS prerequisite was added in 3e7d4888e5 (mingw: align
symlinks-related rmdir() behavior with Linux, 2021-08-02)⁵. It is, as
the name implies, Windows-specific.
¹ https://github.com/git/git/commit/b5726a5d9c (ssh signing: preliminary
refactoring and clean-up, 2021-09-10) and the commits which follow.
² https://github.com/openssh/openssh-portable/commit/ca0e455b93,
https://github.com/openssh/openssh-portable/commit/4afe431da9, and
https://www.mail-archive.com/source-changes@openbsd.org/msg127496.html
(plus the replies, which point out the typo in the first patch)
³ fa92661 (Add grep patterns for checking skipped tests, 2019-02-02)
⁴ https://github.com/git/git/commit/b7d11a0f5d
⁵ https://github.com/git/git/commit/3e7d4888e5
There were a few dependencies missing prior to the change in git-2.33
which Ondřej fixed in the previous commit.
Of the few dependencies being added, only Email::Address and
Sys::Hostname weren't already pulled in by other dependencies when
installing git-email. They each have fallback options, so they aren't
critical to the function of the application. (We could use Recommends
here, if we wanted -- though neither pull in any additional packages at
this time.)
Resolves: rhbz#2020487
In git version 2.33.0, git-send-email.perl has optimized modules
loading[1]. This resulted in perl.req not detecting requires properly,
because it doesn't detect requires that are not at the start of new line.
This commit adds explicit Requires into the spec file.
[1]f4dc9432fd
contrib/hooks/multimail is no longer distributed with git
The multimail hook was removed from the git contrib tree. From the
upstream commit f74d11471f (multimail: stop shipping a copy,
2021-06-10):
The multimail project is developed independently and has its own project
page. Traditionally, we shipped a copy in contrib/.
However, such a copy is prone to become stale, and users are much better
served to be directed to the actual project instead.
Upstream commit 3b072c577b (tests: replace test_tristate with "git
env--helper", 2019-06-21) semi-broke the git-svn tests which require
httpd. This was subsequently fixed in upstream commit 6a20b62d7e
(t/lib-git-svn.sh: check GIT_TEST_SVN_HTTPD when running SVN HTTP tests,
2019-09-06).
The upstream fix also adjusted the variable name to follow the preferred
naming scheme, i.e. GIT_SVN_TEST_ -> GIT_TEST_SVN_. Fix the variable in
%check to indicate that we want those tests to run.
We were still running the tests because we had all the necessary
dependencies. But we want to ensure that we don't skip them
opportunistically if those dependencies ever change.
Update comment which suggest a method for (manually) checking such
variables in the test suite.
The Documentation/cmd-list.perl script requires File::Compare to
generate various cmds-$area.txt file which are included in the main git
help. This has been broken since File::Compare was split from the main
perl package in 3b63b8c (Subpackage File::Compare, 2020-01-06)¹.
The result is a broken git man/html page. In git(1), the output is:
HIGH-LEVEL COMMANDS (PORCELAIN)
We separate the porcelain commands into the main commands
and some ancillary user utilities.
Main porcelain commands
Unresolved directive in git.txt -
include::cmds-mainporcelain.txt[]
Ancillary Commands
Manipulators:
Unresolved directive in git.txt -
include::cmds-ancillarymanipulators.txt[]
Interrogators:
Unresolved directive in git.txt -
include::cmds-ancillaryinterrogators.txt[]
...
This is logged during the build:
make[1]: Entering directory '/builddir/build/BUILD/git-2.32.0.rc3/Documentation'
rm -f cmd-list.made && \
/usr/bin/perl ./cmd-list.perl ../command-list.txt cmds-ancillaryinterrogators.txt cmds-ancillarymanipulators.txt cmds-mainporcelain.txt cmds-plumbinginterrogators.txt cmds-plumbingmanipulators.txt cmds-synchingrepositories.txt cmds-synchelpers.txt cmds-guide.txt cmds-purehelpers.txt cmds-foreignscminterface.txt && \
date >cmd-list.made
Can't locate File/Compare.pm in @INC (you may need to install the File::Compare module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./cmd-list.perl line 3.
BEGIN failed--compilation aborted at ./cmd-list.perl line 3.
make[1]: Leaving directory '/builddir/build/BUILD/git-2.32.0.rc3/Documentation'
This should probably cause a make error rather than generating
incomplete documentation. I'll try to report this upstream (ideally
with a patch to resolve it). It's also worth remembering to search the
build logs for such failures. "Can't locate .* in @INC" and "BEGIN
failed" are good strings to search.
¹ https://src.fedoraproject.org/rpms/perl/c/3b63b8c
With the impending removal of a large chunk of the Java package set,
jgit will become unavailable as a BuildRequires in Fedora soon. Remove
the build dependency on Fedora >= 35.
As noted in 8faf622 (drop jgit BR on Fedora > 30, 2019-07-29), this
affects 3 tests, 2 for packfile format (t5310-pack-bitmaps) and
1 of ls-remote (t5512-ls-remote).
The NEEDS_CRYPTO_WITH_SSL Makefile knob was added in 7878348 (Update to
git-1.7.0 - Link imap-send with libcrypto (#565147) - Disable building
of unused python remote helper libs, 2010-02-15). It is no longer
needed.
I'm not sure when it stopped being necessary, though I am sure I tried
removing once before in the 11 years since it was added.
Builds on Fedora and EL7/EL8 all properly pick up the -lssl -lcrypto
flags when compiling git-imap-send.
Incidentally, git-imap-send has used libcurl for handling IMAP rather
than low-level OpenSSL-based functions on Fedora since upstream commit
dbba42bb32 (imap-send: use curl by default when possible, 2017-09-14).
This applies to EL8 as well. On EL7, libcurl is too old (>= 7.34.0 is
required).
The git-p4 subpackage has been disabled in Fedora 30 via a4b4f7c (Add
support for disabling python2, 2018-03-28). Git 2.17.0 was the current
release at that time. The git-p4 script subsequently gained python3
support which was released in Git 2.27.0 (2020-05-31).
Adjust the python2/python3 conditionals and re-enable git-p4 when either
of them are available. Put python3 first in the various conditionals,
as that is our primary supported python. We only include python2 to aid
in building for EL7.
While here, remove the "# endif" comments within the config.mak output.
We're unlikely to provide the 'WINDOWS' prerequisite in our builds. Nor
are we likely to care about the tests which are skipped as a result.
(Also, 'missing WINDOWS' is not a phrase I thought I'd ever write.)