Update to upstream version 1.68, bug #1267779

- Support a case where a kernel named vmlinuz/x is used under Gentoo, bug #1223237
This commit is contained in:
Hedayat Vatankhah 2015-10-21 00:08:28 +03:30
parent 2491ff6ee2
commit 8cef6cc5ea
11 changed files with 87 additions and 94 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/os-prober_1.57.tar.gz
/os-prober_1.58.tar.gz
/os-prober_1.65.tar.xz
/os-prober_1.68.tar.xz

View File

@ -1,7 +1,8 @@
diff -up os-prober-1.57/common.sh.bootpartnamefix os-prober-1.57/common.sh
--- os-prober-1.57/common.sh.bootpartnamefix 2013-02-03 23:56:39.585511891 +0330
+++ os-prober-1.57/common.sh 2013-02-05 19:42:14.652151904 +0330
@@ -246,7 +246,7 @@ linux_mount_boot () {
Index: os-prober/common.sh
===================================================================
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -269,7 +269,7 @@ linux_mount_boot () {
if [ "$bindfrom" != "$tmpmnt/boot" ]; then
if mount --bind "$bindfrom" "$tmpmnt/boot"; then
mounted=1
@ -10,7 +11,7 @@ diff -up os-prober-1.57/common.sh.bootpartnamefix os-prober-1.57/common.sh
else
debug "failed to bind-mount $bindfrom onto $tmpmnt/boot"
fi
@@ -254,6 +254,15 @@ linux_mount_boot () {
@@ -277,6 +277,15 @@ linux_mount_boot () {
fi
if [ "$mounted" ]; then
:

View File

@ -1,8 +1,8 @@
Index: os-prober-1.58/common.sh
Index: os-prober/common.sh
===================================================================
--- os-prober-1.58.orig/common.sh
+++ os-prober-1.58/common.sh
@@ -127,6 +127,7 @@ parse_proc_mounts () {
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -150,6 +150,7 @@ parse_proc_mounts () {
done
}
@ -10,7 +10,7 @@ Index: os-prober-1.58/common.sh
parsefstab () {
while read -r line; do
case "$line" in
@@ -137,12 +138,22 @@ parsefstab () {
@@ -160,12 +161,22 @@ parsefstab () {
set -f
set -- $line
set +f
@ -34,10 +34,10 @@ Index: os-prober-1.58/common.sh
unescape_mount () {
printf %s "$1" | \
sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g'
Index: os-prober-1.58/linux-boot-prober
Index: os-prober/linux-boot-prober
===================================================================
--- os-prober-1.58.orig/linux-boot-prober
+++ os-prober-1.58/linux-boot-prober
--- os-prober.orig/linux-boot-prober
+++ os-prober/linux-boot-prober
@@ -5,16 +5,143 @@ set -e
newns "$@"
@ -194,10 +194,10 @@ Index: os-prober-1.58/linux-boot-prober
if $test "$partition"; then
debug "linux detected by $test"
break
Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2
Index: os-prober/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
--- os-prober.orig/linux-boot-probes/mounted/common/40grub2
+++ os-prober/linux-boot-probes/mounted/common/40grub2
@@ -2,17 +2,30 @@
. /usr/share/os-prober/common.sh
set -e
@ -230,11 +230,11 @@ Index: os-prober-1.58/linux-boot-probes/mounted/common/40grub2
result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters"
found_item=1
fi
Index: os-prober-1.58/os-prober
Index: os-prober/os-prober
===================================================================
--- os-prober-1.58.orig/os-prober
+++ os-prober-1.58/os-prober
@@ -64,9 +64,12 @@ partitions () {
--- os-prober.orig/os-prober
+++ os-prober/os-prober
@@ -71,9 +71,12 @@ partitions () {
# Also detect OSes on LVM volumes (assumes LVM is active)
if type lvs >/dev/null 2>&1; then
@ -248,7 +248,7 @@ Index: os-prober-1.58/os-prober
}
parse_proc_swaps () {
@@ -124,6 +127,8 @@ if [ -f /proc/mdstat ] ; then
@@ -131,6 +134,8 @@ if [ -f /proc/mdstat ] ; then
grep "^md" /proc/mdstat | cut -d: -f2- | parse_proc_mdstat >"$OS_PROBER_TMP/raided-map" || true
fi
@ -257,7 +257,7 @@ Index: os-prober-1.58/os-prober
for partition in $(partitions); do
if ! mapped="$(mapdevfs "$partition")"; then
log "Device '$partition' does not exist; skipping"
@@ -142,7 +147,26 @@ for partition in $(partitions); do
@@ -149,7 +154,26 @@ for partition in $(partitions); do
continue
fi
@ -285,10 +285,10 @@ Index: os-prober-1.58/os-prober
for test in /usr/lib/os-probes/*; do
if [ -f "$test" ] && [ -x "$test" ]; then
debug "running $test on $partition"
Index: os-prober-1.58/os-probes/common/50mounted-tests
Index: os-prober/os-probes/common/50mounted-tests
===================================================================
--- os-prober-1.58.orig/os-probes/common/50mounted-tests
+++ os-prober-1.58/os-probes/common/50mounted-tests
--- os-prober.orig/os-probes/common/50mounted-tests
+++ os-prober/os-probes/common/50mounted-tests
@@ -1,20 +1,36 @@
#!/bin/sh
# Sub-tests that require a mounted partition.
@ -417,10 +417,10 @@ Index: os-prober-1.58/os-probes/common/50mounted-tests
if type grub-mount >/dev/null 2>&1 && \
type grub-probe >/dev/null 2>&1 && \
grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
Index: os-prober-1.58/os-probes/mounted/common/90linux-distro
Index: os-prober/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
--- os-prober.orig/os-probes/mounted/common/90linux-distro
+++ os-prober/os-probes/mounted/common/90linux-distro
@@ -7,6 +7,8 @@ set -e
partition="$1"
dir="$2"
@ -443,10 +443,10 @@ Index: os-prober-1.58/os-probes/mounted/common/90linux-distro
exit 0
else
exit 1
Index: os-prober-1.58/README.btrfs
Index: os-prober/README.btrfs
===================================================================
--- /dev/null
+++ os-prober-1.58/README.btrfs
+++ os-prober/README.btrfs
@@ -0,0 +1,15 @@
+BTRFS is a new filesystem which combines the filesystem with logical volume
+management (subvolumes). For further information, see:

View File

@ -1,7 +1,7 @@
Index: os-prober-1.58/common.sh
Index: os-prober/common.sh
===================================================================
--- os-prober-1.58.orig/common.sh
+++ os-prober-1.58/common.sh
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -62,10 +62,14 @@ cache_progname() {
esac
}
@ -40,10 +40,10 @@ Index: os-prober-1.58/common.sh
# shim to make it easier to use os-prober outside d-i
if ! type mapdevfs >/dev/null 2>&1; then
Index: os-prober-1.58/linux-boot-prober
Index: os-prober/linux-boot-prober
===================================================================
--- os-prober-1.58.orig/linux-boot-prober
+++ os-prober-1.58/linux-boot-prober
--- os-prober.orig/linux-boot-prober
+++ os-prober/linux-boot-prober
@@ -1,4 +1,12 @@
#!/bin/sh
+
@ -71,10 +71,10 @@ Index: os-prober-1.58/linux-boot-prober
fi
+) 9>&1 | logger 1>&- # fd_logger
+) 3>&1 # fd_result
Index: os-prober-1.58/os-prober
Index: os-prober/os-prober
===================================================================
--- os-prober-1.58.orig/os-prober
+++ os-prober-1.58/os-prober
--- os-prober.orig/os-prober
+++ os-prober/os-prober
@@ -1,7 +1,14 @@
#!/bin/sh
set -e
@ -91,7 +91,7 @@ Index: os-prober-1.58/os-prober
newns "$@"
require_tmpdir
@@ -129,6 +136,7 @@ fi
@@ -136,6 +143,7 @@ fi
: >"$OS_PROBER_TMP/btrfs-vols"
@ -99,7 +99,7 @@ Index: os-prober-1.58/os-prober
for partition in $(partitions); do
if ! mapped="$(mapdevfs "$partition")"; then
log "Device '$partition' does not exist; skipping"
@@ -193,3 +201,5 @@ for partition in $(partitions); do
@@ -200,3 +208,5 @@ for partition in $(partitions); do
fi
fi
done

View File

@ -0,0 +1,13 @@
Index: os-prober/linux-boot-probes/mounted/common/90fallback
===================================================================
--- os-prober.orig/linux-boot-probes/mounted/common/90fallback
+++ os-prober/linux-boot-probes/mounted/common/90fallback
@@ -33,7 +33,7 @@ for kernpat in /vmlinuz /vmlinux /boot/v
# Dracut initramfses are named differently again.
initrdname3=$(echo "$kernfile" | sed "s/vmlinu[zx]/initramfs\*/" | sed 's/$/.img/')
# And Gentoo's also
- initrdname4=$(echo "$kernfile" | sed "s/kernel/initramfs\*/")
+ initrdname4=$(echo "$kernfile" | sed "s/kernel\|vmlinu[zx]/initramfs\*/")
foundinitrd=0
for initrd in $(eval ls "$initrdname" "$initrdname1" "$initrdname2" "$initrdname3" "$initrdname4" 2>/dev/null); do
if [ "$initrd" != "$kernfile" ] && [ -f "$initrd" ] && [ ! -L "$initrd" ]; then

View File

@ -1,38 +1,7 @@
Index: b/os-probes/mounted/x86/20microsoft
Index: os-prober/os-probes/mounted/x86/83haiku
===================================================================
--- a/os-probes/mounted/x86/20microsoft
+++ b/os-probes/mounted/x86/20microsoft
@@ -31,19 +31,19 @@ if item_in_dir -q bootmgr "$2"; then
for boot in $(item_in_dir boot "$2"); do
bcd=$(item_in_dir bcd "$2/$boot")
if [ -n "$bcd" ]; then
- if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
+ if grep -aqs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
long="Windows 8 (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
long="Windows 7 (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then
long="Windows Vista (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then
long="Windows Server 2008 R2 (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then
long="Windows Server 2008 (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then
long="Windows Recovery Environment (loader)"
- elif grep -qs "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then
+ elif grep -aqs "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then
long="Windows Recovery Environment (loader)"
else
long="Windows Vista (loader)"
Index: b/os-probes/mounted/x86/83haiku
===================================================================
--- a/os-probes/mounted/x86/83haiku
+++ b/os-probes/mounted/x86/83haiku
--- os-prober.orig/os-probes/mounted/x86/83haiku
+++ os-prober/os-probes/mounted/x86/83haiku
@@ -13,7 +13,7 @@ case "$type" in
*) debug "$partition is not a BeFS partition: exiting"; exit 1 ;;
esac

View File

@ -1,7 +1,8 @@
diff -up os-prober-1.55/os-prober.mdraidfix os-prober-1.55/os-prober
--- os-prober-1.55/os-prober.mdraidfix 2012-05-20 05:31:38.000000000 +0430
+++ os-prober-1.55/os-prober 2012-08-27 23:13:35.961274472 +0430
@@ -57,6 +57,11 @@ partitions () {
Index: os-prober/os-prober
===================================================================
--- os-prober.orig/os-prober
+++ os-prober/os-prober
@@ -64,6 +64,11 @@ partitions () {
exit 0
fi
@ -13,7 +14,7 @@ diff -up os-prober-1.55/os-prober.mdraidfix os-prober-1.55/os-prober
# Also detect OSes on LVM volumes (assumes LVM is active)
if type lvs >/dev/null 2>&1; then
echo "$(LVM_SUPPRESS_FD_WARNINGS=1 log_output lvs --noheadings --separator : -o vg_name,lv_name |
@@ -116,7 +121,7 @@ if [ -f /proc/swaps ]; then
@@ -123,7 +128,7 @@ if [ -f /proc/swaps ]; then
fi
: >"$OS_PROBER_TMP/raided-map"
if [ -f /proc/mdstat ] ; then

View File

@ -1,7 +1,8 @@
diff -up os-prober-1.57/common.sh.mounted-partitions-fix os-prober-1.57/common.sh
--- os-prober-1.57/common.sh.mounted-partitions-fix 2013-02-05 20:58:03.041289214 +0330
+++ os-prober-1.57/common.sh 2013-02-05 20:58:03.044289177 +0330
@@ -123,7 +123,7 @@ parse_proc_mounts () {
Index: os-prober/common.sh
===================================================================
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -146,7 +146,7 @@ parse_proc_mounts () {
set -f
set -- $line
set +f
@ -10,9 +11,10 @@ diff -up os-prober-1.57/common.sh.mounted-partitions-fix os-prober-1.57/common.s
done
}
diff -up os-prober-1.57/linux-boot-prober.mounted-partitions-fix os-prober-1.57/linux-boot-prober
--- os-prober-1.57/linux-boot-prober.mounted-partitions-fix 2013-02-05 20:58:03.000000000 +0330
+++ os-prober-1.57/linux-boot-prober 2013-02-05 20:58:54.364647584 +0330
Index: os-prober/linux-boot-prober
===================================================================
--- os-prober.orig/linux-boot-prober
+++ os-prober/linux-boot-prober
@@ -167,7 +167,7 @@ else
bootpart="${mountboot%% *}"
bootmounted="${mountboot#* }"

View File

@ -1,8 +1,8 @@
Index: os-prober-1.58/common.sh
Index: os-prober/common.sh
===================================================================
--- os-prober-1.58.orig/common.sh
+++ os-prober-1.58/common.sh
@@ -313,3 +313,13 @@ linux_mount_boot () {
--- os-prober.orig/common.sh
+++ os-prober/common.sh
@@ -336,3 +336,13 @@ linux_mount_boot () {
mountboot="$bootpart $mounted"
}

View File

@ -1,6 +1,6 @@
Name: os-prober
Version: 1.65
Release: 3%{?dist}
Version: 1.68
Release: 1%{?dist}
Summary: Probes disks on the system for installed operating systems
Group: System Environment/Base
@ -27,6 +27,7 @@ Patch11: os-prober-factored-logger-efi-fix.patch
Patch12: os-prober-umount-fix.patch
Patch13: os-prober-grub2-parsefix.patch
Patch14: os-prober-grepfix.patch
Patch15: os-prober-gentoo-fix.patch
Requires: udev coreutils util-linux
Requires: grep /bin/sed /sbin/modprobe
@ -53,6 +54,7 @@ distributions can be added easily.
%patch12 -p1 -b .umount-fix
%patch13 -p1 -b .grub2-parsefix
%patch14 -p1 -b .grepfix
%patch15 -p1 -b .grepfix
find -type f -exec sed -i -e 's|usr/lib|usr/libexec|g' {} \;
sed -i -e 's|grub-probe|grub2-probe|g' os-probes/common/50mounted-tests \
@ -103,6 +105,10 @@ fi
%{_var}/lib/%{name}
%changelog
* Tue Oct 20 2015 Hedayat Vatankhah <hedayat.fwd+rpmchlog@gmail.com> - 1.68-1
- Update to upstream version 1.68, bug #1267779
- Support a case where a kernel named vmlinuz/x is used under Gentoo, bug #1223237
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.65-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1 +1 @@
a7e833555f54387a4798ffea8c2bf0d4 os-prober_1.65.tar.xz
11e9794cc4bfd77092c76d9d96a2035b os-prober_1.68.tar.xz