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: Properly wrap Git commands that are implemented in Perl. #30001

Merged
merged 1 commit into from Oct 2, 2017

Conversation

mboes
Copy link
Contributor

@mboes mboes commented Oct 1, 2017

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.

git-svn was one such program. It was already wrapped properly,
provided svnSupport = true. Similarly for git-send-mail. But this
wrapping did not extend to other commands.

Fixes #29996

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 NixOS#29996
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zimbatm
Copy link
Member

zimbatm commented Oct 2, 2017

14296 packages will be rebuilt

@orivej orivej changed the base branch from master to staging October 2, 2017 11:33
@orivej
Copy link
Contributor

orivej commented Oct 2, 2017

I don't like that this manually lists perl programs instead of wrapping all programs (except git-svn and git-send-email) with a perl shebang.

@zimbatm zimbatm merged commit f795d78 into NixOS:staging Oct 2, 2017
@zimbatm
Copy link
Member

zimbatm commented Oct 2, 2017

oops I've missed your comment @orivej. Can you expand your objection a bit? I don't understand the issue that you are seeing.

@zimbatm
Copy link
Member

zimbatm commented Oct 2, 2017

pushed as 07ca7b6 in the release-17.09 branch

zimbatm pushed a commit that referenced this pull request Oct 2, 2017
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

(cherry picked from commit f795d78)
@orivej
Copy link
Contributor

orivej commented Oct 2, 2017

The issue is that if git adds new perl programs or rewrites old perl programs in another language, the wrapper will have to be updated. I propose that we iterate over git-exec/ and wrap all programs with a perl shebang, this way we will not have to maintain the wrapper.

This was not necessary to do in this PR and I don't mind that you've merged it.

@zimbatm
Copy link
Member

zimbatm commented Oct 2, 2017

Ok. I agree that we might potentially have more maintenance down the road with the current approach but I am not sure if wrapping all the libexec programs is the right approach either. Another option would be to wrap the git binary itself and let it propagate the environment variables to the sub-programs.

Anyways, right now it's fixed, it will come back at the next upgrade of if it becomes too annoying to maintain.

@mboes mboes deleted the git-add-interactive branch October 2, 2017 21:17
@mboes
Copy link
Contributor Author

mboes commented Oct 2, 2017

I propose that we iterate over git-exec/ and wrap all programs with a perl shebang

I think this is a good idea. Note that this PR didn't introduce a problem that wasn't already there: the existing code is already singling out some commands to be wrapped - it's just that a few had been forgotten over time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants