0

I am making a new package from a project that I've been working on for practice. I've been using git, and I've noticed similarities between it and the Debian packing system. What's confusing me is when I make a change to any of the files and do not manually update the .orig.tar.xz file, dpkg wants me to add a patch. Making patches is very annoying and the source code in the .orig is not updated so it's a nightmare to extract.

Now if I manually update .orig.tar.xz as well as make a new entry in changelog, it seems to be much more clean, it increments the build count as well (ie 3.2-2 -> 3.2-3).

When should I use patch vs when should I update .orig and changelog?

3

For the now standard Debian source format 3.0 (quilt), the correct procedure when you make changes to the original/upstream source, is to add corresponding patches in the debian/patches directory, not to .orig.tar.xz. This is commonly done using quilt, but you can alternatively use a "proper" version control system like Git, if you want.

The Debian build system will automatically recreate the .debian.tar.xz based on the contents of the debian directory (including the patches subdirectory). The .orig.tar.xz file should not be modified. It's the upstream source.

And as for updating the changelog, that's up to you. Updating the changelog will increment the Debian version number. It has no direct bearing on patching the source.

  • So, if I was using git, whats the proper way to package the releases? Make a new package every time (in turn updating the .orig.tar.xz and not touching the patches)? It seems like what you're say is patches are used up until you want to permanently applying them all by doing a repackage. Thanks! – Sanchke Dellowar Dec 18 '16 at 20:04
  • Hi @SanchkeDellowar. I don't know enough about the context to answer. Are you packaging your own software, or someone elses? If it's your own software, you don't need Debian patches at all (i.e. patches in debian/patches). If the software is upstream, that's a different situation, and you might need patches. If you don't have a clear question to ask, we could talk in the chat room. – Faheem Mitha Dec 18 '16 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.