Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git, gitweb: Fix git-instaweb #53494

Merged
merged 2 commits into from Aug 4, 2019
Merged

git, gitweb: Fix git-instaweb #53494

merged 2 commits into from Aug 4, 2019

Conversation

kirelagin
Copy link
Member

Motivation for this change

Git’s build system does two things with the gitwebdir variable:

  1. Puts gitweb there
  2. Embeds this path into git-instaweb

Before this change git-instaweb wouldn’t work as it was looking for gitweb in git’s share directory, but it was moved away into a separate output by the nix expression.

This PR sets the gitwebdir variable in the Makefile and points it to the gitweb output. As a result, a path to this output is now embedded into git-instaweb, which will affect the closure size, but, AFAIU, only if perlSupport is enabled, so this is probably not a problem? I also had to move the fixups from the gitweb expression to git itself to make sure that gitweb.cgi that is referenced from git-instaweb is functional.

Fixes #53491.

@gnidorah @peti @the-kenny @wmertens

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

  • I always interrupted the build of git as its tests take too long, but I am relatively confident that it works as its tests were running successfully for quite a while.
  • git instaweb now works
  • I have not tried to build gitweb (as git never finished building), but I don’t think this change could break something in it.

* 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
@kirelagin
Copy link
Member Author

kirelagin commented Jan 6, 2019

Oh, ok, never mind. Skipped tests and it doesn’t work:

patching script interpreter paths in /nix/store/...-git-2.19.2-gitweb
cycle detected in the references of '/nix/store/...-git-2.19.2-gitweb' from '/nix/store/...-git-2.19.2'
error: build of '/nix/store/...-git-2.19.2.drv' failed

Not sure what to do now. Probably unsplit git and git.gitweb? 🤔 @gnidorah

This partially reverts 9029ed9 as
`git-instaweb`, which comes with git, needs on gitweb and having them in
separate outputs results in a cycle.
@kirelagin
Copy link
Member Author

For reference, I partially reverted #38918.

@ghost
Copy link

ghost commented Jan 7, 2019

@kirelagin sorry, i don't use gitweb atm. Feel free to do whatever you find an appropriate.

@wmertens
Copy link
Contributor

Since you're going from not working to working, I think you can merge if it works and if closure size is not impacted overly much.

@aanderse
Copy link
Member

@kirelagin from your perspective what is the status on this?

@kirelagin
Copy link
Member Author

I don’t see any reasons not to merge it.

@aanderse
Copy link
Member

aanderse commented Mar 27, 2019

@wmertens @peti @the-kenny final approval before merging please?

@wmertens wmertens merged commit f24e74d into NixOS:master Aug 4, 2019
@wmertens
Copy link
Contributor

wmertens commented Aug 4, 2019

Thanks, looking forward to trying it out!

@kirelagin kirelagin deleted the git-instaweb branch August 9, 2019 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

git-instaweb is broken
4 participants