diff --git a/os-prober-make-btrfsprogs-optional.patch b/os-prober-make-btrfsprogs-optional.patch new file mode 100644 index 0000000..1498569 --- /dev/null +++ b/os-prober-make-btrfsprogs-optional.patch @@ -0,0 +1,30 @@ +Index: os-prober-1.76/os-probes/common/50mounted-tests +=================================================================== +--- os-prober-1.76.orig/os-probes/common/50mounted-tests ++++ os-prober-1.76/os-probes/common/50mounted-tests +@@ -151,11 +151,20 @@ if [ "$types" = btrfs ]; then + rmdir "$tmpmnt" || true + exit 1 + fi +- # besides regular subvols, get ro and snapshot so thet can be excluded +- subvols=$(btrfs subvolume list -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\/!!) +- rosubvols=$(btrfs subvolume list -r -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\/!!) +- sssubvols=$(btrfs subvolume list -s -a "$tmpmnt" | cut -d ' ' -f 14 | sed -e s!^\/!!) +- defaultvol=$(btrfs subvolume get-default "$tmpmnt" | cut -d ' ' -f 9) ++ ++ if type btrfs >/dev/null 2>&1; then ++ # besides regular subvols, get ro and snapshot so thet can be excluded ++ subvols=$(btrfs subvolume list -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\/!!) ++ rosubvols=$(btrfs subvolume list -r -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\/!!) ++ sssubvols=$(btrfs subvolume list -s -a "$tmpmnt" | cut -d ' ' -f 14 | sed -e s!^\/!!) ++ defaultvol=$(btrfs subvolume get-default "$tmpmnt" | cut -d ' ' -f 9) ++ else ++ subvols="" ++ rosubvols="" ++ sssubvols="" ++ defaultvol="" ++ fi ++ + if ! umount "$tmpmnt"; then + warn "failed to umount btrfs volume on $tmpmnt" + rmdir "$tmpmnt" || true diff --git a/os-prober.changes b/os-prober.changes index 712fde8..db7abc8 100644 --- a/os-prober.changes +++ b/os-prober.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 11 07:30:19 UTC 2018 - mchang@suse.com + +- Don't hard require btrfsprogs by downgrading it to suggests (boo#1118279) + * os-prober-make-btrfsprogs-optional.patch + ------------------------------------------------------------------- Wed Oct 31 07:08:10 UTC 2018 - mchang@suse.com diff --git a/os-prober.spec b/os-prober.spec index 2c0bee0..07e7099 100644 --- a/os-prober.spec +++ b/os-prober.spec @@ -68,15 +68,17 @@ Patch24: os-prober-linux-distro-parse-os-release.patch Patch25: os-prober-05efi-blkid.patch # PATCH-FIX-OPENSUSE: UEFI Grub does not insert Arch Linux entry correctly (boo#1101942) Patch26: os-prober-multiple-initrd.patch +# PATCH-FIX-OPENSUSE: os-prober unconditionally pulls btrfsprogs (boo#1118279) +Patch27: os-prober-make-btrfsprogs-optional.patch Requires: /bin/grep Requires: /bin/sed Requires: /sbin/modprobe -Requires: btrfsprogs Requires: coreutils Requires: udev Requires: util-linux Recommends: dmraid Suggests: lvm2 +Suggests: btrfsprogs %if 0%{?suse_version} >= 1315 # For logger utility Requires: util-linux-systemd @@ -111,6 +113,7 @@ cp %{SOURCE1} . %patch24 -p1 %patch25 -p1 %patch26 -p1 +%patch27 -p1 find . -name \*.orig -delete %build