Package: dh-make Version: 0.40 Severity: normal Tags: patch By default dh_make creates a new .orig directory when no .orig.tar.gz file is found. This leads to many packages with a non-pristine .orig.tar.gz file, but without any changes to the content. (Though of course a different md5sum).
I suggest to only create a .orig directory if some option is supplied, like --createorig in the attached patch. Hochachtungsvoll, Bernhard R. Link
diff -r -u dh-make-0.40.original/dh_make dh-make-0.40/dh_make --- dh-make-0.40.original/dh_make 2006-04-23 12:09:32.000000000 +0200 +++ dh-make-0.40/dh_make 2006-04-23 12:42:43.000000000 +0200 @@ -29,6 +29,7 @@ our $fullname = ""; our $source_file=""; our $debian_native = 0; +our $copy_dir_for_orig = 0; our $package_type=""; our $CHANGELOG=""; our $PRESERVE=""; @@ -104,6 +105,7 @@ -e, --email <address> use <address> as the maintainer e-mail address -n, --native the program is Debian native, don\'t generate .orig -f, --file <file> specify file to use as the original source archive + -r, --createorig make a copy for the original source archive -s, --single set package class to single -m, --multi set package class to multiple binary -l, --library set package class to library @@ -129,6 +131,7 @@ if (GetOptions('copyright|c=s' => \$main::license, 'email|e=s' => \$main::email, 'file|f=s' => \$main::source_file, + 'createorig|r' => \$main::copy_dir_for_orig, 'help|h' => \$dohelp, 'version|v' => \$doversion, 'native|n' => \$main::debian_native, @@ -416,15 +419,20 @@ exit 1; } } else { - if (-d "..$fullname.orig") + if (-d "../$fullname.orig") { print "Skipping copying to $fullname.orig since $fullname.orig exists.\n"; } else { if ( -f "../$fullname.orig.tar.gz") { print "Skipping copying to $fullname.orig since $fullname.org.tar.gz exists.\n"; - } else { + } elsif ($copy_dir_for_orig) { system('cp', '-a', "../$fullname", "../$fullname.orig"); + } else { + print "Could not find $package_name\_$version.orig.tar.gz\n"; + print "Either specify an alternate file to use with -f,\n"; + print "or add --createorig to create one.\n"; + exit 1; } } } diff -r -u dh-make-0.40.original/dh_make.1 dh-make-0.40/dh_make.1 --- dh-make-0.40.original/dh_make.1 2006-04-23 12:09:32.000000000 +0200 +++ dh-make-0.40/dh_make.1 2006-04-23 12:36:28.000000000 +0200 @@ -47,12 +47,18 @@ The package will be build using the Common Debian Build System. CDBS provides a sane set of default rules upon which packages can build. .SH ACTIONS PERFORMED +Unless \-\-native was given, .B dh_make -copies the archive on the higher directory level into -<packagename>-<version>.orig if that directory does not exist. If the -f -option is supplied, the specified file name is taken as the source archive. +makes sure a original source archive (<packagename>\-<version>.orig.tar.gz) +exists. +If no such file exists, the file specified with \-f is copied in place. +If no \-f is supplied either but \-\-createorig is, the current directory +it copied into <packagename>\-<version>.orig which will be made to this +archive by dpkg\-source later automatically. The original archive is needed for other Debian tools to generate the diffs to the original sources required by the Debian packaging format. +Unless there are reasons against it this file should be the pristine +upstream archive. .PP Then .B dh_make