Re: git: 70fde0ed6bbb - main - md5: Encode non-printable filenames

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Fri, 15 May 2026 23:38:08 UTC
On Wed, 29 Apr 2026, Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav wrote:

> The branch main has been updated by des:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=70fde0ed6bbbb1f84c440190ba1e5435f8c90e13
>
> commit 70fde0ed6bbbb1f84c440190ba1e5435f8c90e13
> Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
> AuthorDate: 2026-04-29 18:41:05 +0000
> Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
> CommitDate: 2026-04-29 18:41:05 +0000
>
>    md5: Encode non-printable filenames
>
>    Encode filenames in the VIS_CSTYLE | VIS_OCTAL style regardless of
>    output mode.  When reading filenames from a checksum file, attempt to
>    decode them, and use the decoded name unless the decoded name does not
>    exist but the undecoded one does.
>
>    This breaks compatibility with GNU coreutils, which unfortunately uses
>    a non-reversible encoding when outputting filenames containing
>    non-printable characters.
>
>    While here, drop a sentence about preimage attacks against MD5 and SHA1
>    from the manual page, as I no longer trust it to be true.
>
>    MFC after:      1 week
>    Reviewed by:    bcr, markj
>    Differential Revision:  https://reviews.freebsd.org/D56615
> ---
> sbin/md5/md5.1 | 30 ++++++++++++++++++++++--------
> sbin/md5/md5.c | 41 +++++++++++++++++++++++++++++++++++------
> 2 files changed, 57 insertions(+), 14 deletions(-)

This breaks make makesum and related in ports
for, e.g., filenames/URLs which have a '?' in them.

If you, on an updated system, run make makesum in net/wifi-firmware-rtw88-kmod
for example, you can see that the '?' are now quoted for the SHA256 lines
while they were not previously.

-TIMESTAMP = 1765584880
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8703b_fw.bin?h=20251125) = 5e32bd891c74a0719c871726b74490cf5e1a05cdcefb8fe2414f80fffdeb9f9d
+TIMESTAMP = 1778888000
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8703b_fw.bin\?h=20251125) = 5e32bd891c74a0719c871726b74490cf5e1a05cdcefb8fe2414f80fffdeb9f9d
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8703b_fw.bin?h=20251125) = 20290
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8703b_wow_fw.bin?h=20251125) = 7156b0d2b4580e63d11a3a78258c35ff28e840c7c6428953920ae6a1cd5d05ac
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8703b_wow_fw.bin\?h=20251125) = 7156b0d2b4580e63d11a3a78258c35ff28e840c7c6428953920ae6a1cd5d05ac
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8703b_wow_fw.bin?h=20251125) = 23074
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8723d_fw.bin?h=20251125) = 9c64e079815a333a3f7b731be7cc0be65206ebc883891659dc8ff5ed36a5e2f5
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8723d_fw.bin\?h=20251125) = 9c64e079815a333a3f7b731be7cc0be65206ebc883891659dc8ff5ed36a5e2f5
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8723d_fw.bin?h=20251125) = 28884
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8812a_fw.bin?h=20251125) = abdcca4e8bf76ebfba23d433de310ffefebd0ff9d01990639d4cd9602b32b71a
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8812a_fw.bin\?h=20251125) = abdcca4e8bf76ebfba23d433de310ffefebd0ff9d01990639d4cd9602b32b71a
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8812a_fw.bin?h=20251125) = 27030
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8814a_fw.bin?h=20251125) = aa6bf9d62b2d2d8a37254fd6d917ba2839888cdedc21850d4481874cb1d3d7cb
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8814a_fw.bin\?h=20251125) = aa6bf9d62b2d2d8a37254fd6d917ba2839888cdedc21850d4481874cb1d3d7cb
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8814a_fw.bin?h=20251125) = 68320
-SHA256 (linux-firmware/rtw88fw/rtw88/rtw8821a_fw.bin?h=20251125) = 4693ece655044d96f81bd3f3e8db14dc352b493219c4fd0a75788a6fbd9eac3c
+SHA256 (linux-firmware/rtw88fw/rtw88/rtw8821a_fw.bin\?h=20251125) = 4693ece655044d96f81bd3f3e8db14dc352b493219c4fd0a75788a6fbd9eac3c
  SIZE (linux-firmware/rtw88fw/rtw88/rtw8821a_fw.bin?h=20251125) = 31898
...


That then results in trying to build the port:

=> No SHA256 checksum recorded for linux-firmware/rtw88fw/rtw88/rtw8703b_fw.bin?h=20251125.
=> No suitable checksum found for linux-firmware/rtw88fw/rtw88/rtw8703b_fw.bin?h=20251125.
=> No SHA256 checksum recorded for linux-firmware/rtw88fw/rtw88/rtw8703b_wow_fw.bin?h=20251125.
=> No suitable checksum found for linux-firmware/rtw88fw/rtw88/rtw8703b_wow_fw.bin?h=20251125.
=> No SHA256 checksum recorded for linux-firmware/rtw88fw/rtw88/rtw8723d_fw.bin?h=20251125.
=> No suitable checksum found for linux-firmware/rtw88fw/rtw88/rtw8723d_fw.bin?h=20251125.
...



-- 
Bjoern A. Zeeb                                                     r15:7