Re: Patch rules

From: Riley Williams (terhi.victor@logonet.com)
Date: Fri Dec 15 2000 - 14:36:13 EET

  • Next message: Hans-Peter Zorn: "new ax25-config and LinKT beta releases"

    On Fri, 15 Dec 2000, Gérard Parat wrote:

    > I would like to know how to create "good" patches, i.e.:

    > - Using correct diff options
    > - Using correct directory rules
    > - Using correct file naming

    > I'm sure you know a pointer or document with specification for
    > that topic. Sorry for the newbie question.

    Here's the rules that I use to produce workable diff's. Most people
    seem to use similar rules. I've used "myprog-1.2.3" as the raw tree
    one's trying to patch in the examples given:

     1. Have TWO directory trees, both rooted under the same directory.
        I root them both under /usr/src on my systems.

         a. Tree 1 consists of the raw tree that you are producing a
            diff against, exactly as it came out of the source tarball.
            This should be named "rawname.old" or "rawname.orig" or
            similar. Example: myprog-1.2.3.old

         b. Tree 2 consists of your patched version of tree 1. This
            should be named "rawname". Example: myprog-1.2.3

     2. Ensure that ALL compilation by-products have been removed from
        BOTH trees. With the Linux kernel, for example, you would do a
        `make mrproper` in both directories.

     3. Make the directory that BOTH of the above trees are rooted under
        your current directory. In my case, `cd /usr/src` does this.

    Given those circumstances, I use the following command:

            diff -urN myprog-1.2.3{.old,} | tee myprog-1.2.3.diff

    The resulting diff file is normally what is needed.

    Best wishes from Riley.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-hams" in
    the body of a message to jhzgo.gqlb@uidaho.edu



    This archive was generated by hypermail 2b30 : Fri Dec 15 2000 - 17:18:34 EET