SHA256
1
0
forked from pool/os-prober

Accepting request 657082 from home:michael-chang:branches:Base:System

- Don't hard require btrfsprogs by downgrading it to suggests (boo#1118279)
  * os-prober-make-btrfsprogs-optional.patch

OBS-URL: https://build.opensuse.org/request/show/657082
OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=91
This commit is contained in:
Dirk Mueller 2018-12-11 08:35:07 +00:00 committed by Git OBS Bridge
parent 192dc7fe8f
commit 5abb83d861
3 changed files with 40 additions and 1 deletions

View File

@ -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!^\<FS_TREE\>/!!)
- rosubvols=$(btrfs subvolume list -r -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\<FS_TREE\>/!!)
- sssubvols=$(btrfs subvolume list -s -a "$tmpmnt" | cut -d ' ' -f 14 | sed -e s!^\<FS_TREE\>/!!)
- 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!^\<FS_TREE\>/!!)
+ rosubvols=$(btrfs subvolume list -r -a "$tmpmnt" | cut -d ' ' -f 9 | sed -e s!^\<FS_TREE\>/!!)
+ sssubvols=$(btrfs subvolume list -s -a "$tmpmnt" | cut -d ' ' -f 14 | sed -e s!^\<FS_TREE\>/!!)
+ 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

View File

@ -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

View File

@ -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