DEB_BUILD_OPTIONS=nocheck
This is a quick post to show how you can rebuild a debian package and skip some steps, like “make test” for example in the upstream package, by passing some build options. More and more debian packages are now supporting the nodocs, nocheck/notest build options. You might want this if you are repeatedly building the package and want to skip some parts and make it faster, or maybe some step is failing while running the tests and that is something acceptable and known. In this case you can build the package as usual and export DEB_BUILD_OPTIONS=nocheck.
For example rebuilding the mysql package takes quite a long time, and to skip the package run tests we will do something like:
dpkg-source -x mysql-dfsg-5.0_5.0.67-1.dsc
cd mysql-dfsg-5.0-5.0.67/
DEB_BUILD_OPTIONS=nocheck debuild -us -uc
Note: not all packages implement this option and you might want to look in the rules file and see if this is defined or not.