Compare commits

...

No commits in common. "c8s" and "c8" have entirely different histories.
c8s ... c8

19 changed files with 2 additions and 109 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/os-prober_1.74.tar.xz SOURCES/os-prober_1.74.tar.xz
/os-prober_1.74.tar.xz

1
.os-prober.metadata Normal file
View File

@ -0,0 +1 @@
f7008494924ee60468bb27df8d926d7e0234edab SOURCES/os-prober_1.74.tar.xz

View File

@ -1,6 +1,6 @@
Name: os-prober Name: os-prober
Version: 1.74 Version: 1.74
Release: 10%{?dist} Release: 9%{?dist}
Summary: Probes disks on the system for installed operating systems Summary: Probes disks on the system for installed operating systems
Group: System Environment/Base Group: System Environment/Base
@ -21,8 +21,6 @@ Patch7: os-prober-umount-fix.patch
Patch8: os-prober-grub2-parsefix.patch Patch8: os-prober-grub2-parsefix.patch
Patch9: os-prober-grepfix.patch Patch9: os-prober-grepfix.patch
Patch10: os-prober-gentoo-fix.patch Patch10: os-prober-gentoo-fix.patch
Patch11: os-prober-90fallback-include-possible-kernel-parameters-from-g.patch
Patch12: os-prober-common.sh-do-not-resolve-symbolic-link-on-mapped-dev.patch
Requires: udev coreutils util-linux Requires: udev coreutils util-linux
Requires: grep /bin/sed /sbin/modprobe Requires: grep /bin/sed /sbin/modprobe
@ -88,11 +86,6 @@ fi
%{_var}/lib/%{name} %{_var}/lib/%{name}
%changelog %changelog
* Mon Sep 2 2024 Leo Sandoval <lsandova@redhat.com> - 1.74-10
- 90fallback: include possible kernel parameters from grub's default file
- common.sh: do not resolve symbolic link on mapped device filesystems
- Resolves: #RHEL-55234
* Tue Jun 22 2021 Javier Martinez Canillas <javierm@redhat.com> - 1.74-9 * Tue Jun 22 2021 Javier Martinez Canillas <javierm@redhat.com> - 1.74-9
- Another build but with a gating.yaml to allow leaving gating - Another build but with a gating.yaml to allow leaving gating
Resolves: rhbz#1624158 Resolves: rhbz#1624158

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: manual.sst_desktop.os-prober.functional}

View File

@ -1,53 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Thu, 27 Jun 2024 10:53:32 -0600
Subject: [PATCH] 90fallback: include possible kernel parameters from grub's
default file
Probed filesystems may include the GRUB's default
file ($mpoint/etc/default/grub) so it desirable to source it and get
and place either GRUB_CMDLINE_LINUX and/or GRUB_CMDLINE_LINUX_DEFAULT
on the kernel parameters field, ultimately tools like grub2-mkconfig
makes use of it and create menuentries with kernel parameters.
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
linux-boot-probes/mounted/common/90fallback | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/linux-boot-probes/mounted/common/90fallback b/linux-boot-probes/mounted/common/90fallback
index 7e40d15..cad7645 100755
--- a/linux-boot-probes/mounted/common/90fallback
+++ b/linux-boot-probes/mounted/common/90fallback
@@ -10,6 +10,22 @@ mpoint="$3"
type="$4"
mappedpartition=$(mapdevfs "$partition" 2>/dev/null) || mappedpartition="$partition"
+kernparams="root=$mappedpartition"
+
+# In case there is $mpoint/etc/default/grub, source it and take into account
+# relevant command line variables. This function must be run inside a subshell
+# otherwise grub default variable may be overriden
+get_cmdline_linux_params()
+{
+ local mpoint_sysconfdir="$mpoint/etc"
+ if test -f ${mpoint_sysconfdir}/default/grub ; then
+ unset GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT
+ . ${mpoint_sysconfdir}/default/grub
+ echo "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi
+}
+
+kernparams="$(echo $kernparams $(get_cmdline_linux_params) | sed 's/[[:space:]]\+$//')"
exitcode=1
for kernpat in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux "/boot/vmlinuz*" \
@@ -38,7 +54,7 @@ for kernpat in /vmlinuz /vmlinux /boot/vmlinuz /boot/vmlinux "/boot/vmlinuz*" \
for initrd in $(eval ls "$initrdname" "$initrdname1" "$initrdname2" "$initrdname3" "$initrdname4" 2>/dev/null); do
if [ "$initrd" != "$kernfile" ] && [ -f "$initrd" ] && [ ! -L "$initrd" ]; then
initrd=$(echo "$initrd" | sed "s!^$mpoint!!")
- result "$partition:$kernbootpart::$kernbasefile:$initrd:root=$mappedpartition"
+ result "$partition:$kernbootpart::$kernbasefile:$initrd:$kernparams"
exitcode=0
foundinitrd=1
fi

View File

@ -1,27 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Leo Sandoval <lsandova@redhat.com>
Date: Thu, 27 Jun 2024 11:31:38 -0600
Subject: [PATCH] common.sh: do not resolve symbolic link on mapped device
filesystems
/dev/dm-* devices may change from boot to boot so better to use the
symlink instead of the resolved file name
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
---
common.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common.sh b/common.sh
index a24286a..f0ebfb3 100644
--- a/common.sh
+++ b/common.sh
@@ -92,7 +92,7 @@ export fd_result # so subshells inherit current value by default
# shim to make it easier to use os-prober outside d-i
if ! type mapdevfs >/dev/null 2>&1; then
mapdevfs () {
- readlink -f "$1"
+ echo "$1"
}
fi

View File

@ -1,13 +0,0 @@
---
inspections:
# Not a Java package
javabytecode: off
# These just flag when things change "too much"
changedfiles: off
filesize: off
patches: off
upstream: off
# https://bugzilla.redhat.com/show_bug.cgi?id=2010936
annocheck: off

View File

@ -1 +0,0 @@
SHA512 (os-prober_1.74.tar.xz) = 5407fb3c782ae0532120995d60cfc307028de9bea52ce5534baaf940a99269b735c1174ef0f7a5316be485a1e8bfd097108c2819eadf00e2e38595bfc2c22245