Results 1 to 6 of 6

Thread: patching source files

  1. #1
    Join Date
    Mar 2007
    Location
    BC, Canada
    Beans
    358
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    patching source files

    Hi, can someone explain to me how to patch source files.

    I'm trying to modify the gnome-panel (reduce the size of the black arrow under the main menu) and know how to do that for the most part. I'm stuck however trying to apply the patches to the source.

    I've downloaded from http://packages.ubuntu.com/edgy/gnome/gnome-panel the .dsc, .orig.tar.gz and the diff.gz files.

    I would like to generate a new set of source files with all the patches applied. So far I've used dpkg-source -x gnome-panel_2.16.1-0ubuntu3.dsc and it appears to extract the original source files plus creates the debian subdirectory which includes a set of patches. Where do I go from there? Thanks.

  2. #2
    Join Date
    Feb 2007
    Beans
    2,729

    Re: patching source files

    Do you have the "patch" utility ?

    Code:
    apt-get install patch
    if not. And then,
    Code:
    man patch
    Basically, you run
    Code:
    patch -p0 < patchfile
    but the "p0" depends on what the paths are inside the patch file.

    MrC

  3. #3
    Join Date
    Mar 2007
    Location
    BC, Canada
    Beans
    358
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: patching source files

    Thanks. I managed to get the files more or less patched, but still find the whole system confusing. The patches don't consistently refer to the same version of gnome-panel. I'm sure that I'll eventually figure it out, and there will be a certain logic to the system.

  4. #4
    Join Date
    Feb 2007
    Beans
    2,729

    Re: patching source files

    Not having seen the patches, nor the source, I can't tell you what is going on.

    It is typical for a package program (apt, rpm) to have a script that drives the order of source code patching. Out of context, a series of patches won't make much sense to you. You need to examine the script that drives the building of that debian package.

    MrC

  5. #5
    Join Date
    Mar 2007
    Location
    BC, Canada
    Beans
    358
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: patching source files

    ok. makes sense to me now. i just didn't know how the ./debian/rules file worked. all i needed to do was call ./debian/rules apply-patches from the base directory.

  6. #6
    Join Date
    Feb 2007
    Beans
    2,729

    Re: patching source files

    Nice work, thanks for the update.

    Cheers,
    MrC

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •