ports/92946: New port: print/xmlprpr - XML Pretty Printer

Jean-Yves Lefort jylefort at FreeBSD.org
Sun Feb 12 13:39:31 PST 2006


On Sun, 12 Feb 2006 16:31:02 -0500
Paul Chvostek <paul+fbsd at it.ca> wrote:

> On Sun, Feb 12, 2006 at 10:02:41PM +0100, Jean-Yves Lefort wrote:
> > > 
> > > # cd /usr/ports
> > > # grep -lr '\${PERL' . | grep -c '/Makefile$'
> > > 1933
> > > # grep -lr '/usr/bin/perl' . | while read file; do grep -q '\${PERL' $file || echo $file; done | grep -c '/Makefile$'
> > > 3
> > > 
> > > Of these three hits, only one appears to assume that the perl binary
> > > lives in /usr/bin/perl.  (That would be sysutils/reoback.)
> > 
> > # grep '#!/usr/bin/perl' /usr/bin/* /usr/local/bin/* /usr/X11R6/bin/*
> ...
> > Of course, I only have 500 ports installed.
> 
> Sure, but this only demonstrates that *your* PERL variable points at
> /usr/bin/perl, not what those ports could potentially use.  I think
> you'll find that all the Perl scripts you've installed in /usr/local/bin
> and /usr/X11R6/bin have shell magic controlled by the PERL variable, and
> not by a static string.  Unless one of them is reoback.  :)

No. I'm running FreeBSD 6.0 with the perl5.8 port, and so my ${PERL}
variable points at /usr/local/bin/perl. This demonstrates that
#!/usr/bin/perl is usually left untouched.

> > It'll not break if you hardcode /usr/bin/perl.
> 
> It will if you're installing on a machine that has /usr/local/bin/perl.
> On an older (4.9) machine I manage at work:
> 
> # grep -c '/usr/local/bin/perl' /usr/local/bin/* | awk -F: '{a+=$2}END{print a}'
> 85
> # grep '/usr/local/bin/perl' /usr/local/bin/* | head -10
> Binary file /usr/local/bin/a2p matches
> /usr/local/bin/c2ph:#!/usr/local/bin/perl
> /usr/local/bin/c2ph:    eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
> /usr/local/bin/c2ph:    #!/usr/local/bin/perl
> /usr/local/bin/cpan:#!/usr/local/bin/perl
> /usr/local/bin/cpan:    eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
> /usr/local/bin/crc32:#!/usr/local/bin/perl -w
> /usr/local/bin/crc32:eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}'
> /usr/local/bin/decode-base64:#!/usr/local/bin/perl
> /usr/local/bin/decode-base64:eval 'exec /usr/local/bin/perl  -S $0 ${1+"$@"}'
> 
> So who knows -- it may not even be only shell magic that needs ${PERL}.

These scripts should break if you remove your Perl port.

-- 
Jean-Yves Lefort

jylefort at FreeBSD.org
http://lefort.be.eu.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060212/dd4646b3/attachment.bin


More information about the freebsd-ports mailing list