logo       

Re: patch to allow extra perl args on #! lines: msg#00006

db.rddtool.munin.general

Subject: Re: patch to allow extra perl args on #! lines

On Tuesday, 2006-12-05 at 15:11:52 +0000, Bennett Todd wrote:
> Sorry about broken threading and awkward reply quoting, I'm pulling
> the replies from the web archive.

Well, mutt coped with your "broken" threading just fine. Much better
than what I see from Outlook or Outlook Express.

> > The problem is that passing more than one argument on the shebang
> > line isn't portable.

> On Linux at least, the #! parser in execve seems to pass all the
> args as a single one with embedded whitespace, but perl seems to
> cope with this gracefully. From the shebang article you linked to
> (thanks!) it looks like SunOS 5.x is the only place where this would
> break, and there just by losing the extra args.

That's what we mean with not portable. You missed that FreeBSD was not
doing that either until 6.mumble.

> > Perhaps you should have discussed your problem on this mailing
> > list.

> I probably should subscribe to it, too:-)

Good idea! :-)

> > We could have come up with a more portable solution. Now we don't
> > even know *why* you want to pass -I arguments to perl.

> I'm sorry, I thought the readme explained:

> > The purpose of this patch is to allow a packager to specify
> > Perl module path directories with -I.

Not it says what you want to do, not why. But you are explaining that
below.

> > Its definitely not a normal installation.

> Nope. It's an installation into a shop where the paths that the
> supported perl executable looks on aren't writeable directly, and
> the paths that perl module installers should write, that ultimately
> get propogated to the paths on @INC, can only be written by the perl
> installation maintainers, not by other folks wanting to build
> something like munin.

So you require this for testing? Production uses site_perl? I would
recommend you use a wrapper at some other location that calls perl
-I<temp_path> $*.

You will have to change all Perl programs for installation anyway.

Please understand that we are reluctant to add a feature that until now
nobody has requested, and that you only require for testing. Especially
when we know that it breaks on some platforms. And when there are easier
solutions available.

> And the second reply:

> > As Lupe says, more than one argument string is not portable (I
> > didn't even know it worked on _some_ platforms).

> Given it works on Linux, I am assuming that perl itself is offering
> a helping hand, so I _think_ it should work everywhere except
> Solaris 2 (and OpenServer but I think it's a civic duty to break
> code on that platform).

> > I might be more inclined to allow some ugly foo with perls use
> > lib.

> Seems more intrusive; this is so light-touch that we won't be fussed
> at all if you decline the patch, maintaining this variation
> ourselves will be quite painless:-).

I agree that it's little effort to maintain this. But a wrapper is even
lower maintenance...

> > But is this really needed?

> We weren't able to fire up the node without it, we were able to with
> it.

> > I don't seem to have any tainting plugins in the repository.

> Just from ogling the patch, munin-node.in and munin-run.in have -wT.

It would be a good idea to turn on warnings (-w) in all Perl programs.

Lupe Christoph
--
| You know we're sitting on four million pounds of fuel, one nuclear |
| weapon and a thing that has 270,000 moving parts built by the lowest |
| bidder. Makes you feel good, doesn't it? |
| Rockhound in "Armageddon", 1998, about the Space Shuttle |

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise