SHA256
1
0
forked from pool/os-prober
Dominique Leuenberger 2018-10-22 09:02:38 +00:00 committed by Git OBS Bridge
commit 5fbe035bb1
8 changed files with 61 additions and 89 deletions

View File

@ -1,8 +1,8 @@
Index: os-prober/common.sh
Index: os-prober-1.76/common.sh
===================================================================
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -302,8 +302,8 @@ linux_mount_boot () {
--- os-prober-1.76.orig/common.sh
+++ os-prober-1.76/common.sh
@@ -279,8 +279,8 @@ linux_mount_boot () {
debug "found boot partition $1 for linux system on $partition, but cannot map to existing device"
else
debug "found boot partition $bootpart for linux system on $partition"
@ -11,16 +11,16 @@ Index: os-prober/common.sh
+ if type grub2-mount >/dev/null 2>&1 && \
+ grub2-mount "$boottomnt" "$tmpmnt/boot" 2>/dev/null; then
mounted=1
elif dm_device="$(do_dmsetup osprober-linux "$boottomnt")" && [ "$dm_device" ]; then
if mountinfo=`mount -o ro "$dm_device" "$tmpmnt/boot" -t "$3"`; then
Index: os-prober/linux-boot-probes/common/50mounted-tests
fi
fi
Index: os-prober-1.76/linux-boot-probes/common/50mounted-tests
===================================================================
--- os-prober.orig/linux-boot-probes/common/50mounted-tests
+++ os-prober/linux-boot-probes/common/50mounted-tests
@@ -55,11 +55,11 @@ fi
--- os-prober-1.76.orig/linux-boot-probes/common/50mounted-tests
+++ os-prober-1.76/linux-boot-probes/common/50mounted-tests
@@ -48,11 +48,12 @@ if [ ! -d "$tmpmnt" ]; then
fi
mounted=
dm_devices=
-if type grub-mount >/dev/null 2>&1 && \
- type grub-probe >/dev/null 2>&1 && \
- grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
@ -28,16 +28,16 @@ Index: os-prober/linux-boot-probes/common/50mounted-tests
+ type grub2-probe >/dev/null 2>&1 && \
+ grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
mounted=1
- type="$(grub-probe -d "$partition" -t fs)"
type="$(grub-probe -d "$partition" -t fs)"
+ type="$(grub2-probe -d "$partition" -t fs)"
[ "$type" ] || type=fuseblk
elif dm_device="$(do_dmsetup osprober-linux "$partition")" && \
[ "$dm_device" ]; then
Index: os-prober/os-probes/common/50mounted-tests
fi
Index: os-prober-1.76/os-probes/common/50mounted-tests
===================================================================
--- os-prober.orig/os-probes/common/50mounted-tests
+++ os-prober/os-probes/common/50mounted-tests
@@ -66,11 +66,11 @@ if [ ! -d "$tmpmnt" ]; then
--- os-prober-1.76.orig/os-probes/common/50mounted-tests
+++ os-prober-1.76/os-probes/common/50mounted-tests
@@ -58,11 +58,11 @@ if [ ! -d "$tmpmnt" ]; then
fi
mounted=
@ -53,10 +53,10 @@ Index: os-prober/os-probes/common/50mounted-tests
if [ "$type" ]; then
debug "mounted using GRUB $type filesystem driver"
else
Index: os-prober/os-probes/init/common/10filesystems
Index: os-prober-1.76/os-probes/init/common/10filesystems
===================================================================
--- os-prober.orig/os-probes/init/common/10filesystems
+++ os-prober/os-probes/init/common/10filesystems
--- os-prober-1.76.orig/os-probes/init/common/10filesystems
+++ os-prober-1.76/os-probes/init/common/10filesystems
@@ -3,7 +3,7 @@
set +e # ignore errors from modprobe

View File

@ -1,8 +1,8 @@
Index: os-prober-1.61/os-probes/mounted/x86/05efi
Index: os-prober-1.76/os-probes/mounted/x86/05efi
===================================================================
--- os-prober-1.61.orig/os-probes/mounted/x86/05efi
+++ os-prober-1.61/os-probes/mounted/x86/05efi
@@ -28,20 +28,31 @@ if type udevadm > /dev/null 2>&1; then
--- os-prober-1.76.orig/os-probes/mounted/x86/05efi
+++ os-prober-1.76/os-probes/mounted/x86/05efi
@@ -28,13 +28,24 @@ if type udevadm > /dev/null 2>&1; then
fi
if type udevinfo > /dev/null 2>&1; then
@ -31,12 +31,3 @@ Index: os-prober-1.61/os-probes/mounted/x86/05efi
debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME"
debug "$partition partition type is $ID_PART_ENTRY_TYPE"
if [ -z "$ID_PART_ENTRY_TYPE" -o -z "$ID_PART_ENTRY_SCHEME" -o \
- \( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != msdos \) -o \
+ \( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != dos \) -o \
\( "$ID_PART_ENTRY_SCHEME" = gpt -a "$ID_PART_ENTRY_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \
- \( "$ID_PART_ENTRY_SCHEME" = msdos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then
+ \( "$ID_PART_ENTRY_SCHEME" = dos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then
debug "$partition is not a ESP partition: exiting"
exit 1
fi

View File

@ -1,8 +1,8 @@
Index: os-prober/os-probes/common/50mounted-tests
Index: os-prober-1.76/os-probes/common/50mounted-tests
===================================================================
--- os-prober.orig/os-probes/common/50mounted-tests
+++ os-prober/os-probes/common/50mounted-tests
@@ -57,19 +57,13 @@ elif [ -z "$types" ]; then
--- os-prober-1.76.orig/os-probes/common/50mounted-tests
+++ os-prober-1.76/os-probes/common/50mounted-tests
@@ -49,19 +49,13 @@ elif [ -z "$types" ]; then
debug "$1 is a LUKS partition; skipping"
exit 0
fi
@ -29,19 +29,10 @@ Index: os-prober/os-probes/common/50mounted-tests
fi
tmpmnt=/var/lib/os-prober/mount
@@ -161,7 +155,7 @@ if type grub2-mount >/dev/null 2>&1 && \
fi
elif dm_device="$(do_dmsetup osprober "$partition")" && \
[ "$dm_device" ]; then
- for type in $types $delaytypes; do
+ for type in $types; do
if mountinfo=`mount -o ro -t "$type" "$dm_device" "$tmpmnt" 2>&1`; then
debug "mounted as $type filesystem"
mounted=1
Index: os-prober/os-probes/init/common/10filesystems
Index: os-prober-1.76/os-probes/init/common/10filesystems
===================================================================
--- os-prober.orig/os-probes/init/common/10filesystems
+++ os-prober/os-probes/init/common/10filesystems
--- os-prober-1.76.orig/os-probes/init/common/10filesystems
+++ os-prober-1.76/os-probes/init/common/10filesystems
@@ -1,39 +1,19 @@
#!/bin/sh
# Make sure filesystems are available.

View File

@ -1,8 +1,8 @@
Index: os-prober/os-probes/common/50mounted-tests
Index: os-prober-1.76/os-probes/common/50mounted-tests
===================================================================
--- os-prober.orig/os-probes/common/50mounted-tests
+++ os-prober/os-probes/common/50mounted-tests
@@ -73,10 +73,51 @@ fi
--- os-prober-1.76.orig/os-probes/common/50mounted-tests
+++ os-prober-1.76/os-probes/common/50mounted-tests
@@ -65,10 +65,40 @@ fi
mounted=
@ -21,17 +21,6 @@ Index: os-prober/os-probes/common/50mounted-tests
+ debug "mounted using GRUB, but unknown filesystem?"
+ type=fuseblk
+ fi
+elif dm_device="$(do_dmsetup osprober "$partition")" && \
+ [ "$dm_device" ]; then
+ for type in $types; do
+ if mountinfo=`mount -o ro -t "$type" "$dm_device" "$tmpmnt" 2>&1`; then
+ debug "mounted as $type filesystem"
+ mounted=1
+ break
+ else
+ debug "mounting $dm_device ($partition) as $type failed: $mountinfo"
+ fi
+ done
+fi
+
+if [ "$mounted" ]; then
@ -55,15 +44,15 @@ Index: os-prober/os-probes/common/50mounted-tests
debug "begin btrfs processing for $UUID"
# note that the btrfs volume must not be mounted ro
if mount -t btrfs -U "$UUID" "$tmpmnt" 2>/dev/null; then
@@ -137,48 +178,8 @@ if [ "$types" = btrfs ]; then
@@ -129,37 +159,8 @@ if [ "$types" = btrfs ]; then
rmdir "$tmpmnt" || true
if [ "$found" ]; then
exit 0
- else
- exit 1
fi
fi
- fi
-fi
-
-if type grub2-mount >/dev/null 2>&1 && \
- type grub2-probe >/dev/null 2>&1 && \
- grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
@ -74,20 +63,9 @@ Index: os-prober/os-probes/common/50mounted-tests
- else
- debug "mounted using GRUB, but unknown filesystem?"
- type=fuseblk
- fi
-elif dm_device="$(do_dmsetup osprober "$partition")" && \
- [ "$dm_device" ]; then
- for type in $types; do
- if mountinfo=`mount -o ro -t "$type" "$dm_device" "$tmpmnt" 2>&1`; then
- debug "mounted as $type filesystem"
- mounted=1
- break
- else
- debug "mounting $dm_device ($partition) as $type failed: $mountinfo"
- fi
- done
-fi
-
fi
fi
-if [ "$mounted" ]; then
- for test in /usr/lib/os-probes/mounted/*; do
- debug "running subtest $test"

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Oct 8 10:01:45 UTC 2018 - mchang@suse.com
- Version bump to 1.76:
* Fix check on ID_PART_ENTRY_SCHEME, to look for "dos" instead of "msdos"
* Remove code using device mapper
* This also removes the dependency on dmsetup
- Rediff
* os-prober-1.49-grub2-mount.patch
* os-prober-accept-ESP-on-IMSM.patch
* os-prober-dont-load-all-fs-module-and-dont-test-mount.patch
* os-prober-fix-btrfs-subvol-mounted-tests.patch
-------------------------------------------------------------------
Tue Jul 31 09:16:55 UTC 2018 - mchang@suse.com

View File

@ -17,7 +17,7 @@
Name: os-prober
Version: 1.74
Version: 1.76
Release: 0
Summary: Probes disks on the system for installed operating systems
License: GPL-2.0-or-later
@ -77,7 +77,6 @@ Requires: udev
Requires: util-linux
Recommends: dmraid
Suggests: lvm2
Recommends: dmsetup
%if 0%{?suse_version} >= 1315
# For logger utility
Requires: util-linux-systemd
@ -89,7 +88,7 @@ in a generic machine-readable format. Support for new OSes and Linux
distributions can be added easily.
%prep
%setup -q -n os-prober
%setup -q
cp %{SOURCE1} .
%patch0 -p1
%patch1 -p1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8e97ae193783eb8b5f5aba6b6d447b2e3e60696bb71f86ad029c33e14c5a7be
size 26692

3
os-prober_1.76.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d3a580610e0148ee1fea98de993b27b856870fb0a31e9ce1a33be2654e2c64ed
size 26432