Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 129386
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: MM_Cygwin::maybe_command
The check mistakenly tries to use the MM_Win32 variant of this function if the command resolves to a path outside the Cygwin installation directory. This does not indicate that the command in question is _not_ a Cygwin command, nor does Cygwin itself have any limitation in this regard. In particular, if you build outside the Cygwin installation (either in your home directory, on a different disk or a network share) the check will fail false negative. This nixes some recently added tests in fixin.t for the shebang rewrite. I will release a patched version of 7.36 on Cygwin with that overload removed from MM_Cygwin, which fixes the test issues. I can't really think of a situation where you'd need to fall back to MM_Win32 these days; if Cygwin doesn't recognize the file as executable, then its Perl won't run it anyway.
Subject: perl-ExtUtils-MakeMaker.src.patch
--- origsrc/ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Cygwin.pm 2019-04-28 17:32:31.000000000 +0200 +++ src/ExtUtils-MakeMaker-7.36/lib/ExtUtils/MM_Cygwin.pm 2019-05-01 16:42:58.927633300 +0200 @@ -9,7 +9,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '7.36'; +our $VERSION = '7.36_01'; $VERSION =~ tr/_//d; @@ -100,26 +100,6 @@ sub init_linker { $self->{EXPORT_LIST} ||= ''; } -=item maybe_command - -Determine whether a file is native to Cygwin by checking whether it -resides inside the Cygwin installation (using Windows paths). If so, -use C<ExtUtils::MM_Unix> to determine if it may be a command. -Otherwise use the tests from C<ExtUtils::MM_Win32>. - -=cut - -sub maybe_command { - my ($self, $file) = @_; - - my $cygpath = Cygwin::posix_to_win_path('/', 1); - my $filepath = Cygwin::posix_to_win_path($file, 1); - - return (substr($filepath,0,length($cygpath)) eq $cygpath) - ? $self->SUPER::maybe_command($file) # Unix - : ExtUtils::MM_Win32->maybe_command($file); # Win32 -} - =item dynamic_lib Use the default to produce the *.dll's.
Thanks for the report. Please don't release a version of EUMM.
On Wed May 01 12:19:25 2019, ETJ wrote: Show quoted text
> Thanks for the report. Please don't release a version of EUMM.
Well, you don't leave me much choice if you don't fix it in your releases, do you? In case it wasn't sufficiently clear, I am the Cygwin Perl maintainer and I will patch anything if it unbreaks Perl on Cygwin. The function in question was introduced in 2009 via RT#16375 (git commit d0aedb081aa). I don't remember if that was a real problem or a pilot error with the mount flags (noexec, cough) back then, but that Cygwin version no longer runs on any supported or semi-supported version of Windows and current Cygwin doesn't have that problem anymore: $ perl -E 'say "This file is ", -e "/cygdrive/c/Program\ Files/Intel/Media\ SDK/libmfxhw32.dll" ? "executable." : "not executable."' This file is executable. Again, leaving the function in results in a test failure in EUMM's own test suite unless the build directory is within the Cygwin installation tree.
Show quoted text
> In case it wasn't sufficiently clear, I am the Cygwin Perl maintainer
It was not. Do you have a name or an email address?
On Sat Oct 05 13:34:33 2019, https://me.yahoo.com/howdidwegetherereally#f714d wrote: Show quoted text
> On Wed May 01 12:19:25 2019, ETJ wrote:
> > Thanks for the report. Please don't release a version of EUMM.
> > Well, you don't leave me much choice if you don't fix it in your > releases, do you? In case it wasn't sufficiently clear, I am the > Cygwin Perl maintainer and I will patch anything if it unbreaks Perl > on Cygwin. > > The function in question was introduced in 2009 via RT#16375 (git > commit d0aedb081aa). I don't remember if that was a real problem or a > pilot error with the mount flags (noexec, cough) back then, but that > Cygwin version no longer runs on any supported or semi-supported > version of Windows and current Cygwin doesn't have that problem > anymore: > > $ perl -E 'say "This file is ", -e "/cygdrive/c/Program\ > Files/Intel/Media\ SDK/libmfxhw32.dll" ? "executable." : "not > executable."' > This file is executable.
Three points: 1) you probably wanted to do "-x", not "-e"; 2) you would get much better traction if you made a pull request against EUMM's GitHub repo; 3) that PR would be even more powerful if you can as part of it persuade the AppVeyor build to test on CygWin, which I know must be possible.
On Sun Oct 06 07:21:31 2019, ETJ wrote: Show quoted text
> 1) you probably wanted to do "-x", not "-e";
My bad, copied the wrong line from the terminal. Here it is again, this time with the correct test: perl -E 'say "This file is ", -x "/cygdrive/c/Program\ Files/Intel/Media\ SDK/libmfxhw32.dll" ? "executable." : "not executable."' This file is executable. Show quoted text
> 2) you would get much better traction if you made a pull request > against EUMM's GitHub repo;
Once GitHub doesn't require an account to do anything on it I will. Show quoted text
> 3) that PR would be even more powerful if you can as part of it > persuade the AppVeyor build to test on CygWin, which I know must be > possible.
I know next to nothing about AppVeyor other that it exists (and would require yet another account or maybe it's rolled in with GitHub, see above). But yes, Cygwin runs on AppVeyor, although I'm not sure how closely they follow the releases. If you have to install a large number of packages to get things rolling you might hit their limits unlewss you have something better than their free tier. I've attached the current patch I'm using, or pick it up from here: https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/perl-ExtUtils-MakeMaker.git;a=summary
Subject: perl-ExtUtils-MakeMaker-7.38-1.src.patch
--- origsrc/ExtUtils-MakeMaker-7.38/lib/ExtUtils/MM_Cygwin.pm 2019-09-11 11:01:28.000000000 +0200 +++ src/ExtUtils-MakeMaker-7.38/lib/ExtUtils/MM_Cygwin.pm 2019-10-05 11:04:17.935056900 +0200 @@ -9,7 +9,7 @@ require ExtUtils::MM_Unix; require ExtUtils::MM_Win32; our @ISA = qw( ExtUtils::MM_Unix ); -our $VERSION = '7.38'; +our $VERSION = '7.38_01'; $VERSION =~ tr/_//d; @@ -100,26 +100,6 @@ sub init_linker { $self->{EXPORT_LIST} ||= ''; } -=item maybe_command - -Determine whether a file is native to Cygwin by checking whether it -resides inside the Cygwin installation (using Windows paths). If so, -use C<ExtUtils::MM_Unix> to determine if it may be a command. -Otherwise use the tests from C<ExtUtils::MM_Win32>. - -=cut - -sub maybe_command { - my ($self, $file) = @_; - - my $cygpath = Cygwin::posix_to_win_path('/', 1); - my $filepath = Cygwin::posix_to_win_path($file, 1); - - return (substr($filepath,0,length($cygpath)) eq $cygpath) - ? $self->SUPER::maybe_command($file) # Unix - : ExtUtils::MM_Win32->maybe_command($file); # Win32 -} - =item dynamic_lib Use the default to produce the *.dll's.