Packaging Debian Packages using Darcs and Tailor
This page is intended to collect howto and tips related to Debian packaging using darcs and tailor.
[http://www.darcs.net/ darcs] is a revision control system that does not need a central repository or network connectivity. Also branching is pretty cheap in time and space requirements.
[http://progetti.arstecnica.it/tailor tailor] is a utility to convert between revision control systems. We use it to convert the upstream format to darcs format.
We will have 2 repositories for package foo: foo and foo-upstream. The work will be done in another repository in order to minimize rollbacks and accidental repository corruption. So you have a ~/packaging/repository/foo, ~/packaging/repository/foo-upstream, ~/packaging/work/foo and ~/packaging/work/foo-upstream structure for example.
You do your merging of upstream, preparing of packages etc in ~/packaging/work and only do darcs push if you want to record the changes. For team cooperation I would then rsync the ~/packaging/repository tree to some webserver.
Starting the repository
Converting upstream with tailor
Making the first debian package
Keeping up to date
Tip and tricks
The most important tip for using darcs is that sometimes the build-in conflict management fails. So
if a darcs command fails, retry it with more memory using GHCRTS="-M640M -K64M" darcs ...
if the conflict is too complex, use an external merge command: GHCRTS="-M640M -K64M" darcs apply --interactive --verbose --external-merge 'kdiff3 --output %o %a %1 %2' foo.dpatch
do a darcs check to check your repository now and again
likewise do darcs optimize now and again.