[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I apply a patch Debian style?

On Mon, Oct 03, 2005 at 09:28:59AM +0200, Joost Kraaijeveld wrote:
> I want to compile stock gnome-system-monitor-2.8.1-2 with a patch
> gnome-system-monitor-2.8.1-4.diff.gz applied.
> How do I do that? What do I need, more than a compiling
> gnome-system-monitor-2.8.1-2 and the
> gnome-system-monitor-2.8.1-4.diff.gz?
> Is there a Debian way of doing things, so that I end up with a
> gnome-system-monitor-2.8.1-4_amd64.deb package that I can install?

Well something like this might work:

apt-get source gnome-system-monitor

That will get the sources to the current one.

If you then in a temp dir extract the current debian .orig.tar.gz and
the new tar file, you can do a diff -ruN between the dirs and save that
to a file.  Then go to the directory apt-get source created and apply
the changes:

/path/gnome-system-monitor-version# patch -p1 --dry-run < ../path/to/saved/diff

If it says everything ok, then do it without dryrun to really do it.  If
it looks very broken (unlikely for a small version change) then you have
to figure out why.  A few line offsets are usually nothing to worry

You can then add a new changelog entry (using dch -v 2.8.1-4) and
mention that you updated to a new upstream, and finally you can
dpkg-buildpackage -b -us -uc to create the .deb

Should be close to what you need to do at least.

Len Sorensen

Reply to: