[pve-devel] [PATCH kernel] debian: find firmware: quote regex metacharacters in directory name
Friedrich Weber
f.weber at proxmox.com
Mon Apr 28 18:34:12 CEST 2025
The directory name contains the version which may contain characters
with semantics as regex metacharacters, e.g. `+` when building a test
kernel. If they are not quoted, the script does not remove the
directory name from its output, which will cause a build failure in
`fwcheck` even though the firmware did not change.
To avoid that, quote metacharacters in the directory name.
Signed-off-by: Friedrich Weber <f.weber at proxmox.com>
---
debian/scripts/find-firmware.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debian/scripts/find-firmware.pl b/debian/scripts/find-firmware.pl
index a53223c..5c458bb 100755
--- a/debian/scripts/find-firmware.pl
+++ b/debian/scripts/find-firmware.pl
@@ -17,7 +17,7 @@ open(my $FIND_KO_FH, "find '$dir' -name '*.ko'|");
while (defined(my $fn = <$FIND_KO_FH>)) {
chomp $fn;
my $relfn = $fn;
- $relfn =~ s|^$dir/*||;
+ $relfn =~ s|^\Q$dir\E/*||;
my $cmd = "/sbin/modinfo -F firmware '$fn'";
open(my $MOD_FH, "$cmd|");
--
2.39.5
More information about the pve-devel
mailing list