get-orig-source: possible MBF
I performed an experiment, in which I tried to check if source packages
are providing get-orig-source targets that comply with the Debian
Policy. Let me quote:
| `get-orig-source' (optional)
| This target fetches the most recent version of the original
| source package from a canonical archive site (via FTP or WWW, for
| example), does any necessary rearrangement to turn it into the
| original source tar file format described below, and leaves it in
| the current directory.
| This target may be invoked in any directory, and should take care
| to clean up any temporary files it may have left.
| This target is optional, but providing it if possible is a good
Note that there is a disagreement what does "the most recent version"
mean . Therefore, I didn't actually check if get-orig-source
downloads the correct version, but merely if it downloads tarballs into
the current directory.
Here are preliminary results:
a) 12424 packages didn't have g-o-s targets;
b) 928 packages had g-o-s targets and passed all my tests;
c) 15 packages call interactive programs (like lynx);
d) 21 packages unnecessarily call dh_testroot; accidentally, all of
these packages put tarballs in a wrong directory;
e) 327 packages put .orig.tar.gz in the ../tarballs/ directory;
f) 368 packages use uscan without --destdir (or even with
"--destdir ../") ;
g) 100 packages (+ many more of the above categories) try to access
files in ./debian/ directory, and thus fail when g-o-s is run in a
different than usual directory; this includes packages using uscan with
"--destdir ." ;
h) I need to further investigate 422 more packages (out of which at
least 134 create .orig.tar.gz in a wrong directory).
If there is consensus, I'll post dd-lists for some of the above
categories (except a, b and h, of course) and start mass bug-filling
 For those who want to improve their g-o-s targets, here's a makefile
fragment that appears to work:
MAKEFILE = $(firstword $(MAKEFILE_LIST))
SOURCE_DIR = $(dir $(MAKEFILE))/..
cd $(SOURCE_DIR) && \
uscan --rename --force-download --destdir $(CURDIR) <your-favorite-uscan-options>