From 8519278b645c1b29046377ad42e5f723247c7b9b Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Sun, 4 Aug 2019 19:10:23 +0000 Subject: Sun Aug 4 19:10:23 UTC 2019 a/kernel-generic-4.19.63-x86_64-1.txz: Upgraded. a/kernel-huge-4.19.63-x86_64-1.txz: Upgraded. a/kernel-modules-4.19.63-x86_64-1.txz: Upgraded. a/libgudev-233-x86_64-1.txz: Upgraded. a/os-prober-1.77-x86_64-2.txz: Rebuilt. Patched to fix lvm2 detection. Thanks to USUARIONUEVO. ap/man-db-2.8.6-x86_64-1.txz: Upgraded. ap/man-pages-5.02-noarch-1.txz: Upgraded. d/kernel-headers-4.19.63-x86-1.txz: Upgraded. d/re2c-1.2-x86_64-1.txz: Upgraded. k/kernel-source-4.19.63-noarch-1.txz: Upgraded. l/Mako-1.1.0-x86_64-1.txz: Upgraded. l/babl-0.1.70-x86_64-1.txz: Upgraded. l/imagemagick-6.9.10_59-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt. --- source/a/os-prober/os-prober.SlackBuild | 7 ++++-- source/a/os-prober/os-prober.lvm2.diff | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 source/a/os-prober/os-prober.lvm2.diff (limited to 'source/a/os-prober') diff --git a/source/a/os-prober/os-prober.SlackBuild b/source/a/os-prober/os-prober.SlackBuild index f4c0348db..1098ac6b8 100755 --- a/source/a/os-prober/os-prober.SlackBuild +++ b/source/a/os-prober/os-prober.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2013, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2013, 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=os-prober VERSION=${VERSION:-$(echo $PKGNAM_*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d _ | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -79,6 +79,9 @@ cd $PKGNAM-$VERSION || exit 1 # Don't drop support for reiserfs. It's still in the kernel (for now): zcat $CWD/os-prober.reiserfs.diff.gz | patch -p1 --verbose || exit 1 +# Fix detecting LVM2 volumes: +zcat $CWD/os-prober.lvm2.diff.gz | patch -p1 --verbose || exit 1 + # Edit the scripts to use $LIBDIRSUFFIX=64 if needed: if [ "$LIBDIRSUFFIX" = "64" ]; then find -type f -exec sed -i -e 's|usr/lib|usr/lib64|g' {} \; diff --git a/source/a/os-prober/os-prober.lvm2.diff b/source/a/os-prober/os-prober.lvm2.diff new file mode 100644 index 000000000..91f527256 --- /dev/null +++ b/source/a/os-prober/os-prober.lvm2.diff @@ -0,0 +1,38 @@ +diff -ru os-prober-1.77/common.sh os-prober-1.77.new/common.sh +--- os-prober-1.77/common.sh 2018-08-10 21:23:18.000000000 +0200 ++++ os-prober-1.77.new/common.sh 2019-08-03 23:37:48.466380378 +0200 +@@ -176,6 +176,15 @@ + sed 's/\\011/ /g; s/\\012/\n/g; s/\\040/ /g; s/\\134/\\/g' + } + ++ro_partition () { ++ if type blockdev >/dev/null 2>&1 && \ ++ [ "$(blockdev --getro "$1")" = 0 ] && \ ++ blockdev --setro "$1"; then ++ cleanup_ro_partitions="${cleanup_ro_partitions:+$cleanup_ro_partitions }$1" ++ trap cleanup EXIT HUP INT QUIT TERM ++ fi ++} ++ + find_label () { + local output + if type blkid >/dev/null 2>&1; then +diff -ru os-prober-1.77/os-probes/common/50mounted-tests os-prober-1.77.new/os-probes/common/50mounted-tests +--- os-prober-1.77/os-probes/common/50mounted-tests 2018-08-10 21:23:18.000000000 +0200 ++++ os-prober-1.77.new/os-probes/common/50mounted-tests 2019-08-03 23:37:48.465380372 +0200 +@@ -69,6 +69,15 @@ + debug "mounted using GRUB, but unknown filesystem?" + type=fuseblk + fi ++else ++ ro_partition "$partition" ++ for type in $types $delaytypes; do ++ if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then ++ debug "mounted as $type filesystem" ++ mounted=1 ++ break ++ fi ++ done + fi + + if [ "$mounted" ]; then -- cgit v1.2.3