Fixed bug #982009: fix btrfs support
- Suppress some more debug messages when debug messages are disabled
This commit is contained in:
parent
7065d6ff35
commit
e292704fcb
@ -1,6 +1,8 @@
|
||||
--- os-prober-1.56-orig-1/common.sh 2013-01-10 08:33:45.200766262 -0500
|
||||
+++ os-prober-1.56-orig-1/common.sh 2013-01-10 08:34:43.644058934 -0500
|
||||
@@ -127,6 +127,7 @@
|
||||
Index: os-prober-1.58/common.sh
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/common.sh
|
||||
+++ os-prober-1.58/common.sh
|
||||
@@ -127,6 +127,7 @@ parse_proc_mounts () {
|
||||
done
|
||||
}
|
||||
|
||||
@ -8,7 +10,7 @@
|
||||
parsefstab () {
|
||||
while read -r line; do
|
||||
case "$line" in
|
||||
@@ -137,12 +138,22 @@
|
||||
@@ -137,12 +138,22 @@ parsefstab () {
|
||||
set -f
|
||||
set -- $line
|
||||
set +f
|
||||
@ -32,9 +34,11 @@
|
||||
unescape_mount () {
|
||||
printf %s "$1" | \
|
||||
sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
|
||||
--- os-prober-1.56-orig-1/linux-boot-prober 2012-03-27 10:39:42.000000000 -0400
|
||||
+++ os-prober-1.56-orig-1/linux-boot-prober 2013-01-10 08:34:43.644058934 -0500
|
||||
@@ -5,16 +5,143 @@
|
||||
Index: os-prober-1.58/linux-boot-prober
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/linux-boot-prober
|
||||
+++ os-prober-1.58/linux-boot-prober
|
||||
@@ -5,16 +5,143 @@ set -e
|
||||
|
||||
newns "$@"
|
||||
require_tmpdir
|
||||
@ -180,7 +184,7 @@
|
||||
if ! mapped="$(mapdevfs "$partition")"; then
|
||||
log "Device '$partition' does not exist; skipping"
|
||||
continue
|
||||
@@ -22,8 +149,8 @@
|
||||
@@ -22,8 +149,8 @@ fi
|
||||
|
||||
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
|
||||
for test in /usr/lib/linux-boot-probes/*; do
|
||||
@ -190,9 +194,11 @@
|
||||
if $test "$partition"; then
|
||||
debug "linux detected by $test"
|
||||
break
|
||||
--- os-prober-1.56-orig-1/linux-boot-probes/mounted/common/40grub2 2012-09-17 13:32:52.000000000 -0400
|
||||
+++ os-prober-1.56-orig-1/linux-boot-probes/mounted/common/40grub2 2013-01-10 08:34:43.644058934 -0500
|
||||
@@ -2,17 +2,27 @@
|
||||
Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/linux-boot-probes/mounted/common/40grub2
|
||||
+++ os-prober-1.58/linux-boot-probes/mounted/common/40grub2
|
||||
@@ -2,17 +2,30 @@
|
||||
. /usr/share/os-prober/common.sh
|
||||
set -e
|
||||
|
||||
@ -208,9 +214,12 @@
|
||||
found_item=0
|
||||
|
||||
entry_result () {
|
||||
+ if [ "x$type" = "xbtrfs" -a "$rootsv" = "$bootsv" ]; then
|
||||
+ if [ "x$type" = "xbtrfs" -a "$partition" = "$bootpart" ]; then
|
||||
+ # trim off the leading subvol
|
||||
+ kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-)
|
||||
+ if [ "x$rootsv" != "x$bootsv" ]; then
|
||||
+ kernelfile="/boot/$kernelfile"
|
||||
+ fi
|
||||
+ else
|
||||
+ kernelfile=$kernel
|
||||
+ fi
|
||||
@ -221,9 +230,11 @@
|
||||
result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
|
||||
found_item=1
|
||||
fi
|
||||
--- os-prober-1.56-orig-1/os-prober 2013-01-10 08:33:45.193766227 -0500
|
||||
+++ os-prober-1.56-orig-1/os-prober 2013-01-10 08:34:43.645058939 -0500
|
||||
@@ -64,9 +64,12 @@
|
||||
Index: os-prober-1.58/os-prober
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/os-prober
|
||||
+++ os-prober-1.58/os-prober
|
||||
@@ -64,9 +64,12 @@ partitions () {
|
||||
|
||||
# Also detect OSes on LVM volumes (assumes LVM is active)
|
||||
if type lvs >/dev/null 2>&1; then
|
||||
@ -237,7 +248,7 @@
|
||||
}
|
||||
|
||||
parse_proc_swaps () {
|
||||
@@ -124,6 +127,8 @@
|
||||
@@ -124,6 +127,8 @@ if [ -f /proc/mdstat ] ; then
|
||||
grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
|
||||
fi
|
||||
|
||||
@ -246,7 +257,7 @@
|
||||
for partition in $(partitions); do
|
||||
if ! mapped="$(mapdevfs "$partition")"; then
|
||||
log "Device '$partition' does not exist; skipping"
|
||||
@@ -142,7 +147,26 @@
|
||||
@@ -142,7 +147,26 @@ for partition in $(partitions); do
|
||||
continue
|
||||
fi
|
||||
|
||||
@ -274,8 +285,10 @@
|
||||
for test in /usr/lib/os-probes/*; do
|
||||
if [ -f "$test" ] && [ -x "$test" ]; then
|
||||
debug "running $test on $partition"
|
||||
--- os-prober-1.56-orig-1/os-probes/common/50mounted-tests 2012-09-17 11:08:12.000000000 -0400
|
||||
+++ os-prober-1.56-orig-1/os-probes/common/50mounted-tests 2013-01-10 08:34:43.645058939 -0500
|
||||
Index: os-prober-1.58/os-probes/common/50mounted-tests
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/os-probes/common/50mounted-tests
|
||||
+++ os-prober-1.58/os-probes/common/50mounted-tests
|
||||
@@ -1,20 +1,36 @@
|
||||
#!/bin/sh
|
||||
# Sub-tests that require a mounted partition.
|
||||
@ -318,7 +331,7 @@
|
||||
elif [ "$types" = ntfs ]; then
|
||||
if type ntfs-3g >/dev/null 2>&1; then
|
||||
types='ntfs-3g ntfs'
|
||||
@@ -23,7 +39,7 @@
|
||||
@@ -23,7 +39,7 @@ elif [ -z "$types" ]; then
|
||||
if type cryptsetup >/dev/null 2>&1 && \
|
||||
cryptsetup luksDump "$partition" >/dev/null 2>&1; then
|
||||
debug "$1 is a LUKS partition; skipping"
|
||||
@ -327,7 +340,7 @@
|
||||
fi
|
||||
for type in $(grep -v nodev /proc/filesystems); do
|
||||
# hfsplus filesystems are mountable as hfs. Try hfs last so
|
||||
@@ -46,6 +62,76 @@
|
||||
@@ -46,6 +62,76 @@ if [ ! -d "$tmpmnt" ]; then
|
||||
fi
|
||||
|
||||
mounted=
|
||||
@ -404,9 +417,11 @@
|
||||
if type grub-mount >/dev/null 2>&1 && \
|
||||
type grub-probe >/dev/null 2>&1 && \
|
||||
grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
||||
--- os-prober-1.56-orig-1/os-probes/mounted/common/90linux-distro 2013-01-10 08:33:45.197766247 -0500
|
||||
+++ os-prober-1.56-orig-1/os-probes/mounted/common/90linux-distro 2013-01-10 08:34:43.645058939 -0500
|
||||
@@ -7,6 +7,8 @@
|
||||
Index: os-prober-1.58/os-probes/mounted/common/90linux-distro
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/os-probes/mounted/common/90linux-distro
|
||||
+++ os-prober-1.58/os-probes/mounted/common/90linux-distro
|
||||
@@ -7,6 +7,8 @@ set -e
|
||||
partition="$1"
|
||||
dir="$2"
|
||||
type="$3"
|
||||
@ -415,7 +430,7 @@
|
||||
|
||||
# This test is inaccurate, but given separate / and /boot partitions and the
|
||||
# fact that only some architectures have ld-linux.so, I can't see anything
|
||||
@@ -131,7 +133,11 @@
|
||||
@@ -131,7 +133,11 @@ if (ls "$dir"/lib*/ld*.so* && [ -d "$di
|
||||
fi
|
||||
|
||||
label="$(count_next_label "$short")"
|
||||
@ -428,8 +443,10 @@
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
--- os-prober-1.56-orig-1/README.btrfs 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ os-prober-1.56-orig-1/README.btrfs 2013-01-10 08:34:43.645058939 -0500
|
||||
Index: os-prober-1.58/README.btrfs
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ os-prober-1.58/README.btrfs
|
||||
@@ -0,0 +1,15 @@
|
||||
+BTRFS is a new filesystem which combines the filesystem with logical volume
|
||||
+management (subvolumes). For further information, see:
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -ur os-prober-1.56-orig/common.sh os-prober-1.56/common.sh
|
||||
--- os-prober-1.56-orig/common.sh 2012-12-26 13:53:55.962187097 -0500
|
||||
+++ os-prober-1.56/common.sh 2013-01-10 08:25:14.843206268 -0500
|
||||
@@ -76,7 +76,9 @@
|
||||
Index: os-prober-1.58/common.sh
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/common.sh
|
||||
+++ os-prober-1.58/common.sh
|
||||
@@ -76,7 +76,9 @@ warn() {
|
||||
}
|
||||
|
||||
debug() {
|
||||
@ -12,3 +13,18 @@ diff -ur os-prober-1.56-orig/common.sh os-prober-1.56/common.sh
|
||||
}
|
||||
|
||||
result () {
|
||||
Index: os-prober-1.58/os-probes/mounted/powerpc/20macosx
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/os-probes/mounted/powerpc/20macosx
|
||||
+++ os-prober-1.58/os-probes/mounted/powerpc/20macosx
|
||||
@@ -7,7 +7,9 @@ mpoint="$2"
|
||||
type="$3"
|
||||
|
||||
debug() {
|
||||
- logger -t macosx-prober "debug: $@"
|
||||
+ if [ -z "$OS_PROBER_DISABLE_DEBUG" ]; then
|
||||
+ logger -t macosx-prober "debug: $@"
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Weed out stuff that doesn't apply to us
|
||||
|
@ -1,6 +1,7 @@
|
||||
diff -up os-prober-1.57/common.sh.logger-factor-out os-prober-1.57/common.sh
|
||||
--- os-prober-1.57/common.sh.logger-factor-out 2013-02-05 21:19:38.896088800 +0330
|
||||
+++ os-prober-1.57/common.sh 2013-02-05 21:20:04.624767147 +0330
|
||||
Index: os-prober-1.58/common.sh
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/common.sh
|
||||
+++ os-prober-1.58/common.sh
|
||||
@@ -62,10 +62,14 @@ cache_progname() {
|
||||
esac
|
||||
}
|
||||
@ -39,9 +40,10 @@ diff -up os-prober-1.57/common.sh.logger-factor-out os-prober-1.57/common.sh
|
||||
|
||||
# shim to make it easier to use os-prober outside d-i
|
||||
if ! type mapdevfs >/dev/null 2>&1; then
|
||||
diff -up os-prober-1.57/linux-boot-prober.logger-factor-out os-prober-1.57/linux-boot-prober
|
||||
--- os-prober-1.57/linux-boot-prober.logger-factor-out 2013-02-05 21:19:59.395832518 +0330
|
||||
+++ os-prober-1.57/linux-boot-prober 2013-02-05 21:24:42.301295713 +0330
|
||||
Index: os-prober-1.58/linux-boot-prober
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/linux-boot-prober
|
||||
+++ os-prober-1.58/linux-boot-prober
|
||||
@@ -1,4 +1,12 @@
|
||||
#!/bin/sh
|
||||
+
|
||||
@ -55,23 +57,24 @@ diff -up os-prober-1.57/linux-boot-prober.logger-factor-out os-prober-1.57/linux
|
||||
. /usr/share/os-prober/common.sh
|
||||
|
||||
set -e
|
||||
@@ -147,6 +155,7 @@ if ! mapped="$(mapdevfs "$partition")";
|
||||
continue
|
||||
fi
|
||||
@@ -19,6 +27,7 @@ bootuuid=
|
||||
|
||||
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
|
||||
|
||||
+( (
|
||||
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
|
||||
for test in /usr/lib/linux-boot-probes/*; do
|
||||
if [ -x $test ] && [ -f $test ]; then
|
||||
if [ -z "$1" ]; then
|
||||
ERR=y
|
||||
elif [ "$1" = btrfs -a -z "$2" ]; then
|
||||
@@ -186,3 +195,5 @@ else
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
+) 9>&1 | logger 1>&- # fd_logger
|
||||
+) 3>&1 # fd_result
|
||||
diff -up os-prober-1.57/os-prober.logger-factor-out os-prober-1.57/os-prober
|
||||
--- os-prober-1.57/os-prober.logger-factor-out 2013-02-05 21:19:52.914913541 +0330
|
||||
+++ os-prober-1.57/os-prober 2013-02-05 21:25:35.168634780 +0330
|
||||
Index: os-prober-1.58/os-prober
|
||||
===================================================================
|
||||
--- os-prober-1.58.orig/os-prober
|
||||
+++ os-prober-1.58/os-prober
|
||||
@@ -1,7 +1,14 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: os-prober
|
||||
Version: 1.58
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Probes disks on the system for installed operating systems
|
||||
|
||||
Group: System Environment/Base
|
||||
@ -100,6 +100,10 @@ fi
|
||||
%{_var}/lib/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Apr 24 2014 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.58-5
|
||||
- Fixed bug #982009: fix btrfs support
|
||||
- Suppress some more debug messages when debug messages are disabled
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.58-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user