a5bd9f6
From d803dd359dd431cad08e95952f90c3f4f5acc9b7 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Colin Watson <cjwatson@ubuntu.com>
a5bd9f6
Date: Sat, 12 Jan 2013 13:30:37 +0000
a5bd9f6
Subject: [PATCH 095/364] Clean up dangling references to grub-setup. Fixes
a5bd9f6
 Ubuntu bug #1082045.
a5bd9f6
a5bd9f6
* docs/grub.texi (Images): Refer generally to grub-install rather
a5bd9f6
than directly to grub-setup.
a5bd9f6
(Installing GRUB using grub-install): Remove direct reference to
a5bd9f6
grub-setup.
a5bd9f6
(Device map) Likewise.
a5bd9f6
(Invoking grub-install): Likewise.
a5bd9f6
* docs/man/grub-install.h2m (SEE ALSO): Likewise.
a5bd9f6
* docs/man/grub-mkimage.h2m (SEE ALSO): Likewise.
a5bd9f6
* util/grub-install.in (usage): Likewise.
a5bd9f6
a5bd9f6
* util/bash-completion.d/grub-completion.bash.in (_grub_setup):
a5bd9f6
Apply to grub-bios-setup and grub-sparc64-setup rather than to
a5bd9f6
grub-setup.
a5bd9f6
* configure.ac: Remove grub_setup output variable.
a5bd9f6
a5bd9f6
* docs/man/grub-bios-setup.h2m (NAME): Change name from grub-setup
a5bd9f6
to grub-bios-setup.
a5bd9f6
* docs/man/grub-sparc64-setup.h2m (NAME): Change name from
a5bd9f6
grub-setup to grub-sparc64-setup.
a5bd9f6
---
a5bd9f6
 ChangeLog                                      | 25 +++++++++++++++++++++++++
a5bd9f6
 configure.ac                                   |  1 -
a5bd9f6
 docs/grub.texi                                 | 24 ++++++++++++------------
a5bd9f6
 docs/man/grub-bios-setup.h2m                   |  2 +-
a5bd9f6
 docs/man/grub-install.h2m                      |  1 -
a5bd9f6
 docs/man/grub-mkimage.h2m                      |  1 -
a5bd9f6
 docs/man/grub-sparc64-setup.h2m                |  2 +-
a5bd9f6
 util/bash-completion.d/grub-completion.bash.in | 14 ++++++++++----
a5bd9f6
 util/grub-install.in                           |  4 ++--
a5bd9f6
 9 files changed, 51 insertions(+), 23 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 22b18b1..61bf8e7 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,3 +1,28 @@
a5bd9f6
+2013-01-12  Colin Watson  <cjwatson@ubuntu.com>
a5bd9f6
+
a5bd9f6
+	Clean up dangling references to grub-setup.
a5bd9f6
+	Fixes Ubuntu bug #1082045.
a5bd9f6
+
a5bd9f6
+	* docs/grub.texi (Images): Refer generally to grub-install rather
a5bd9f6
+	than directly to grub-setup.
a5bd9f6
+	(Installing GRUB using grub-install): Remove direct reference to
a5bd9f6
+	grub-setup.
a5bd9f6
+	(Device map) Likewise.
a5bd9f6
+	(Invoking grub-install): Likewise.
a5bd9f6
+	* docs/man/grub-install.h2m (SEE ALSO): Likewise.
a5bd9f6
+	* docs/man/grub-mkimage.h2m (SEE ALSO): Likewise.
a5bd9f6
+	* util/grub-install.in (usage): Likewise.
a5bd9f6
+
a5bd9f6
+	* util/bash-completion.d/grub-completion.bash.in (_grub_setup):
a5bd9f6
+	Apply to grub-bios-setup and grub-sparc64-setup rather than to
a5bd9f6
+	grub-setup.
a5bd9f6
+	* configure.ac: Remove grub_setup output variable.
a5bd9f6
+
a5bd9f6
+	* docs/man/grub-bios-setup.h2m (NAME): Change name from grub-setup
a5bd9f6
+	to grub-bios-setup.
a5bd9f6
+	* docs/man/grub-sparc64-setup.h2m (NAME): Change name from
a5bd9f6
+	grub-setup to grub-sparc64-setup.
a5bd9f6
+
a5bd9f6
 2013-01-11  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
 	Import gcrypt public-key cryptography and implement signature checking.
a5bd9f6
diff --git a/configure.ac b/configure.ac
a5bd9f6
index dde954e..92b550a 100644
a5bd9f6
--- a/configure.ac
a5bd9f6
+++ b/configure.ac
a5bd9f6
@@ -64,7 +64,6 @@ grub_TRANSFORM([grub-probe])
a5bd9f6
 grub_TRANSFORM([grub-reboot])
a5bd9f6
 grub_TRANSFORM([grub-script-check])
a5bd9f6
 grub_TRANSFORM([grub-set-default])
a5bd9f6
-grub_TRANSFORM([grub-setup])
a5bd9f6
 grub_TRANSFORM([grub-sparc64-setup])
a5bd9f6
 
a5bd9f6
 # Optimization flag.  Allow user to override.
a5bd9f6
diff --git a/docs/grub.texi b/docs/grub.texi
a5bd9f6
index a92bd96..e75bae9 100644
a5bd9f6
--- a/docs/grub.texi
a5bd9f6
+++ b/docs/grub.texi
a5bd9f6
@@ -622,11 +622,11 @@ This install doesn't conflict with standard install as long as they are in
a5bd9f6
 separate directories.
a5bd9f6
 
a5bd9f6
 Note that @command{grub-install} is actually just a shell script and the
a5bd9f6
-real task is done by @command{grub-mkimage} and @command{grub-setup}.
a5bd9f6
-Therefore, you may run those commands directly to install GRUB, without
a5bd9f6
-using @command{grub-install}. Don't do that, however, unless you are very
a5bd9f6
-familiar with the internals of GRUB. Installing a boot loader on a running
a5bd9f6
-OS may be extremely dangerous.
a5bd9f6
+real task is done by other tools such as @command{grub-mkimage}. Therefore,
a5bd9f6
+you may run those commands directly to install GRUB, without using
a5bd9f6
+@command{grub-install}. Don't do that, however, unless you are very familiar
a5bd9f6
+with the internals of GRUB. Installing a boot loader on a running OS may be
a5bd9f6
+extremely dangerous.
a5bd9f6
 
a5bd9f6
 @node Making a GRUB bootable CD-ROM
a5bd9f6
 @section Making a GRUB bootable CD-ROM
a5bd9f6
@@ -688,8 +688,8 @@ storage devices.
a5bd9f6
 @section The map between BIOS drives and OS devices
a5bd9f6
 
a5bd9f6
 If the device map file exists, the GRUB utilities (@command{grub-probe},
a5bd9f6
-@command{grub-setup}, etc.) read it to map BIOS drives to OS devices.  This
a5bd9f6
-file consists of lines like this:
a5bd9f6
+etc.) read it to map BIOS drives to OS devices.  This file consists of lines
a5bd9f6
+like this:
a5bd9f6
 
a5bd9f6
 @example
a5bd9f6
 (@var{device}) @var{file}
a5bd9f6
@@ -2283,8 +2283,8 @@ bytes.
a5bd9f6
 The sole function of @file{boot.img} is to read the first sector of the core
a5bd9f6
 image from a local disk and jump to it.  Because of the size restriction,
a5bd9f6
 @file{boot.img} cannot understand any file system structure, so
a5bd9f6
-@command{grub-setup} hardcodes the location of the first sector of the core
a5bd9f6
-image into @file{boot.img} when installing GRUB.
a5bd9f6
+@command{grub-install} hardcodes the location of the first sector of the
a5bd9f6
+core image into @file{boot.img} when installing GRUB.
a5bd9f6
 
a5bd9f6
 @item diskboot.img
a5bd9f6
 This image is used as the first sector of the core image when booting from a
a5bd9f6
@@ -4689,9 +4689,9 @@ GRUB.
a5bd9f6
 @node Invoking grub-install
a5bd9f6
 @chapter Invoking grub-install
a5bd9f6
 
a5bd9f6
-The program @command{grub-install} installs GRUB on your drive using
a5bd9f6
-@command{grub-mkimage} and (on some platforms) @command{grub-setup}.  You
a5bd9f6
-must specify the device name on which you want to install GRUB, like this:
a5bd9f6
+The program @command{grub-install} generates a GRUB core image using
a5bd9f6
+@command{grub-mkimage} and installs it on your system.  You must specify the
a5bd9f6
+device name on which you want to install GRUB, like this:
a5bd9f6
 
a5bd9f6
 @example
a5bd9f6
 grub-install @var{install_device}
a5bd9f6
diff --git a/docs/man/grub-bios-setup.h2m b/docs/man/grub-bios-setup.h2m
a5bd9f6
index eebe3ef..ac6ede3 100644
a5bd9f6
--- a/docs/man/grub-bios-setup.h2m
a5bd9f6
+++ b/docs/man/grub-bios-setup.h2m
a5bd9f6
@@ -1,5 +1,5 @@
a5bd9f6
 [NAME]
a5bd9f6
-grub-setup \- set up a device to boot using GRUB
a5bd9f6
+grub-bios-setup \- set up a device to boot using GRUB
a5bd9f6
 [SEE ALSO]
a5bd9f6
 .BR grub-install (8),
a5bd9f6
 .BR grub-mkimage (1),
a5bd9f6
diff --git a/docs/man/grub-install.h2m b/docs/man/grub-install.h2m
a5bd9f6
index 2de371a..8cbbc87 100644
a5bd9f6
--- a/docs/man/grub-install.h2m
a5bd9f6
+++ b/docs/man/grub-install.h2m
a5bd9f6
@@ -3,5 +3,4 @@ grub-install \- install GRUB to a device
a5bd9f6
 [SEE ALSO]
a5bd9f6
 .BR grub-mkconfig (8),
a5bd9f6
 .BR grub-mkimage (1),
a5bd9f6
-.BR grub-setup (8),
a5bd9f6
 .BR grub-mkrescue (1)
a5bd9f6
diff --git a/docs/man/grub-mkimage.h2m b/docs/man/grub-mkimage.h2m
a5bd9f6
index ca08b0c..f0fbc2b 100644
a5bd9f6
--- a/docs/man/grub-mkimage.h2m
a5bd9f6
+++ b/docs/man/grub-mkimage.h2m
a5bd9f6
@@ -2,6 +2,5 @@
a5bd9f6
 grub-mkimage \- make a bootable image of GRUB
a5bd9f6
 [SEE ALSO]
a5bd9f6
 .BR grub-install (8),
a5bd9f6
-.BR grub-setup (8),
a5bd9f6
 .BR grub-mkrescue (1),
a5bd9f6
 .BR grub-mknetdir (8)
a5bd9f6
diff --git a/docs/man/grub-sparc64-setup.h2m b/docs/man/grub-sparc64-setup.h2m
a5bd9f6
index eebe3ef..18f803a 100644
a5bd9f6
--- a/docs/man/grub-sparc64-setup.h2m
a5bd9f6
+++ b/docs/man/grub-sparc64-setup.h2m
a5bd9f6
@@ -1,5 +1,5 @@
a5bd9f6
 [NAME]
a5bd9f6
-grub-setup \- set up a device to boot using GRUB
a5bd9f6
+grub-sparc64-setup \- set up a device to boot using GRUB
a5bd9f6
 [SEE ALSO]
a5bd9f6
 .BR grub-install (8),
a5bd9f6
 .BR grub-mkimage (1),
a5bd9f6
diff --git a/util/bash-completion.d/grub-completion.bash.in b/util/bash-completion.d/grub-completion.bash.in
a5bd9f6
index 5f4b249..44bf135 100644
a5bd9f6
--- a/util/bash-completion.d/grub-completion.bash.in
a5bd9f6
+++ b/util/bash-completion.d/grub-completion.bash.in
a5bd9f6
@@ -252,10 +252,16 @@ _grub_setup () {
a5bd9f6
         _filedir
a5bd9f6
     fi
a5bd9f6
 }
a5bd9f6
-__grub_setup_program="@grub_setup@"
a5bd9f6
-have ${__grub_setup_program} && \
a5bd9f6
- complete -F _grub_setup -o filenames ${__grub_setup_program}
a5bd9f6
-unset __grub_setup_program
a5bd9f6
+
a5bd9f6
+__grub_bios_setup_program="@grub_bios_setup@"
a5bd9f6
+have ${__grub_bios_setup_program} && \
a5bd9f6
+ complete -F _grub_setup -o filenames ${__grub_bios_setup_program}
a5bd9f6
+unset __grub_bios_setup_program
a5bd9f6
+
a5bd9f6
+__grub_sparc64_setup_program="@grub_sparc64_setup@"
a5bd9f6
+have ${__grub_sparc64_setup_program} && \
a5bd9f6
+ complete -F _grub_setup -o filenames ${__grub_sparc64_setup_program}
a5bd9f6
+unset __grub_sparc64_setup_program
a5bd9f6
 
a5bd9f6
 
a5bd9f6
 #
a5bd9f6
diff --git a/util/grub-install.in b/util/grub-install.in
a5bd9f6
index 218bbd9..aac27c7 100644
a5bd9f6
--- a/util/grub-install.in
a5bd9f6
+++ b/util/grub-install.in
a5bd9f6
@@ -114,8 +114,8 @@ echo
a5bd9f6
 gettext "INSTALL_DEVICE must be system device filename.";echo
a5bd9f6
 echo
a5bd9f6
 
a5bd9f6
-gettext_printf "%s copies GRUB images into %s, and uses grub-setup
a5bd9f6
-to install grub into the boot sector.\n" "$self" "$grubdir";echo
a5bd9f6
+gettext_printf "%s copies GRUB images into %s.  On some platforms, it
a5bd9f6
+may also install GRUB into the boot sector.\n" "$self" "$grubdir";echo
a5bd9f6
 echo
a5bd9f6
 gettext "Report bugs to <bug-grub@gnu.org>."; echo
a5bd9f6
 }
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6