diff --git a/os-prober-1.49-grub2-mount.patch b/os-prober-1.49-grub2-mount.patch index cf11e14..b9472f9 100644 --- a/os-prober-1.49-grub2-mount.patch +++ b/os-prober-1.49-grub2-mount.patch @@ -1,34 +1,7 @@ -From: Andrey Borzenkov -Subject: replace grub-mount with grub2-mount everywhere - -References: bnc#799457, bnc#767272 - -We use grub2-mount, not grub-mount. As shown in bnc#799457, -grub2-mount may access filesystem even when kernel driver -will refuse it. os-prober makes devices read-only to prevent -accidental damage, so kernel driver fails if log replay is needed -but cannot be performed. - -This may likely fix bnc#767272 - -Index: os-prober-1.57/os-probes/init/common/10filesystems -=================================================================== ---- os-prober-1.57.orig/os-probes/init/common/10filesystems -+++ os-prober-1.57/os-probes/init/common/10filesystems -@@ -3,7 +3,7 @@ - set +e # ignore errors from modprobe - - FILESYSTEMS='ext2 ext3 ext4 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs btrfs' --# fuse is needed to make grub-mount work. -+# 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. -Index: os-prober-1.57/common.sh -=================================================================== ---- os-prober-1.57.orig/common.sh -+++ os-prober-1.57/common.sh -@@ -259,8 +259,8 @@ linux_mount_boot () { +diff -urN os-prober.old/common.sh os-prober/common.sh +--- os-prober.old/common.sh 2014-12-14 19:04:07.711368751 +0100 ++++ os-prober/common.sh 2014-12-14 19:04:29.792443896 +0100 +@@ -259,8 +259,8 @@ 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" @@ -39,11 +12,10 @@ Index: os-prober-1.57/common.sh mounted=1 else ro_partition "$boottomnt" -Index: os-prober-1.57/linux-boot-probes/common/50mounted-tests -=================================================================== ---- os-prober-1.57.orig/linux-boot-probes/common/50mounted-tests -+++ os-prober-1.57/linux-boot-probes/common/50mounted-tests -@@ -34,11 +34,11 @@ if [ ! -d "$tmpmnt" ]; then +diff -urN os-prober.old/linux-boot-probes/common/50mounted-tests os-prober/linux-boot-probes/common/50mounted-tests +--- os-prober.old/linux-boot-probes/common/50mounted-tests 2014-12-14 19:04:07.711368751 +0100 ++++ os-prober/linux-boot-probes/common/50mounted-tests 2014-12-14 19:04:29.792443896 +0100 +@@ -34,11 +34,11 @@ fi mounted= @@ -59,11 +31,10 @@ Index: os-prober-1.57/linux-boot-probes/common/50mounted-tests [ "$type" ] || type=fuseblk else ro_partition "$partition" -Index: os-prober-1.57/os-probes/common/50mounted-tests -=================================================================== ---- os-prober-1.57.orig/os-probes/common/50mounted-tests -+++ os-prober-1.57/os-probes/common/50mounted-tests -@@ -49,11 +49,11 @@ if [ ! -d "$tmpmnt" ]; then +diff -urN os-prober.old/os-probes/common/50mounted-tests os-prober/os-probes/common/50mounted-tests +--- os-prober.old/os-probes/common/50mounted-tests 2014-12-14 19:04:07.712368755 +0100 ++++ os-prober/os-probes/common/50mounted-tests 2014-12-14 19:04:29.793443899 +0100 +@@ -46,11 +46,11 @@ fi mounted= @@ -79,3 +50,15 @@ Index: os-prober-1.57/os-probes/common/50mounted-tests if [ "$type" ]; then debug "mounted using GRUB $type filesystem driver" else +diff -urN os-prober.old/os-probes/init/common/10filesystems os-prober/os-probes/init/common/10filesystems +--- os-prober.old/os-probes/init/common/10filesystems 2014-12-14 19:04:07.713368758 +0100 ++++ os-prober/os-probes/init/common/10filesystems 2014-12-14 19:04:54.182526874 +0100 +@@ -3,7 +3,7 @@ + set +e # ignore errors from modprobe + + FILESYSTEMS='ext2 ext3 ext4 xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs btrfs' +-# fuse is needed to make grub-mount work. ++# 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. diff --git a/os-prober-call-dmraid-once.patch b/os-prober-call-dmraid-once.patch index a7a0793..a33bb1e 100644 --- a/os-prober-call-dmraid-once.patch +++ b/os-prober-call-dmraid-once.patch @@ -13,8 +13,10 @@ Signed-off-by: Jeff Mahoney os-prober | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---- a/os-prober -+++ b/os-prober +Index: os-prober/os-prober +=================================================================== +--- os-prober.orig/os-prober ++++ os-prober/os-prober @@ -14,11 +14,17 @@ log_output () { fi } diff --git a/os-prober-dont-load-all-fs-module-and-dont-test-mount.patch b/os-prober-dont-load-all-fs-module-and-dont-test-mount.patch index bab3b9e..4adb2af 100644 --- a/os-prober-dont-load-all-fs-module-and-dont-test-mount.patch +++ b/os-prober-dont-load-all-fs-module-and-dont-test-mount.patch @@ -1,8 +1,7 @@ -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 +diff -urN os-prober.old/os-probes/common/50mounted-tests os-prober/os-probes/common/50mounted-tests +--- os-prober.old/os-probes/common/50mounted-tests 2014-12-14 19:04:07.712368755 +0100 ++++ os-prober/os-probes/common/50mounted-tests 2014-12-14 19:08:15.674211934 +0100 +@@ -25,19 +25,13 @@ debug "$1 is a LUKS partition; skipping" exit 0 fi @@ -29,7 +28,7 @@ Index: os-prober-1.61/os-probes/common/50mounted-tests fi tmpmnt=/var/lib/os-prober/mount -@@ -144,7 +138,7 @@ if type grub2-mount >/dev/null 2>&1 && \ +@@ -59,7 +53,7 @@ fi else ro_partition "$partition" @@ -38,17 +37,15 @@ Index: os-prober-1.61/os-probes/common/50mounted-tests 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 @@ +diff -urN os-prober.old/os-probes/init/common/10filesystems os-prober/os-probes/init/common/10filesystems +--- os-prober.old/os-probes/init/common/10filesystems 2014-12-14 19:04:07.713368758 +0100 ++++ os-prober/os-probes/init/common/10filesystems 2014-12-14 19:09:51.939538946 +0100 +@@ -1,39 +1,19 @@ #!/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' +- +-FILESYSTEMS='ext2 ext3 ext4 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 @@ -66,14 +63,7 @@ Index: os-prober-1.61/os-probes/init/common/10filesystems - 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-*) @@ -83,18 +73,27 @@ Index: os-prober-1.61/os-probes/init/common/10filesystems - ;; - 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 ++set -e ++ ++# 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 ++# 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. diff --git a/os-prober.changes b/os-prober.changes index 889dbbd..5b6a37f 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sun Dec 14 18:16:40 UTC 2014 - tchvatal@suse.com + +- Version bujmp to 1.65: + * use latest in debian to be up par patch wise + * Drop reiserfs, it's no longer supported. + - we actually still support it as we patch this class away + anyway, but still they have it in their changes... + * Add ppc64el support. Closes: #752416. + * Recognise the new ignore_uefi flag from partman-efi. +- Refresh all patches to still apply: + * os-prober-1.49-grub2-mount.patch + * os-prober-call-dmraid-once.patch + * os-prober-dont-load-all-fs-module-and-dont-test-mount.patch +- Always delete all the .orig files as sometimes even upstream + put them to tarball :) + ------------------------------------------------------------------- Tue Aug 19 11:15:57 UTC 2014 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index c438e45..d1ec5f5 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -17,14 +17,13 @@ Name: os-prober -Version: 1.61 +Version: 1.65 Release: 0 Summary: Probes disks on the system for installed operating systems License: GPL-2.0+ Group: System/Boot - Url: http://kitenet.net/~joey/code/os-prober/ -Source0: http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.gz +Source0: http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.xz Source1: COPYING-note.txt # move newns binary outside of os-prober subdirectory, so that debuginfo # can be automatically generated for it @@ -55,16 +54,15 @@ Patch13: os-prober-fix-btrfs-subvol-mounted-tests.patch Patch14: os-prober-skip-part-on-multipath.patch # PATCH-FIX-SLE: fix os-prober: dmraid is called without a device list for every partition (bnc#883453) Patch15: os-prober-call-dmraid-once.patch - Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe Requires: btrfsprogs Requires: coreutils -Recommends: dmraid -Recommends: lvm2 Requires: udev Requires: util-linux +Recommends: dmraid +Recommends: lvm2 %if 0%{?suse_version} >= 1315 # For logger utility Requires: util-linux-systemd @@ -76,8 +74,8 @@ in a generic machine-readable format. Support for new OSes and Linux distributions can be added easily. %prep -%setup -q -n %{name}-%{version} -cp %SOURCE1 . +%setup -q -n %{name} +cp %{SOURCE1} . %patch0 -p1 %patch1 -p1 %patch3 -p1 @@ -92,9 +90,10 @@ cp %SOURCE1 . %patch13 -p1 %patch14 -p1 %patch15 -p1 +find . -name \*.orig -delete %build -make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}" +make %{?_smp_mflags} CC="gcc" CFLAGS="%{optflags}" %install install -m 0755 -d %{buildroot}%{_bindir} @@ -113,7 +112,7 @@ ARCH=powerpc %ifarch sparc sparc64 ARCH=sparc %endif -%ifarch %{ix86} x86_64 +%ifarch %ix86 x86_64 ARCH=x86 %endif diff --git a/os-prober_1.61.tar.gz b/os-prober_1.61.tar.gz deleted file mode 100644 index 1969179..0000000 --- a/os-prober_1.61.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b83d037c38ca6393e1ead7d1548c59528c07b9fc1a1e07b4e1d07af03905f48 -size 28197 diff --git a/os-prober_1.65.tar.xz b/os-prober_1.65.tar.xz new file mode 100644 index 0000000..22fafe3 --- /dev/null +++ b/os-prober_1.65.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4a7661a52edae722f7e6bacb3f107cf7086cbe768275fadf5398d04360bfc84 +size 24712