Bug#1026976: Upcoming test suite regression due to changes in file/libmagic

Chris Lamb lamby at debian.org
Wed Dec 28 10:12:22 GMT 2022


Hi Christoph,

Thanks again for the "new version of file in experimental" bugs;
very much appreciated.

> - a /usr/bin/python3 script executable (binary data)
> + Zip archive, with extra data prepended
>
> Now that looks a bit delicate ... if you think this is something that
> should be handled in file/libmagic, let me know.

Naturally, as one of the maintainers of strip-nondeterminism, I am
inclined to believe that this is a minor regression in file. :)

However, this "extra data prepended" doesn't fit well under the rubric
of "data". Yes, this "#!/usr/bin/python3\n" shebang is definitely
"data" of a kind, but a shebang isn't really data in that way given
the special-treatment afforded to it by UNIX systems. Even if this
noun was replaced by the more general "bytes", the magic nature of the
shebang would still remain… as would the desire to discriminate
between pyzip files and other ZIP files with prepended data.

Could another — different — string be emitted in the case that these
prepended bytes are a shebang? We could potentially look for the file
starting with #! and for that to take precedence over this new case.


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org 🍥 chris-lamb.co.uk
       `-



More information about the Reproducible-builds mailing list