From owner-svn-ports-head@FreeBSD.ORG Sun Jul 27 00:27:36 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5E53A10; Sun, 27 Jul 2014 00:27:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1FE82063; Sun, 27 Jul 2014 00:27:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6R0RaI8055267; Sun, 27 Jul 2014 00:27:36 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6R0RaKM055266; Sun, 27 Jul 2014 00:27:36 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201407270027.s6R0RaKM055266@svn.freebsd.org> From: John Marino Date: Sun, 27 Jul 2014 00:27:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r363000 - head/sysutils/grub2/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2014 00:27:37 -0000 Author: marino Date: Sun Jul 27 00:27:36 2014 New Revision: 363000 URL: http://svnweb.freebsd.org/changeset/ports/363000 QAT: https://qat.redports.org/buildarchive/r363000/ Log: sysutils/grub2: Resolve install sysutils/grub2 on UFS problem PR: 185741 Submitted by: onborodin (gmail) Added: head/sysutils/grub2/files/patch-util_grub-install.in (contents, props changed) Added: head/sysutils/grub2/files/patch-util_grub-install.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/grub2/files/patch-util_grub-install.in Sun Jul 27 00:27:36 2014 (r363000) @@ -0,0 +1,72 @@ +--- util/grub-install.in.orig 2012-06-26 21:31:03.000000000 +0000 ++++ util/grub-install.in +@@ -107,6 +107,8 @@ usage () { + print_option_help "--recheck" "$(gettext "delete device map if it already exists")" + print_option_help "--force" "$(gettext "install even if problems are detected")" + print_option_help "--force-file-id" "$(gettext "use identifier file even if UUID is available")" ++ print_option_help "--force-label" "$(gettext "use filesystem label even if UUID is available")" ++ + print_option_help "--disk-module=$(gettext "MODULE")" "$(gettext "disk module to use (biosdisk or native). This option is only available on BIOS target.")" + print_option_help "--no-nvram" "$(gettext "don't update the \`boot-device' NVRAM variable. This option is only available on IEEE1275 targets.")" + print_option_help "--removable" "$(gettext "the installation device is removable. This option is only available on EFI.")" +@@ -159,6 +161,9 @@ do + --force-file-id) + force_file_id=y ;; + ++ --force-label) ++ force_fs_label=y ;; ++ + # Accept and ignore for compatibility + --font) + shift;; +@@ -585,7 +590,7 @@ fi + partmap_module= + for x in `echo "${grub_device}" | xargs "$grub_probe" --device-map="${device_map}" --target=partmap --device 2> /dev/null`; do + case "$x" in +- netbsd | openbsd) ++ netbsd | openbsd | freebsd ) + partmap_module="$partmap_module part_bsd";; + "") ;; + *) +@@ -593,6 +598,11 @@ for x in `echo "${grub_device}" | xargs + esac + done + ++case `uname -o` in ++ FreeBSD) ++ partmap_module="$partmap_module part_msdos part_bsd";; ++esac ++ + # Device abstraction module, if any (lvm, raid). + devabstraction_module="`echo "${grub_device}" | xargs "$grub_probe" --device-map="${device_map}" --target=abstraction --device`" + +@@ -668,16 +678,28 @@ if [ "x${devabstraction_module}" = "x" ] + echo 1>&2 + hints= + fi ++ ++ if [ x"$force_fs_label" = xy ]; then ++ fs_label="`echo "${grub_device}" | xargs "$grub_probe" --device-map="${device_map}" --target=fs_label --device`" ++ fi ++ ++ if [ x"$fs_label" != x ]; then ++ echo "search.fs_label ${fs_label} root $hints " >> "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg" ++ search_module=search_label ++ else ++ + if [ x"$uuid" != x ]; then + echo "search.fs_uuid ${uuid} root $hints " >> "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg" + search_module=search_fs_uuid + else + mkdir -p "${grubdir}/uuid" +- file="`mktemp "${grubdir}/uuid/XXXXXXXXXXXXXXXXXXXXXXXXX"`" ++ file="`mktemp "${grubdir}/uuid/XXXX-XXXX-XXXX"`" + relfile="`${grub_mkrelpath} "$file"`" + echo "search.file '${relfile}' root $hints " >> "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg" + search_module=search_fs_file + fi ++ fi ++ + echo 'set prefix=($root)'"$(echo "${relative_grubdir}" | sed "s,\\([ \"'\\\\]\\),\\\\\\1,g")" >> "${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg" + config_opt_file="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/load.cfg" + modules="$modules $search_module"