All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
@ 2007-02-12  6:20 Jerone Young
  2007-02-13  1:01 ` Hollis Blanchard
  2007-02-14 20:12 ` Yoshinori K. Okuji
  0 siblings, 2 replies; 9+ messages in thread
From: Jerone Young @ 2007-02-12  6:20 UTC (permalink / raw)
  To: grub-devel; +Cc: lkundrak, okuji

[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

I accidentally sent the wrong changes in the last email. So please pay
them no attention. The patches in this email are the right ones.

Signed-off-by: Jerone Young <jerone@gmail.com>

Here is a recap of what was in my previous email:
This patch is derived from the patch sent earlier by Lubomir Kundrak.
What this patch adds is for library directories and directories in
/boot to be changed as well. So the user can easily launch

./configure --program-transform-name="s/grub/grub2/"

And the installed files (in this case for i386-pc) will be:

/usr/lib/grub2/i386-pc/*
/usr/local/sbin/grub2-emu
/usr/local/sbin/grub2-install
...etc

Also grub2-install place boot files in "/boot/grub2"

This allows easy integration into distributions as it allows grub2 to
sit side by side with a grub legacy install without issue. Giving
distributions a migration path.

Attached I have changes for i386-pc & powerpc . More then happy to do
the foot work for others to get this integrated.

All patches are attached.

[-- Attachment #2: grub2-program-name-tranform-autoconfig.patch --]
[-- Type: text/x-patch, Size: 2635 bytes --]

diff -r cca565f3c398 Makefile.in
--- a/Makefile.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/Makefile.in	Sun Feb 11 11:44:32 2007 -0600
@@ -16,6 +16,8 @@ SHELL = /bin/sh
 SHELL = /bin/sh
 
 @SET_MAKE@
+
+transform = @program_transform_name@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -34,8 +36,8 @@ infodir = @infodir@
 infodir = @infodir@
 mandir = @mandir@
 includedir = @includedir@
-pkgdatadir = $(datadir)/@PACKAGE_TARNAME@
-pkglibdir = $(libdir)/@PACKAGE_TARNAME@/$(target_cpu)-$(platform)
+pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
+pkglibdir =  $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'`
 
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -134,18 +136,18 @@ install-local: all
 	$(mkinstalldirs) $(DESTDIR)$(bindir)
 	@list='$(bin_UTILITIES)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(sbindir)
 	@list='$(sbin_UTILITIES)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
 	done
 	@list='$(sbin_SCRIPTS)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
 	done
 
@@ -159,11 +161,11 @@ uninstall:
 	  rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
 	done
 	@list='$(bin_UTILITIES)'; for file in $$list; do \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(bindir)/$$dest; \
 	done
 	@list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(sbindir)/$$dest; \
 	done
 
diff -r cca565f3c398 configure.ac
--- a/configure.ac	Sun Feb 11 09:48:36 2007 -0600
+++ b/configure.ac	Sun Feb 11 09:49:54 2007 -0600
@@ -39,6 +39,9 @@ AC_CONFIG_HEADER([config.h])
 # Checks for host and target systems.
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
+
+# Program name transformations
+AC_ARG_PROGRAM
 
 case "$host_cpu" in
   powerpc64) host_m32=1 ;;

[-- Attachment #3: grub2-program-name-tranform-i386-pc.patch --]
[-- Type: text/x-patch, Size: 1702 bytes --]

diff -r cca565f3c398 util/i386/pc/grub-install.in
--- a/util/i386/pc/grub-install.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/util/i386/pc/grub-install.in	Sun Feb 11 13:55:26 2007 -0600
@@ -18,6 +18,8 @@
 # Foundation, Inc., 51 Franklin St - Suite 330, Boston, MA 02110, USA.
 
 # Initialize some variables.
+transform="@program_transform_name@"
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@
@@ -28,14 +30,14 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
 PACKAGE_VERSION=@PACKAGE_VERSION@
 target_cpu=@target_cpu@
 platform=@platform@
-pkglibdir=${libdir}/${PACKAGE_TARNAME}/${target_cpu}-${platform}
-
-grub_setup=${sbindir}/grub-setup
-grub_mkimage=${bindir}/grub-mkimage
-grub_mkdevicemap=${sbindir}/grub-mkdevicemap
-grub_probe=${sbindir}/grub-probe
+pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
+
+grub_setup=${sbindir}/`echo grub-setup | sed ${transform}`
+grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
+grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
+grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
 rootdir=
-grub_prefix=/boot/grub
+grub_prefix=`echo /boot/grub | sed ${transform}`
 modules=
 
 install_device=
@@ -132,7 +134,7 @@ netbsd* | openbsd*)
 netbsd* | openbsd*)
     # Because /boot is used for the boot block in NetBSD and OpenBSD, use /grub
     # instead of /boot/grub.
-    grub_prefix=/grub
+    grub_prefix=`echo /grub | sed ${transform}`
     bootdir=${rootdir}
     ;;
 *)
@@ -141,7 +143,7 @@ netbsd* | openbsd*)
     ;;
 esac
 
-grubdir=${bootdir}/grub
+grubdir=${bootdir}/`echo grub | sed ${transform}`
 device_map=${grubdir}/device.map
 
 # Check if GRUB is installed.

[-- Attachment #4: grub2-program-name-tranform-powerpc.patch --]
[-- Type: text/x-patch, Size: 1151 bytes --]

diff -r cca565f3c398 util/powerpc/ieee1275/grub-install.in
--- a/util/powerpc/ieee1275/grub-install.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/util/powerpc/ieee1275/grub-install.in	Sun Feb 11 14:30:56 2007 -0600
@@ -21,6 +21,8 @@
 # http://ppc64-utils.ozlabs.org .
 
 # Initialize some variables.
+transform="@program_transform_name@"
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@
@@ -30,11 +32,11 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
 PACKAGE_VERSION=@PACKAGE_VERSION@
 target_cpu=@target_cpu@
 platform=@platform@
-pkglibdir=${libdir}/${PACKAGE_TARNAME}/${target_cpu}-${platform}
+pkglibdir= ${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
 
-grub_mkimage=${bindir}/grub-mkimage
+grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
 rootdir=
-grub_prefix=/boot/grub
+grub_prefix=`echo /boot/grub | sed ${transform}`
 modules=
 
 install_device=
@@ -109,7 +111,7 @@ fi
 
 # Initialize these directories here, since ROOTDIR was initialized.
 bootdir=${rootdir}/boot
-grubdir=${bootdir}/grub
+grubdir=${bootdir}/`echo grub | sed ${transform}`
 
 set $grub_mkimage dummy
 if test -f "$1"; then

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-12  6:20 [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations Jerone Young
@ 2007-02-13  1:01 ` Hollis Blanchard
  2007-02-13 16:30   ` Lubomir Kundrak
  2007-02-14 20:12 ` Yoshinori K. Okuji
  1 sibling, 1 reply; 9+ messages in thread
From: Hollis Blanchard @ 2007-02-13  1:01 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: lkundrak, okuji

On Mon, 2007-02-12 at 00:20 -0600, Jerone Young wrote:
> 
> This patch is derived from the patch sent earlier by Lubomir Kundrak.
> What this patch adds is for library directories and directories in
> /boot to be changed as well. So the user can easily launch
> 
> ./configure --program-transform-name="s/grub/grub2/" 

This seems a little over-engineered to me. Why not just rename all the
grub2 stuff to be "grub2-*" to begin with?

-Hollis




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-13  1:01 ` Hollis Blanchard
@ 2007-02-13 16:30   ` Lubomir Kundrak
  2007-02-13 19:16     ` Hollis Blanchard
  0 siblings, 1 reply; 9+ messages in thread
From: Lubomir Kundrak @ 2007-02-13 16:30 UTC (permalink / raw)
  To: Hollis Blanchard; +Cc: The development of GRUB 2, okuji

Hi Hollis,

On Mon, 2007-02-12 at 19:01 -0600, Hollis Blanchard wrote:
> On Mon, 2007-02-12 at 00:20 -0600, Jerone Young wrote:
> > 
> > This patch is derived from the patch sent earlier by Lubomir Kundrak.
> > What this patch adds is for library directories and directories in
> > /boot to be changed as well. So the user can easily launch
> > 
> > ./configure --program-transform-name="s/grub/grub2/" 
> 
> This seems a little over-engineered to me. Why not just rename all the
> grub2 stuff to be "grub2-*" to begin with?

Do you think it is a good practice to rename the program names by
default? In my opinion is not the good place to tell what version of the
program the binary belongs to. This technique is commonly used to
separate versions of software when more than one version it is in use --
temporarily, till it gets wider acceptance. That's why I think it is
good that it is configurable. Additionally we merely use autoconf's
feature, not add or invent new stuff, so it hardly can be called
over-engineering.

> -Hollis

Regards,
-- 
Lubomir Kundrak (Red Hat Security Response Team)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-13 16:30   ` Lubomir Kundrak
@ 2007-02-13 19:16     ` Hollis Blanchard
  2007-02-14 10:38       ` Lubomir Kundrak
  0 siblings, 1 reply; 9+ messages in thread
From: Hollis Blanchard @ 2007-02-13 19:16 UTC (permalink / raw)
  To: Lubomir Kundrak; +Cc: The development of GRUB 2, okuji

On Tue, 2007-02-13 at 17:30 +0100, Lubomir Kundrak wrote:
> Hi Hollis,
> 
> On Mon, 2007-02-12 at 19:01 -0600, Hollis Blanchard wrote:
> > On Mon, 2007-02-12 at 00:20 -0600, Jerone Young wrote:
> > > 
> > > This patch is derived from the patch sent earlier by Lubomir Kundrak.
> > > What this patch adds is for library directories and directories in
> > > /boot to be changed as well. So the user can easily launch
> > > 
> > > ./configure --program-transform-name="s/grub/grub2/" 
> > 
> > This seems a little over-engineered to me. Why not just rename all the
> > grub2 stuff to be "grub2-*" to begin with?
> 
> Do you think it is a good practice to rename the program names by
> default? In my opinion is not the good place to tell what version of the
> program the binary belongs to. This technique is commonly used to
> separate versions of software when more than one version it is in use --
> temporarily, till it gets wider acceptance.

So users will have both grub-* and grub2-* installed? When grub2 is the
default, they and all their scripts will need to learn to run grub2-*
instead of grub-*. Then one day grub1 will be removed, grub2 will be
renamed to grub-*, and the user must learn this and all those tools will
need to be reverted to call grub-* again?

I don't think changing the name more than once is a good idea. And if
we're only going to change it once, let's just do it and avoid this
transform stuff.

> That's why I think it is
> good that it is configurable. Additionally we merely use autoconf's
> feature, not add or invent new stuff, so it hardly can be called
> over-engineering.

All those | sed "$(transform)" additions don't look like an autoconf
feature to me...

-Hollis




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-13 19:16     ` Hollis Blanchard
@ 2007-02-14 10:38       ` Lubomir Kundrak
  0 siblings, 0 replies; 9+ messages in thread
From: Lubomir Kundrak @ 2007-02-14 10:38 UTC (permalink / raw)
  To: Hollis Blanchard; +Cc: The development of GRUB 2, okuji

Hi,

On Tue, 2007-02-13 at 13:16 -0600, Hollis Blanchard wrote:
> On Tue, 2007-02-13 at 17:30 +0100, Lubomir Kundrak wrote:
> > Hi Hollis,
> > 
> > On Mon, 2007-02-12 at 19:01 -0600, Hollis Blanchard wrote:
> > > On Mon, 2007-02-12 at 00:20 -0600, Jerone Young wrote:
> > > > 
> > > > This patch is derived from the patch sent earlier by Lubomir Kundrak.
> > > > What this patch adds is for library directories and directories in
> > > > /boot to be changed as well. So the user can easily launch
> > > > 
> > > > ./configure --program-transform-name="s/grub/grub2/" 
> > > 
> > > This seems a little over-engineered to me. Why not just rename all the
> > > grub2 stuff to be "grub2-*" to begin with?
> > 
> > Do you think it is a good practice to rename the program names by
> > default? In my opinion is not the good place to tell what version of the
> > program the binary belongs to. This technique is commonly used to
> > separate versions of software when more than one version it is in use --
> > temporarily, till it gets wider acceptance.
> 
> So users will have both grub-* and grub2-* installed? When grub2 is the
> default, they and all their scripts will need to learn to run grub2-*
> instead of grub-*. Then one day grub1 will be removed, grub2 will be
> renamed to grub-*, and the user must learn this and all those tools will
> need to be reverted to call grub-* again?

I don't think that GRUB is a think that users tend to use in scripts.

This practice (name transformation) is currently used happily by Debian
to make two versions of Apache HTTPD coexist, by vendors who use
multiple versions of Berkeley DB, by UNIX and BSD systems who provide
GNU versions of their tools etc. In my opinion chance of causing
conflicts and confisuion is even considerably smaller for GNU GRUB.

> I don't think changing the name more than once is a good idea. And if
> we're only going to change it once, let's just do it and avoid this
> transform stuff.

Transformation means that it is not us who change the name. It is an
option for the end-users who wish to have both versions installed. At
least till it is in development, many users will want to avoid conflicts
between the two version, while from long-time perspective it makes
little sense to call everything grub2-*.

It might be argued that this will become of no use once GRUB 2 is
stable. In that case the benefits are ability to have even multiple
versions of GRUB 2 installed (might be useful for debugging) or when one
day GRUB 3 comes out, people could retain their GRUB 2s as grub2-*.

> > That's why I think it is
> > good that it is configurable. Additionally we merely use autoconf's
> > feature, not add or invent new stuff, so it hardly can be called
> > over-engineering.
> 
> All those | sed "$(transform)" additions don't look like an autoconf
> feature to me...

It is documented as example implementation of using AC_ARG_PROGRAM in
GNU Autoconf manual, chapter 12.5 "Transforming Program Names When
Installing".

> -Hollis

Regards,
-- 
Lubomir Kundrak (Red Hat Security Response Team)




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-12  6:20 [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations Jerone Young
  2007-02-13  1:01 ` Hollis Blanchard
@ 2007-02-14 20:12 ` Yoshinori K. Okuji
  2007-02-17 22:39   ` Jerone Young
  1 sibling, 1 reply; 9+ messages in thread
From: Yoshinori K. Okuji @ 2007-02-14 20:12 UTC (permalink / raw)
  To: The development of GRUB 2

On Monday 12 February 2007 07:20, Jerone Young wrote:
> I accidentally sent the wrong changes in the last email. So please pay
> them no attention. The patches in this email are the right ones.

Thank you for your contribution. I think your patches look good, but I would 
like you to write ChangeLog as well.

Okuji



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-14 20:12 ` Yoshinori K. Okuji
@ 2007-02-17 22:39   ` Jerone Young
  2007-03-05  2:35     ` Jerone Young
  0 siblings, 1 reply; 9+ messages in thread
From: Jerone Young @ 2007-02-17 22:39 UTC (permalink / raw)
  To: The development of GRUB 2, okuji

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

I've created a ChangeLog entry and have attaced all the patches along
with it in this email.

On 2/14/07, Yoshinori K. Okuji <okuji@enbug.org> wrote:
> On Monday 12 February 2007 07:20, Jerone Young wrote:
> > I accidentally sent the wrong changes in the last email. So please pay
> > them no attention. The patches in this email are the right ones.
>
> Thank you for your contribution. I think your patches look good, but I would
> like you to write ChangeLog as well.
>
> Okuji
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: ChangeLog.patch --]
[-- Type: text/x-patch, Size: 566 bytes --]

diff -r e6e15bb2da5c ChangeLog
--- a/ChangeLog	Sat Feb 17 16:31:30 2007 -0600
+++ b/ChangeLog	Sat Feb 17 16:36:47 2007 -0600
@@ -1,3 +1,9 @@ 2007-02-12  Hollis Blanchard  <hollis@pe
+2007-02-17  Jerone Young <jerone@gmail.com>
+	*configure.ac: Add argument for autoconf to use tranformation ability 	
+	*Makefile.in: Add autoconf package transformation code
+	*util/i386/pc/grub-install.in: Likewise
+	*util/powerpc/ieee1275/grub-install.in: Likewise
+
 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
 
 	* include/grub/ieee1275/ieee1275.h: Update copyright.

[-- Attachment #3: grub2-program-name-tranform-autoconfig.patch --]
[-- Type: text/x-patch, Size: 2635 bytes --]

diff -r cca565f3c398 Makefile.in
--- a/Makefile.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/Makefile.in	Sun Feb 11 11:44:32 2007 -0600
@@ -16,6 +16,8 @@ SHELL = /bin/sh
 SHELL = /bin/sh
 
 @SET_MAKE@
+
+transform = @program_transform_name@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
@@ -34,8 +36,8 @@ infodir = @infodir@
 infodir = @infodir@
 mandir = @mandir@
 includedir = @includedir@
-pkgdatadir = $(datadir)/@PACKAGE_TARNAME@
-pkglibdir = $(libdir)/@PACKAGE_TARNAME@/$(target_cpu)-$(platform)
+pkgdatadir = $(datadir)/`echo @PACKAGE_TARNAME@ | sed '$(transform)'`
+pkglibdir =  $(libdir)/`echo @PACKAGE_TARNAME@/$(target_cpu)-$(platform) | sed '$(transform)'`
 
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
@@ -134,18 +136,18 @@ install-local: all
 	$(mkinstalldirs) $(DESTDIR)$(bindir)
 	@list='$(bin_UTILITIES)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(bindir)/$$dest; \
 	done
 	$(mkinstalldirs) $(DESTDIR)$(sbindir)
 	@list='$(sbin_UTILITIES)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_PROGRAM) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
 	done
 	@list='$(sbin_SCRIPTS)'; for file in $$list; do \
 	  if test -f "$$file"; then dir=; else dir="$(srcdir)"; fi; \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  $(INSTALL_SCRIPT) $$dir$$file $(DESTDIR)$(sbindir)/$$dest; \
 	done
 
@@ -159,11 +161,11 @@ uninstall:
 	  rm -f $(DESTDIR)$(pkglibdir)/$$dest; \
 	done
 	@list='$(bin_UTILITIES)'; for file in $$list; do \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(bindir)/$$dest; \
 	done
 	@list='$(sbin_UTILITIES) $(sbin_SCRIPTS)'; for file in $$list; do \
-	  dest="`echo $$file | sed 's,.*/,,'`"; \
+	  dest="`echo $$file | sed 's,.*/,,' | sed '$(transform)'`"; \
 	  rm -f $(DESTDIR)$(sbindir)/$$dest; \
 	done
 
diff -r cca565f3c398 configure.ac
--- a/configure.ac	Sun Feb 11 09:48:36 2007 -0600
+++ b/configure.ac	Sun Feb 11 09:49:54 2007 -0600
@@ -39,6 +39,9 @@ AC_CONFIG_HEADER([config.h])
 # Checks for host and target systems.
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
+
+# Program name transformations
+AC_ARG_PROGRAM
 
 case "$host_cpu" in
   powerpc64) host_m32=1 ;;

[-- Attachment #4: grub2-program-name-tranform-i386-pc.patch --]
[-- Type: text/x-patch, Size: 1702 bytes --]

diff -r cca565f3c398 util/i386/pc/grub-install.in
--- a/util/i386/pc/grub-install.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/util/i386/pc/grub-install.in	Sun Feb 11 13:55:26 2007 -0600
@@ -18,6 +18,8 @@
 # Foundation, Inc., 51 Franklin St - Suite 330, Boston, MA 02110, USA.
 
 # Initialize some variables.
+transform="@program_transform_name@"
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@
@@ -28,14 +30,14 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
 PACKAGE_VERSION=@PACKAGE_VERSION@
 target_cpu=@target_cpu@
 platform=@platform@
-pkglibdir=${libdir}/${PACKAGE_TARNAME}/${target_cpu}-${platform}
-
-grub_setup=${sbindir}/grub-setup
-grub_mkimage=${bindir}/grub-mkimage
-grub_mkdevicemap=${sbindir}/grub-mkdevicemap
-grub_probe=${sbindir}/grub-probe
+pkglibdir=${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
+
+grub_setup=${sbindir}/`echo grub-setup | sed ${transform}`
+grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
+grub_mkdevicemap=${sbindir}/`echo grub-mkdevicemap | sed ${transform}`
+grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`
 rootdir=
-grub_prefix=/boot/grub
+grub_prefix=`echo /boot/grub | sed ${transform}`
 modules=
 
 install_device=
@@ -132,7 +134,7 @@ netbsd* | openbsd*)
 netbsd* | openbsd*)
     # Because /boot is used for the boot block in NetBSD and OpenBSD, use /grub
     # instead of /boot/grub.
-    grub_prefix=/grub
+    grub_prefix=`echo /grub | sed ${transform}`
     bootdir=${rootdir}
     ;;
 *)
@@ -141,7 +143,7 @@ netbsd* | openbsd*)
     ;;
 esac
 
-grubdir=${bootdir}/grub
+grubdir=${bootdir}/`echo grub | sed ${transform}`
 device_map=${grubdir}/device.map
 
 # Check if GRUB is installed.

[-- Attachment #5: grub2-program-name-tranform-powerpc.patch --]
[-- Type: text/x-patch, Size: 1151 bytes --]

diff -r cca565f3c398 util/powerpc/ieee1275/grub-install.in
--- a/util/powerpc/ieee1275/grub-install.in	Sun Feb 11 09:48:36 2007 -0600
+++ b/util/powerpc/ieee1275/grub-install.in	Sun Feb 11 14:30:56 2007 -0600
@@ -21,6 +21,8 @@
 # http://ppc64-utils.ozlabs.org .
 
 # Initialize some variables.
+transform="@program_transform_name@"
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@
@@ -30,11 +32,11 @@ PACKAGE_VERSION=@PACKAGE_VERSION@
 PACKAGE_VERSION=@PACKAGE_VERSION@
 target_cpu=@target_cpu@
 platform=@platform@
-pkglibdir=${libdir}/${PACKAGE_TARNAME}/${target_cpu}-${platform}
+pkglibdir= ${libdir}/`echo ${PACKAGE_TARNAME}/${target_cpu}-${platform} | sed ${transform}`
 
-grub_mkimage=${bindir}/grub-mkimage
+grub_mkimage=${bindir}/`echo grub-mkimage | sed ${transform}`
 rootdir=
-grub_prefix=/boot/grub
+grub_prefix=`echo /boot/grub | sed ${transform}`
 modules=
 
 install_device=
@@ -109,7 +111,7 @@ fi
 
 # Initialize these directories here, since ROOTDIR was initialized.
 bootdir=${rootdir}/boot
-grubdir=${bootdir}/grub
+grubdir=${bootdir}/`echo grub | sed ${transform}`
 
 set $grub_mkimage dummy
 if test -f "$1"; then

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-02-17 22:39   ` Jerone Young
@ 2007-03-05  2:35     ` Jerone Young
  2007-03-05 17:06       ` Yoshinori K. Okuji
  0 siblings, 1 reply; 9+ messages in thread
From: Jerone Young @ 2007-03-05  2:35 UTC (permalink / raw)
  To: The development of GRUB 2, okuji

Are these patches ok? There does not seem to be much activity on the
list. Is anyone still actively maintaining grub2? Whould love to see
this and other patches I've sent to the list to be in cvs.

On 2/17/07, Jerone Young <jerone@gmail.com> wrote:
> I've created a ChangeLog entry and have attaced all the patches along
> with it in this email.
>
> On 2/14/07, Yoshinori K. Okuji <okuji@enbug.org> wrote:
> > On Monday 12 February 2007 07:20, Jerone Young wrote:
> > > I accidentally sent the wrong changes in the last email. So please pay
> > > them no attention. The patches in this email are the right ones.
> >
> > Thank you for your contribution. I think your patches look good, but I would
> > like you to write ChangeLog as well.
> >
> > Okuji
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations
  2007-03-05  2:35     ` Jerone Young
@ 2007-03-05 17:06       ` Yoshinori K. Okuji
  0 siblings, 0 replies; 9+ messages in thread
From: Yoshinori K. Okuji @ 2007-03-05 17:06 UTC (permalink / raw)
  To: The development of GRUB 2

On Monday 05 March 2007 03:35, Jerone Young wrote:
> Are these patches ok? There does not seem to be much activity on the
> list. Is anyone still actively maintaining grub2? Whould love to see
> this and other patches I've sent to the list to be in cvs.

I am sorry that I haven't replied for long. In order to avoid this kind of 
state, we have multiple maintainers (i.e. Marco and me), but both of us have 
been busy for other things these days by chance. I do not know how we could 
do better at the moment, unfortunately.

About your ChangeLog, there are very subtle problems:

- Please insert an empty line between the first line and descriptions.

- Please terminate each sentence with a period.

Besides these, it looks ok. The rest is copyright handling. I will write to 
you separately.

Thanks,
Okuji



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-03-05 17:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12  6:20 [PATCH] [UPDATE 2] More enhanced GNU GRUB program name transformations Jerone Young
2007-02-13  1:01 ` Hollis Blanchard
2007-02-13 16:30   ` Lubomir Kundrak
2007-02-13 19:16     ` Hollis Blanchard
2007-02-14 10:38       ` Lubomir Kundrak
2007-02-14 20:12 ` Yoshinori K. Okuji
2007-02-17 22:39   ` Jerone Young
2007-03-05  2:35     ` Jerone Young
2007-03-05 17:06       ` Yoshinori K. Okuji

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.