Perl Symlinks question

rflynn at rflynn at
Tue Jan 17 02:06:48 UTC 2012


On Tue Jan 10 09:57:32 UTC 2012, Erik Tulsson wrote:
> On Tue, Jan 10, 2012 at 12:46:51AM +0100, Oliver Heesakkers wrote:
> > Op ma 09 jan 2012 22:49:33 schreef Ruslan Mahmatkhanov:
> > > Hi.
> > >
> > > There is PR:
> > > It tries to fix port building when user built it's perl installation
> > > with USE_PERL option (creating symlinks in /usr/bin) set to off (not the
> > > default). Patch in PR just replaces static shebang with ${PERL} variable
> > > from Mk/ But it doesn't actually fix the build, because
> > > consequent call of aclocal-1.11 will fail since it's shebang set to
> > > '/usr/bin/perl' too.
> > >
> > > The question is how to properly handle this PR:
> > > 1. Fix devel/automake too (by replacing /usr/bin/perl with ${PERL})
> > > 2. Create symlinks unconditionally in perl port and drop USE_PERL option
> > > 3. Close PR as invalid since the build fails because of user
> > >     intervention (changing the value of default option)
> >
> > 4. Teach upstream (and maybe maintainers) to use /usr/bin/env as they should
> > do:
> >
> >
> That may be the modern way of doing it, but older versions of the Perl
> documentation used to recommend using /usr/bin/perl, so there are most
> likely a ton of perl scripts out there (only a small fraction of which
> appears in the FreeBSD ports tree) which use that convention.
> It is also worth noting that even the current version of the Perl
> documentation refers to /usr/bin/perl in numerous places and recommends
> that it exists as a symlink to the perl binary.

As the original reporter, I'd like to keep the option to turn use_perl off.
For two reasons:

1) Those scripts you mention above will never be identified (and fixed) if you
   keep the compatibility symlink. Some don't care, some do, which is why the
   option (and default setting) are good.
2) When you use a ezjail-like setup with a template jail and read-only nullfs
   mounts, it means that all the jails on that template SHALL have the same
   perl version, because it links to exact perl binary version, not just
   /usr/local/bin/perl. This has bit me before and I decided to get rid of
   the symlink in the template jail, rather then creating another template
   just for different perl versions.

-- Mel

More information about the freebsd-ports mailing list