shopt failglob If set, patterns which fail to match filenames during pathname expansion result in an expansion error. Using this feature is good practice in scripts as helps prevent scripting mistakes; however, having file name with square brackets causes failures. And with Fedora 40 upgrade seems google-noto-sans-mono-vf-fonts-20240301-2.fc40.noarch has added one with: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf Reproducible: Always Steps to Reproduce: 1. Causes globs that don't expand to cause errors $ shopt -s failglob 2. Try use files from rpm as variable, and fail $ for file in $(rpm -q --list google-noto-sans-mono-vf-fonts) ; do [[ -f "/${file}" ]] || echo "${file}" done -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf 3. Note the RC $ echo $? 1 4. Or even command line $ rpm -qf /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf $ rpm -qf '/usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf' google-noto-sans-mono-vf-fonts-20240301-2.fc40.noarch Actual Results: -bash: no match: /usr/share/fonts/google-noto-vf/NotoSansMono[wght].ttf Expected Results: no error accessing files with failglob shopt enabled started fedora 40 upgrade, as daily script of mine fails because this file is included in initramfs too.
FYI google-noto-sans-mono-vf-fonts is installed for me as a vlc dependency
There should be no limitations in characters to be used for filename. That sounds to me like a script bug. shouldn't they try to escape such characters? FWIW this isn't new. it was there since f38.
Sorry. And the RPM was on my system in F39. However, it must not have been getting included in initramfs until F40. My script is looking at lsinitrd -k output, and hitting this issue.
Agree, can work around the issue. Not a problem. Wanted to report it, as could be other backup applications that could have issue. Feel free to close not a bug.
I think it would make sense to raise this with upstream: it is highly unusual to have brackets in system filenames. I always thought it looked strange too.
This message is a reminder that Fedora Linux 42 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 42 on 2026-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '42'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 42 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.