diff --git a/SPECS-SIGNED/kernel-signed-aarch64/kernel-signed-aarch64.spec b/SPECS-SIGNED/kernel-signed-aarch64/kernel-signed-aarch64.spec index f78d02201d3..ce34dff638e 100644 --- a/SPECS-SIGNED/kernel-signed-aarch64/kernel-signed-aarch64.spec +++ b/SPECS-SIGNED/kernel-signed-aarch64/kernel-signed-aarch64.spec @@ -2,7 +2,7 @@ Summary: Signed Linux Kernel for aarch64 systems Name: kernel-signed-aarch64 Version: 5.4.51 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 URL: https://github.com/microsoft/WSL2-Linux-Kernel Group: System Environment/Kernel @@ -67,7 +67,8 @@ echo "initrd of kernel %{uname_r} removed" >&2 %postun if [ ! -e /boot/mariner.cfg ] then - if [ `ls /boot/linux-*.cfg 1> /dev/null 2>&1` ] + ls /boot/linux-*.cfg 1> /dev/null 2>&1 + if [ $? -eq 0 ] then list=`ls -tu /boot/linux-*.cfg | head -n1` test -n "$list" && ln -sf "$list" /boot/mariner.cfg @@ -84,6 +85,8 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg %config %{_localstatedir}/lib/initramfs/kernel/%{uname_r} %changelog +* Wed Sep 30 2020 Emre Girgin 5.4.51-8 +- Update postun script to deal with removal in case of another installed kernel. * Fri Sep 25 2020 Suresh Babu Chalamalasetty 5.4.51-7 - Update release number * Wed Sep 23 2020 Daniel McIlvaney 5.4.51-6 @@ -101,4 +104,4 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg * Wed Aug 19 2020 Chris Co 5.4.42-12 - Update release number * Tue Aug 18 2020 Chris Co 5.4.42-11 -- Original version for CBL-Mariner. \ No newline at end of file +- Original version for CBL-Mariner. diff --git a/SPECS-SIGNED/kernel-signed-x64/kernel-signed-x64.spec b/SPECS-SIGNED/kernel-signed-x64/kernel-signed-x64.spec index a186413ff3e..3e5c43461c8 100644 --- a/SPECS-SIGNED/kernel-signed-x64/kernel-signed-x64.spec +++ b/SPECS-SIGNED/kernel-signed-x64/kernel-signed-x64.spec @@ -2,7 +2,7 @@ Summary: Signed Linux Kernel for x86_64 systems Name: kernel-signed-x64 Version: 5.4.51 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 URL: https://github.com/microsoft/WSL2-Linux-Kernel Group: System Environment/Kernel @@ -67,7 +67,8 @@ echo "initrd of kernel %{uname_r} removed" >&2 %postun if [ ! -e /boot/mariner.cfg ] then - if [ `ls /boot/linux-*.cfg 1> /dev/null 2>&1` ] + ls /boot/linux-*.cfg 1> /dev/null 2>&1 + if [ $? -eq 0 ] then list=`ls -tu /boot/linux-*.cfg | head -n1` test -n "$list" && ln -sf "$list" /boot/mariner.cfg @@ -84,6 +85,8 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg %config %{_localstatedir}/lib/initramfs/kernel/%{uname_r} %changelog +* Wed Sep 30 2020 Emre Girgin 5.4.51-8 +- Update postun script to deal with removal in case of another installed kernel. * Fri Sep 25 2020 Suresh Babu Chalamalasetty 5.4.51-7 - Update release number * Wed Sep 23 2020 Daniel McIlvaney 5.4.51-6 @@ -101,4 +104,4 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg * Wed Aug 19 2020 Chris Co 5.4.42-12 - Update release number * Tue Aug 18 2020 Chris Co 5.4.42-11 -- Original version for CBL-Mariner. \ No newline at end of file +- Original version for CBL-Mariner. diff --git a/SPECS/kernel-hyperv/kernel-hyperv.spec b/SPECS/kernel-hyperv/kernel-hyperv.spec index 93c450b800f..a8e56f1591c 100644 --- a/SPECS/kernel-hyperv/kernel-hyperv.spec +++ b/SPECS/kernel-hyperv/kernel-hyperv.spec @@ -2,7 +2,7 @@ Summary: Linux Kernel optimized for Hyper-V Name: kernel-hyperv Version: 5.4.51 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 URL: https://github.com/microsoft/WSL2-Linux-Kernel Group: System Environment/Kernel @@ -202,7 +202,8 @@ echo "initrd of kernel %{uname_r} removed" >&2 %postun if [ ! -e /boot/mariner.cfg ] then - if [ `ls /boot/linux-*.cfg 1> /dev/null 2>&1` ] + ls /boot/linux-*.cfg 1> /dev/null 2>&1 + if [ $? -eq 0 ] then list=`ls -tu /boot/linux-*.cfg | head -n1` test -n "$list" && ln -sf "$list" /boot/mariner.cfg @@ -257,6 +258,8 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg %{_libdir}/perf/include/bpf/* %changelog +* Wed Sep 30 2020 Emre Girgin 5.4.51-4 +- Update postun script to deal with removal in case of another installed kernel. * Thu Sep 03 2020 Daniel McIlvaney 5.4.51-3 - Add code to check for missing config flags in the checked in configs * Tue Sep 01 2020 Chris Co 5.4.51-2 diff --git a/SPECS/kernel/kernel.spec b/SPECS/kernel/kernel.spec index 75831bb4bf4..19a66d676dc 100644 --- a/SPECS/kernel/kernel.spec +++ b/SPECS/kernel/kernel.spec @@ -2,7 +2,7 @@ Summary: Linux Kernel Name: kernel Version: 5.4.51 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 URL: https://github.com/microsoft/WSL2-Linux-Kernel Group: System Environment/Kernel @@ -259,7 +259,8 @@ echo "initrd of kernel %{uname_r} removed" >&2 %postun if [ ! -e /boot/mariner.cfg ] then - if [ `ls /boot/linux-*.cfg 1> /dev/null 2>&1` ] + ls /boot/linux-*.cfg 1> /dev/null 2>&1 + if [ $? -eq 0 ] then list=`ls -tu /boot/linux-*.cfg | head -n1` test -n "$list" && ln -sf "$list" /boot/mariner.cfg @@ -332,6 +333,8 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg %{_libdir}/perf/include/bpf/* %changelog +* Wed Sep 30 2020 Emre Girgin 5.4.51-8 +- Update postun script to deal with removal in case of another installed kernel. * Fri Sep 25 2020 Suresh Babu Chalamalasetty 5.4.51-7 - Enable Mellanox kernel configs * Wed Sep 23 2020 Daniel McIlvaney 5.4.51-6