bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build failures of coreutils-8.1 in Fedora build system "koji"


From: Jim Meyering
Subject: Re: Build failures of coreutils-8.1 in Fedora build system "koji"
Date: Mon, 23 Nov 2009 15:32:49 +0100

Ondřej Vašík wrote:
> Jim Meyering wrote:
...
>> Thanks for the report.
>> For the 126 vs 127 problems, it looks like execvp is
>> failing with errno != ENOENT.  I.e., when you run "env no_such",
>> we expect execvp to fail with errno == ENOENT, and hence env should
>> exit with EXIT_ENOENT (127).  Since it's actually exiting with status
>> of 126, execvp must be failing with some other errno value.
>>
>>   ...
>>   execvp (argv[optind], &argv[optind]);
>>
>>   {
>>     int exit_status = (errno == ENOENT ? EXIT_ENOENT : EXIT_CANNOT_INVOKE);
>>     error (0, errno, "%s", argv[optind]);
>>     exit (exit_status);
>>   }
>>
>> Can you strace it?
>> That would show the unexpected errno value.
>
> relevant part
> (http://koji.fedoraproject.org/koji/getfile?taskID=1824793&name=build.log)
>
> ...
> execve("/usr/X11R6/bin/no_such", ["no_such"], [/* 57 vars */]) = -1
> ENOENT (No such file or directory)
> execve("/root/bin/no_such", ["no_such"], [/* 57 vars */]) = -1 EACCES 
> (Permission denied)
...
> /root/bin/ directory is not created in koji buildroot (it is not created by 
> default at all) - so that might be the difference.

Thanks!  The problem is that your PATH contains a
directory that disallows search access:

    $ (mkdir d && chmod u-x d && export PATH=d:$PATH; env no-such )
    env: no-such: Permission denied
    [Exit 126]

in that case, execve fails with permission denied.

I've just confirmed that Solaris 10's env command also
exits with status 126 in this case.

I think the best way to fix this problem is to add a new predicate
that skips the test when PATH contains an unsearchable directory.

Or better still: just rewrite PATH to exclude any such directory.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]