3

I'm trying to create a brand new Debian-ish package (mostly for private use but I'm thinking about publishing it on GitHub) based on a third-party program that doesn't currently have a Debian package.

I have all the basics sorted out (it builds packages and it works) but I've run into some snags while trying to make a git repository out of it.

I've used git-buildpackage to create a repository from my .dsc and using the basic build options it works fine. I'm now trying to use pbuilder to do some extended sanity checking and it's run into a problem with the README.md file.

Upstream doesn't provide a README.md file. I want to have one in the root of my repository so that people browsing GitHub will see the information automatically.

dpkg-source gets annoyed if I add the file without also adding a patch to debian/patches.

But it seems like the recommended way to use a git repository (at least with git-buildpackage) is to have the master branch not have patches pre-applied (which makes a certain amount of sense since it'd be duplication -- especially due to the way that applied patches are tracked via the .pc subdir) -- but if I unapply all patches, then the README.md file vanishes, which defeats the point.


I've now added a debian/source/options file that contains:

extend-diff-ignore="README\.md$"

And not including a patch to create the file. This accomplishes both goals (master is the unpatched source but contains a README.md file and dpkg-source doesn't get upset about this during the build). The downside is that this file doesn't appear anywhere in the generated source package (orig.tar.gz and debian.tar.xz) files either.

I can live with this as the file isn't terribly exciting (mostly just a description and some instructions how to build it from git), but it means the Git repository is "different" from the source package. Is this the right way to do it? Is there a better way?

Your Answer

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

Browse other questions tagged or ask your own question.