summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Debian/Debhelper/Dh_Getopt.pm2
-rw-r--r--debian/changelog21
-rwxr-xr-xdh_compress2
-rwxr-xr-xdh_install41
-rwxr-xr-xdh_installchangelogs16
-rwxr-xr-xdh_shlibdeps6
6 files changed, 83 insertions, 5 deletions
diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm
index 37d6f47..7967414 100644
--- a/Debian/Debhelper/Dh_Getopt.pm
+++ b/Debian/Debhelper/Dh_Getopt.pm
@@ -143,6 +143,8 @@ sub parseopts {
"h|help" => \&showhelp,
"mainpackage=s" => \$options{MAINPACKAGE},
+
+ "list-missing" => \$options{LIST_MISSING},
"<>" => \&NonOption,
);
diff --git a/debian/changelog b/debian/changelog
index ae50371..593d2c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,24 @@
+debhelper (4.0.19) unstable; urgency=low
+
+ * Make dh_installchangelogs install debian/NEWS files as well, as
+ NEWS.Debian. Make dh_compress always compress them. The idea is to make
+ these files be in a machine parsable form, like the debian changelog, but
+ only put newsworthy info into them. Automated tools can then display new
+ news on upgrade. It is hoped that if this catches on it will reduce the
+ abuse of debconf notes. See discussion on debian-devel for details.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 14 Jul 2002 23:09:24 -0400
+
+debhelper (4.0.18) unstable; urgency=low
+
+ * Removed a seemingly useless -dDepends in dh_shlibdeps's call to
+ dpkg-shalibdeps; this allows for stuff like dh_shlibdeps -- -dRecommends
+ Closes: #152117
+ * Added a --list-missing parameter to dh_install, which calc may find
+ useful.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 7 Jul 2002 22:44:01 -0400
+
debhelper (4.0.17) unstable; urgency=low
* In dh_install, don't limit to -type f when doing the find due to -X.
diff --git a/dh_compress b/dh_compress
index 5e8bb37..5c04e0c 100755
--- a/dh_compress
+++ b/dh_compress
@@ -95,7 +95,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# ".tgz", "-gz", "-z", "_z"
push @files, split(/\n/,`
find usr/info usr/share/info usr/man usr/share/man usr/X11*/man -type f ! -name "*.gz" 2>/dev/null || true;
- find usr/doc usr/share/doc -type f \\( -size +4k -or -name "changelog*" \\) \\
+ find usr/doc usr/share/doc -type f \\( -size +4k -or -name "changelog*" -or -name "NEWS*" \\) \\
\\( -name changelog.html -or ! -iname "*.htm*" \\) \\
! -iname "*.gif" ! -iname "*.png" ! -iname "*.jpg" \\
! -iname "*.jpeg" ! -iname "*.gz" ! -iname "*.taz" \\
diff --git a/dh_install b/dh_install
index 69f2436..8458840 100755
--- a/dh_install
+++ b/dh_install
@@ -7,11 +7,12 @@ dh_install - install files into package build directories
=cut
use strict;
+use File::Find;
use Debian::Debhelper::Dh_Lib;
=head1 SYNOPSIS
-B<dh_install> [B<-X>I<item>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
+B<dh_install> [B<-X>I<item>] [B<--sutodest>] [B<--list-missing>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
=head1 DESCRIPTION
@@ -65,6 +66,19 @@ Note that if you list only a filename on a line by itself in a
debian/package.install file, with no explicit destination, then dh_install
will automatically guess the destination even if this flag is not set.
+=item B<--list-missing>
+
+This option makes dh_install keep track of the files it installs, and then at
+the end, compare that list with the files in debian/tmp. If any of the files
+(and symlinks) in debian/tmp were not installed to somewhere, it will
+warn on stderr about that.
+
+This may be useful if you have a large package and want to make sure that
+you don't miss installing newly added files in new upstream releases.
+
+Note that files that are excluded from being moved via the -X option are not
+warned about.
+
=item B<--sourcedir=dir>
Makes all source files relative to "dir". If this is specified, it is akin
@@ -88,7 +102,7 @@ The files will be installed into the first package dh_install acts on.
init();
-my $ret=0;
+my @installed;
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
@@ -134,6 +148,15 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
doit("install","-d","$tmp/$dest");
}
+ # Keep track of what's installed.
+ if ($dh{LIST_MISSING}) {
+ # Kill any extra slashes. Makes the
+ # @installed stuff more robust.
+ $src=~y:/:/:s;
+ $src=~s:/+$::;
+ push @installed, "\Q$src\E\/.*|\Q$src\E";
+ }
+
if (-d $src && $exclude) {
my ($dir_basename) = basename($src);
# Pity there's no cp --exclude ..
@@ -148,6 +171,20 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
+if ($dh{LIST_MISSING}) {
+ my @missing;
+ my $installed=join("|", @installed);
+ $installed=qr{^$installed$};
+ find(sub {
+ -f || -l || return;
+ $_="$File::Find::dir/$_";
+ push @missing, $_ unless /$installed/;
+ }, './debian/tmp');
+ if (@missing) {
+ warning "$_ not installed" foreach @missing;
+ }
+}
+
=head1 SEE ALSO
L<debhelper(1)>
diff --git a/dh_installchangelogs b/dh_installchangelogs
index dc9b5a0..2588d57 100755
--- a/dh_installchangelogs
+++ b/dh_installchangelogs
@@ -25,6 +25,12 @@ into usr/share/doc/package/changelog.Debian in the package build directory. (If
files named debian/package.changelog exist, they will be used in preference
to debian/changelog.)
+Parallelling the debian changelog handling, this program also takes care of
+debian NEWS files. If there is a debian/NEWS file, it is installed as
+usr/share/doc/package/NEWS for native packages, and as
+usr/share/doc/package/NEWS.Debian for non-native packages. debian/package.NEWS
+files can also be used.
+
If an upstream changelog file is specified as an option, and the package is
not a native debian package, then this upstream changelog will be installed
as usr/share/doc/package/changelog in the package build directory. If the
@@ -67,17 +73,23 @@ if (isnative($dh{MAINPACKAGE}) && defined $upstream) {
}
my $changelog_name="changelog.Debian";
+my $news_name="NEWS.Debian";
if (isnative($dh{MAINPACKAGE})) {
$changelog_name='changelog';
+ $news_name='NEWS';
}
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $changelog=pkgfile($package,"changelog");
+ my $news=pkgfile($package,"NEWS");
if (!$changelog) {
$changelog="debian/changelog";
}
+ if (!$news) {
+ $news="debian/NEWS";
+ }
if (! -e $changelog) {
error("could not find changelog $changelog");
@@ -93,6 +105,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
doit("install","-o",0,"-g",0,"-p","-m644",$changelog,
"$tmp/usr/share/doc/$package/$changelog_name");
+ if (-e $news) {
+ doit("install","-o",0,"-g",0,"-p","-m644",$news,
+ "$tmp/usr/share/doc/$package/$news_name");
+ }
if ($upstream) {
my $link_to;
diff --git a/dh_shlibdeps b/dh_shlibdeps
index b3648e5..5001d75 100755
--- a/dh_shlibdeps
+++ b/dh_shlibdeps
@@ -89,7 +89,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
$find_options="! \\( $dh{EXCLUDE_FIND} \\)";
}
foreach my $file (split(/\n/,`find $tmp -type f \\( -perm +111 -or -name "*.so*" \\) $find_options`)) {
- # TODO: this is slow, optimize. Ie, file can run once on multiple files..
+ # TODO this is slow, optimize. Ie, file can run once on
+ # multiple files..
$ff=`file "$file"`;
if ($ff=~m/ELF/ && $ff!~/statically linked/) {
push @filelist,$file;
@@ -97,7 +98,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
if (@filelist) {
- doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",@{$dh{U_PARAMS}},'-dDepends',@filelist);
+ doit("dpkg-shlibdeps","-Tdebian/${ext}substvars",
+ @{$dh{U_PARAMS}},@filelist);
}
}