Commit Graph

355 Commits

Author SHA1 Message Date
Ruud van Asseldonk
2163fc7f0a git: fix the "perlSupport = false" configuration
When perlSupport = false, we will set NO_PERL=1, and build Git without
Perl support. This is a build option that Git supports. However, Git's
test suite still requires a Perl to be available to run the tests, and
we did not provide one. The tests respect PERL_PATH, and if it is not
set, they default to /usr/bin/perl.

Before this commit, if we set "perlSupport = false", then no Perl would
be available to the package, and so the tests would default to
/usr/bin/perl. When building without a sandbox, that could still work,
even though there is no "perl" on the path, because the tests defaulted
to an absolute path.

You can reproduce this issue as follows:

    nix-build -E 'let pkgs = (import ./default.nix) {}; in pkgs.git.override { perlSupport = false; }'

I just ran into this when trying to build pkgs.git from an old version
of Nixpkgs that I was able to build just fine in the past, and today it
would not build any more, complaining when running the tests:

    make -C t/ all
    make[1]: Entering directory '/build/git-2.18.0/t'
    rm -f -r 'test-results'
    /nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/bash: /usr/bin/perl: No such file or directory

In the past the sandbox was not enabled by default, so then it worked
for me. But now that it is enabled, my host's (not NixOS) /usr/bin/perl
is no longer accessible, and the build fails.

The solution is to explicitly set PERL_PATH when running the tests. This
*almost* works, except that there appears to be a bug in the test for
"git request-pull". That command is a Bash script that calls Perl at
some point, so it requires Perl, and therefore it cannot be supported
when NO_PERL=1. But that particular test does not check whether Git was
compiled with Perl support (other tests do include that check), and that
makes the test fail:

    t5150-request-pull.sh ..............................
    not ok 4 - pull request after push
    not ok 5 - request asks HEAD to be pulled
    not ok 6 - pull request format
    not ok 7 - request-pull ignores OPTIONS_KEEPDASHDASH poison
    not ok 9 - pull request with mismatched object
    not ok 10 - pull request with stale object
    Dubious, test returned 1 (wstat 256, 0x100)
    Failed 6/10 subtests

This output makes sense if you look at t5150-request-pull.sh. Test 1 and
2 are setup steps. Test 3 does call request-pull, but it expects the
command to fail, and it cannot distinguish between the command exiting
with a nonzero exit code, or failing to start it at all. So test 3
passes for the wrong reasons. Test 4 through 10 all call request-pull,
so they fail.

The quick workaround here is to disable the test. I will look into
upstreaming a patch that makes the test skip itself when Perl is
disabled.
2019-11-27 19:23:56 +01:00
John Ericson
d0d5136cce Merge remote-tracking branch 'upstream/master' into wrapper-pname-support 2019-11-24 17:25:07 +00:00
John Ericson
9b090ccbca treewide: Get rid of most parseDrvName without breaking compat
That is because this commit should be merged to both master and
release-19.09.
2019-11-24 17:22:28 +00:00
Daiderd Jordan
185e30c664
git: disable failing test on darwin
The tests for null patterns where changed in 25754125cef278c7e9492fbd6dc4a28319b01f18,
it's possible utf-8 normalisation is causing different behaviour here.

    not ok 54 - LC_ALL='C' git grep -P -f f -i 'Æ<NUL>[Ð]' a
    not ok 57 - LC_ALL='C' git grep -P -f f -i '[Æ]<NUL>Ð' a
    not ok 60 - LC_ALL='C' git grep -P -f f -i '[Æ]<NUL>ð' a
    not ok 63 - LC_ALL='C' git grep -P -f f -i 'Æ<NUL>Ð' a
    Dubious, test returned 1 (wstat 256, 0x100)
    Failed 4/145 subtests
            (less 48 skipped subtests: 93 okay)
2019-11-22 21:02:21 +01:00
Tim Steinbach
0a9e548b2f
git: 2.23.0 -> 2.24.0 2019-11-04 09:35:15 -05:00
Alyssa Ross
4b63c915af
git: drop extraneous sysconfdir trailing slash
I noticed while strace-ing that Git was trying to open
/etc//gitconfig.  Not a big deal, but it is definitely more correct
without the trailing slash.
2019-11-03 21:26:56 +00:00
Matthew Bauer
0c1cef2f11
Merge pull request #68366 from sorbits/git-bash-completion
Install git’s bash completion so that it is loaded on demand
2019-09-18 09:40:52 -04:00
Allan Odgaard
dc45fc4ca2 Install git’s bash completion so that it is loaded on demand
Putting the file in $out/share/bash-completion/completions means that it will be loaded on demand by nixpkgs.bash-completion.

With the old location, the user would either have to explicitly source the file during bash startup, or set BASH_COMPLETION_COMPAT_DIR before sourcing bash_completion.sh, which will eagerly load everything in that directory.
2019-09-09 19:16:29 +02:00
Frederik Rietdijk
5061fe0c2c Merge staging-next into staging 2019-08-28 08:26:42 +02:00
Vladimír Čunát
2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02:00
Robin Gloster
4e60b0efae
treewide: update globin's maintained drvs 2019-08-20 19:36:05 +02:00
Izorkin
6da7a17ffb git: 2.22.1 -> 2.23.0 2019-08-18 09:19:42 +03:00
volth
c814d72b51 treewide: name -> pname 2019-08-17 10:54:38 +00:00
Tim Steinbach
ce1b77231a
git: 2.22.0 -> 2.22.1 2019-08-13 13:58:37 -04:00
Wout Mertens
f24e74d159
Merge pull request #53494 from kirelagin/git-instaweb
git, gitweb: Fix git-instaweb
2019-08-04 23:40:16 +02:00
Demin Dmitriy
ea688c051d git: remove runtime dependency on gcc
Reduces gitMinimal closure size from 329.6M to 174.8M.

Fixes the issue https://github.com/NixOS/nixpkgs/issues/64350.

In git 2.22.0 git-stash is no longer a shell script and now it is just a symlink to git.
`postInstall` assumed that it was a shell script, tried to patch it and
ended up corrupting the file and made `strip` refuse stripping it.
2019-07-17 10:33:13 +02:00
Peter Simons
eeffb474bd
Merge pull request #56069 from delroth/git-diff-highlight
git: build diff-highlight if Perl support is enabled
2019-06-14 17:27:02 +02:00
Will Dietz
eeb9e6c762
git: 2.21.0 -> 2.22.0
https://github.com/git/git/blob/master/Documentation/RelNotes/2.22.0.txt
2019-06-07 20:55:34 -05:00
Frederik Rietdijk
d108b49168 Merge master into staging-next 2019-04-09 16:38:35 +02:00
Tim Steinbach
f53ffadbc5
git: Add update script 2019-04-07 09:15:28 -04:00
Artemis Tosini
fc917e5346
git: 2.19.2 -> 2.21.0 2019-02-25 19:21:45 +00:00
Pierre Bourdon
ce15dafc7d
git: build diff-highlight if Perl support is enabled
Fixes #27671.

git/git@0c977dbc81 made that script
require an extra build step.
2019-02-20 01:11:32 +01:00
Kirill Elagin
047def418e
git: Do not split gitweb output
This partially reverts 9029ed933c as
`git-instaweb`, which comes with git, needs on gitweb and having them in
separate outputs results in a cycle.
2019-01-06 16:14:49 +03:00
Kirill Elagin
813c6d4664
git, gitweb: Fix git-instaweb
* Make the build system embed the correct path to gitweb into git-instaweb
* Move gitweb fixups to the git expression, to make sure that gitweb
used by git-instaweb is functional
* This will increase the closure size of git, but only with perlSupport
2019-01-06 14:56:54 +03:00
volth
bb9557eb7c lib.makePerlPath -> perlPackages.makePerlPath 2018-12-15 03:50:31 +00:00
Craig Younkins
921d046537 git: wrap git-credential-netrc to set PERL5LIB (#50992) 2018-12-14 21:49:09 +01:00
Will Dietz
003a96c04c git: 2.19.1 -> 2.19.2
https://github.com/git/git/blob/master/Documentation/RelNotes/2.19.2.txt
2018-11-21 15:48:45 -06:00
Eelco Dolstra
7b9c4954f2
git: Strip libsecret
This reduces gitFull's closure size from 412 MiB to 271 MiB.
2018-10-08 18:13:29 +02:00
edef
5cdecca8b7 git: 2.19.0 -> 2.19.1 (CVE-2018-17456) 2018-10-05 18:36:08 +00:00
Andrew Childs
50454ec5f1 git: 2.18.0 -> 2.19.0 (#46723) 2018-09-18 17:54:22 +02:00
Frederik Rietdijk
099c13da1b Merge staging-next into master (#44009)
* substitute(): --subst-var was silently coercing to "" if the variable does not exist.

* libffi: simplify using `checkInputs`

* pythonPackges.hypothesis, pythonPackages.pytest: simpify dependency cycle fix

* utillinux: 2.32 -> 2.32.1

https://lkml.org/lkml/2018/7/16/532

* busybox: 1.29.0 -> 1.29.1

* bind: 9.12.1-P2 -> 9.12.2

https://ftp.isc.org/isc/bind9/9.12.2/RELEASE-NOTES-bind-9.12.2.html

* curl: 7.60.0 -> 7.61.0

* gvfs: make tests run, but disable

* ilmbase: disable tests on i686. Spooky!

* mdds: fix tests

* git: disable checks as tests are run in installcheck

* ruby: disable tests

* libcommuni: disable checks as tests are run in installcheck

* librdf: make tests run, but disable

* neon, neon_0_29: make tests run, but disable

* pciutils: 3.6.0 -> 3.6.1

Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/pciutils/versions.

* mesa: more include fixes

mostly from void-linux (thanks!)

* npth: 1.5 -> 1.6

minor bump

* boost167: Add lockfree next_prior patch

* stdenv: cleanup darwin bootstrapping

Also gets rid of the full python and some of it's dependencies in the
stdenv build closure.

* Revert "pciutils: use standardized equivalent for canonicalize_file_name"

This reverts commit f8db20fb3a.
Patching should no longer be needed with 3.6.1.

* binutils-wrapper: Try to avoid adding unnecessary -L flags

(cherry picked from commit f3758258b8895508475caf83e92bfb236a27ceb9)
Signed-off-by: Domen Kožar <domen@dev.si>

* libffi: don't check on darwin

libffi usages in stdenv broken darwin. We need to disable doCheck for that case.

* "rm $out/share/icons/hicolor/icon-theme.cache" -> hicolor-icon-theme setup-hook

* python.pkgs.pytest: setupHook to prevent creation of .pytest-cache folder, fixes #40273

When `py.test` was run with a folder as argument, it would not only
search for tests in that folder, but also create a .pytest-cache folder.
Not only is this state we don't want, but it was also causing
collisions.

* parity-ui: fix after merge

* python.pkgs.pytest-flake8: disable test, fix build

* Revert "meson: 0.46.1 -> 0.47.0"

With meson 0.47.0 (or 0.47.1, or git)
things are very wrong re:rpath handling
resulting in at best missing libs but
even corrupt binaries :(.

When we run patchelf it masks the problem
by removing obviously busted paths.
Which is probably why this wasn't noticed immediately.

Unfortunately the binary already
has a long series of paths scribbled
in a space intended for a much smaller string;
in my testing it was something like
lengths were 67 with 300+ written to it.

I think we've reported the relevant issues upstream,
but unfortunately it appears our patches
are what introduces the overwrite/corruption
(by no longer being correct in what they assume)

This doesn't look so bad to fix but it's
not something I can spend more time on
at the moment.

--

Interestingly the overwritten string data
(because it is scribbled past the bounds)
remains in the binary and is why we're suddenly
seeing unexpected references in various builds
-- notably this is is the reason we're
seeing the "extra-utils" breakage
that entirely crippled NixOS on master
(and probably on staging before?).

Fixes #43650.

This reverts commit 305ac4dade.

(cherry picked from commit 273d68eff8)
Signed-off-by: Domen Kožar <domen@dev.si>
2018-07-24 15:04:48 +01:00
Benjamin Staffin
815ae70556
gitFull: build libsecret credential helper (#43616)
...except on Darwin, where it won't be useful.
2018-07-22 15:20:37 -04:00
Will Dietz
bb00076931 Revert "Revert "Merge pull request #42376 from dtzWill/update/git-2.18.0""
This reverts commit 6d1955e0c4.
2018-06-28 07:01:14 -05:00
Will Dietz
6d1955e0c4 Revert "Merge pull request #42376 from dtzWill/update/git-2.18.0"
This reverts commit 2624f90796, reversing
changes made to 37aab4cbb5.

See:
https://github.com/NixOS/nixpkgs/pull/42376#issuecomment-399789096

Basically this breaks at least some users of fetchgit,
so let's revert this until this is sorted out.
2018-06-24 22:36:50 -05:00
Will Dietz
26f24fe09a git: indicate when last tested to "still" fail, for checking updates 2018-06-22 10:10:20 -05:00
Will Dietz
1190af39b9 git: disable failing completion test as well 2018-06-22 10:02:57 -05:00
Will Dietz
4136cb5ba9 git: disable "editor with a space" tests due to fails
Need to investigate.
2018-06-22 10:00:42 -05:00
Will Dietz
e65e6cad23 git: disable working-tree-encoding tests on musl
Makes assumptions about BOM.
2018-06-22 09:56:20 -05:00
Will Dietz
5f27396e8f git: remove symlinks-in-bin patch 2018-06-22 09:15:54 -05:00
Will Dietz
18231121f4 git: 2.17.1 -> 2.18.0 2018-06-22 09:12:06 -05:00
Matthew Bauer
fc048073e6 git: remove object file from closure
This file pulls in some big dependencies that are unneeded (like
clang).
2018-06-21 19:47:10 -04:00
Tim Steinbach
9db1f486e1
git: 2.17.0 -> 2.17.1 2018-05-29 21:33:43 -04:00
Will Dietz
481ca44771 git: disable failing test w/musl for now
I'm working to resolve this but it will take some time
(patches sent to upstream musl, maybe to git afterwards)
and for now this blocks quite a lot.

If that doesn't work out we can explore options such as
always using GNU libiconv with musl.
2018-05-03 15:20:38 -05:00
Guillaume Maudoux
6dda53ad22 git: add install checks
(cherry picked from commit f57873f674)
2018-04-24 20:26:54 -05:00
Will Dietz
97372a1104 git: 2.16.3 -> 2.17.0... again! 2018-04-24 20:19:22 -05:00
Will Dietz
f07f0c6009 Merge remote-tracking branch 'origin/master' into staging 2018-04-24 19:58:44 -05:00
Ben Gamari
b26ae506a9 git: Set PERL_PATH when building manual
Otherwise the build fails with the perplexing error

    make: *** No rule to make target 'cmd-list.made', needed by 'doc.dep'.  Stop.
    make: Leaving directory '/tmp/nix-build-git-2.16.3.drv-0/git-2.16.3/Documentation'

on NixOS (but not on Debian, where it succeeds, presumably since it picks up the
system perl).
2018-04-24 19:00:34 -04:00
Ben Gamari
d111a42772 git: Enable cross-compilation 2018-04-24 14:58:58 -04:00
Ben Gamari
2d397f1b76 git: Allow perl support to be disabled 2018-04-24 14:58:58 -04:00
Ben Gamari
432df5b1cf git: Fix USE_LIBPCRE2 configuration
Previously this was injected during install, causing the build system to rebuild
the entire package.
2018-04-24 14:58:58 -04:00
Ben Gamari
ae0a14d25d git: Refactor makeFlags using lib.optionals 2018-04-24 14:58:58 -04:00
Tuomas Tynkkynen
3c6e077301 Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	pkgs/development/tools/misc/binutils/default.nix
2018-04-22 22:31:30 +03:00
gnidorah
9029ed933c nixos/gitweb: add gitwebTheme option 2018-04-17 20:07:01 +03:00
Tuomas Tynkkynen
16b45ec3da Merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	pkgs/applications/version-management/git-and-tools/git/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/unix-tools.nix
2018-04-16 21:13:30 +03:00
Will Dietz
281775bb1a git: 2.16.2 -> 2.16.3
Cherry picked from 260194193c in staging as suggested by
https://github.com/NixOS/nixpkgs/pull/38763#issuecomment-380504142.
2018-04-12 08:55:31 +02:00
Guillaume Maudoux
2ddba49f59 git: fix perl libs path 2018-04-11 17:54:08 +02:00
Guillaume Maudoux
ad076ff7ce git: 2.16.3 -> 2.17.0 2018-04-11 17:54:08 +02:00
Will Dietz
260194193c git: 2.16.2 -> 2.16.3 2018-04-11 17:54:08 +02:00
Frederik Rietdijk
ee6894ca12 Merge staging into master 2018-04-11 14:55:52 +02:00
Peter Simons
e4fd05449e git: revert "2.16.2 -> 2.17.0"
This reverts commit 5d65b4ebeb, because it broke
git-add. See https://github.com/NixOS/nixpkgs/pull/38636#issuecomment-380182555
for details.
2018-04-11 09:51:06 +02:00
Frederik Rietdijk
0aa59a08d6 Merge master into staging 2018-04-09 15:12:32 +02:00
Guillaume Maudoux
5d65b4ebeb git: 2.16.2 -> 2.17.0 2018-04-09 10:02:57 +02:00
Tim Steinbach
2bb28e1f01
Revert "git: 2.16.3 -> 2.17.0"
This reverts commit 3bd496faa8.
2018-04-04 08:35:19 -04:00
Tim Steinbach
3bd496faa8
git: 2.16.3 -> 2.17.0 2018-04-03 18:16:27 -04:00
Will Dietz
2b29239eff
Revert "git: 2.16.3 -> 2.17.0" 2018-04-03 07:52:38 -05:00
Will Dietz
dee77f7e43 git: 2.16.3 -> 2.17.0 2018-04-02 16:40:08 -05:00
Will Dietz
dcaea58eb7 git: 2.16.2 -> 2.16.3 2018-03-22 18:29:11 -05:00
Tuomas Tynkkynen
b34274d363 git: 2.16.1 -> 2.16.2 2018-02-19 05:34:03 +02:00
Will Dietz
f2aae45514 git: Disable use of <sys/poll.h> on musl, disable gettext 2018-02-13 09:44:47 -06:00
Tuomas Tynkkynen
630a26ac0b git: 2.16.0 -> 2.16.1 2018-01-22 10:57:00 +02:00
Tim Steinbach
b5be5ef364
git: 2.15.1 -> 2.16.0 2018-01-18 09:13:17 -05:00
Tuomas Tynkkynen
e36e23acd5 git: 2.15.0 -> 2.15.1 2017-12-03 01:50:42 +02:00
Florian Klink
e4bf9e4fef git: honor $PATH for sendmail used in git-send-email command
git-send-email will now search $PATH for a sendmail binary, instead of
the (previously fixed) list of paths.
2017-11-18 09:37:05 +01:00
Dan Peebles
94fc7214ce git: remove custom sandbox profile (not allowed by modern Nix anymore) 2017-11-08 22:23:07 -05:00
Tim Steinbach
7fd58b57b1
git: 2.14.3 -> 2.15.0 2017-10-30 09:04:23 -04:00
Tim Steinbach
124e462455
git: 2.14.2 -> 2.14.3 2017-10-23 08:46:15 -04:00
Mathieu Boespflug
f795d78d86 git: Properly wrap Git commands that are implemented in Perl. (#30001)
Some Git commands are implemented as Perl scripts. Some of these
scripts use Perl modules from CPAN. Without wrapping these programs to
set `GITPERLLIB`, these programs would not be fully functional because
some Perl libraries are found to be missing at runtime.

Fixes #29996
2017-10-02 14:25:12 +01:00
Tim Steinbach
5a2a35aef3
git: 2.14.1 -> 2.14.2 2017-09-26 08:50:00 -04:00
Vladimír Čunát
aea7216cf8
Merge #27962: git: pcre1 -> pcre2
Except for gitMinimal, as pcre1 is in closure anyway so using pcre2
increases the size by ~1.4 MB.
2017-08-27 16:22:11 +02:00
Frederik Rietdijk
13bbaee21d Merge pull request #27881 from mimadrid/fix/http-https
Update homepage attributes: http -> https
2017-08-13 21:53:20 +02:00
Silvan Mosberger
4a0efc9c4f
git: 2.14.0 -> 2.14.1
The new version contains a security fix for CVE-2017-1000117

More information regarding this update can be found here:
http://marc.info/?l=git&m=150238802328673&w=2
2017-08-11 02:17:35 +02:00
mimadrid
95bbe17a04
git: add pcre2 support 2017-08-07 14:55:30 +02:00
mimadrid
dc74b1a86d
git: 2.13.4 -> 2.14.0 2017-08-04 23:58:45 +02:00
mimadrid
09e0cc7cc7
Update homepage attributes: http -> https
Homepage link "http://.../" is a permanent redirect to "https://.../" and should be updated
https://repology.org/repository/nix_stable/problems
2017-08-03 11:56:15 +02:00
Tim Steinbach
ae73a1704a
git: 2.13.3 -> 2.13.4 2017-08-01 18:41:14 -04:00
Tim Steinbach
eb5263a9f1
git: 2.13.2 -> 2.13.3 2017-07-13 08:45:43 -04:00
Alexander Schmolck
2c1097a83b git: add missing deps for filter-branch etc (#27221)
Several git commands are implemented as shell scripts that run awk, sed, grep
and perl. There is some existing patching in the postinstall for perl to rewrite
it to an absolute reference to pkgs.perl, but several other packages are both
missing as a dependency and have no rewrite logic.

In particular git filter-branch depends on sed and grep.

Additionally, the perl logic also seds git-am, which is now a binary not a shell
script anymore (see <github.com/git/git/blob/master/builtin/am.c>), so this part
was obsolete.

I tested this by grepping all shell scripts for the relevant commands and then
comparing the diffs of the new version to what is produced in master. All
changes in the scripts seem good to me.
2017-07-11 17:00:17 +01:00
Tim Steinbach
1a25495b63
git: 2.13.1 -> 2.13.2 2017-06-25 21:13:23 -04:00
Tim Steinbach
385ba07615
git: 2.13.0 -> 2.13.1 2017-06-05 09:10:26 -04:00
Tim Steinbach
ce8662e693
git: 2.12.2 -> 2.13.0 2017-05-09 21:57:24 -04:00
Tim Steinbach
10725a6329
git: 2.12.0 -> 2.12.2 2017-03-25 10:25:54 -04:00
Guillaume Maudoux
525a663174 curl, git: Fix curl default CA, let git use it
Improve patching of curl to use NIX_SSL_CERT_FILE as default CA
Remove patches from git, as git uses curl and passes its environment
variables to curl.
2017-03-22 11:22:53 +01:00
Domen Kožar
c3c9412c7d
git, openssl, curl: Respect $NIX_SSL_CERT_FILE
Slightly modified version of 942dbf89c6
2017-03-20 14:11:20 +01:00
Tim Steinbach
7611525c00
git: 2.11.1 -> 2.12.0 2017-02-26 16:18:42 -05:00
Tim Steinbach
c1e7832591
git: 2.11.0 -> 2.11.1 2017-02-03 18:54:35 -05:00
Tim Steinbach
f1a0cadaec
git: 2.10.2 -> 2.11.0 2016-11-29 18:37:24 -05:00
Alex Dunn
80bff0b459 git: link git-credential-netrc into $out/bin 2016-11-19 13:36:30 -08:00
Tim Steinbach
ef4a335be4
git: 2.10.1 -> 2.10.2 2016-11-15 18:05:02 -05:00
dipinhora
641a1e433a git: enable credential-osxkeychain for darwin 2016-10-11 15:25:08 -04:00
Frederik Rietdijk
2fb5289d83 git: 2.10.0 -> 2.10.1 2016-10-05 10:37:09 +02:00