Commit Graph

459 Commits

Author SHA1 Message Date
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
144ee1f802 lint: ignore obsolete-not-provided git-gnome-keyring
The git-gnome-keyring package was obsoleted in 2d1c8b1 ("Remove obsolete
gnome-keyring credential helper", 2018-01-09).  Silence the rpmlint
warning.
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