Hello community,

here is the log from the commit of package os-prober for openSUSE:Factory 
checked in at 2013-12-10 17:44:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/os-prober (Old)
 and      /work/SRC/openSUSE:Factory/.os-prober.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "os-prober"

Changes:
--------
--- /work/SRC/openSUSE:Factory/os-prober/os-prober.changes      2013-11-10 
15:07:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.os-prober.new/os-prober.changes 2013-12-10 
17:44:20.000000000 +0100
@@ -1,0 +2,9 @@
+Fri Dec  6 09:21:55 UTC 2013 - mch...@suse.com
+
+- add os-prober-dont-load-all-fs-module-and-dont-test-mount.patch
+  * don't modprobe that many kernel file system modules before mount
+    as mount will take care that for us (bnc#782689)
+  * don't test mount on partitions without any known file system
+    detected (bnc#851722) 
+
+-------------------------------------------------------------------

New:
----
  os-prober-dont-load-all-fs-module-and-dont-test-mount.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ os-prober.spec ++++++
--- /var/tmp/diff_new_pack.WGMeMp/_old  2013-12-10 17:44:21.000000000 +0100
+++ /var/tmp/diff_new_pack.WGMeMp/_new  2013-12-10 17:44:21.000000000 +0100
@@ -47,6 +47,8 @@
 Patch10:        os-prober-EFI-openSUSEfy.patch
 # PATCH-FIX-OPENSUSE: accept ESP on IMSM MD raid (bnc#818871)
 Patch11:        os-prober-accept-ESP-on-IMSM.patch
+# PATCH-FIX-OPENSUSE: don't modprobe all file system modules and don't test 
mount on unknown partition (bnc#851722)
+Patch12:        os-prober-dont-load-all-fs-module-and-dont-test-mount.patch
 
 Requires:       /bin/grep
 Requires:       /bin/sed
@@ -76,6 +78,7 @@
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 %build
 make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"

++++++ os-prober-dont-load-all-fs-module-and-dont-test-mount.patch ++++++
Index: os-prober-1.61/os-probes/common/50mounted-tests
===================================================================
--- os-prober-1.61.orig/os-probes/common/50mounted-tests
+++ os-prober-1.61/os-probes/common/50mounted-tests
@@ -40,19 +40,13 @@ elif [ -z "$types" ]; then
                debug "$1 is a LUKS partition; skipping"
                exit 0
        fi
-       for type in $(grep -v nodev /proc/filesystems); do
-               # hfsplus filesystems are mountable as hfs. Try hfs last so
-               # that we can tell the difference.
-               if [ "$type" = hfs ]; then
-                       delaytypes="${delaytypes:+$delaytypes }$type"
-               elif [ "$type" = fuseblk ]; then
-                       if type ntfs-3g >/dev/null 2>&1; then
-                               types="${types:+$types }ntfs-3g"
-                       fi
-               else
-                       types="${types:+$types }$type"
-               fi
-       done
+
+       # Simply skip such partition is better than trying to detect
+       # it by blinded test mounts with all kinds of kernel file system,
+       # that would lead to unwanted consequence like kernel oops and
+       # risk to corrupt your system and data.
+       debug "$1 is a partition without file system; skipping"
+       exit 0
 fi
 
 tmpmnt=/var/lib/os-prober/mount
@@ -144,7 +138,7 @@ if type grub2-mount >/dev/null 2>&1 && \
        fi
 else
        ro_partition "$partition"
-       for type in $types $delaytypes; do
+       for type in $types; do
                if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; 
then
                        debug "mounted as $type filesystem"
                        mounted=1
Index: os-prober-1.61/os-probes/init/common/10filesystems
===================================================================
--- os-prober-1.61.orig/os-probes/init/common/10filesystems
+++ os-prober-1.61/os-probes/init/common/10filesystems
@@ -1,39 +1,21 @@
 #!/bin/sh
 # Make sure filesystems are available.
-set +e # ignore errors from modprobe
+set -e
 
-FILESYSTEMS='ext2 ext3 ext4 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus 
qnx4 ufs btrfs'
-# fuse is needed to make grub2-mount work.
-FILESYSTEMS="$FILESYSTEMS fuse"
-# The Ubuntu kernel udebs put a number of filesystem modules in
-# fs-{core,secondary}-modules. It's fairly cheap to check for these too.
-FILESYSTEMS="$FILESYSTEMS fs-core fs-secondary"
-
-if [ ! -e /var/lib/os-prober/modules ]; then
-       # Check for anna-install to make it easier to use os-prober outside
-       # d-i.
-       if type anna-install >/dev/null 2>&1 && [ -d /lib/debian-installer ]; 
then
-               for fs in $FILESYSTEMS; do
-                       ANNA_QUIET=1 DEBIAN_FRONTEND=none \
-                       log-output -t os-prober \
-                               anna-install "$fs-modules" || true
-               done
-               depmod -a >/dev/null 2>&1 || true
-       fi
+# Make sure fuse is available for grub2-mount
+# As long as we use grub2-mount, we use grub2's own file system modules
+# to mount the partitiion and the operation don't require kernel support
+# other than fuse.
+if ! cat /proc/filesystems | grep nodev | cut -f2 | grep -qw fuse; then
+       modprobe fuse 2>&1 | logger -t os-prober
+fi
 
-       for fs in $FILESYSTEMS; do
-               case "$fs" in
-                       fs-*)
-                               ;;
-                       *)
-                               modprobe "$fs" 2>/dev/null | logger -t os-prober
-                               ;;
-               esac
-       done
+# Regarding file systems not supported by grub2, or systems simply don't
+# have grub2-mount, will use linux 'mount' utility. This will require
+# kernel file system module to work, but still we don't need to modprobe
+# all of them before mount, because mount() syscall will take care of it
+# by __request_module the needed kernel module and we should leave it do
+# that for us in order to have only needed modules get loaded. 
+#
+# Still if you want any kernel module loaded, add them here.
 
-       # We only want to keep this state inside d-i, so this is as good a
-       # check as any.
-       if type anna-install >/dev/null 2>&1 && [ -d /lib/debian-installer ]; 
then
-               touch /var/lib/os-prober/modules
-       fi
-fi
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to