On Thu, 18 Oct 2007 12:45:26 -0400, Bryan Kadzban <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 18, 2007 at 09:09:21AM -0600, Matthew Burgess wrote:
>> Agreed.  Note, though, that grub-0.9x is no longer being maintained,
>> so upstream won't accept whatever patch we come up with.
> 
> Right; if we patch it (as opposed to simply moving to grub2, although I
> think that will be a while), we'll have to keep the patch local.

Agreed.  I've attached the trivial but untested patch here.  In an ideal world, 
I think we'd want to create some autoconf foo that detects where `mktemp' or 
`tempfile' live, rather than hardcoding paths.  Given the abandoned nature of 
the 0.9x branch of Grub though, I'm not sure it matters much.

I've also attached the trivial patch for findutils that I've just submitted 
upstream.

Matt.
Submitted By: Matt Burgess <matthew at linuxfromscratch dot org>
Date: 2007-10-18
Initial Package Version: 0.97
Upstream status: Not submitted - no longer maintained
Description: Prefer `mktemp' when trying to create temporary files.  Fall back
             to `tempfile' if `mktemp' doesn't exist.

diff -Naur grub-0.97.orig/util/grub-install.in grub-0.97/util/grub-install.in
--- grub-0.97.orig/util/grub-install.in	2004-07-24 18:57:31.000000000 +0000
+++ grub-0.97/util/grub-install.in	2007-10-18 21:50:26.000000000 +0000
@@ -43,12 +43,12 @@
 debug=no
 
 # look for secure tempfile creation wrappers on this platform
-if test -x /bin/tempfile; then
-    mklog="/bin/tempfile --prefix=grub"
-    mkimg="/bin/tempfile --prefix=grub"
-elif test -x /bin/mktemp; then
-    mklog="/bin/mktemp /tmp/grub-install.log.XXXXXX"
-    mkimg="/bin/mktemp /tmp/grub-install.img.XXXXXX"
+if test -x /usr/bin/mktemp; then
+    mklog="/usr/bin/mktemp --prefix=grub"
+    mkimg="/usr/bin/mktemp --prefix=grub"
+elif test -x /usr/bin/tempfile; then
+    mklog="/usr/bin/tempfile /tmp/grub-install.log.XXXXXX"
+    mkimg="/usr/bin/tempfile /tmp/grub-install.img.XXXXXX"
 else
     mklog=""
     mkimg=""
Submitted By: Matt Burgess <matthew at linuxfromscratch dot org>
Date: 2007-10-18
Initial Package Version: 4.2.31
Upstream status: Submitted
Description: Changes the output of error messages in updatedb.sh which
             reference tempfile when the binary that was called was mktemp

diff -Naur findutils-4.2.31.orig/locate/updatedb.sh findutils-4.2.31/locate/updatedb.sh
--- findutils-4.2.31.orig/locate/updatedb.sh	2007-04-22 18:41:11.000000000 +0000
+++ findutils-4.2.31/locate/updatedb.sh	2007-10-18 21:40:56.000000000 +0000
@@ -245,12 +245,12 @@
 else # old
 
 if ! bigrams=`mktemp -t updatedbXXXXXXXXX`; then
-    echo tempfile failed
+    echo mktemp failed
     exit 1
 fi
 
 if ! filelist=`mktemp -t updatedbXXXXXXXXX`; then
-    echo tempfile failed
+    echo mktemp failed
     exit 1
 fi
 
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to