mirror of
https://abf.rosa.ru/djam/kernel-5.15.git
synced 2025-02-23 18:42:55 +00:00
Clean up deps and scriptlets
* the kernel may work OK without WiFi and firmware stuff, make it easy to uninstall it (e.g. when trying to save disk space in a VM) * sysfsutils is not used in scriptlets, remove it * symlinks vmlinuz-%{flavour} and initrd-%{flavour}.img have not existed for ages, they were removed lots of time ago in ROSA, there is no sense in trying to delete what does not exist and is never created
This commit is contained in:
parent
5c184f0011
commit
9c1919cb5b
1 changed files with 7 additions and 38 deletions
45
kernel.spec
45
kernel.spec
|
@ -24,7 +24,7 @@
|
|||
%define sublevel 3
|
||||
|
||||
# Release number. Increase this before a rebuild.
|
||||
%define rpmrel 1
|
||||
%define rpmrel 2
|
||||
%define fullrpmrel %{rpmrel}
|
||||
|
||||
%define rpmtag %{disttag}
|
||||
|
@ -425,19 +425,17 @@ Provides: kernel-hardened-%{flavour} = %{kverrel}
|
|||
Provides: alsa = 1.0.27
|
||||
Provides: should-restart = system
|
||||
|
||||
Requires(pre): grub2
|
||||
Requires(pre): dracut >= 046
|
||||
Requires(pre): kmod >= 20-1
|
||||
Requires(pre): sysfsutils >= 2.1.0-12
|
||||
Requires: dracut >= 046
|
||||
Requires: linux-firmware >= 20181026
|
||||
Requires: wireless-regdb
|
||||
Requires(post): dracut
|
||||
Requires(post): kmod
|
||||
# Usually necessary, but sometimes user may want to not install them
|
||||
Recommends: linux-firmware
|
||||
Recommends: wireless-regdb
|
||||
Recommends: crda
|
||||
|
||||
%if %{with flow_abi}
|
||||
Requires: kernel-%{kernelversion}.%{patchlevel}-rosa-flow-abi
|
||||
%endif
|
||||
|
||||
Recommends: crda
|
||||
# Set BFQ as default scheduler for HDDs
|
||||
# https://www.phoronix.com/scan.php?page=article&item=linux-50hdd-io
|
||||
Recommends: udev-rules-ioschedulers
|
||||
|
@ -481,35 +479,6 @@ input and output, etc. This is a general-purpose kernel.
|
|||
# File triggers from grub packages will handle this.
|
||||
#/usr/sbin/update-grub2
|
||||
|
||||
pushd /boot > /dev/null
|
||||
if [ -L vmlinuz-%{flavour} ]; then
|
||||
rm -f vmlinuz-%{flavour}
|
||||
fi
|
||||
if [ -L initrd-%{flavour}.img ]; then
|
||||
rm -f initrd-%{flavour}.img
|
||||
fi
|
||||
popd > /dev/null
|
||||
exit 0
|
||||
|
||||
%preun -n kernel-%{flavour}-%{buildrel}
|
||||
pushd /boot > /dev/null
|
||||
if [ -L vmlinuz-%{flavour} ]; then
|
||||
if [ "$(readlink vmlinuz-%{flavour})" = "vmlinuz-%{kver_full}" ]; then
|
||||
rm -f vmlinuz-%{flavour}
|
||||
fi
|
||||
fi
|
||||
if [ -L initrd-%{flavour}.img ]; then
|
||||
if [ "$(readlink initrd-%{flavour}.img)" = "initrd-%{kver_full}.img" ]; then
|
||||
rm -f initrd-%{flavour}.img
|
||||
fi
|
||||
fi
|
||||
|
||||
# File triggers from grub packages will handle this.
|
||||
#/usr/sbin/update-grub2
|
||||
|
||||
popd > /dev/null
|
||||
exit 0
|
||||
|
||||
%postun -n kernel-%{flavour}-%{buildrel}
|
||||
rm -f /boot/initrd-%{kver_full}.img
|
||||
rm -f /boot/initrd-%{kver_full}_old.img
|
||||
|
|
Loading…
Add table
Reference in a new issue