git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Making perl scripts include the correct Git.pm

From
Junio C Hamano <junkio@cox.net>
Date
Jul 3, 2006, 00:02 UTC
Message-ID
<7v64if1rop.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060702214012.GI29115@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
> so this is my attempt to summarize it:

Ah, our message crossed -- thanks for summarizing it. I do not particularly like any of the solution so far, but maybe the patch I just sent out to "do the normal thing unless we are running tests" might be the right thing to do.

Show 6 quoted lines
>   (ii) My proposed second solution was to add an autogenerated line to
> the Git's perl scripts saying something like:
>
> 	use lib ('instlibdir', 'srclibdir');
>
> This fulfills all (D1), (D2) and (D3)
If you have srclibdir after instlibdir, aren't you breaking D2?

And I do not think swapping them is right either. It would fullfil D1/D2/D3 but I think it has one bad side effect.

Namely, I do not want an installed script, maybe coming from the vendor, to be affected by whatever unrelated garbage the end user happens to have on the same path as the one used for building the module on potentially remote machine, so I would like to avoid including srclibdir anywhere on the include path for normal execution.

That is, if I built a binary package in /home/junio/git/git.git on my machine to be installed in /usr/lib/perl/somewhere, the users on a multi-user system can be tricked to run random stuff that happens to be in /home/junio/git/git.git/ directory on their machine.

Previous: Petr BaudisNext: Junio C Hamano
Message 2 of 6 in “Making perl scripts include the correct Git.pm”
  1. Petr BaudisJul 2, 2006
  2. Junio C HamanoJul 3, 2006
  3. Junio C HamanoJul 3, 2006
  4. Marco CostalbaJul 4, 2006
  5. Petr BaudisJul 3, 2006
  6. Use $GITPERLLIB instead of $RUNNING_GIT_TESTS and centralize @INC mungingPetr Baudis, Jul 3, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.