/usr/bin/perl on FreeBSD

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

/usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
Hi,

We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
/usr/local/bin/perl, but /user/bin/env perl works)

For example, the attached patch fixes setting up the nt4_member test
env, but there are ~70 scripts with /usr/bin/perl.

Do we fix all those scripts or ask FreeBSD developers to kindly install
a symlink or something when they build Samba?

Thanks,
Uri.

nt4_member-env.patch.txt (960 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
Perl location is discovered during the build.
This location should be used when installing perl scripts.

On 12/20/2017 3:57 PM, Uri Simchoni via samba-technical wrote:

> Hi,
>
> We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
> which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
> /usr/local/bin/perl, but /user/bin/env perl works)
>
> For example, the attached patch fixes setting up the nt4_member test
> env, but there are ~70 scripts with /usr/bin/perl.
>
> Do we fix all those scripts or ask FreeBSD developers to kindly install
> a symlink or something when they build Samba?
>
> Thanks,
> Uri.


Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
On 12/20/2017 11:02 PM, jim via samba-technical wrote:
> Perl location is discovered during the build.
> This location should be used when installing perl scripts.
>
Good point. I'll be trying the attached patch (need to run it through an
autobuild first...)

Thanks,
Uri.

> On 12/20/2017 3:57 PM, Uri Simchoni via samba-technical wrote:
>> Hi,
>>
>> We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
>> which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
>> /usr/local/bin/perl, but /user/bin/env perl works)
>>
>> For example, the attached patch fixes setting up the nt4_member test
>> env, but there are ~70 scripts with /usr/bin/perl.
>>
>> Do we fix all those scripts or ask FreeBSD developers to kindly install
>> a symlink or something when they build Samba?
>>
>> Thanks,
>> Uri.
>
>


raw_fix.path (656 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On Wednesday, 20 December 2017 21:57:24 CET Uri Simchoni via samba-technical
wrote:

> Hi,
>
> We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
> which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
> /usr/local/bin/perl, but /user/bin/env perl works)
>
> For example, the attached patch fixes setting up the nt4_member test
> env, but there are ~70 scripts with /usr/bin/perl.
>
> Do we fix all those scripts or ask FreeBSD developers to kindly install
> a symlink or something when they build Samba?
>
> Thanks,
> Uri.

RB+ could you please create an upstream nss_wrapper patch for this too?


        Andreas


--
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             [hidden email]
www.samba.org



Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On Wed, Dec 20, 2017 at 9:57 PM, Uri Simchoni <[hidden email]> wrote:

> Hi,
>
> We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
> which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
> /usr/local/bin/perl, but /user/bin/env perl works)
>
> For example, the attached patch fixes setting up the nt4_member test
> env, but there are ~70 scripts with /usr/bin/perl.
>
> Do we fix all those scripts or ask FreeBSD developers to kindly install
> a symlink or something when they build Samba?
>

Somehow I never faced with that particular problem, maybe due the way I/we
build the Samba port.

Symlink to /usr/bin used to be provided in the past, but now it's gone and
I don't think it'll strike back.

In general, I'd vote for the auto-detection and/or usage $ENV{'PERL'} or
$ENV{'PERL5'} for that.


With regards,
Timur Bakeyev.
Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
On 12/22/2017 01:18 AM, Timur I. Bakeyev wrote:

>
> On Wed, Dec 20, 2017 at 9:57 PM, Uri Simchoni <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
>     which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
>     /usr/local/bin/perl, but /user/bin/env perl works)
>
>     For example, the attached patch fixes setting up the nt4_member test
>     env, but there are ~70 scripts with /usr/bin/perl.
>
>     Do we fix all those scripts or ask FreeBSD developers to kindly install
>     a symlink or something when they build Samba?
>
>
> Somehow I never faced with that particular problem, maybe due the way
> I/we build the Samba port.
>

The problem surfaces when running "make test", not when building.

> Symlink to /usr/bin used to be provided in the past, but now it's gone
> and I don't think it'll strike back.
>
> In general, I'd vote for the auto-detection and/or usage $ENV{'PERL'} or
> $ENV{'PERL5'} for that.
>
>

Already posted a solution in that spirit, forgot to cc you but you can
see it on samba-technical.

Thanks,
Uri.

> With regards,
> Timur Bakeyev.
>


Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
On Fri, 2017-12-22 at 01:23 +0200, Uri Simchoni via samba-technical
wrote:

> On 12/22/2017 01:18 AM, Timur I. Bakeyev wrote:
> >
> > On Wed, Dec 20, 2017 at 9:57 PM, Uri Simchoni <[hidden email]
> > <mailto:[hidden email]>> wrote:
> >
> >     Hi,
> >
> >     We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
> >     which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
> >     /usr/local/bin/perl, but /user/bin/env perl works)
> >
> >     For example, the attached patch fixes setting up the nt4_member test
> >     env, but there are ~70 scripts with /usr/bin/perl.
> >
> >     Do we fix all those scripts or ask FreeBSD developers to kindly install
> >     a symlink or something when they build Samba?
> >
> >
> > Somehow I never faced with that particular problem, maybe due the way
> > I/we build the Samba port.
> >
>
> The problem surfaces when running "make test", not when building.
>
> > Symlink to /usr/bin used to be provided in the past, but now it's gone
> > and I don't think it'll strike back.
> >
> > In general, I'd vote for the auto-detection and/or usage $ENV{'PERL'} or
> > $ENV{'PERL5'} for that.
> >
> >
>
> Already posted a solution in that spirit, forgot to cc you but you can
> see it on samba-technical.

I've got in autobuild now.

Andrew Bartlett

--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT  
https://catalyst.net.nz/services/samba





Reply | Threaded
Open this post in threaded view
|

Re: /usr/bin/perl on FreeBSD

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On 12/21/2017 04:23 PM, Andreas Schneider wrote:

> On Wednesday, 20 December 2017 21:57:24 CET Uri Simchoni via samba-technical
> wrote:
>> Hi,
>>
>> We seem to have many perl scripts with a "#!/usr/bin/perl" shebang,
>> which doesn't work on my FreeBSD 11.1-RELEASE machine (where perl is at
>> /usr/local/bin/perl, but /user/bin/env perl works)
>>
>> For example, the attached patch fixes setting up the nt4_member test
>> env, but there are ~70 scripts with /usr/bin/perl.
>>
>> Do we fix all those scripts or ask FreeBSD developers to kindly install
>> a symlink or something when they build Samba?
>>
>> Thanks,
>> Uri.
>
> RB+ could you please create an upstream nss_wrapper patch for this too?
>
>

Turns out upstream nss_wrapper already has /usr/bin/env perl - had it
since last May, but there was no release.

In any case, the fix that got into master Samba doesn't depend on the
shebang, it gets perl from the configuration process.

Thanks,
Uri.