From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH] mbuto: Fix for kernel modules with additional extensions in filename Date: Wed, 06 Jul 2022 16:04:08 +1000 Message-ID: In-Reply-To: <20220705175332.1846149-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3045179908126071476==" --===============3045179908126071476== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Tue, Jul 05, 2022 at 07:53:32PM +0200, Stefano Brivio wrote: > David reports that on Fedora 36 mbuto fails to source the virtio_net > module for the passt profile, because modules are compressed and they > have a .ko.xz file extension. > > I tried this on Fedora Cloud Base 36-1.5 on x86_64, and mbuto > actually locates the module, but it fails to parse the insmod > commands from the dependencies as it expects a .ko at the end of any > module file. I'm not sure that's the same issue David found, but > start fixing this part at least. > > While at it: we're calling kmod_node always on the module name > passed to kmod_add, instead of calling it for that module plus > dependencies: fix this as well. > > Reported-by: David Gibson > Signed-off-by: Stefano Brivio This seems to do the trick: I'm now booting guests in the passt tests. Running into other failures, but I don't think they're mbuto related. Tested-by: David Gibson > --- > mbuto | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/mbuto b/mbuto > index 693aaaa..4ffe549 100755 > --- a/mbuto > +++ b/mbuto > @@ -868,11 +868,12 @@ kmod_add() { > ;; > *) > for __t in ${__f}; do > - __t="$(${BASENAME} -- "${__t%*.ko}")" > + __t="$(${BASENAME} -- "${__t}")" > + __t="${__t%%.*}" > if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ > --show-depends -- "$(${BASENAME} -- "${__t}")" >/dev/null; then > > - __src="$(${FIND} ${__find_path} -name "${__t}.ko")" > + __src="$(${FIND} ${__find_path} -name "${__t}.*")" > [ -z "${__src}" ] && continue > > __dst="${wd}${__src##${MODDIR}}" > @@ -881,7 +882,7 @@ kmod_add() { > "${CP}" -a "${__src}" "${__dst}" > fi > > - kmod_node "${1}" > + kmod_node "${__t}" > fi > done > esac -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --===============3045179908126071476== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1MRkpid0FDZ2tRZ3lwWTRnRXcKWVNLOEF3Ly9US1NPTEZ0VFQy SWM4Mk5WUFNaS0taZTFDY1F5am81YWpxeml3MDBES2tOWHcyb25IUEdJRit5QQoyeFlQQVBXaCs1 WXBJTzNicnV1QXhhMGd4c3pGaFYrN3RKTy94VjlxU1o3Z2JJQng0NEhKWWlUVlgrbHhUZmpZCm1P dUdXTXhqc1VudzdnNVdKcHc3U1hzNkNrZ3dYTmpYbldEbVc2N3h6RFhUYmIyLzhPV1lOdXFQRFV5 MlNqNnYKc0ljcWE2dDc2WWI3aS9XME0yMDR3M1JOR0YvazJzdkpHek1rL2xGUlVIMGJDM2cwT2xB VFIySEswam10Um1SMwpwc285S054TldSYXR2TzNpdjRkZVg2ZjNxVkZJQTR6VDR4cDBJdlh3eG9J Z21DbTArdXFYR2RTZnJ1UkRqM0pKClQ3VUFpZGJBaHRmQmV3WUgwWUVzek9mNXFHYjNNWENhVzBT VVk4eGlOV1JWTEVLblZ4NkNIYXV4QTd3VHdqbFgKT3QxT1dUK1pUM21PZ3k4YnB6S0VUMklPdmdM c2JXUnVTalhwbmN0MFZYNS9TK29DMVJlRE5VNU1mZWE3ZkJibQpqYi9vWlJod050Syt5WG0xaHBn L2lsS0VkVnJ5ckJHZUhacHh0UWNzRE5BVmFOcmZrQU1PVkNvUlZrYVF0MFhYCi9LT1ZIRXFQWS9s dUVFUGMxcXozN1ZUcjZkVEZTMW8wWHVIeVA1O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