From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VNmyA-0001Pm-Pl for mharc-grub-devel@gnu.org; Sun, 22 Sep 2013 12:57:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNmy2-0001Ht-Hj for grub-devel@gnu.org; Sun, 22 Sep 2013 12:57:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VNmxv-0004Wt-ST for grub-devel@gnu.org; Sun, 22 Sep 2013 12:57:06 -0400 Received: from mail-ee0-x22a.google.com ([2a00:1450:4013:c00::22a]:42879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNmxv-0004WO-HV for grub-devel@gnu.org; Sun, 22 Sep 2013 12:56:59 -0400 Received: by mail-ee0-f42.google.com with SMTP id b45so1269884eek.1 for ; Sun, 22 Sep 2013 09:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=urq6xm7tYby+thy+mR49RNPR7ekn8b7PnntV4ErLYE8=; b=zmV0So8oIFv5z7R0ugN5M4bm6Uq+rxnpbRf6pmsBz5LSGiUAEaEZBDMpVdqD8scqvc fXk1UfG/8fPpcvbzOa+zEtBNx4s0skUshJM8MHzLEH5HveLX2YdUCZ6jpqbFX1Nnn4kR vG0y4omAj2uS4nRBL0LRAJvLhAuQI6+UKvCluKnrQKkSxWRGgP7sthuJv7o4EPWyq6C+ efiy3fMWqBL/9ekhyVIBBORgunydSuEd6OFhL9s8ywEXJPota+Mqyc6z7qY0ebr5FIw7 hBnDheX+rcwE2HS+NUX73XJJffGUjIyAJYEdliTBSqnLi+lLiE8EQ9x+ETXLaqbljE1V qoAg== X-Received: by 10.15.98.194 with SMTP id bj42mr29867972eeb.12.1379869018617; Sun, 22 Sep 2013 09:56:58 -0700 (PDT) Received: from [192.168.1.113] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id r48sm35472714eev.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 22 Sep 2013 09:56:57 -0700 (PDT) Message-ID: <523F2158.7070409@gmail.com> Date: Sun, 22 Sep 2013 18:56:56 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130821 Icedove/17.0.8 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] fix grub-install from build directory References: <1379866940-16014-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1379866940-16014-1-git-send-email-arvidjaar@gmail.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2RETDNWILAINNGUPXOBSA" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22a X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Sep 2013 16:57:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2RETDNWILAINNGUPXOBSA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Go ahead On 22.09.2013 18:22, Andrey Borzenkov wrote: > 1. grub-install exits early due to cp error >=20 > bor@opensuse:~/build/grub> LC_ALL=3DC sudo pkgdatadir=3D$PWD ./grub-ins= tall --grub-mkimage=3D./grub-mkimage --grub-setup=3D./grub-bios-setup --g= rub-probe=3D./grub-probe --grub-mkrelpath=3D./grub-mkrelpath --boot-direc= tory=3D/boot/upstream -d $PWD/grub-core /dev/sda1 > cp: omitting directory '/home/bor/build/grub/themes/starfield/src' > bor@opensuse:~/build/grub> echo $? > 1 >=20 > Explicitly skip non-plain files but emit a warning. >=20 > 2. grub-install requires grub-editenv when installing in clean director= y. >=20 > Add --grub-editenv option to grub-install to specify its location. >=20 > Signed-off-by: Andrey Borzenkov >=20 > --- > util/grub-install.in | 6 ++++++ > util/grub-install_header | 10 +++++++--- > 2 files changed, 13 insertions(+), 3 deletions(-) >=20 > diff --git a/util/grub-install.in b/util/grub-install.in > index 1816bb1..acd516f 100644 > --- a/util/grub-install.in > +++ b/util/grub-install.in > @@ -75,6 +75,7 @@ usage () { > print_option_help "--grub-setup=3D$(gettext "FILE")" "$(gettext "u= se FILE as grub-setup")" > print_option_help "--grub-mkrelpath=3D$(gettext "FILE")" "$(gettex= t "use FILE as grub-mkrelpath")" > print_option_help "--grub-probe=3D$(gettext "FILE")" "$(gettext "u= se FILE as grub-probe")" > + print_option_help "--grub-editenv=3D$(gettext "FILE")" "$(gettext = "use FILE as grub-editenv")" > # TRANSLATORS: "may break" doesn't just mean that option wouldn't = have any > # effect but that it will make the resulting install unbootable fr= om HDD. > print_option_help "--allow-floppy" "$(gettext "make the drive also= bootable as floppy (default for fdX devices). May break on some BIOSes."= )" > @@ -173,6 +174,11 @@ do > --grub-probe=3D*) > grub_probe=3D"`echo "$option" | sed 's/--grub-probe=3D//'`" ;; > =20 > + --grub-editenv) > + grub_editenv=3D"`argument "$option" "$@"`"; shift;; > + --grub-editenv=3D*) > + grub_editenv=3D"`echo "$option" | sed 's/--grub-editenv=3D//'`" ;; > + > --no-floppy) > ;; > --recheck) > diff --git a/util/grub-install_header b/util/grub-install_header > index cf7fa9d..26013fe 100644 > --- a/util/grub-install_header > +++ b/util/grub-install_header > @@ -45,10 +45,14 @@ handler.lst video.lst crypto.lst terminal.lst" > grub_mkimage=3D"${bindir}/@grub_mkimage@" > =20 > grub_compress_file () { > - if [ "$compressor" !=3D "" ] ; then > - "$compressor" $compressor_opts "$1" > "$2" > + if [ -f "$1" ] ; then > + if [ "$compressor" !=3D "" ] ; then > + "$compressor" $compressor_opts "$1" > "$2" > + else > + cp -f "$1" "$2" > + fi > else > - cp -f "$1" "$2" > + gettext_printf "Skipping file \`%s': not a plain file\n" "$1" 1>&2 > fi > } > =20 >=20 ------enig2RETDNWILAINNGUPXOBSA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlI/IVgACgkQNak7dOguQgmkNgD/XikPY5Xlka0nVHJuK4WyuWm9 0FvLu2UP5+wc+RxMUBcA/38nNQAZ2DgziKOgBvcxF80JA3cOsACv7SQO9qD5LVIU =Aid9 -----END PGP SIGNATURE----- ------enig2RETDNWILAINNGUPXOBSA--