Darcy Parker wrote:
Good day All,

  I have gone to the website and created the patch file as per the
directions below.  How do I apply this patch? (Excuse me for being new to
Linux but you have to start somewhere).

By using the patch program, of course. :) Typically the command would look something like:


  cd /location/of/sh-httpd
  patch </location/of/patchfile

Of course, I don't think this has been compiled for LEAF, so you'll need to run it on a more conventional linux install. For a small patch like the one for sh-httpd, it's usually just as easy to hand apply the changes. The patchfile format is fairly easy to understand by simple observation, but a few comments:

- The original files used to create the patch are noted at the top of the patch file (by the --- and +++ lines).

- The @@ lines list the line # and number of lines in each file for the following "chunk"

- The lines starting with a space in the left-hand column are not part of the patch, but are just for providing context (so the patch can still be applied if there are a few lines more or less in your version of the file vs the file used to make the patch)

- The lines with a dash (-) in the left-hand column are deleted from the input file

- The lines with a plus (+) in the left-hand column are added to the input file

Now, on to some comments about the patch itself. There actually is a problem with the first two chunks. By surrounding the argument to set with quotes, it defeats the entire purpose of using set to seperate the argument into smaller chunks. The problem with expanding * can be taken care of by turning off globbing with set -f:

@@ -31,7 +31,7 @@

 bname() {
        local IFS='/'
        set -f
        set -- $1
        eval rc="\$$#"
        [ "$rc" = "" ] && eval rc="\$$(($# - 1))"
        echo "$rc"
@@ -262,7 +262,7 @@

        # Split URI into base and query string at ?
        IFS='?'
+       set -f
        set -- $URI
        QUERY_STRING="$2"
        URL="$1"
        IFS=$OIFS

I think above will work, but if there's a side-effect from setting -f in the second chunk, it can be undone with "set +f" following the "set -- $URI" line.

I think the third chunk I posted previously will work as-is.

--
Charles Steinkuehler
[EMAIL PROTECTED]




------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to