Search code examples
ubuntucompilationpackagedebiandpkg

Rebuild an ubuntu/debian package without some of the patches


I'd like to rebuild a source package that's in the ubuntu repo, changing nothing, except that I would like to build it without a subset of the patches it comes with. I have no experience doing such things.

Let's say the package is called foo (it's actually called network-manager-gnome in my case) and the patches I don't want are called patch1 and patch2. At which step do I tell it to ignore these patches? When extracting with {dpkg-source -x foo_version-revision.dsc}? Or when building with {dpkg-buildpackage -rfakeroot -b}? Or sometime in between extracting and calling dpkg-buildpackage?

It seems like the build side of dpkg-source has options for ignoring patches matching a given regular expressions. Is this what I should be using, passing them in with --source-option through dpkg-buildpackage?

Thanks!


Solution

  • Apply your changes (such as reversing some patches) before building. dpkg-buildpackage simply builds the files in the directory you specify.