diff for patch - Aix

This is a discussion on diff for patch - Aix ; Hi! To compile db-4.2.52 a consultant "patched" db.in by adding one line. Now I want to build an rpm. The best way to note this in the spec file is to produce a real patch and include it, right? But ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: diff for patch

  1. diff for patch

    Hi!

    To compile db-4.2.52 a consultant "patched" db.in by adding one line.
    Now I want to build an rpm. The best way to note this in the spec file
    is to produce a real patch and include it, right?

    But how do I get the right output from diff for patch?

    Output looks like that:

    # /opt/freeware/bin/diff --normal db.>
    25a26
    > #include




    Other patches look like that:

    # head patch.4.2.52.1.txt
    *** mp/mp_fget.c.orig 25 Sep 2003 02:15:16 -0000 11.81
    --- mp/mp_fget.c 9 Dec 2003 19:06:28 -0000 11.82
    ***************
    *** 440,446 ****
    c_mp->stat.st_pages--;
    [...]



    I installed diffutils from "AIX Toolbox for Linux Applications" too.
    /opt/freeware/bin/diff --help was not a great help.


  2. Re: diff for patch

    MP wrote:
    > To compile db-4.2.52 a consultant "patched" db.in by adding one line.
    > Now I want to build an rpm. The best way to note this in the spec file
    > is to produce a real patch and include it, right?


    Right.

    > But how do I get the right output from diff for patch?
    >
    > Output looks like that:
    >
    > # /opt/freeware/bin/diff --normal db.>
    > 25a26
    >> #include

    >
    >
    >
    > Other patches look like that:
    >
    > # head patch.4.2.52.1.txt
    > *** mp/mp_fget.c.orig 25 Sep 2003 02:15:16 -0000 11.81
    > --- mp/mp_fget.c 9 Dec 2003 19:06:28 -0000 11.82
    > ***************
    > *** 440,446 ****
    > c_mp->stat.st_pages--;
    > [...]
    >
    >
    >
    > I installed diffutils from "AIX Toolbox for Linux Applications" too.
    > /opt/freeware/bin/diff --help was not a great help.


    The problem with the first kind of diffs is
    a) they are harder to read
    b) there can be problems if the patched file changes (e.g., when you
    try to apply the patch to the next version of the source.

    The second kind of diff was probably produced with 'diff -c'
    (context diff).

    Yours,
    Laurenz Albe

  3. Re: diff for patch


    Laurenz Albe schrieb:

    > The second kind of diff was probably produced with 'diff -c'
    > (context diff).

    Thanks!


+ Reply to Thread