forked from pool/os-prober
Accepting request 1046401 from Base:System
OBS-URL: https://build.opensuse.org/request/show/1046401 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/os-prober?expand=0&rev=57
This commit is contained in:
commit
692f58fb93
@ -35,14 +35,12 @@ b. Fix kernelfile path if separate boot partition on btrfs
|
||||
|
||||
Signed-off-by: Michael Chang <mchang@suse.com>
|
||||
---
|
||||
linux-boot-probes/mounted/common/40grub2 | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
linux-boot-probes/mounted/common/40grub2 | 24 +++++++++++++++++-------
|
||||
1 file changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
===================================================================
|
||||
--- os-prober-1.61.orig/linux-boot-probes/mounted/common/40grub2
|
||||
+++ os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -14,9 +14,19 @@ bootsv="$6"
|
||||
--- a/linux-boot-probes/mounted/common/40grub2
|
||||
+++ b/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -14,9 +14,19 @@
|
||||
found_item=0
|
||||
|
||||
entry_result () {
|
||||
@ -65,7 +63,7 @@ Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
else
|
||||
kernelfile=$kernel
|
||||
fi
|
||||
@@ -81,7 +91,7 @@ parse_grub_menu () {
|
||||
@@ -81,7 +91,7 @@
|
||||
ignore_item=1
|
||||
fi
|
||||
;;
|
||||
@ -74,7 +72,7 @@ Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
# Hack alert: sed off any (hdn,n) but
|
||||
# assume the kernel is on the same
|
||||
# partition.
|
||||
@@ -90,14 +100,14 @@ parse_grub_menu () {
|
||||
@@ -90,18 +100,18 @@
|
||||
parameters="$@"
|
||||
# Systems with a separate /boot will not have
|
||||
# the path to the kernel in grub.cfg.
|
||||
@ -85,10 +83,14 @@ Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
;;
|
||||
- initrd|initrdefi)
|
||||
+ initrd|initrdefi|initrd16)
|
||||
initrd="$(echo "$2" | sed 's/(.*)//')"
|
||||
# Initrd same.
|
||||
- if [ "$partition" != "$bootpart" ]; then
|
||||
+ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then
|
||||
initrd="/boot$initrd"
|
||||
fi
|
||||
;;
|
||||
shift
|
||||
initrd=""
|
||||
for initrd_path in "$@"; do
|
||||
# sed hack, as above
|
||||
initrd_path="$(echo "$initrd_path" | sed 's/(.*)//')"
|
||||
# Initrd same.
|
||||
- if [ "$partition" != "$bootpart" ]; then
|
||||
+ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then
|
||||
initrd_path="/boot$initrd_path"
|
||||
fi
|
||||
if [ -z "$initrd" ]; then
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1fb3aeda6c28e9b9a07d53779ceb0b8d653bd70ff1d99a80ee98fb6a6d877254
|
||||
size 27205
|
3
os-prober-1.81.tar.bz2
Normal file
3
os-prober-1.81.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f4af6c8f99a8d248ab26c7cf27525849e777b4a7d3bf644e2b8fbafbb0db6f14
|
||||
size 27725
|
@ -1,8 +1,11 @@
|
||||
Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
===================================================================
|
||||
--- os-prober.orig/os-probes/mounted/common/90linux-distro
|
||||
+++ os-prober/os-probes/mounted/common/90linux-distro
|
||||
@@ -10,147 +10,133 @@ type="$3"
|
||||
---
|
||||
os-prober | 5
|
||||
os-probes/mounted/common/90linux-distro | 280 +++++++++++++++-----------------
|
||||
2 files changed, 138 insertions(+), 147 deletions(-)
|
||||
|
||||
--- a/os-probes/mounted/common/90linux-distro
|
||||
+++ b/os-probes/mounted/common/90linux-distro
|
||||
@@ -10,153 +10,139 @@
|
||||
uuid="$4"
|
||||
subvol="$5"
|
||||
|
||||
@ -19,6 +22,9 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
- if [ -e "$dir/etc/os-release" ]; then
|
||||
- short="$(grep ^NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')"
|
||||
- long="$(grep ^PRETTY_NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')"
|
||||
- elif [ -e "$dir/usr/lib/os-release" ]; then
|
||||
- short="$(grep ^NAME= "$dir/usr/lib/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')"
|
||||
- long="$(grep ^PRETTY_NAME= "$dir/usr/lib/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')"
|
||||
- elif [ -e "$dir/etc/debian_version" ]; then
|
||||
- short="Debian"
|
||||
- long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")"
|
||||
@ -135,6 +141,9 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
- elif [ -e "$dir/etc/devuan_version" ]; then
|
||||
- short="Devuan"
|
||||
- long="$(printf "Devuan GNU/Linux (%s)\n" "$(cat "$dir/etc/devuan_version")")"
|
||||
- elif [ -e "$dir/etc/exherbo-release" ]; then
|
||||
- short="Exherbo"
|
||||
- long="Exherbo Linux"
|
||||
- else
|
||||
- short="Linux"
|
||||
- long="unknown Linux distribution"
|
||||
@ -150,6 +159,9 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
+if [ -e "$dir/etc/os-release" ]; then
|
||||
+ short="$(grep ^NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')"
|
||||
+ long="$(grep ^PRETTY_NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')"
|
||||
+elif [ -e "$dir/usr/lib/os-release" ]; then
|
||||
+ short="$(grep ^NAME= "$dir/usr/lib/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')"
|
||||
+ long="$(grep ^PRETTY_NAME= "$dir/usr/lib/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')"
|
||||
+elif [ -e "$dir/etc/debian_version" ]; then
|
||||
+ short="Debian"
|
||||
+ long="$(printf "Debian GNU/Linux (%s)\n" "$(cat "$dir/etc/debian_version")")"
|
||||
@ -266,6 +278,9 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
+elif [ -e "$dir/etc/devuan_version" ]; then
|
||||
+ short="Devuan"
|
||||
+ long="$(printf "Devuan GNU/Linux (%s)\n" "$(cat "$dir/etc/devuan_version")")"
|
||||
+elif [ -e "$dir/etc/exherbo-release" ]; then
|
||||
+ short="Exherbo"
|
||||
+ long="Exherbo Linux"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
@ -277,11 +292,9 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
+ result "$partition:$long:$label:linux"
|
||||
+fi
|
||||
+exit 0
|
||||
Index: os-prober/os-prober
|
||||
===================================================================
|
||||
--- os-prober.orig/os-prober
|
||||
+++ os-prober/os-prober
|
||||
@@ -186,6 +186,11 @@ for partition in $(partitions); do
|
||||
--- a/os-prober
|
||||
+++ b/os-prober
|
||||
@@ -185,6 +185,11 @@
|
||||
# be handled by 50mounted-tests so we can do a subvol only once.
|
||||
type=$(blkid -o value -s TYPE $mapped || true)
|
||||
if [ "$type" = btrfs ]; then
|
||||
|
@ -1,8 +1,10 @@
|
||||
Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
===================================================================
|
||||
--- os-prober.orig/os-probes/mounted/common/90linux-distro
|
||||
+++ os-prober/os-probes/mounted/common/90linux-distro
|
||||
@@ -10,7 +10,18 @@ type="$3"
|
||||
---
|
||||
os-probes/mounted/common/90linux-distro | 13 ++++++++++++-
|
||||
1 file changed, 12 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/os-probes/mounted/common/90linux-distro
|
||||
+++ b/os-probes/mounted/common/90linux-distro
|
||||
@@ -10,7 +10,18 @@
|
||||
uuid="$4"
|
||||
subvol="$5"
|
||||
|
||||
@ -21,4 +23,4 @@ Index: os-prober/os-probes/mounted/common/90linux-distro
|
||||
+elif [ -e "$dir/etc/os-release" ]; then
|
||||
short="$(grep ^NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g; s/[[:space:]].*//')"
|
||||
long="$(grep ^PRETTY_NAME= "$dir/etc/os-release" | sed 's/^[^=]*=//; s/^['\''"]\(.*\)['\''"]$/\1/; s/\\\(.\)/\1/g')"
|
||||
elif [ -e "$dir/etc/debian_version" ]; then
|
||||
elif [ -e "$dir/usr/lib/os-release" ]; then
|
||||
|
@ -5,11 +5,13 @@ Reference: bnc#810912
|
||||
Recognize initrdefi and linuxefi too. Whether linux/initrd or
|
||||
linuxefi/initrdefi will be emitted is controlled by SECURE_BOOT
|
||||
setting in /etc/sysconfig/bootloader.
|
||||
Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
===================================================================
|
||||
--- os-prober-1.61.orig/linux-boot-probes/mounted/common/40grub2
|
||||
+++ os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -71,7 +71,7 @@ parse_grub_menu () {
|
||||
---
|
||||
linux-boot-probes/mounted/common/40grub2 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/linux-boot-probes/mounted/common/40grub2
|
||||
+++ b/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -71,7 +71,7 @@
|
||||
ignore_item=1
|
||||
fi
|
||||
;;
|
||||
@ -18,12 +20,12 @@ Index: os-prober-1.61/linux-boot-probes/mounted/common/40grub2
|
||||
# Hack alert: sed off any (hdn,n) but
|
||||
# assume the kernel is on the same
|
||||
# partition.
|
||||
@@ -84,7 +84,7 @@ parse_grub_menu () {
|
||||
@@ -84,7 +84,7 @@
|
||||
kernel="/boot$kernel"
|
||||
fi
|
||||
;;
|
||||
- initrd)
|
||||
+ initrd|initrdefi)
|
||||
initrd="$(echo "$2" | sed 's/(.*)//')"
|
||||
# Initrd same.
|
||||
if [ "$partition" != "$bootpart" ]; then
|
||||
shift
|
||||
initrd=""
|
||||
for initrd_path in "$@"; do
|
||||
|
@ -1,32 +0,0 @@
|
||||
Index: os-prober/linux-boot-probes/mounted/common/40grub2
|
||||
===================================================================
|
||||
--- os-prober.orig/linux-boot-probes/mounted/common/40grub2
|
||||
+++ os-prober/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -19,11 +19,11 @@ entry_result () {
|
||||
# if path is not relative to subvolume make it relative
|
||||
kernel=${kernel#${bsv}}
|
||||
kernelfile=$kernel
|
||||
- initrd=${initrd#${bsv}}
|
||||
+ initrd=`echo $initrd | sed -e "s!^${bsv}!!" -e "s!\\(\\s\\)${bsv}!\\1!g"`
|
||||
if [ "x$GRUB_FS" != "xbtrfs" -o "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" != "xtrue" ]; then
|
||||
# absolute path needed: prepend subvolume if $kernel isn't empty
|
||||
kernel=${kernel:+${bsv}}${kernel}
|
||||
- initrd=${initrd:+${bsv}}${initrd}
|
||||
+ initrd=`echo $initrd | sed -e "s!\\(\\S\\+\\)!${bsv}\\1!g"`
|
||||
fi
|
||||
# assumed: rootsv != bootsv if rootsv isn't ancestor of bootsv
|
||||
[ "$partition" != "$bootpart" -o "$rootsv" != "$bootsv" ] && kernelfile="/boot${kernelfile}"
|
||||
@@ -105,10 +105,11 @@ parse_grub_menu () {
|
||||
fi
|
||||
;;
|
||||
initrd|initrdefi|initrd16)
|
||||
- initrd="$(echo "$2" | sed 's/(.*)//')"
|
||||
+ shift
|
||||
+ initrd="$(echo "$@" | sed 's/(\S*)//g')"
|
||||
# Initrd same.
|
||||
if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then
|
||||
- initrd="/boot$initrd"
|
||||
+ initrd=`echo $initrd | sed -e 's!\(\S\+\)!/boot\1!g'`
|
||||
fi
|
||||
;;
|
||||
"}")
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 22 04:54:11 UTC 2022 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- update to 1.81
|
||||
- use %autosetup macro to unpack source and apply patch
|
||||
- drop patch for upstream
|
||||
* os-prober-multiple-initrd.patch
|
||||
- rediff
|
||||
* Improve-btrfs-handling-on-os-probing-for-grub2.patch
|
||||
* os-prober-linux-distro-avoid-expensive-ld-file-test.patch
|
||||
* os-prober-linux-distro-parse-os-release.patch
|
||||
* os-prober-linux-secure-boot.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 22 08:17:58 UTC 2021 - Michael Chang <mchang@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package os-prober
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: os-prober
|
||||
Version: 1.79
|
||||
Version: 1.81
|
||||
Release: 0
|
||||
Summary: Probes disks on the system for installed operating systems
|
||||
License: GPL-2.0-or-later
|
||||
@ -66,8 +66,6 @@ Patch23: os-prober-linux-distro-avoid-expensive-ld-file-test.patch
|
||||
Patch24: os-prober-linux-distro-parse-os-release.patch
|
||||
# PATCH-FIX-OPENSUSE: Windows 10 is not listed in the grub menu (bsc#1076779)
|
||||
Patch25: os-prober-05efi-blkid.patch
|
||||
# PATCH-FIX-OPENSUSE: UEFI Grub does not insert Arch Linux entry correctly (boo#1101942)
|
||||
Patch26: os-prober-multiple-initrd.patch
|
||||
# PATCH-FIX-OPENSUSE: os-prober unconditionally pulls btrfsprogs (boo#1118279)
|
||||
Patch27: os-prober-make-btrfsprogs-optional.patch
|
||||
# PATCH-FIX-OPENSUSE: os-prober isn't compatible with transactional update (boo#1125729)
|
||||
@ -97,33 +95,8 @@ in a generic machine-readable format. Support for new OSes and Linux
|
||||
distributions can be added easily.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
cp %{SOURCE1} .
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
find . -name \*.orig -delete
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user