Commit Graph

714 Commits

Author SHA1 Message Date
Todd Zullinger
340e1bd03d Remove second make invocation for doc build/install
In c3202fd ("Use prebuilt documentation on EL-5, where asciidoc is too
old", 2013-01-04) the make targets to build and install the
documentation were split into separate make calls to handle prebuilt
docs on EL-5 where asciidoc was too old to build the documentation.

Support for EL-5 was removed in 903d8f3 ("Remove EL-5 and old Fedora
conditionals", 2017-07-22), making the separate make calls unneeded.
2017-12-21 18:36:32 -05:00
Todd Zullinger
53fdd5334a Use %autosetup macro to unpack and patch source
Using %autosetup frees us from having to manage %patch entries.  It does
require that all patches use the same strip level (-p1 in our case).
There is also a mildly annoying bug in EL-6¹ which chokes on the patch
invocation if a blank line doesn't follow %autosetup.  A comment should
prevent any problems.

The %autosetup -S option is deliberately avoided, to prevent needless
bootstrapping problems.

¹ https://bugzilla.redhat.com/1310704
2017-12-21 18:36:31 -05:00
Todd Zullinger
2e7d4595e5 Include verbose logs in build output for 'make test' failures
When building in koji or copr and a test fails, the verbose output from
the tests can be very useful in determining the cause.  Print the output
from failing tests, borrowing heavily from the upstream code¹ used when
running tests in Travis CI².

This could be done inline in %check rather than in a separate script.
The downside is that rpm would include each command invocation of the
loop in the output, which adds a lot of useless text to the already
copious build output.

¹ https://git.kernel.org/pub/scm/git/git.git/plain/ci/print-test-failures.sh
² https://travis-ci.org/git/git
2017-12-21 18:36:31 -05:00
Ben Harper
4079ad14b1 fix typo in comment 2017-11-30 15:11:44 -05:00
Todd Zullinger
1b01c1c177 Fix debuginfo for gnome-keyring and libsecret credential helpers
We used to remove the contrib/credential tree from the build dir to
avoid binaries and other cruft from ending up in the doc dir.  Doing so
prevented debuginfo from being generated for the credential helpers we
install.  The following warnings were printed during the debuginfo
extraction:

cpio: git-2.15.1/contrib/credential/gnome-keyring: Cannot stat: No such file or directory
cpio: git-2.15.1/contrib/credential/gnome-keyring/git-credential-gnome-keyring.c: Cannot stat: No such file or directory
cpio: git-2.15.1/contrib/credential/libsecret: Cannot stat: No such file or directory
cpio: git-2.15.1/contrib/credential/libsecret/git-credential-libsecret.c: Cannot stat: No such file or directory

Keep contrib/credential in the build dir; remove it from the buildroot
instead.
2017-11-30 15:11:44 -05:00
Todd Zullinger
3baa69d782 Update to 2.15.1
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.15.1.txt
2017-11-28 21:27:56 -05:00
Todd Zullinger
0f50b14ee4 Add .mailmap for git shortlog output
Use the name/address from the %changelog where author names on commits
differed.  This makes git shortlog output more consistent.
2017-11-28 21:27:36 -05:00
Todd Zullinger
030dee6148 Enable support for release candidate builds
Building release candidates helps test the upstream code before it's
final.  Make it easier to create such builds by defining an rcrev macro,
which is commented out by default.
2017-11-28 21:27:26 -05:00
Todd Zullinger
08602e223b Add tcl/tk BuildRequires
The git-gui build tries to use tclsh to generate an index file.  It
falls back to a static list, which is why this wasn't noticed before.
It's not a real problem, but git may soon also try to test that wish is
installed before building and installing git-gui and gitk, so this helps
prepare for that future.
2017-11-28 21:26:39 -05:00
Todd Zullinger
99aec7086b Remove stale comment regarding perl YAML::Any filtering
The code to filter the spurious YAML::Any requires was removed in
903d8f3 (Remove EL-5 and old Fedora conditionals, 2017-07-22).  The
comment was simply missed.
2017-11-12 13:15:14 -05:00
Todd Zullinger
2fd0c5cf45 Remove unneeded cleanup of shebang in bash-completion script
In older versions of git, the bash-completion script began with a
needless #!bash, which we removed before installation.

This and other unneeded shebangs were removed upstream in 1.9.0,
11d62145b9 (remove #!interpreter line from shell libraries, 2013-11-25).
2017-11-12 13:15:13 -05:00
Todd Zullinger
6dc6285283 Improve test suite coverage
3041eeb (Run git test suite, 2016-12-16) enabled the test suite, but
many of the tests were skipped due to missing requirements.  Improve the
test suite coverage by ensuring as many requirements are present as
possible.

Also add an option to run the test suite with multiple jobs using the
%{?_smp_mflags} macro.  This cut the test suite run time roughly in
half in local testing.  The -O option to 'make' helps ensure the output
of each job is collected together rather than interspersed with output
from other jobs.  Sadly, the tests fail when run in parallel in koji, so
this is disabled by default.  It is included to speed up local builds.

To enable in rpmbuild and mock, use either "--with parallel_tests" or
"--define 'parallel_tests 1'" arguments.  This is only supported on
Fedora, as it requires make >= 4.0, which neither EL6 nor EL7 satisfy.

Disable 2 failing tests which run with a limited stack on aarch64, arm*,
and ppc* architectures.  Some debugging with the affected hardware is
needed.

Similarly, disable "git svn branch tests" globally for both
t9128-git-svn-cmd-branch and t9167-git-svn-cmd-branch-subproject because
they fail randomly.  The bug seems likely to be in the subversion perl
bindings, but requires more testing.  The failure output from a manual
run (./t9128-git-svn-cmd-branch.sh -v -x -d):

    ++ git svn branch a
    Copying file:///home/tmz/rpmbuild/BUILD/git-2.14.2/t/trash%20directory.t9128-git-svn-cmd-branch/svnrepo/trunk at r2 to file:///home/tmz/rpmbuild/BUILD/git-2.14.2/t/trash%20directory.t9128-git-svn-cmd-branch/svnrepo/branches/a...
    Found possible branch point: file:///home/tmz/rpmbuild/BUILD/git-2.14.2/t/trash%20directory.t9128-git-svn-cmd-branch/svnrepo/trunk => file:///home/tmz/rpmbuild/BUILD/git-2.14.2/t/trash%20directory.t9128-git-svn-cmd-branch/svnrepo/branches/a, 2
    Found branch parent: (refs/remotes/origin/a) bb43a88ce94511096d7d774f4d5feae281603eb0
    Following parent with do_switch
    Successfully followed parent
    r3 = 2e27ee45dadc098239114bc13a6ae6cf6122d16f (refs/remotes/origin/a)
    error: git-svn died of signal 11
    + test_eval_ret_=139
    + want_trace
    + test t = t
    + test t = t
    + set +x
    error: last command exited with $?=139
    not ok 3 - git svn branch tests

The failure in t9167-git-svn-cmd-branch-subproject is similar.
2017-11-12 13:15:13 -05:00
Todd Zullinger
339c6b6d5c Move filter-branch out of core, it needs perl now
A change to the git filter-branch command in git-2.15 added a perl
dependency, bd2c79fbfe (filter-branch: stash away ref map in a branch,
2017-09-21)¹.

This dependency is only present when using the option --state-branch,
which means many users of filter-branch will never notice the perl
dependency.

However, without moving the tool from git-core to git, any users running
filter-branch with the --state-branch option might find that the command
fails badly, potentially leaving their repository in a broken state.
This is not an acceptable trade-off, in my opinion.

I'm not sure if it's worthwhile to suggest a patch upstream to better
handle users running with the --state-branch option when perl is not
installed, allowing us to safely ship git filter-branch in git-core for
use on systems without perl.

¹ https://github.com/git/git/commit/bd2c79fbfe
2017-11-12 13:15:13 -05:00
Todd Zullinger
cb7fab7e6c Move commands which no longer require perl into git-core
Commands which required perl were moved from git-core to git in 6fdc5e5
(new subpackage git-core, which is perl-less and part of original git
rpm, 2015-06-03).  This was with git-2.4.2.  Since then, a number of
commands have been partially or entirely rewritten upstream and no
longer require perl.  Move them back to git-core.

- git-am was converted to a builtin in 2.6.0, 783d7e865e (builtin-am:
  remove redirection to git-am.sh, 2015-08-04)

- git-submodule's dependence on perl was removed in 2.10.0, 74703a1e4d
  (submodule: rewrite `module_list` shell function in C, 2015-09-02)

- git-relink was removed in 2.12.0, ed21e30fef (relink: retire the
  command, 2017-01-25)

Additionally, two sample hooks (pre-rebase and prepare-commit-msg) were
intended to be excluded from git-core due to their perl dependencies,
but were included due to the way the exclusion via %files lists are
created.  List them explicitly in the git %files section and exclude
them from git-core.
2017-11-12 13:15:13 -05:00
Todd Zullinger
054dd6179a Rename %gitcoredir to %gitexecdir; upstream uses the latter
Using the same variable make it clearer that we're referring to the same
thing as upstream when the Makefile uses gitexecdir.

Remove a stale conditional in git-cvs for handling the case where git's
binaries are stored in %{_bindir}.  This support was dropped after
EL-5's support ended.  Most similar conditionals were removed in 903d8f3
(Remove EL-5 and old Fedora conditionals, 2017-07-22).

Also remove the conditional setting of 'gitexecdir = %{_bindir}' which
was only used on EL-5 to prevent moving the git binaries during the
update to git-1.6.
2017-11-12 13:15:13 -05:00
Todd Zullinger
76189e1ea4 Add rpmlint config to silence unneeded warnings
After this change, the only rpmlint issues are incorrect-fsf-address
errors:

git-gui.noarch: E: incorrect-fsf-address /usr/libexec/git-core/git-gui
git-gui.noarch: E: incorrect-fsf-address /usr/libexec/git-core/git-citool
git.x86_64: E: incorrect-fsf-address /usr/share/emacs/site-lisp/git/git.el
git-core-doc.x86_64: E: incorrect-fsf-address /usr/share/doc/git/contrib/hg-to-git/hg-to-git.py
git-core-doc.x86_64: E: incorrect-fsf-address /usr/share/doc/git/contrib/emacs/git.el
git-core-doc.x86_64: E: incorrect-fsf-address /usr/share/doc/git/contrib/fast-import/import-directories.perl
git-debuginfo.x86_64: E: incorrect-fsf-address /usr/src/debug/git-2.15.0/trace.c

These issues will be fixed in the next upstream release, with the
following commits:

https://github.com/git/git/commit/484257925f
https://github.com/git/git/commit/63100874c1
2017-11-12 13:15:13 -05:00
Todd Zullinger
d24b9418f8 Fix t9020-remote-svn failure when setting PYTHON_PATH
In ef7ac1a (git-p4: adjust python2 shebang manually, 2017-08-03) we
dropped PYTHON_PATH due to failures in t9020-remote-svn.

Digging deeper, the issue appears to be caused by the test calling a
script which has a hard-coded #!/usr/bin/python shebang.  On newer
fedora releases, /usr/bin/python is python3.

Replacing the shebang in contrib/svn-fe/svnrdump_sim.py (the script the
test calls) with #!%{__python2} allows the test to succeed while setting
PYTHON_PATH in config.mak, as desired.
2017-11-12 13:15:13 -05:00
Todd Zullinger
71cf98e082 Fix shebang in a few places to silence rpmlint complaints 2017-11-12 13:15:08 -05:00
Todd Zullinger
382ccf9f8c Update summary/description of numerous subpackages
Use '%{summary}.' as the %description for all subpackages where the
summary and description matched.  This is one less place to change
if/when we update a summary/description in the future.

While looking at rpmlint complaints, gitk had a spelling warning because
the summary/description used the British  English spelling of
"visualiser." Rather than simply change that to the American English
spelling, change the summary/description to match the gitk
documentation.  Do the same for git-gui.

Using %summary fixes the %description for perl-Git-SVN, which previously
used the %description from perl-Git mistakenly.

Also improve/clarify the summary of git-gnome-keyring, git-send-email,
and git-svn.
2017-11-12 13:09:07 -05:00
Todd Zullinger
aa0ed7a703 Drop ancient obsoletes for git and git-arch
The git-all subpackage added an obsoletes for older git packages in
0c4a11c (git 1.5.4.3 and include krh's change to rename git-core to git,
2008-02-23).

The git-arch subpackage was obsoleted many years ago in 3f997b4
(Obsolete git-arch as needed, 2011-08-05).

We don't need to carry either of these obsoletes any longer.
2017-11-11 18:29:39 -05:00
Todd Zullinger
6ef5f1f723 Disable cross-directory hardlinks
We cannot be sure that users installing the git package have not mounted
the git bin and lib dirs on different file systems.  The cost is a small
amount of extra disk space (1.25M in the current build).
2017-11-11 18:29:39 -05:00
Todd Zullinger
7dbcd332fc Fix git-clone memory exhaustion (CVE-2017-15298)
Cherry-pick upstream patch from a937b37e76 (revision: quit pruning diff
more quickly when possible, 2017-10-13)¹.

Resolves: #1510455, #1510457

¹ https://github.com/git/git/commit/a937b37e76
2017-11-07 12:08:47 -05:00
Todd Zullinger
6e4a41c073 Update to 2.15.0 2017-10-30 11:38:18 -04:00
Todd Zullinger
d157da4208 Update to 2.14.3 2017-10-23 10:12:29 -04:00
Todd Zullinger
5f2c65c7b0 Update to 2.14.2
In addition to bug fixes, this release contains a security fix to harden
"git shell" against an unsafe user input, which "git cvsserver" copes
with poorly.

References:

http://seclists.org/oss-sec/2017/q3/534
https://public-inbox.org/git/xmqqy3p29ekj.fsf@gitster.mtv.corp.google.com/
2017-09-26 10:28:22 -04:00
Todd Zullinger
7c95c76e49 Update Junio's GPG key
The expiration of the signing subkey was recently extended.  Ensure
we're using a current copy of the key to avoid any output from gpg
stating that the key is expired.

While our current usage of gpgv2 is not affected by the expired signing
subkey, anyone importing the key and using 'gpg2 --verify' would see
'Note: This key has expired!' in the output.

For reference, here is the process used to update the key:

    (cd ~/src/git && git cat-file blob junio-gpg-pub | gpg2 --import)
    fpr='96E07AF25771955980DAD10020D04E5A713660A7'
    gpg2 --keyserver hkp://keys.gnupg.net --refresh-keys $fpr
    gpg2 --export-options export-minimal --no-emit-version --armor \
         --export $fpr > gpgkey-junio.asc

Here is the ouput from gpg2 --list-sigs¹ before:

    pub   rsa4096/20D04E5A713660A7 2011-10-01 [SC]
	  Key fingerprint = 96E0 7AF2 5771 9559 80DA  D100 20D0 4E5A 7136 60A7
    uid                            Junio C Hamano <gitster@pobox.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    uid                            Junio C Hamano <junio@pobox.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    uid                            Junio C Hamano <jch@google.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    sub   rsa4096/B0B5E88696AFE6CB 2011-10-03 [S] [expired: 2015-09-21]
	  Key fingerprint = E1F0 36B1 FEE7 221F C778  ECEF B0B5 E886 96AF E6CB
    sig          20D04E5A713660A7 2014-09-21 never       Junio C Hamano <gitster@pobox.com>

and after:

    pub   rsa4096/20D04E5A713660A7 2011-10-01 [SC]
	  Key fingerprint = 96E0 7AF2 5771 9559 80DA  D100 20D0 4E5A 7136 60A7
    uid                            Junio C Hamano <gitster@pobox.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    uid                            Junio C Hamano <junio@pobox.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    uid                            Junio C Hamano <jch@google.com>
    sig 3        20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    sub   rsa4096/B0B5E88696AFE6CB 2011-10-03 [S] [expires: 2020-07-26]
	  Key fingerprint = E1F0 36B1 FEE7 221F C778  ECEF B0B5 E886 96AF E6CB
    sig          20D04E5A713660A7 2017-07-27 never       Junio C Hamano <gitster@pobox.com>
    sub   rsa4096/86B76D5D833262C4 2011-10-01 [E]
	  Key fingerprint = 1843 AEC2 2DD5 6B75 E554  3FEF 86B7 6D5D 8332 62C4
    sig          20D04E5A713660A7 2011-10-01 never       Junio C Hamano <gitster@pobox.com>
    sub   rsa4096/7594EEC7B3F7CAC9 2014-09-20 [S] [expires: 2020-07-26]
	  Key fingerprint = DC3D 6C01 251E CA4B 1200  A7EE 7594 EEC7 B3F7 CAC9
    sig          20D04E5A713660A7 2017-07-27 never       Junio C Hamano <gitster@pobox.com>

¹ The full gpg2 command used was:
  gpg2 --no-options --keyid-format long --with-fingerprint --with-subkey-fingerprint --list-options "show-sig-expire show-sig-subpackets show-unusable-uids show-unusable-subkeys no-show-uid-validity" --list-sigs 20D04E5A713660A7
2017-09-18 13:07:51 -04:00
Todd Zullinger
f39e78e3c3 Rebuild for rpm-4.14 bug (#1480407) 2017-08-10 21:24:54 -04:00
Todd Zullinger
0588f15273 Update to 2.14.1 (resolves CVE-2017-1000117)
From the release announcement¹

    A malicious third-party can give a crafted "ssh://..." URL to an
    unsuspecting victim, and an attempt to visit the URL can result in
    any program that exists on the victim's machine being executed.
    Such a URL could be placed in the .gitmodules file of a malicious
    project, and an unsuspecting victim could be tricked into running
    "git clone --recurse-submodules" to trigger the vulnerability.

    Credits to find and fix the issue go to Brian Neel at GitLab, Joern
    Schneeweisz of Recurity Labs and Jeff King at GitHub.

¹ https://public-inbox.org/git/xmqqh8xf482j.fsf@gitster.mtv.corp.google.com/
2017-08-10 17:40:10 -04:00
Petr Stodulka
abdac93434 skip all grep tests on s390x 2017-08-09 14:55:40 +02:00
Iryna Shcherbina
271b894dc1 Add a build-time dependency on python2-devel for p4 2017-08-09 11:55:21 +02:00
Todd Zullinger
7bf42a704a Remove unused patch files
git-1.7-el5-emacs-support.patch was dropped in 903d8f3 (Remove EL-5 and
old Fedora conditionals, 2017-07-22).

git-infinite-loop.patch was dropped in f5bc9a8 (Check upstream GPG
signatures in %prep, 2016-03-27).
2017-08-06 13:28:51 -04:00
Todd Zullinger
65f6b37a14 Skip more grep tests on s390x
These tests fail intermittently on s390x, but work reliably on all other
architectures.
2017-08-05 15:05:57 -04:00
Todd Zullinger
2c6eff99d7 Remove prebuilt docs cruft from EL-5 days
Support for EL-5 was dropped in 903d8f3 (Remove EL-5 and old Fedora
conditionals, 2017-07-22).  This code became useless cruft at that
point.
2017-08-05 15:05:57 -04:00
Todd Zullinger
ef7ac1a89e git-p4: adjust python2 shebang manually
Setting 'PYTHON_PATH = %{__python2}' in config.mak should work, but
doing so causes the remote svn tests in t9020 (which use a python script
to similate svnrdump) to fail.  Just fix the git-p4 shebang until the
svn test failures can be resolved.
2017-08-05 15:05:57 -04:00
Todd Zullinger
3d91c7b1f2 git-p4: explicitly require python2
The git-p4 script requires python2.  Ensure we require it rather than
and unversioned /usr/bin/python.
2017-08-04 13:07:56 -04:00
Todd Zullinger
595b682e78 Use pcre2 library
The pcre1 library is only maintained for serious bugs and
vulnerabilities at this point.  Further improvements are happening in
pcre2.  In a future release git will make this the default library for
pcre support.
2017-08-04 13:07:56 -04:00
Todd Zullinger
98fb8ee0a8 Update to 2.14.0 2017-08-04 13:07:56 -04:00
Todd Zullinger
a25cd0d022 Update to 2.13.4
Upstream bugfix release.  Release notes:

    https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.13.4.txt
2017-08-01 16:27:12 -04:00
Todd Zullinger
903d8f35ed Remove EL-5 and old Fedora conditionals
EL-5 has been EOL for several months now.  We can drop all the
conditionals needed to build there, as well as some conditionals for
long-expired Fedora releases.

Without EL-5 we also no longer use the prebuilt documentation.  Remove
these sources and simplify the gpg check for the remaining source.
2017-08-01 16:26:48 -04:00
Florian Weimer
570387156b Rebuild with binutils fix for ppc64le (#1475636) 2017-07-30 15:06:30 +02:00
Petr Stodulka
7cc97f7b44 Remove explicit libcurl requirement from git-core 2017-07-25 16:28:45 -04:00
Petr Stodulka
00a8980c58 add test by linkchecker for broken links in doc files
Links in docfiles are now automatically checked for correct paths
by linkchecker. The test is available only for Fedora 25+ system,
because the utility is not available for RHEL.
2017-07-25 16:28:45 -04:00
Todd Zullinger
00daf46570 Quiet a few more rpmlint complaints
A few more hidden files have crept into the files installed under
contrib.  Remove any .gitattributes, .gitignore, or .perlcriticrc files
found.
2017-07-25 16:28:44 -04:00
Todd Zullinger
57c799c234 Remove git-archimport from git command list
We have not supported git-archimport in many years and have removed the
files from the documentation.  Removing it from the command list ensures
that git will not generate a link to the command in the documentation.
This avoids leaving a broken link in the html docs.
2017-07-25 16:28:44 -04:00
Todd Zullinger
c13069e1fa Leave git-subtree.html in %_pkgdocdir to avoid broken links
The link to git.html in git-subtree.html expects to find git.html in the
main docdir.  Shipping git-subtree.html in contrib/subtree breaks this
link.
2017-07-25 16:28:44 -04:00
Petr Stodulka
c0de2acb92 Keep documentation files under %{_pkgdocdir} (#1357438)
Move documentation files from all subpackages into the %{_pkgdocdir}
directory, so links inside doc and man files are correct
  Resolves: #1357438

- excluded *py[co] files from doc/* subdirectories, as these files
  are not expected to be executed (thanks tmz)
2017-07-25 16:28:44 -04:00
Gwyn Ciesla
568aad0c32 2.13.3 2017-07-13 07:49:01 -05:00
Todd Zullinger
8c3e8ca7b2 Skip grep tests which fail intermittently on s390x
The grep tests succeed and fail intermittently on s390x.  Until that
arch is more established and works (or fails) consistently, skip these
tests rather than let s390x hold back ever other arch.
2017-06-25 11:52:00 -04:00
Todd Zullinger
38b835a543 Update to 2.13.2 2017-06-25 00:31:18 -04:00
Jitka Plesnikova
086b7a290d Perl 5.26 re-rebuild of bootstrapped packages 2017-06-07 16:42:33 +02:00