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
|
Index: os-prober-1.58/common.sh
|
||||||
+++ os-prober-1.56-orig-1/common.sh 2013-01-10 08:34:43.644058934 -0500
|
===================================================================
|
||||||
@@ -127,6 +127,7 @@
|
--- os-prober-1.58.orig/common.sh
|
||||||
|
+++ os-prober-1.58/common.sh
|
||||||
|
@@ -127,6 +127,7 @@ parse_proc_mounts () {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8,7 +10,7 @@
|
|||||||
parsefstab () {
|
parsefstab () {
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
case "$line" in
|
case "$line" in
|
||||||
@@ -137,12 +138,22 @@
|
@@ -137,12 +138,22 @@ parsefstab () {
|
||||||
set -f
|
set -f
|
||||||
set -- $line
|
set -- $line
|
||||||
set +f
|
set +f
|
||||||
@ -32,9 +34,11 @@
|
|||||||
unescape_mount () {
|
unescape_mount () {
|
||||||
printf %s "$1" | \
|
printf %s "$1" | \
|
||||||
sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
|
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
|
Index: os-prober-1.58/linux-boot-prober
|
||||||
+++ os-prober-1.56-orig-1/linux-boot-prober 2013-01-10 08:34:43.644058934 -0500
|
===================================================================
|
||||||
@@ -5,16 +5,143 @@
|
--- os-prober-1.58.orig/linux-boot-prober
|
||||||
|
+++ os-prober-1.58/linux-boot-prober
|
||||||
|
@@ -5,16 +5,143 @@ set -e
|
||||||
|
|
||||||
newns "$@"
|
newns "$@"
|
||||||
require_tmpdir
|
require_tmpdir
|
||||||
@ -180,7 +184,7 @@
|
|||||||
if ! mapped="$(mapdevfs "$partition")"; then
|
if ! mapped="$(mapdevfs "$partition")"; then
|
||||||
log "Device '$partition' does not exist; skipping"
|
log "Device '$partition' does not exist; skipping"
|
||||||
continue
|
continue
|
||||||
@@ -22,8 +149,8 @@
|
@@ -22,8 +149,8 @@ fi
|
||||||
|
|
||||||
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
|
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
|
||||||
for test in /usr/lib/linux-boot-probes/*; do
|
for test in /usr/lib/linux-boot-probes/*; do
|
||||||
@ -190,9 +194,11 @@
|
|||||||
if $test "$partition"; then
|
if $test "$partition"; then
|
||||||
debug "linux detected by $test"
|
debug "linux detected by $test"
|
||||||
break
|
break
|
||||||
--- os-prober-1.56-orig-1/linux-boot-probes/mounted/common/40grub2 2012-09-17 13:32:52.000000000 -0400
|
Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2
|
||||||
+++ os-prober-1.56-orig-1/linux-boot-probes/mounted/common/40grub2 2013-01-10 08:34:43.644058934 -0500
|
===================================================================
|
||||||
@@ -2,17 +2,27 @@
|
--- 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
|
. /usr/share/os-prober/common.sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -208,9 +214,12 @@
|
|||||||
found_item=0
|
found_item=0
|
||||||
|
|
||||||
entry_result () {
|
entry_result () {
|
||||||
+ if [ "x$type" = "xbtrfs" -a "$rootsv" = "$bootsv" ]; then
|
+ if [ "x$type" = "xbtrfs" -a "$partition" = "$bootpart" ]; then
|
||||||
+ # trim off the leading subvol
|
+ # trim off the leading subvol
|
||||||
+ kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-)
|
+ kernelfile=$(echo "$kernel" | cut -d '/' -f 2- | cut -d '/' -f 2-)
|
||||||
|
+ if [ "x$rootsv" != "x$bootsv" ]; then
|
||||||
|
+ kernelfile="/boot/$kernelfile"
|
||||||
|
+ fi
|
||||||
+ else
|
+ else
|
||||||
+ kernelfile=$kernel
|
+ kernelfile=$kernel
|
||||||
+ fi
|
+ fi
|
||||||
@ -221,9 +230,11 @@
|
|||||||
result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
|
result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
|
||||||
found_item=1
|
found_item=1
|
||||||
fi
|
fi
|
||||||
--- os-prober-1.56-orig-1/os-prober 2013-01-10 08:33:45.193766227 -0500
|
Index: os-prober-1.58/os-prober
|
||||||
+++ os-prober-1.56-orig-1/os-prober 2013-01-10 08:34:43.645058939 -0500
|
===================================================================
|
||||||
@@ -64,9 +64,12 @@
|
--- 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)
|
# Also detect OSes on LVM volumes (assumes LVM is active)
|
||||||
if type lvs >/dev/null 2>&1; then
|
if type lvs >/dev/null 2>&1; then
|
||||||
@ -237,7 +248,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
parse_proc_swaps () {
|
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
|
grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -246,7 +257,7 @@
|
|||||||
for partition in $(partitions); do
|
for partition in $(partitions); do
|
||||||
if ! mapped="$(mapdevfs "$partition")"; then
|
if ! mapped="$(mapdevfs "$partition")"; then
|
||||||
log "Device '$partition' does not exist; skipping"
|
log "Device '$partition' does not exist; skipping"
|
||||||
@@ -142,7 +147,26 @@
|
@@ -142,7 +147,26 @@ for partition in $(partitions); do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -274,9 +285,11 @@
|
|||||||
for test in /usr/lib/os-probes/*; do
|
for test in /usr/lib/os-probes/*; do
|
||||||
if [ -f "$test" ] && [ -x "$test" ]; then
|
if [ -f "$test" ] && [ -x "$test" ]; then
|
||||||
debug "running $test on $partition"
|
debug "running $test on $partition"
|
||||||
--- os-prober-1.56-orig-1/os-probes/common/50mounted-tests 2012-09-17 11:08:12.000000000 -0400
|
Index: os-prober-1.58/os-probes/common/50mounted-tests
|
||||||
+++ os-prober-1.56-orig-1/os-probes/common/50mounted-tests 2013-01-10 08:34:43.645058939 -0500
|
===================================================================
|
||||||
@@ -1,20 +1,36 @@
|
--- 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
|
#!/bin/sh
|
||||||
# Sub-tests that require a mounted partition.
|
# Sub-tests that require a mounted partition.
|
||||||
set -e
|
set -e
|
||||||
@ -318,7 +331,7 @@
|
|||||||
elif [ "$types" = ntfs ]; then
|
elif [ "$types" = ntfs ]; then
|
||||||
if type ntfs-3g >/dev/null 2>&1; then
|
if type ntfs-3g >/dev/null 2>&1; then
|
||||||
types='ntfs-3g ntfs'
|
types='ntfs-3g ntfs'
|
||||||
@@ -23,7 +39,7 @@
|
@@ -23,7 +39,7 @@ elif [ -z "$types" ]; then
|
||||||
if type cryptsetup >/dev/null 2>&1 && \
|
if type cryptsetup >/dev/null 2>&1 && \
|
||||||
cryptsetup luksDump "$partition" >/dev/null 2>&1; then
|
cryptsetup luksDump "$partition" >/dev/null 2>&1; then
|
||||||
debug "$1 is a LUKS partition; skipping"
|
debug "$1 is a LUKS partition; skipping"
|
||||||
@ -327,7 +340,7 @@
|
|||||||
fi
|
fi
|
||||||
for type in $(grep -v nodev /proc/filesystems); do
|
for type in $(grep -v nodev /proc/filesystems); do
|
||||||
# hfsplus filesystems are mountable as hfs. Try hfs last so
|
# hfsplus filesystems are mountable as hfs. Try hfs last so
|
||||||
@@ -46,6 +62,76 @@
|
@@ -46,6 +62,76 @@ if [ ! -d "$tmpmnt" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mounted=
|
mounted=
|
||||||
@ -404,9 +417,11 @@
|
|||||||
if type grub-mount >/dev/null 2>&1 && \
|
if type grub-mount >/dev/null 2>&1 && \
|
||||||
type grub-probe >/dev/null 2>&1 && \
|
type grub-probe >/dev/null 2>&1 && \
|
||||||
grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
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
|
Index: os-prober-1.58/os-probes/mounted/common/90linux-distro
|
||||||
+++ os-prober-1.56-orig-1/os-probes/mounted/common/90linux-distro 2013-01-10 08:34:43.645058939 -0500
|
===================================================================
|
||||||
@@ -7,6 +7,8 @@
|
--- 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"
|
partition="$1"
|
||||||
dir="$2"
|
dir="$2"
|
||||||
type="$3"
|
type="$3"
|
||||||
@ -415,7 +430,7 @@
|
|||||||
|
|
||||||
# This test is inaccurate, but given separate / and /boot partitions and the
|
# 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
|
# 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
|
fi
|
||||||
|
|
||||||
label="$(count_next_label "$short")"
|
label="$(count_next_label "$short")"
|
||||||
@ -428,9 +443,11 @@
|
|||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
--- os-prober-1.56-orig-1/README.btrfs 1969-12-31 19:00:00.000000000 -0500
|
Index: os-prober-1.58/README.btrfs
|
||||||
+++ os-prober-1.56-orig-1/README.btrfs 2013-01-10 08:34:43.645058939 -0500
|
===================================================================
|
||||||
@@ -0,0 +1,15 @@
|
--- /dev/null
|
||||||
|
+++ os-prober-1.58/README.btrfs
|
||||||
|
@@ -0,0 +1,15 @@
|
||||||
+BTRFS is a new filesystem which combines the filesystem with logical volume
|
+BTRFS is a new filesystem which combines the filesystem with logical volume
|
||||||
+management (subvolumes). For further information, see:
|
+management (subvolumes). For further information, see:
|
||||||
+ https://btrfs.wiki.kernel.org/index.php/Main_Page
|
+ https://btrfs.wiki.kernel.org/index.php/Main_Page
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
diff -ur os-prober-1.56-orig/common.sh os-prober-1.56/common.sh
|
Index: os-prober-1.58/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
|
--- os-prober-1.58.orig/common.sh
|
||||||
@@ -76,7 +76,9 @@
|
+++ os-prober-1.58/common.sh
|
||||||
|
@@ -76,7 +76,9 @@ warn() {
|
||||||
}
|
}
|
||||||
|
|
||||||
debug() {
|
debug() {
|
||||||
@ -12,3 +13,18 @@ diff -ur os-prober-1.56-orig/common.sh os-prober-1.56/common.sh
|
|||||||
}
|
}
|
||||||
|
|
||||||
result () {
|
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
|
Index: os-prober-1.58/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
|
--- os-prober-1.58.orig/common.sh
|
||||||
|
+++ os-prober-1.58/common.sh
|
||||||
@@ -62,10 +62,14 @@ cache_progname() {
|
@@ -62,10 +62,14 @@ cache_progname() {
|
||||||
esac
|
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
|
# shim to make it easier to use os-prober outside d-i
|
||||||
if ! type mapdevfs >/dev/null 2>&1; then
|
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
|
Index: os-prober-1.58/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
|
--- os-prober-1.58.orig/linux-boot-prober
|
||||||
|
+++ os-prober-1.58/linux-boot-prober
|
||||||
@@ -1,4 +1,12 @@
|
@@ -1,4 +1,12 @@
|
||||||
#!/bin/sh
|
#!/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
|
. /usr/share/os-prober/common.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@@ -147,6 +155,7 @@ if ! mapped="$(mapdevfs "$partition")";
|
@@ -19,6 +27,7 @@ bootuuid=
|
||||||
continue
|
|
||||||
fi
|
grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
|
||||||
|
|
||||||
+( (
|
+( (
|
||||||
if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then
|
if [ -z "$1" ]; then
|
||||||
for test in /usr/lib/linux-boot-probes/*; do
|
ERR=y
|
||||||
if [ -x $test ] && [ -f $test ]; then
|
elif [ "$1" = btrfs -a -z "$2" ]; then
|
||||||
@@ -186,3 +195,5 @@ else
|
@@ -186,3 +195,5 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
+) 9>&1 | logger 1>&- # fd_logger
|
+) 9>&1 | logger 1>&- # fd_logger
|
||||||
+) 3>&1 # fd_result
|
+) 3>&1 # fd_result
|
||||||
diff -up os-prober-1.57/os-prober.logger-factor-out os-prober-1.57/os-prober
|
Index: os-prober-1.58/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
|
--- os-prober-1.58.orig/os-prober
|
||||||
|
+++ os-prober-1.58/os-prober
|
||||||
@@ -1,7 +1,14 @@
|
@@ -1,7 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: os-prober
|
Name: os-prober
|
||||||
Version: 1.58
|
Version: 1.58
|
||||||
Release: 4%{?dist}
|
Release: 5%{?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
|
||||||
@ -100,6 +100,10 @@ fi
|
|||||||
%{_var}/lib/%{name}
|
%{_var}/lib/%{name}
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user