On 5/25/26 9:31 AM, Jonathan Wakely wrote:
> On Mon, 25 May 2026 at 03:32, Omair Majid <[email protected]> wrote:
>>
>> Hi,
>>
>> (Re-sending with fixed CC, sorry)
>>
>> Jonathan Wakely <[email protected]> writes:
>>
>>> Has something changed in rpminspect recently? I built a new dejagnu
>>> package and it's failing rpminspect:
>>> https://artifacts.dev.testing-farm.io/d6ffbc34-995f-47a5-b41a-87b5ff33be0d/
>>
>>> The error is:
>>> "/usr/share/dejagnu/remote.exp is not a valid sh script on noarch"
>>>
>>> and ... well, that's true. It's not a sh script at all. It's not
>>> executable, it doesn't have a shebang, it doesn't end in .sh ... why
>>> is rpminspect even looking at it?
>>
>> I suspect this is the reason why:
>> https://github.com/rpminspect/rpminspect/pull/1412
> 
> I did find that in the repo, but thought that it couldn't be the
> reason because it was merged in 2024, but ...
> 
>>
>> rpminspect sees that the remote.exp file has a mime-type beginning with
>> `text/`, then sees that it contains `exec sh...` so the heuristic it
>> uses concludes that the script itself is an `sh` script.
>>
>>> A build a few weeks ago didn't have this problem.
>>
>> Fedora's CI was using a stale version of rpmisnpect for a while, so
>> maybe that's why this started showing up now?
> 
> ... that would explain it, thanks.
> 

I made this change today:

https://github.com/rpminspect/rpminspect/pull/1589

Restrict the looking for an exec line to only happen if we also pick up a known 
shell from a #! line.  This should avoid running checks on script code that 
lacks a #! as well as README files that have code in them.  In this case the 
dejagnu remote.exp script is Tcl code, but it's not meant to be run directly by 
a user.  And it would use tclsh or wish anyway, which the shellsyntax 
inspection does not handle.  Or at least doesn't mean to go out of its way to 
handle.

-- 
Dave Cantrell <[email protected]>
Red Hat, Inc. | Boston, MA | EST5EDT

-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to