How do you apply a patch?

Asked by Cliff Kerr

Uh, dumb question, but how do you apply a patch? This bug:

https://bugs.launchpad.net/ubuntu/+source/gnome-panel/+bug/1063890

has been annoying me for some time, and I see there's a patch for it, but as an end-user (i.e. non-developer) I'm not sure how I can use it. I guess I have to download the source code for the full package (gnome-panel); apply the patch; then make and install? Fun...

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
William Grant
Solved:
Last query:
Last reply:
Revision history for this message
Laura Czajkowski (czajkowski) said :
#2

http://manpages.ubuntu.com/manpages/lucid/man1/patch.1.html would give you more information this area is for launchpad support.

Revision history for this message
Cliff Kerr (q-questionably) said :
#3

Yes, I read the man page. But that doesn't explain how to use it in practice. For example I downloaded the patch and used what I thought was correct syntax and, well, nothing happened.

Revision history for this message
Laura Czajkowski (czajkowski) said :
#4

You can ask for help in #ubuntu on irc this area is for launchpad support.

Revision history for this message
Cliff Kerr (q-questionably) said :
#5

I would think that a (brief) explanation of how to use the files that Launchpad supplies counts as "Launchpad support"! It puzzles me why you spent 203 characters on unhelpful replies when a simple "Yes" (3 character!) in reply to my actual question would've been far more helpful. I did not, you will note, ask how to use the patch utility; I was simply asking whether Launchpad patches are useless unless you're willing to download the package source code yourself, apply the patch, and then compile it. A simple answer is all I was after.

Revision history for this message
Best William Grant (wgrant) said :
#6

On 22/04/13 20:16, Cliff Kerr wrote:
> I would think that a (brief) explanation of how to use the files that
> Launchpad supplies counts as "Launchpad support"! It puzzles me why you
> spent 203 characters on unhelpful replies when a simple "Yes" (3
> character!) in reply to my actual question would've been far more
> helpful. I did not, you will note, ask how to use the patch utility; I
> was simply asking whether Launchpad patches are useless unless you're
> willing to download the package source code yourself, apply the patch,
> and then compile it. A simple answer is all I was after.

Launchpad doesn't supply patch files, and there's no such thing as a
"Launchpad patch"; users may attach to a bug any file that they wish,
and in the case of bug #1063890 a user has attached a patch file for an
Ubuntu package. So this is really an Ubuntu development question. To use
the patch you'll need download the source (apt-get source gnome-panel),
apply the patch, then build a new binary package (dpkg-buildpackage -b).

Revision history for this message
Cliff Kerr (q-questionably) said :
#7

Thanks William Grant, that solved my question.