[pve-devel] [PATCH kernel] add argument to find-firmware.pl for kernelversion

Stoiko Ivanov s.ivanov at proxmox.com
Wed May 30 12:27:43 CEST 2018


Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
As discussed in the threads with subject "Refactor version variables and versionize linux-tools manpages"
The refactoring is similar for both 4.13 and 4.15 - hence I'm only sending the
changes for 4.13


debian/rules                    | 2 +-
 debian/scripts/find-firmware.pl | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 96373e5..24c7778 100755
--- a/debian/rules
+++ b/debian/rules
@@ -206,7 +206,7 @@ ${MODULES}/e1000e.ko: .compile_mark
 	cp ${MODULES}/${E1000EDIR}/src/e1000e.ko ${MODULES}/
 
 fwlist-${KVNAME}: .compile_mark .modules_compile_mark
-	debian/scripts/find-firmware.pl debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} >fwlist.tmp
+	debian/scripts/find-firmware.pl $(KERNEL_MAJMIN) debian/${PVE_KERNEL_PKG}/lib/modules/${KVNAME} >fwlist.tmp
 	mv fwlist.tmp $@
 
 .PHONY: fwcheck
diff --git a/debian/scripts/find-firmware.pl b/debian/scripts/find-firmware.pl
index dce8dc8..2351e62 100755
--- a/debian/scripts/find-firmware.pl
+++ b/debian/scripts/find-firmware.pl
@@ -2,13 +2,15 @@
 
 use strict;
 
-my $dir = shift;
+my ($majmin, $dir) = @ARGV;
+
+die "strange versionnumber" if $majmin !~ m|^\d+\.\d+$|;
 
 die "no directory to scan" if !$dir;
 
 die "no such directory" if ! -d $dir;
 
-die "strange directory name" if $dir !~ m|^(.*/)?(4.13.\d+\-\d+\-pve)(/+)?$|;
+die "strange directory name" if $dir !~ m|^(.*/)?(\Q$majmin\E.\d+\-\d+\-pve)(/+)?$|;
 
 my $apiver = $2;
 
-- 
2.11.0





More information about the pve-devel mailing list