kmod: remove .alias config files for modprobe.d
PATCH 1/1 kmod: remove .alias config files for modprobe.d
The use of .alias (alongside .conf) was added for compatibility with the original module-init-tools project and has been living in kmod ever since.
In practise, all the linux distributions that I can see are using .conf files alone, as instructed by modprobe.d(5) and the only instance of an .alias file is the modules.alias as shipped in the kernel.
The latter is already handled by other parts of the kmod project, so let's enforce what our documentation says.
---
As suggested in https://lore.kernel.org/linux-modules/q6dutb2b5ztkuwjkq7a7ddnsbfneoq66bafaaxwppelepflcc5@us5n2ll5syja/T/#m84a542f8d4e2f4d31b2a7ee82aaf3d0bcf211aec
I have tested this on my Arch box, alongside a normal make check/distcheck and it's working as expected. Other distributions have not been tested, although I don't anticipate any to be using .alias configuration files.
The section in the README will be removed shortly via unrelated patch.
--- libkmod/libkmod-config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
libkmod/libkmod-config.c +1 -2
@@ -940,8 +940,7 @@ static bool conf_files_filter_out(struct kmod_ctx *ctx, DIR *d,if (fn[0 ] =='.' )return true; -if (len <6 || (!streq (&fn[len -5 ],".conf" ) - && !streq (&fn[len -6 ],".alias" ))) +if (len <6 || !streq (&fn[len -5 ],".conf" ))return true;fstatat (dirfd (d), fn, &st,0 );
---
base-commit: fa715f8c8b78a09f47701ce1cf46e9b67a49b8d0
change-id: 20240708-rm-alias-288013f86456
Best regards,
Signature · 1 line
Emil Velikov <[email protected]>
Quoted 6 lines · On Wed, Jul 17, 2024 at 06:26:45PM GMT, Emil Velikov via B4 Relay wrote:
From: Emil Velikov <[email protected]>
The use of .alias (alongside .conf) was added for compatibility with the original module-init-tools project and has been living in kmod ever since.
Quoted 8 lines
In practise, all the linux distributions that I can see are using .conf files alone, as instructed by
modprobe.d(5)and the only instance of an .alias file is the modules.alias as shipped in the kernel.The latter is already handled by other parts of the kmod project, so let's enforce what our documentation says.
Signed-off-by Emil Velikov <[email protected]>
thanks
Lucas De Marchi
Quoted 37 lines
---
As suggested in https://lore.kernel.org/linux-modules/q6dutb2b5ztkuwjkq7a7ddnsbfneoq66bafaaxwppelepflcc5@us5n2ll5syja/T/#m84a542f8d4e2f4d31b2a7ee82aaf3d0bcf211aecI have tested this on my Arch box, alongside a normal make check/distcheck and it's working as expected. Other distributions have not been tested, although I don't anticipate any to be using .alias configuration files.
The section in the README will be removed shortly via unrelated patch.
---libkmod/libkmod-config.c| 3 +--1 file changed, 1 insertion(+), 2 deletions(-)libkmod/libkmod-config.c +1
-3@@ -940,8 +940,7 @@ static bool conf_files_filter_out(struct kmod_ctx *ctx, DIR *d,if (fn[0 ] =='.' )return true; -if (len <6 || (!streq (&fn[len -5 ],".conf" ) - && !streq (&fn[len -6 ],".alias" ))) +if (len <6 || !streq (&fn[len -5 ],".conf" ))return true;fstatat (dirfd (d), fn, &st,0 ); ---base-commit:
fa715f8c8b78a09f47701ce1cf46e9b67a49b8d0
change-id: 20240708-rm-alias-288013f86456Best regards,
Signature · 1 line
Emil Velikov <[email protected]>