[PATCH] point.sh creates loops on case-insensitive filesystems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] point.sh creates loops on case-insensitive filesystems

Charles Bailey-2
The helper script utils/point.sh creates self-referential links on a
case-insensitive filesystem (such as HFS+) when given two file names which
differ only in alphabetic case.  The attached patch resolves the issue by
causing it to skip any pair of names which already point to the same file.

--
Regards,
Charles Bailey  < bailey _at_ newman _dot_ upenn _dot_ edu >
Newman Center at the University of Pennsylvania

--- openssl-0.9.7g/util/point.sh.orig   Wed Jun 11 15:44:40 2003
+++ openssl-0.9.7g/util/point.sh        Tue May 31 15:09:21 2005
@@ -1,10 +1,13 @@
 #!/bin/sh

-rm -f "$2"
-if test "$OSTYPE" = msdosdjgpp; then
-    cp "$1" "$2"
+if test "$1" -ef "$2"; then true;
 else
-    ln -s "$1" "$2"
+    rm -f "$2"
+    if test "$OSTYPE" = msdosdjgpp; then
+       cp "$1" "$2"
+    else
+        ln -s "$1" "$2"
+    fi
 fi
 echo "$2 => $1"

## End of patch ##
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] point.sh creates loops on case-insensitive filesystems

Doug Kaufman
On Tue, 31 May 2005, Charles Bailey wrote:

> The helper script utils/point.sh creates self-referential links on a
> case-insensitive filesystem (such as HFS+) when given two file names which
> differ only in alphabetic case.  The attached patch resolves the issue by
> causing it to skip any pair of names which already point to the same file.

The point.sh utility is currently only used in installing man
pages. The makefile gets around the problem of different names
pointing to the same file on case-insensitive systems by specifying
"filecase=-i" as an argument to grep. You might want to consider
adding your filesystem to those that use this mechanism. Just search
for "filecase" in Makefile to see where this is done.
                              Doug
--
Doug Kaufman
Internet: [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]