Bug#852001: grub2: fix running build-efi-images as non-root

Luca Boccassi luca.boccassi at gmail.com
Fri Jan 20 16:59:50 UTC 2017


Source: grub2
Version: 2.02~beta3-3
Severity: normal
Tags: patch

Dear maintainer,

When running debian/build-efi-images as non-root the script fails
because mkfs.msdos is not in the default PATH, being installed in /sbin.
This trivial patch uses the full path to fix the build for non-root
users and for automated build systems, removing the need to hack the
default Debian PATH.

Kind regards,
Luca Boccassi

From dc398c78b476a59b91befa56ca977844e0253af6 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <lboccass at brocade.com>
Date: Sat, 17 Dec 2016 00:51:17 +0000
Subject: [PATCH] Fix running build-efi-images as non-root

build-efi-images calls mkfs.msdos which is in /sbin, so on Debian
it's not in the default PATH of unprivileged users.
Use the full path to allow users (and automated build systems that
don't build as root) to build normally without hacking the default
PATH.
---
 debian/build-efi-images | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/build-efi-images b/debian/build-efi-images
index 1d1e159..a3e52b1 100755
--- a/debian/build-efi-images
+++ b/debian/build-efi-images
@@ -70,10 +70,10 @@ else
 fi
 EOF
 
-mkfs.msdos -C "$workdir/memdisk.fat" 64
+/sbin/mkfs.msdos -C "$workdir/memdisk.fat" 64
 mcopy -i "$workdir/memdisk.fat" "$workdir/grub.cfg" ::grub.cfg
 
-mkfs.msdos -C "$workdir/memdisk-netboot.fat" 64
+/sbin/mkfs.msdos -C "$workdir/memdisk-netboot.fat" 64
 mcopy -i "$workdir/memdisk-netboot.fat" "$workdir/grub-netboot.cfg" ::grub.cfg
 
 CD_MODULES="
-- 
2.1.4



More information about the Pkg-grub-devel mailing list