Commit Graph

595 Commits

Author SHA1 Message Date
Todd Zullinger
fece8d786b Add additional BuildRequires for i18n locales used in tests
The test suite uses is_IS.UTF-8 and is_IS.ISO8859-1 (via the
GETTEXT_LOCALE and GETTEXT_ISO_LOCALE prereq's.  Ensure these locales
are available.  Installing glibc-langpack-is is insufficient as it does
not provide is_IS.ISO8859-1, glibc-all-langpacks is also needed.

Now that we're installing additional langpacks, update the macro name
which was added in a6a24cf ("Add glibc-langpack-en BuildRequires for
en_US.UTF-8 locale", 2018-11-05).
2019-02-11 22:46:46 -05:00
Todd Zullinger
5aaf62d16f Remove extraneous pcre BuildRequires
The pcre BR was added in 6dc6285 ("Improve test suite coverage",
2017-11-10), which seems to have been an oversight.  The test suite
improvements were worked on over a long period of time.  It is quite
likely that the pcre BR was needed before 6dc6285 was finalized.
Regardless, we began building against pcre2 in 595b682 ("Use pcre2
library", 2017-07-22).

Note that pcre remains in the minimal buildroot due to dependencies in
glib2 and grep.
2019-02-11 22:46:22 -05:00
Fedora Release Engineering
6a5fa7acb3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 22:26:02 +00:00
Todd Zullinger
e38a5c222e Update to 2.20.1
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.20.1.txt
2018-12-15 00:53:32 -05:00
Todd Zullinger
4fe38417f1 Update to 2.20.0
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.20.0.txt
2018-12-09 10:18:20 -05:00
Todd Zullinger
c983514258 Update to 2.20.0.rc2
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.20.0.txt
2018-12-01 13:45:33 -05:00
Todd Zullinger
0b6f68c532 Update to 2.20.0.rc1
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.20.0.txt
2018-11-26 22:51:54 -05:00
Todd Zullinger
e46c99bb3b Update to 2.19.2
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.19.2.txt
2018-11-21 23:44:18 -05:00
Todd Zullinger
a6a24cf421 Add glibc-langpack-en BuildRequires for en_US.UTF-8 locale
Fedora 30 will remove glibc-all-langpacks from the default buildroot¹.
Ensure en_US.UTF-8 locale is present for the test suite.  Avoid C.UTF-8
until it is more widely used and tested.

¹ https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot
2018-11-21 23:40:32 -05:00
Todd Zullinger
314daae243 Avoid 'unexpanded macro' warning in mock srpm builds
When preparing the srpm in mock or other minimal environments, the use
of %{_emacs_version} causes a spurious warning:

  Possible unexpanded macro in: Requires: emacs-filesystem >= %{_emacs_version}

Prevent the warning with a check that the macro is defined before use.

(There is another use of %{_emacs_version}, but it only applies to EL-6
where the warning is not present.  Just ignore it.)
2018-11-21 23:40:32 -05:00
Todd Zullinger
ac594c4ca5 Add comments to %endif statements
Make it easier to tell what %if conditions are being ended.  This is
particularly useful with nested conditions since we lack any indentation
to visually denote the conditional blocks.
2018-11-21 23:40:32 -05:00
Todd Zullinger
ba93b90998 Use %{without ...} macro consistently
The %{without ...} macro is easier to read than '! %{with ...}', use it
consistently.

(Note that using %without_* and %_without_* macros is still not
advised.)
2018-11-21 23:40:32 -05:00
Todd Zullinger
4e0f331329 Simplify gpg verification of Source0
The verification was simplified slightly in 903d8f3 ("Remove EL-5 and
old Fedora conditionals", 2017-07-22).

Further simplifications:

    - do away with unneeded variables
    - drop '--batch' and '>/dev/null' from gpg2 --dearmor
    - check tarball signature via stdin

The "noisy output from GnuPG 2.0" alluded to on EL <= 7 is no longer
present.  This has been tested in mock for el6, el7, and fedora
releases.
2018-11-21 23:40:32 -05:00
Todd Zullinger
a91c5fdb8a Skip test BuildRequires when --without tests is used
The chroot is a bit quicker to create and slightly smaller when building
'--without tests' if the BuildRequires needed to run the tests are
skipped.

Add pod2man dependency when documentation is enabled (the default).
Since git-2.17.0, pod2man is needed to build Git.3pm.  The pod2man
command is in perl-podlators on Fedora and EL >= 7, but in perl on EL-6.
Use %{_bindir}/pod2man to ensure the dependency is found regardless of
what package provides it.

The dependency is only missed when building without the test deps, as
the many perl requirements pulled in for the test suite bring in
pod2man.
2018-11-21 23:40:27 -05:00
Pavel Cahyna
79dbcc83dc Update condition for the t5540-http-push-webdav test for future RHEL 2018-10-22 11:43:21 +02:00
Todd Zullinger
32a31b7090 Update to 2.19.1 (CVE-2018-17456)
From the upstream release announcement:

  These releases fix a security flaw (CVE-2018-17456), which allowed an
  attacker to execute arbitrary code by crafting a malicious .gitmodules
  file in a project cloned with --recurse-submodules.

  When running "git clone --recurse-submodules", Git parses the supplied
  .gitmodules file for a URL field and blindly passes it as an argument
  to a "git clone" subprocess.  If the URL field is set to a string that
  begins with a dash, this "git clone" subprocess interprets the URL as
  an option.  This can lead to executing an arbitrary script shipped in
  the superproject as the user who ran "git clone".

  In addition to fixing the security issue for the user running "clone",
  the 2.17.2, 2.18.1 and 2.19.1 releases have an "fsck" check which can
  be used to detect such malicious repository content when fetching or
  accepting a push. See "transfer.fsckObjects" in git-config(1).

  Credit for finding and fixing this vulnerability goes to joernchen
  and Jeff King, respectively.

References:
https://public-inbox.org/git/xmqqy3bcuy3l.fsf@gitster-ct.c.googlers.com/
2018-10-05 15:18:02 -04:00
Todd Zullinger
1cb6673d8f Update t5551 w/curl-7.61.1 patch
Add a link to the upstream commit and use that patch.  The patch content
is the same -- only the metadata differs.
2018-10-01 23:26:58 -04:00
Todd Zullinger
93e9ed05e4 Update to 2.19.0
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.19.0.txt
2018-09-10 22:26:10 -04:00
Todd Zullinger
6bd166894f Add --without tests option to skip tests
While rpmbuild and mock have --nocheck to disable the %check section,
'fedpkg mockbuild' lacks this convenient option.

Add %bcond_without tests to allow 'fedpkg mockbuild --without tests' to
not run the test suite.  Disabling the test suite cuts the build time by
approximately 60%, which is very useful while working on changes to the
packaging.
2018-09-10 22:26:10 -04:00
Todd Zullinger
2ed8c8c53d Fix smart-http test due to changes in cookie sort order in curl-7.61.1
With curl-7.61.1 cookies are sorted by creation-time¹.  Sort the output
used in the 'cookies stored in http.cookiefile when http.savecookies
set' test before comparing it to the expected cookies.

¹ https://github.com/curl/curl/commit/e2ef8d6fa ("cookies: support
  creation-time attribute for cookies", 2018-08-28)
2018-09-10 22:26:10 -04:00
Sebastian Kisela
6bf3ed4a31 Fix builds without docs and without cvs and/or p4
When building with options "--without docs --without p4 --without cvs"
the build fails with the following errors:

    error: Installed (but unpackaged) file(s) found:
       /usr/share/doc/git/git-cvsexportcommit.txt
       /usr/share/doc/git/git-cvsimport.txt
       /usr/share/doc/git/git-cvsserver.txt
       /usr/share/doc/git/git-p4.txt
	Installed (but unpackaged) file(s) found:
       /usr/share/doc/git/git-cvsexportcommit.txt
       /usr/share/doc/git/git-cvsimport.txt
       /usr/share/doc/git/git-cvsserver.txt
       /usr/share/doc/git/git-p4.txt

The .txt files were not caught by the %files entry in the main git
package when cvs/p4 were disabled -- from 9cd8ee7 ("Disable CVS support
on EL > 7", 2018-03-14.  Those only applied when documentation was not
disabled.

Remove git-cvs* and git-p4* files from Documentation as well as the
%{buildroot}.  Simplify the find path by dropping %{_bindir} and
%{gitexecdir}.  Tighten the git-p4 glob to avoid unintended matches.
Drop the conditional inclusion of cvs/p4 docs in the main git package in
favor of removing the files entirely.
2018-09-10 22:26:10 -04:00
Sebastian Kisela
f8a83b9ea0 Move instaweb to a subpackage
Gives possibility to add dependencies for git-instaweb http daemon,
without having to install all dependencies at each git install.

Currently, lighttpd is required by the git-instaweb package.
The git-instaweb script supports other httpd daemons (httpd, mongoose,
plackup [in perl(Plack)], and webrick [in rub-libs]).  lighttpd is the
default, works without any configuration, and is only ~1M installed.
2018-09-10 22:26:10 -04:00
Todd Zullinger
3bd04f23dc Drop git-gnome-keyring obsolete for fedora > 30
Add a conditional to allow merging from master to f29.  The obsoletes
should be removed when f29 is EOL.  It was added in 2d1c8b1 ("Remove
obsolete gnome-keyring credential helper", 2018-01-09).  The comment was
improved in 4a06e99 ("clarify comment for obsolete git-gnome-keyring",
2018-09-04).
2018-09-10 22:26:10 -04:00
Todd Zullinger
1fe470a26e Remove python2 contrib scripts if python2 is not available
Avoid shipping scripts which require python2 when building without
python2.  The following scripts/directories are removed:

    contrib/fast-import/import-zips.py
    contrib/hg-to-git
    contrib/svn-fe
2018-09-10 22:26:10 -04:00
Todd Zullinger
601f4c9e87 Obsolete git-cvs if it's disabled
Similar to git-p4 in 5032bef ("bump release", 2018-09-04), add
Obsoletes: for git-cvs when it is disabled.
2018-09-10 22:25:49 -04:00
Todd Zullinger
cf5fc1863f Drop unnecessary Conflicts: when git-p4 is disabled
The Obsoletes: tag is sufficient to ensure git-p4 is removed when
updating to a newer git which lacks a git-p4 subpackage.
2018-09-08 01:30:00 -04:00
Todd Zullinger
2b58811801 Update to 2.19.0.rc2
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.19.0.txt
2018-09-05 00:52:20 -04:00
Nils Philippsen
5032bef960 bump release 2018-09-04 14:18:29 +02:00
Nils Philippsen
4a06e99217 clarify comment for obsolete git-gnome-keyring 2018-09-04 14:17:41 +02:00
Todd Zullinger
dfcc5ccfe1 Update to 2.19.0.rc1 2018-08-28 16:41:06 -04:00
Todd Zullinger
218c314f1f Update to 2.19.0.rc0 2018-08-23 17:42:20 -04:00
Todd Zullinger
394b8eec1e Restore fixed contrib/credential/netrc tests 2018-08-23 17:42:11 -04:00
Todd Zullinger
8f1e2b63b0 Remove git-remote-testsvn, make git-svn noarch
A future release of git will likely remove contrib/svn-fe and
git-remote-testsvn¹.  The git-remote-testsvn binary is the only noarch
file in the git-svn package.  Seeing that it's utility is very
questionable, remove it so git-svn can return to a noarch package.

¹ https://public-inbox.org/git/20180817190310.GA5360@sigill.intra.peff.net/
2018-08-23 17:37:25 -04:00
Fedora Release Engineering
98b3cc5061 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 02:24:10 +00:00
Petr Písař
3e2a92724a Perl 5.28 rebuild 2018-07-03 12:15:31 +02:00
Jitka Plesnikova
fb90b05714 Perl 5.28 re-rebuild of bootstrapped packages 2018-07-01 09:00:33 +02:00
Jitka Plesnikova
3a186b000a Perl 5.28 rebuild 2018-06-29 21:51:33 +02:00
Pavel Cahyna
bd7ea152d6 fix build --without cvs
9125e65 ("Use new INSTALL_SYMLINKS setting", 2018-05-30) broke builds
using --without cvs. /usr/libexec/git-core/git-cvsserver became a
symlink instead of hardlink. Adapt the find command used to exclude
'git-cvs*' files to detect symlinks as well.
2018-06-27 01:23:50 -04:00
Todd Zullinger
a66569768e Update to 2.18.0
Release notes:
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.18.0.txt
2018-06-21 15:38:42 -04:00
Miro Hrončok
83950a818e Rebuilt for Python 3.7 2018-06-19 10:43:40 +02:00
Todd Zullinger
5cf8e316f1 Apply upstream zlib buffer handling patch (#1582555)
With the patch accepted upstream, apply it to all architectures.
2018-06-13 18:36:50 -04:00
Todd Zullinger
5834e5a5ce Update to 2.18.0-rc2 2018-06-13 18:27:26 -04:00
Todd Zullinger
8169f9d942 lint: fix macro-in-%changelog warnings
These unescaped macros slipped in with 3f3a0b6 ("Use %make_build and
%make_install", 2018-05-30).
2018-06-07 23:40:21 -04:00
Todd Zullinger
c86e52df37 Build git-subtree docs in %build
We want to build all documentation in the %build phase rather than
falling through to the %install phase and building it as a dependency of
install-doc.
2018-06-07 23:34:44 -04:00
Todd Zullinger
2ea451f1f4 Include git-contacts, SubmittingPatches suggests it to users
The git-contacts script was added to SubmittingPatches recently.  Make
it easier for users who read about it in the documentation to make use
of the command.
2018-06-07 23:33:48 -04:00
Todd Zullinger
95447ce86a Drop flaky & out-of-place netrc credential helper tests
The default target in contrib/credential/netrc/Makefile is, and has
always been, test.  Running 'make -C contrib/credential/netrc/' in
%build is not needed.

Additionally, the tests recently were changed and require perl-Git to be
installed before running.  The tests also exit cleanly regardless of any
failures encountered, which makes them unreliable.  A fix for these
issues will be submitted upstream, but rather than apply it here, simply
drop the unneeded 'make' call.

Ideally, the tests will be run in %check once fixed.  This does present
a small wrinkle due to the deletion of contrib/credential in %install.
Cross that bridge when we get there. :)
2018-06-05 13:30:56 -04:00
Todd Zullinger
ce668b9d1e Update to 2.18.0-rc1 2018-06-05 13:30:56 -04:00
Todd Zullinger
572ec3935e add -p: fix counting empty context lines in edited patches
References:
https://github.com/gitster/git/commit/f2cb01d35
https://public-inbox.org/git/20180601174644.13055-1-phillip.wood@talktalk.net/
2018-06-05 13:30:56 -04:00
Todd Zullinger
9125e65273 Use new INSTALL_SYMLINKS setting
Replace NO_CROSS_DIRECTORY_HARDLINKS and NO_INSTALL_HARDLINKS with
INSTALL_SYMLINKS.  The result is slightly improved; all symlinks will
point directly to the target rather than via multiple levels of
symlinks.

The rationale was covered in slightly more detail in d56cfc6 ("Use
symlinks instead of hardlinks for installed binaries", 2018-03-15).

Adjust the dangling-relative-symlink filter in the rpmlint config for
the new target of the git-difftool symlink.
2018-06-05 13:30:56 -04:00
Todd Zullinger
d3cc8ccead Update to 2.18.0-rc0
The USE_LIBPCRE setting now defaults to pcre2; use it.  It's still
valid to set USE_LIBPCRE2, but using the default should be cleaner in
the long-run.

The (long-unmaintained) emacs support has been dropped upstream in favor
of better alternatives.  From the upstream commit¹:

    The git-blame.el mode has been superseded by Emacs's own
    vc-annotate (invoked by C-x v g). Users of the git.el mode are now
    much better off using either Magit or the Git backend for Emacs's own
    VC mode.

    These modes were added over 10 years ago when Emacs's own Git support
    was much less mature, and there weren't other mature modes in the wild
    or shipped with Emacs itself.

    These days these modes have few if any users, and users of git aren't
    well served by us shipping these (some OS's install them alongside git
    by default, which is confusing and leads users astray).

¹ 6d5ed4836d ("git{,-blame}.el: remove old bitrotting Emacs code", 2018-04-11)
  https://git.kernel.org/pub/scm/git/git.git/commit/?id=6d5ed4836d
2018-06-05 13:30:56 -04:00
Todd Zullinger
3f3a0b6309 Use %make_build and %make_install
Also drop DESTDIR and INSTALL from config.mak; they are both handled via
%make_install.

Remove the rpmlint filter for %buildroot usage which was only needed due
to DESTDIR's use in config.mak.
2018-06-05 13:30:49 -04:00
Todd Zullinger
fd929804e7 Disable jgit tests on s390x, they're unreliable
Specifically, t5512-ls-remote.sh has a test which starts a jgit daemon.
This has failed to exit on a number of occasions, only on s390x.  We
could disable just that test with "GIT_SKIP_TESTS=t5512.28", but the
test number can and does change as more ls-remote tests are added.

Dropping the jgit BuildRequires is cleaner and only causes 3 tests to be
skipped, the offending t5512 test and two others in t5310-pack-bitmaps.

Access to s390x might help better debug this, but it does not occur
consistently and may be limited to koji.  The issue could be a problem
in jgit as well.  While looking at a hung build, Kevin Fenzi found a few
errors in t5512-ls-remote.out:

    /usr/bin/build-classpath: Could not find xz-java Java extension for this JVM
    /usr/bin/build-classpath: error: Some specified jars were not found
2018-06-05 13:30:21 -04:00
Todd Zullinger
f179dc950e Use %apply_patch for aarch64 zlib patch, return to %autosetup
Unfortunately, it appears we need to carry this patch longer than
expected.  Return to using %autosetup so other patches are easier to
manage.  Use %apply_patch to manually apply the zlib patch only on
aarch64, as that is the only arch where it is required at this time.
2018-06-05 12:27:41 -04:00
Todd Zullinger
20fad240e8 packfile: Correct zlib buffer handling on aarch64 (#1582555)
A recent zlib build with optimization for ARM exposed an issue in git's
packfile handling.

Thanks to Pavel Cahyna for the initial report and debugging and Jeremy
Linton for further diagnosis and the subsequent patch.

The patch is currently being discussed upstream¹.  Until it is accepted,
apply it only on aarch64 to avoid any unexpected issues with other
arches.

¹ https://public-inbox.org/git/20180525231713.23047-1-lintonrjeremy@gmail.com/T/#u
2018-05-29 14:28:31 -04:00
Todd Zullinger
9a5cabc9ef Update to 2.17.1 (CVE-2018-11233, CVE-2018-11235)
Fixes two security issues, described in the 2.13.7 release notes¹:

 * Submodule "names" come from the untrusted .gitmodules file, but we
   blindly append them to $GIT_DIR/modules to create our on-disk repo
   paths. This means you can do bad things by putting "../" into the
   name. We now enforce some rules for submodule names which will cause
   Git to ignore these malicious names (CVE-2018-11235).

   Credit for finding this vulnerability and the proof of concept from
   which the test script was adapted goes to Etienne Stalmans.

 * It was possible to trick the code that sanity-checks paths on NTFS
   into reading random piece of memory (CVE-2018-11233).

¹ https://mirrors.edge.kernel.org/pub/software/scm/git/docs/RelNotes/2.13.7.txt
2018-05-29 13:08:24 -04:00
Todd Zullinger
de617607d0 Move TEST_SHELL_PATH setting to config.mak
There's no need to manually export this.  Set it via the method
documented in the Makefile, like other settings.
2018-05-24 21:44:08 -04:00
Todd Zullinger
b717510550 Fix segfault in rev-parse with invalid input (#1581678) 2018-05-24 21:41:43 -04:00
Todd Zullinger
ebd4261f9f Fix formatting of changelog release string
While it's acceptable with or without the hyphen, all other entries use
a hyphen.  Keep it consistent.
2018-04-22 17:00:14 -04:00
Todd Zullinger
6eb92cebdc Re-enable t5000-tar-tree.sh test on f28
The unknown, but temporary, breakage in fedora-28-x86_64 buildroots
appears to be resolved.

The test was disabled in a998227 ("Disable t5000-tar-tree.sh on x86 in
f28", 2018-01-18).
2018-04-16 14:27:50 -04:00
Todd Zullinger
da74a8e523 Move linkcheck macro to existing fedora/rhel > 7 block
The spec file is a bit easier to read with as few conditional blocks as
required.  Use %bcond_(with|without) to allow easier toggling of the
link checking.
2018-04-16 12:14:49 -04:00
Pavel Cahyna
34c2440884 Update conditions for future RHEL 2018-04-16 11:13:55 -04:00
Pavel Cahyna
1a82d92cd4 Conform to the Packaging Guidelines for Perl
Add BuildRequires: perl-interpreter (or perl on systems that do not
provide perl-interpreter) since perl is invoked during the build
process.

(https://fedoraproject.org/wiki/Packaging:Perl#Build_Dependencies,
https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules)

Probably no functional change, since perl is being brought in via other
deps.
2018-04-14 19:33:46 -04:00
Todd Zullinger
eeb7261573 Require perl-generators on EL > 7
Add a %{use_perl_generators} macro to control this requirement.
2018-04-12 20:45:18 -04:00
Todd Zullinger
c1f934e016 daemon: use --log-destination=stderr with systemd
Using stderr rather than syslog should be a mild improvement with the
systemd journal.  The reasons are detailed in the upstream commit
0c591cacba ("daemon: add --log-destination=(stderr|syslog|none)",
2018-02-04)¹:

    The combination of --inetd with --log-destination=stderr is useful, for
    instance, when running `git daemon` as an instanced systemd service
    (with associated socket unit). In this case, log messages sent via
    syslog are received by the journal daemon, but run the risk of being
    processed at a time when the `git daemon` process has already exited
    (especially if the process was very short-lived, e.g. due to client
    error), so that the journal daemon can no longer read its cgroup and
    attach the message to the correct systemd unit (see systemd/systemd#2913
    [1]). Logging to stderr instead can solve this problem, because systemd
    can connect stderr directly to the journal daemon, which then already
    knows which unit is associated with this stream.

    [1]: https://github.com/systemd/systemd/issues/2913

While here, wrap the git-daemon command line to improve readability.

¹ https://github.com/git/git/commit/0c591cacba
2018-04-11 23:19:00 -04:00
Todd Zullinger
f25fef61e0 daemon: fix condition for redirecting stderr
We don't currently use the --log-destination option in the git-daemon
systemd service or xinetd files.  With this patch in place, we can.
2018-04-11 23:19:00 -04:00
Todd Zullinger
e72bed93ca git-svn: avoid uninitialized value warning
This issue has been present since 2.11.0, but only became visible with
the addition of the 'use warnings' pragma in 2.17.0.
2018-04-11 23:19:00 -04:00
Todd Zullinger
5eb603d7e0 Clean up redundant and unneeded Requires
Move all Requires to their own lines for better readability.

We can safely drop the 'perl(Git)' requires from the cvs and email
packages because the perl rpm dependency generator already add it.

We can also drop 'perl-Git = %{version}-%{release}' from the email
package because it requires 'git = %{version}-%{release}' which in turn
requires the matching 'perl-Git' package.
2018-04-11 23:19:00 -04:00
Todd Zullinger
b5fac2ab8d Remove Git::LoadCPAN to ensure we use only system perl modules
Git tries very hard to rely on as few non-core modules as possible.  The
few that it does (currently Error and Mail::Address) are bundled.  We've
disabled such bundling since it became an option in 2.17.0.

Go a step further and remove the Git::LoadCPAN wrapper.  This allows
rpm's automatic dependency generator to find and add the needed
requirements.

With this change we can remove the manual 'Requires:' for perl(Error)
and perl(Mail::Address).

'Requires: perl(Error)' in the main git package has been unneeded for
many years.  It was added in edddb83 ("Update to latest upstream
release. Fix some bugs at the same time", 2007-11-27), which was
git-1.5.3.6.  It was needed for 'git svn' and 'git remote'.  'git svn'
requires perl(Git), which in turn requires perl(Error).

In git-1.5.5, 'git remote' was converted to a builtin command in C
rather than perl, removing the perl(Error) dependency.

Lastly, move the 'BuildRequires: perl(Error)' from perl-Git to the main
list of BuildRequires.
2018-04-10 10:25:40 -04:00
Todd Zullinger
b3c76729a3 Tighten file exclusion pattern
The bare p4 entry was a bit concerning; it's easy to imagine false
positives from such a short string.  Remove git-remote-(bzr|hg) from the
pattern.  The scripts and placeholders were removed in git-2.0.0.

While here, group all the git-* patterns and be more explicit with the
svn files.
2018-04-10 10:25:04 -04:00
Todd Zullinger
a4b4f7cade Add support for disabling python2
Python 2 end of life is approaching, prepare for dropping it
along with all python2 scripts and subpackages requiring it.

Helped-by: Sebastian Kisela <skisela@redhat.com>
Helped-by: Pavel Cahyna <pcahyna@redhat.com>
2018-04-02 18:10:46 -04:00
Todd Zullinger
07e03fdaa0 Use %bcond_(with|without) to enable/disable python3
The with_python3 macro was added in 7ac1fbc ("Avoid python dependency in
git-core (#1536471)", 2018-01-22) and followed the example from a devel
list request¹.

The %bcond_(with|without) macro allows enabling or disabling of python3
via the command line, modulemd file, etc.  Use it.

¹ https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/UG6XYG3EPLMLA5N47AK63NCF2Y6MDWFJ/
2018-04-02 18:05:55 -04:00
Todd Zullinger
73282c0771 Allow git-p4 subpackage to be toggled via --with/--without
Currently, git-p4 requires python2, which is approaching its end of
life.  Prepare for building on releases without python2.
2018-04-02 16:30:03 -04:00
Todd Zullinger
32f8d8d33b Update to 2.17.0
https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.17.0.txt
2018-04-02 16:26:27 -04:00
Todd Zullinger
5cc54546f6 Fix incorrect comment about multimail hook
The multimail contrib hook was moved from git-core to git in 7ac1fbc
("Avoid python dependency in git-core (#1536471)", 2018-01-22).
2018-04-02 16:25:39 -04:00
Todd Zullinger
336bc7765e Update to 2.17.0-rc2 2018-03-28 16:06:32 -04:00
Todd Zullinger
081aa7dea3 Allow cvs subpackage to be toggled via --with/--without
The previous commit disabled the cvs subpackage on EL > 7.  Convert to
the %bcond_with(out) macro to allow the subpackage to be toggled easily
via a --with/--without option at build time.
2018-03-27 16:02:51 -04:00
Joe Orton
9cd8ee74c8 Disable CVS support on EL > 7
The cvs package will be dropped in the next RHEL release.  Disable the
git-cvs subpackage when %{rhel} > 7.
2018-03-27 15:54:43 -04:00
Todd Zullinger
6f88057585 Add missing perl(Mail::Address) requirement (#1561086)
When setting NO_PERL_CPAN_FALLBACKS to avoid bundled perl modules, we
must take care to ensure the dependencies are required.  The code which
handles modules via Git::LoadCPAN prevents the normal perl dependency
generator from identifying them.  Thankfully, there should not be many
modules loaded this way.

Prior to 2.17.0 and NO_PERL_CPAN_FALLBACKS we were falling back to not
using Mail::Address, which is partly why the lack of the dependency
wasn't spotted with rpmdiff with and without NO_PERL_CPAN_FALLBACKS.
2018-03-27 12:38:03 -04:00
Todd Zullinger
c538f21825 Remove unnecessary "chmod +x contrib/hooks/*"
Using a simple glob in contrib/hooks/* to match contributed hook scripts
was valid when it was added in 762cf11 ("Update to git-1.6.3.3 - Move
contributed hooks to %{_datadir}/git-core/contrib/hooks (bug 500137)",
2009-06-28).  With the addition of the multimail directory in git-1.8.4
it was no longer doing what was intended.

However, the scripts in contrib/hooks all ship with the execute bit set,
making the "chmod +x" unnecessary.  If we did descend into the multimail
directory with a chmod (whether via "chmod -R" or "find | xargs ..."),
we would need to exclude the non-script files within that directory.
2018-03-22 02:13:29 -04:00
Todd Zullinger
28cb1fda84 Drop .py extension from contrib/hooks/multimail/git_multimail.py
Fedora 28 prints a deprecation notice if /usr/bin/python is called in an
rpm build¹, which is done by default when byte-compiling python files
outside of %{_libdir}/pythonX.X.

Avoid the issue by dropping the .py extension from the multimail hook
script.  The hook script is not used as a module and therefore has no
need to use the extension or be byte-compiled.

¹ https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build
2018-03-22 01:38:31 -04:00
Todd Zullinger
ee1ed82969 Update to 2.17.0-rc1 2018-03-21 16:01:18 -04:00
Todd Zullinger
0b3c85937b Add findutils BuildRequires, improve 'find | xargs' calls
Ensure find and xargs are required.  While findutils is currently in the
default buildroot, we should still be explicit about the requirement.

Also improve the 'find | xargs' calls to handle files which may contain
spaces, quotes, or other characters which might cause spurious failures.
2018-03-19 11:08:38 -04:00
Todd Zullinger
440594446e Install contrib/diff-highlight (#1550251)
The script is installed at /usr/share/git-core/contrib/diff-highlight.
Documentation is in /usr/share/doc/git/contrib/diff-highlight/README.
2018-03-19 11:08:38 -04:00
Todd Zullinger
556b4a03d3 Rename gitweb httpd config file
The gitweb httpd config file was added long before git gained support
for smart http, in c97cf8e ("Add git-daemon and gitweb packages",
2007-08-04).

Now, users who want to enable git's smart http support with apache will
often want to use /etc/httpd/conf.d/git.conf as the path.

Make this easier by giving the gitweb httpd config file a more logical
name going forward.  Keep the current config file name in previous
releases.
2018-03-19 11:08:38 -04:00
Todd Zullinger
098a42523b Require git-core rather than git for git-daemon
A git-daemon install should require nothing more than git-core.  This
allows running the daemon on systems or containers with a minimal
install.
2018-03-16 21:56:48 -04:00
Todd Zullinger
f3c13faa20 Update to 2.17.0-rc0
The perl install process was updated to remove the need for
ExtUtils::MakeMaker.  The main change for us is setting perllibdir to
keep the files installed in %{perl_vendorlib}.

Manpages for non-public portions of the Git perl modules are no longer
built.  Anyone who wishes to make use of these modules can read the
source files or use pod2man.

Set NO_PERL_CPAN_FALLBACKS to ensure we don't package the bundled
fallback modules.

Also drop now-unneeded commands to remove *.bs, .packlist, and
perllocal.pod files.  The new install method does not produce these
artifacts.
2018-03-16 21:56:41 -04:00
Todd Zullinger
d56cfc6775 Use symlinks instead of hardlinks for installed binaries
A recent discussion on the git list¹ suggested that using symlinks
should be clearer and have no drawbacks (except on filesystems where
symlinks are not well supported, e.g. on Windows).

This shrinks the git-core package by nearly 25% and saves almost 6MB in
the debuginfo package.

See also 6ef5f1f ("Disable cross-directory hardlinks", 2017-11-10).

¹ https://public-inbox.org/git/87y3iwp2z0.fsf@evledraar.gmail.com/#t
2018-03-16 21:55:46 -04:00
Todd Zullinger
0609eef4e2 Improve hardening flags for EL-6 & EL-7
Ensure all binaries are hardened when building on EL-6 & EL-7.  On EL-7
use the %{_hardened_build} macro.  On EL-6 update %{optflags} and set
%{__global_ldflags}.

For EL-7 this could also be put in the existing Fedora and EL >= 7
condition, e.g.: %{!?_hardened_build: %global _hardened_build 1}.  I
think this is a bit uglier than needed and is better in an %if condition
which only applied to EL-7.
2018-02-24 14:15:30 -05:00
Todd Zullinger
04982344f3 Add gawk, gcc, make, and sed BuildRequires
The guidelines require all required packages to be explicitly listed.
This list may not be complete, but it's a start.

Additionally, a proposed change for Fedora 29 removes gcc from the
default BuildRoot.

While at it, sort a few BuildRequires in alphabetical order.
2018-02-16 14:09:11 -05:00
Todd Zullinger
0164091753 Update to 2.16.2
Release notes: https://www.kernel.org/pub/software/scm/git/docs/RelNotes/2.16.2.txt
2018-02-16 13:50:09 -05:00
Todd Zullinger
986b772e55 Split 'git subtree' into a separate package
While 'git subtree' does not pull in any additional dependencies, having
it in a separate package may help avoid confusion that it is a core git
command.  This came up recently on the git list¹.

Another recent thread leaves the impression that 'git subtree' is in
maintenance mode².  This implies that it is unlikely to move out of
contib in the near future.

¹ https://public-inbox.org/git/alpine.LFD.2.21.1802070801470.19185@android-a172fe96dd584b41/
² https://public-inbox.org/git/CADfK3RWXDuE=hYD==4sHXO1iJeOiVDOp7hBqhBtSn7gnQ+x7Qg@mail.gmail.com/
2018-02-09 14:51:34 -05:00
Todd Zullinger
cfcd10ad91 Don't package contrib/svn-fe in %doc 2018-02-09 14:51:34 -05:00
Todd Zullinger
ff200cac04 Remove obsolete %defattr
The use of %defattr has been unneeded since rpm-4.4.  It was removed
from the guidelines 6 years ago¹.  It was kept to allow builds on EL-5,
which has been EOL since March of last year.

¹ https://pagure.io/packaging-committee/issue/77
  %defattr is no longer needed in Fedora
2018-02-09 14:50:09 -05:00
Todd Zullinger
f9c3604c48 Order %files and %packages sections by name
Adding new sections or finding existing sections should be easier.  Sort
the %files and %packages sections by name.
2018-02-08 19:02:18 -05:00
Fedora Release Engineering
78864b8eb3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 12:33:55 +00:00
Todd Zullinger
b30f47c653 Drop obsolete BuildRoot, Group, %clean, and buildroot cleanup
No supported releases of Fedora or EPEL require these tags, sections, or
commands.
2018-01-31 15:37:00 -05:00
Todd Zullinger
a51e1362a2 git-svn: avoid segfaults in 'git svn branch'
Re-enable t9128, t9141, and t9167 which were disabled due to these
random segfaults.  The bug has also been reported against the subversion
perl bindings in Debian¹.  Hopefully this will reach upstream subversion
if a fix is made to subversion.

¹ https://bugs.debian.org/888791
2018-01-31 15:31:04 -05:00
Todd Zullinger
7ac1fbccc9 Avoid python dependency in git-core (#1536471)
Move contrib/hooks/multimail from git-core to git and use python3 rather
than python2.

We still use python2 as the default PYTHON_PATH because not all of the
python scripts in git support python3.  None of the other scripts are
included in git-core though.

Primarily, python2 is used by git-p4 and contrib/svn-fe/svnrdump_sim.py
(which is used by t9020-remote-svn.sh).  Converting git-p4 to python3 is
not a trivial matter of fixing a few print statements.  A simple
conversion using python3's 2to3 tool results in a large number of test
failures.

Add a python3-devel BuildRequires for %{__python3} and add python2-devel
to the tests section since t9020-remote-svn.sh uses python2.  (We
already BR python2-devel in git-p4, but having it in the tests section
ensures we don't remove it if/when git-p4 supports python3.)
2018-01-22 14:44:07 -05:00
Todd Zullinger
8368c37a74 Update to 2.16.1
This release fixes an issue which only affects users on case-insensitive
file systems and repositories which contain paths that differ only in
case.  Such circumstances result in a segmentation fault in various git
commands.
2018-01-22 12:46:37 -05:00
Todd Zullinger
a9982274b4 Disable t5000-tar-tree.sh on x86 in f28
This test was passing as recently as last week.  Something seems to have
changed or broken in the x86 arch of f28 since then.  Disable the test
until the issue is determined and resolved.
2018-01-18 10:34:30 -05:00
Todd Zullinger
62f562d630 Use 'prove' as test harness, enable shell tracing
With 'prove' as the test harness the tests can be run in parallel on
EPEL as well as Fedora targets.

Move GIT_TEST_OPTS to config.mak along with the new test options and
enable shell tracing (-x).  The output from failures when tracing is
enabled should allow us to more easily diagnose test failures.

Explicitly use /bin/bash as the shell for the test suite; it allows
using "-x" reliably across the whole test suite.  This is made possible
by changes included in 2.16.0 thanks to Jeff King¹, particularly:

    3f824e91c8 t/Makefile: introduce TEST_SHELL_PATH
    f5ba2de6bc test-lib: make "-x" work with "--verbose-log"
    90c8a1db9d test-lib: silence "-x" cleanup under bash

¹ https://github.com/gitster/git/tree/jk/test-suite-tracing
2018-01-18 01:14:55 -05:00
Todd Zullinger
6adaa76501 Update to 2.16.0
Move fsmonitor-watchman sample hook out of git-core to avoid a perl
dependency.
2018-01-18 01:14:41 -05:00
Todd Zullinger
76ecad7439 Use .in template for git@.service to ensure paths are substituted
The paths don't change often, but if they do this is one less place
which will need to be updated.  It also makes it easier for anyone
rebuilding the packages to change the defaults.
2018-01-13 18:39:53 -05:00
Todd Zullinger
049553f03c Add %{emacs_filesystem} to simplify emacs support
Use a single macro rather than testing for %{fedora} and %{rhel}
versions repeatedly.  The "dist" logic is best kept at the start of the
spec file (as much as possible).

Cleanup a few comments related to "dist" checks while we're at it.
2018-01-13 18:39:53 -05:00
Todd Zullinger
f0946b65f2 Update BuildRequires for tests
The acl and perl(HTTP::Date) requirements are pulled in by other
packages on Fedora so they were not noticed when the test requirements
were updated in 6dc6285 ("Improve test suite coverage", 2017-11-10).

The highlight package is available in EPEL for EL-6 (on all supported
architectures).  Extend the conditional to only exclude it on ppc64 for
EL-7.
2018-01-13 18:39:53 -05:00
Todd Zullinger
2d1c8b10e9 Remove obsolete gnome-keyring credential helper
The gnome-keyring credential helper was removed in Fedora 26, but
remained in builds for older Fedora and EL-7 releases.  No official
release has shipped the gnome-keyring subpackage since 2.11.1-3.

Obsolete it to ensure a clean upgrade path for any users who have it
installed.  The Obsoletes can be removed after rawhide is branched for
Fedora 29.
2018-01-13 18:39:45 -05:00
Todd Zullinger
6af316afb7 Avoid excluding non-existent .py[co] files in %doc
Starting with rpm-build-4.13.0 (in F-22), brp-python-bytecompile
excludes files under /usr/share/doc by default.  Restrict the %files
%exclude to EL <= 7 to avoid spurious 'File not found' warnings from
rpm-build.
2018-01-13 18:16:19 -05:00
Todd Zullinger
6611083041 Explicitly enable tests which may be skipped opportunistically
Ensure these tests are not skipped if some dependency or other condition
is not met.  We prefer to see the failure(s) in order to fix the
underlying issue(s).

Disable t9115-git-svn-dcommit-funky-renames on ppc-arches because it
frequently fails.  The port it uses (9115) is already in use.  It is unclear if
this is due to an issue in the test suite or a conflict with some other
process on the build host.

Add mod_dav_svn BuildRequires for t9115-git-svn-dcommit-funky-renames
(GIT_SVN_TEST_HTTPD).
2018-01-13 18:15:11 -05:00
Todd Zullinger
cd265cb40c Fix perl requires filtering on EL-6
When building release candidates the path to the perl requires filter
script is wrong.  Correct it.

It's tempting to use the output of `pwd` to avoid future changes to the
build dir breaking it, but the call occurs prior to unpacking and thus
`pwd` is not suitable.
2018-01-13 18:13:13 -05:00
Todd Zullinger
ebf9643f6d Re-enable grep tests on s390x
The tests appear to work reliably now, after a number of test builds. If
not, this is easily reverted.  (The newly added test output may also
help determine the root cause.)
2017-12-22 20:25:29 -05:00
Todd Zullinger
84015970a0 Skip 'git svn branch' tests which fail intermittently
All tests which call 'git svn branch' fail intermittently with SIGSEGV
in the subversion bindings.  The failures are not remotely consistent.
Until we can enable shell tracing (-x) in the test suite by default to
attempt to further debug the failure, disable these tests.
2017-12-22 20:25:29 -05:00
Todd Zullinger
62688d0ccc Run tests in parallel by default on Fedora
An option to enable parallel test runs was added in 6dc6285 ("Improve
test suite coverage", 2017-11-10).  After further improvements it seems
to be reliable for use in koji builds.

It is still disabled for EPEL builds because make lacks support for the
-O (--output-sync) option.  Without this option the output is much less
readable.

In the future we may be able to move to using 'prove' as the default
test harness which might allow us to run in parallel without requiring
the -O option.
2017-12-22 20:25:29 -05:00
Todd Zullinger
db2eb1dae4 Avoid failures in svnserve tests when run in parallel
Setting SVNSERVE_PORT enables several tests which require a local
svnserve daemon to be run (in t9113 & t9126).  The tests share setup of
the local svnserve via `start_svnserve()`.  The function uses svnserve's
`--listen-once` option, which causes svnserve to accept one connection
on the port, serve it, and exit.  When running the tests in parallel
this fails if one test tries to start svnserve while the other is still
running.

Use the test number as the svnserve port (similar to httpd tests) to
avoid port conflicts.  Set GIT_TEST_SVNSERVE to enable these tests.

The change should make it into 2.16 or 2.17.  Until then, setting
GIT_TEST_SVNSERVE will disable the svnserve tests.  There are only a few
tests affected and this allows more testing with parallel test runs, so
it's a reasonable trade.  Once an upstream release with these changes
arrives, we'll begin running these tests without any further changes.
2017-12-22 20:25:29 -05:00
Todd Zullinger
15d075cb09 Mark git-core-docs package noarch
Nothing arch-specific should be included in the git-core-docs package.
2017-12-22 20:25:29 -05:00
Todd Zullinger
675b3bad86 Fix builds using '--without docs'
Use '%bcond_without docs' and the corresponding %{with ...} syntax.  Fix
a number of areas where builds failed due to broken %if conditions.
2017-12-22 20:25:28 -05:00
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
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
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
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
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