dist: rename modules-removable-media to modules-public-removable-media

Modules in kernle*modules-removable-media*.rpm are the drivers for removable
media. Using them will rise attack risck, and they are not used in private
release, only used in public release. So, rename it.

Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
Reviewed-by: Yongliang Gao <leonylgao@tencent.com>
This commit is contained in:
Jianping Liu 2024-03-15 12:06:30 +08:00
parent 2596824741
commit 83c70cfab6
2 changed files with 8 additions and 8 deletions

View File

@ -170,7 +170,7 @@ case $MODULEPKG in
# Now process the override list to bring those modules back into core # Now process the override list to bring those modules back into core
filter_override "$overrides" filter_override "$overrides"
;; ;;
modules-removable-media ) modules-public-removable-media )
# Filter all mods under /lib/modules/$kver/kernel/drivers/usb/storage # Filter all mods under /lib/modules/$kver/kernel/drivers/usb/storage
filter_mods "drivers/usb/" "storage" / filter_mods "drivers/usb/" "storage" /
;; ;;

View File

@ -265,7 +265,7 @@ Requires(postun): kmod
This package provides commonly used kernel modules for the %{?2:%{2}-}core kernel package. This package provides commonly used kernel modules for the %{?2:%{2}-}core kernel package.
### Kernel removable media module package ### Kernel removable media module package
%package modules-removable-media %package modules-public-removable-media
Summary: %{rpm_vendor} Kernel removable modules to match the %{rpm_name}-core kernel Summary: %{rpm_vendor} Kernel removable modules to match the %{rpm_name}-core kernel
Provides: installonlypkg(kernel-module-removable-media) Provides: installonlypkg(kernel-module-removable-media)
Requires: %{rpm_name} = %{version}-%{release} Requires: %{rpm_name} = %{version}-%{release}
@ -273,7 +273,7 @@ AutoReq: no
AutoProv: yes AutoProv: yes
Requires(pre): kmod Requires(pre): kmod
Requires(postun): kmod Requires(postun): kmod
%description modules-removable-media %description modules-public-removable-media
This package provides drivers for removable media, e.g. USB disks and CD-ROM, This package provides drivers for removable media, e.g. USB disks and CD-ROM,
for %{name} of version %{version}-%{release}. for %{name} of version %{version}-%{release}.
@ -1074,12 +1074,12 @@ CollectKernelFile() {
%SOURCE10 "%{buildroot}" "$KernUnameR" "%{_target_cpu}" "$_KernBuild/System.map" non-core-modules >> modules.list || exit $? %SOURCE10 "%{buildroot}" "$KernUnameR" "%{_target_cpu}" "$_KernBuild/System.map" non-core-modules >> modules.list || exit $?
# Do module splitting for removable-media-modules # Do module splitting for removable-media-modules
%SOURCE10 "%{buildroot}" "$KernUnameR" "%{_target_cpu}" "$_KernBuild/System.map" modules-removable-media >> modules-removable-media.list || exit $? %SOURCE10 "%{buildroot}" "$KernUnameR" "%{_target_cpu}" "$_KernBuild/System.map" modules-public-removable-media >> modules-public-removable-media.list || exit $?
comm -23 core.list modules.list > core.list.tmp comm -23 core.list modules.list > core.list.tmp
mv core.list.tmp core.list mv core.list.tmp core.list
comm -23 core.list modules-removable-media.list > core.list.tmp comm -23 core.list modules-public-removable-media.list > core.list.tmp
mv core.list.tmp core.list mv core.list.tmp core.list
popd popd
@ -1250,10 +1250,10 @@ fi
depmod -a %{kernel_unamer} depmod -a %{kernel_unamer}
### Module package ### Module package
%post modules-removable-media %post modules-public-removable-media
depmod -a %{kernel_unamer} depmod -a %{kernel_unamer}
%postun modules-removable-media %postun modules-public-removable-media
depmod -a %{kernel_unamer} depmod -a %{kernel_unamer}
### Devel package ### Devel package
@ -1313,7 +1313,7 @@ fi
%files modules -f modules.list %files modules -f modules.list
%defattr(-,root,root) %defattr(-,root,root)
%files modules-removable-media -f modules-removable-media.list %files modules-public-removable-media -f modules-public-removable-media.list
%if %{with_keypkg} %if %{with_keypkg}
%files signing-keys -f signing-keys.list %files signing-keys -f signing-keys.list