From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] Unbreak help2man invocations
Date: Fri, 10 Feb 2012 13:11:17 +0100 [thread overview]
Message-ID: <4F350965.7010801@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
Following Vladimir's suggestion on IRC, the attached patch fixes
bug http://savannah.gnu.org/bugs/?35452.
Grégoire
p.s. The patch uses @PACKAGE_TARNAME@ instead of @PACKAGE@ in the
name of the directory that grub-mkconfig_lib is sourced from, to
preserve the definition of pkgdatadir that was in grub-mkconfig.in.
But I guess that those two are always equal for GRUB.
[-- Attachment #2: ChangeLog.source-grub-mkconfig_lib --]
[-- Type: text/plain, Size: 646 bytes --]
2012-02-10 Grégoire Sutre <gregoire.sutre@gmail.com>
Source grub-mkconfig_lib from the build directory at build time.
Suggested by: Vladimir Serbinenko.
* gentpl.py (manpage): Set pkgdatadir to $(builddir) on help2man call.
* util/grub-install.in: Define pkgdatadir if not already set, and source
grub-mkconfig_lib from there.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
[-- Attachment #3: patch-source-grub-mkconfig_lib.diff --]
[-- Type: text/x-patch, Size: 7053 bytes --]
=== modified file 'gentpl.py'
--- gentpl.py 2011-12-24 14:09:26 +0000
+++ gentpl.py 2012-02-10 11:34:46 +0000
@@ -465,7 +465,7 @@ def manpage():
r += gvar_add("man_MANS", "[+ name +].[+ mansection +]\n")
r += rule("[+ name +].[+ mansection +]", "[+ name +]", """
chmod a+x [+ name +]
-PATH=$(builddir):$$PATH $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
+PATH=$(builddir):$$PATH pkgdatadir=$(builddir) $(HELP2MAN) --section=[+ mansection +] -i $(top_srcdir)/docs/man/[+ name +].h2m -o $@ [+ name +]
""")
r += gvar_add("CLEANFILES", "[+ name +].[+ mansection +]")
r += "endif\n"
=== modified file 'util/grub-install.in'
--- util/grub-install.in 2012-02-08 18:26:01 +0000
+++ util/grub-install.in 2012-02-10 11:40:34 +0000
@@ -34,6 +34,9 @@ platform=@platform@
host_os=@host_os@
pkglibdir="${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
localedir="@datadir@/locale"
self="`basename $0`"
@@ -77,7 +80,7 @@ else
disk_module=native
fi
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-kbdcomp.in'
--- util/grub-kbdcomp.in 2012-02-05 10:23:47 +0000
+++ util/grub-kbdcomp.in 2012-02-10 11:40:14 +0000
@@ -7,12 +7,15 @@ exec_prefix="@exec_prefix@"
bindir="@bindir@"
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
grub_mklayout="${bindir}/`echo grub-mklayout | sed ${transform}`"
ckbcomp_options=""
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
self=`basename $0`
=== modified file 'util/grub-mkconfig.in'
--- util/grub-mkconfig.in 2012-02-08 18:26:01 +0000
+++ util/grub-mkconfig.in 2012-02-10 11:39:54 +0000
@@ -31,7 +31,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
host_os=@host_os@
datadir="@datadir@"
-pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
grub_cfg=""
grub_mkconfig_dir="${sysconfdir}"/grub.d
@@ -42,7 +44,7 @@ grub_script_check="${bindir}/`echo grub-
GRUB_PREFIX=`echo '/@bootdirname@/@grubdirname@' | sed "s,//*,/,g"`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
@@ -95,8 +97,6 @@ do
esac
done
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
-
if [ "x$EUID" = "x" ] ; then
EUID=`id -u`
fi
=== modified file 'util/grub-mknetdir.in'
--- util/grub-mknetdir.in 2012-02-08 19:27:46 +0000
+++ util/grub-mknetdir.in 2012-02-10 11:39:45 +0000
@@ -30,6 +30,9 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
host_os=@host_os@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -52,7 +55,7 @@ efi32_dir="${libdir}/$(echo ${PACKAGE_TA
efi64_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/x86_64-efi"
itanium_dir="${libdir}/$(echo ${PACKAGE_TARNAME} | sed ${transform})/ia64-efi"
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-mkrescue.in'
--- util/grub-mkrescue.in 2012-02-08 18:26:01 +0000
+++ util/grub-mkrescue.in 2012-02-10 11:40:03 +0000
@@ -30,6 +30,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
self=`basename $0`
@@ -46,7 +49,7 @@ grub_mkimage="${bindir}/`echo grub-mkima
xorriso=xorriso
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-mkstandalone.in'
--- util/grub-mkstandalone.in 2012-02-09 13:45:56 +0000
+++ util/grub-mkstandalone.in 2012-02-10 11:39:29 +0000
@@ -31,6 +31,9 @@ PACKAGE_TARNAME=@PACKAGE_TARNAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
pkglib_DATA="moddep.lst command.lst fs.lst partmap.lst parttool.lst handler.lst video.lst crypto.lst terminal.lst"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -40,7 +43,7 @@ format=
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
source=
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-reboot.in'
--- util/grub-reboot.in 2012-02-03 20:30:05 +0000
+++ util/grub-reboot.in 2012-02-10 11:40:22 +0000
@@ -26,6 +26,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -34,7 +37,7 @@ rootdir=
bootdir=
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/grub-set-default.in'
--- util/grub-set-default.in 2012-02-03 20:30:05 +0000
+++ util/grub-set-default.in 2012-02-10 11:40:27 +0000
@@ -26,6 +26,9 @@ PACKAGE_NAME=@PACKAGE_NAME@
PACKAGE_VERSION=@PACKAGE_VERSION@
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
@@ -34,7 +37,7 @@ rootdir=
bootdir=
grubdir=`echo "/@bootdirname@/@grubdirname@" | sed 's,//*,/,g'`
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
=== modified file 'util/powerpc/ieee1275/grub-mkrescue.in'
--- util/powerpc/ieee1275/grub-mkrescue.in 2012-02-08 18:26:01 +0000
+++ util/powerpc/ieee1275/grub-mkrescue.in 2012-02-10 11:39:39 +0000
@@ -32,12 +32,15 @@ platform=@platform@
pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
datarootdir="@datarootdir@"
datadir="@datadir@"
+if [ "x$pkgdatadir" = x ]; then
+ pkgdatadir="${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`"
+fi
self=`basename $0`
grub_mkimage="${bindir}/`echo grub-mkimage | sed ${transform}`"
-. "${datadir}/@PACKAGE@/grub-mkconfig_lib"
+. "${pkgdatadir}/grub-mkconfig_lib"
# Usage: usage
# Print the usage.
next reply other threads:[~2012-02-10 12:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 12:11 Grégoire Sutre [this message]
2012-02-10 15:51 ` [PATCH] Unbreak help2man invocations Vladimir 'φ-coder/phcoder' Serbinenko
2012-02-10 17:38 ` Grégoire Sutre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F350965.7010801@gmail.com \
--to=gregoire.sutre@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.