summaryrefslogtreecommitdiff
path: root/libre/syslinux
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-17 22:32:10 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-17 22:32:10 -0300
commita5c7a2d156c741b045d0b9ee5c287122197a7143 (patch)
treee83e555987ed2e381694f99f1bb6a41986727990 /libre/syslinux
parentcfdcacf50147ab467719f65e348aa0739f8bc8f4 (diff)
syslinux-6.03-4.parabola1: fix btrfs boot issue - FS#48214 -> https://bugs.archlinux.org/task/48214
Diffstat (limited to 'libre/syslinux')
-rw-r--r--libre/syslinux/PKGBUILD10
-rw-r--r--libre/syslinux/syslinux-install_update50
2 files changed, 36 insertions, 24 deletions
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD
index 31ccd97a2..7a1fe3210 100644
--- a/libre/syslinux/PKGBUILD
+++ b/libre/syslinux/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=syslinux
pkgver=6.03
_tag=syslinux-$pkgver
-pkgrel=3.parabola1
+pkgrel=4.parabola1
pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)'
url='http://www.syslinux.org/'
arch=(i686 x86_64)
@@ -38,11 +38,13 @@ optdepends=('perl-passwd-md5: For md5pass'
source=(git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git#tag=$_tag
syslinux.cfg
syslinux-install_update
+ btrfs-fix.patch::http://repo.or.cz/syslinux.git/patch/548386049cd41e887079cdb904d3954365eb28f3?hp=721a0af2f0ba111c31685c5f6c5481eb25346971
splash.png)
sha1sums=('SKIP'
'e40acf4cf9d05ec000c59284f959d1540b35a3be'
- 'b9ca016e08dd1c45dd7f3c88df680b949e39aa77'
- '8d937eb2ffb563a0cb876bda731e036f43bf0e4b')
+ '29d7c28639e57cdaefc8ef2447e8412a7b59709d'
+ 'e1b6768e64f1f9448131b30f2b1f3389f36253f1'
+ 'df57121ba1a4fb400161182f123e773770fc40a1')
_targets='bios efi32'
case "$CARCH" in
@@ -52,6 +54,8 @@ esac
prepare() {
cd syslinux
+ patch -p1 < ../btrfs-fix.patch # FS#48214
+
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
diff --git a/libre/syslinux/syslinux-install_update b/libre/syslinux/syslinux-install_update
index a4481644e..c2653dc25 100644
--- a/libre/syslinux/syslinux-install_update
+++ b/libre/syslinux/syslinux-install_update
@@ -51,6 +51,28 @@ check_is_in() {
return 1
}
+get_disk() {
+ local part=$1
+ if [[ ! -b "${part}" ]]; then
+ echo >&2 "error: '$part' is not a valid block device!"
+ exit 1
+ fi
+
+ case "$part" in
+ *[[:digit:]]p[[:digit:]]*)
+ local disk="${part%%p$partnum}" # get everything before p1
+ ;;
+ *)
+ local disk="${part%%[[:digit:]]*}"
+ ;;
+ esac
+ if [[ ! -b "${disk}" ]]; then
+ echo >&2 "error: '$disk' is not a valid block device!"
+ exit 1
+ fi
+ echo $disk
+}
+
# return true when blockdevice is an md raid, otherwise return a unset value
# get all devices that are part of raid device $1
device_is_raid() {
@@ -169,14 +191,14 @@ getBoot() {
exit 1
fi
boot="boot"
- bootpart="$bootdev"
+ bootpart="$(readlink -f "$bootdev")"
elif [[ $rootfs ]]; then
if ! check_is_in "$rootfs" "${syslinux_fs[@]}"; then
echo "/ (root) file system is not supported by Syslinux"
exit 1
fi
boot="root"
- bootpart="$rootdev"
+ bootpart="$(readlink -f "$rootdev")"
else
echo "Could not find filesystem on / (root) or /boot."
exit 1
@@ -194,12 +216,12 @@ get_boot_devices() {
slaves=$(mdraid_all_slaves "$bootpart")
for slave in ${slaves[@]}; do
- local disk="${slave%%[[:digit:]]*}"
+ local disk=$(get_disk "$slave")
device_is_gpt "$disk" && local ptb="GPT" || local ptb="MBR"
bootdevs[$slave]="$ptb"
done
else
- local disk="${bootpart%%[[:digit:]]*}"
+ local disk=$(get_disk "$bootpart")
device_is_gpt "$disk" && local ptb="GPT" || local ptb="MBR"
bootdevs[$bootpart]="$ptb"
fi
@@ -220,7 +242,7 @@ set_active() {
for dev in "${!bootdevs[@]}"; do
local ptb="${bootdevs[$dev]}"
if [[ "$ptb" = GPT ]]; then
- local disk="${dev%%[[:digit:]]*}" #ex: /dev/sda
+ local disk=$(get_disk "$dev")
clear_gpt_attr2 "$disk"
fi
done
@@ -229,14 +251,7 @@ set_active() {
for part in "${!bootdevs[@]}"; do
local ptb="${bootdevs[$part]}"
local partnum="${part##*[[:alpha:]]}"
- case "$part" in
- *[[:digit:]]p[[:digit:]]*)
- local disk="${part%%p$partnum}" # get everything before p1
- ;;
- *)
- local disk="${part%%[[:digit:]]*}"
- ;;
- esac
+ local disk=$(get_disk "$part")
if [[ "$ptb" = MBR ]]; then
if sfdisk "$disk" --activate "$partnum" &>/dev/null; then
@@ -271,14 +286,7 @@ install_mbr() {
for part in "${!bootdevs[@]}"; do
local partnum="${part##*[[:alpha:]]}"
- case "$part" in
- *[[:digit:]]p[[:digit:]]*)
- local disk="${part%%p$partnum}" # get everything before p1
- ;;
- *)
- local disk="${part%%[[:digit:]]*}"
- ;;
- esac
+ local disk=$(get_disk "$part")
local ptb="${bootdevs[$part]}"
# We want to install to the root of the block device