summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoscripts/postinst-gconf4
-rw-r--r--autoscripts/postinst-python2
-rw-r--r--autoscripts/postrm-gconf7
-rw-r--r--autoscripts/prerm-gconf2
-rw-r--r--debian/changelog22
-rwxr-xr-xdh_fixperms6
-rwxr-xr-xdh_gconf22
-rwxr-xr-xdh_installmanpages5
-rwxr-xr-xdh_installmodules23
-rwxr-xr-xdh_link36
-rwxr-xr-xdh_scrollkeeper6
-rw-r--r--doc/TODO3
-rwxr-xr-xt/dh_link20
13 files changed, 131 insertions, 27 deletions
diff --git a/autoscripts/postinst-gconf b/autoscripts/postinst-gconf
index c5ee87d..f4a7c82 100644
--- a/autoscripts/postinst-gconf
+++ b/autoscripts/postinst-gconf
@@ -1,5 +1,5 @@
if [ "$1" = "configure" ]; then
- SCHEMA_LOCATION=/etc/gconf/schemas
+ SCHEMA_LOCATION=/usr/share/gconf/schemas
SCHEMA_FILES="#SCHEMAS#"
for SCHEMA in $SCHEMA_FILES; do
if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
@@ -8,4 +8,6 @@ if [ "$1" = "configure" ]; then
--makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null
fi
done
+
+ kill -HUP `pidof gconfd-2` >/dev/null 2>&1 || true
fi
diff --git a/autoscripts/postinst-python b/autoscripts/postinst-python
index 6f1f9a5..c48d1aa 100644
--- a/autoscripts/postinst-python
+++ b/autoscripts/postinst-python
@@ -1,5 +1,5 @@
PYTHON=#PYVER#
-if which $PYTHON >/dev/null 2>&1; then
+if which $PYTHON >/dev/null 2>&1 && [ -e /usr/lib/$PYTHON/compileall.py ]; then
DIRLIST="#DIRLIST#"
for i in $DIRLIST ; do
$PYTHON -O /usr/lib/$PYTHON/compileall.py -q $i
diff --git a/autoscripts/postrm-gconf b/autoscripts/postrm-gconf
new file mode 100644
index 0000000..10a47fd
--- /dev/null
+++ b/autoscripts/postrm-gconf
@@ -0,0 +1,7 @@
+if [ "$1" = purge ]; then
+ SCHEMA_FILES="#SCHEMAS#"
+ for SCHEMA in $SCHEMA_FILES; do
+ rm -f /etc/gconf/schemas/$SCHEMA
+ done
+ rmdir -p --ignore-fail-on-non-empty /etc/gconf/schemas
+fi
diff --git a/autoscripts/prerm-gconf b/autoscripts/prerm-gconf
index aaa803e..cd75541 100644
--- a/autoscripts/prerm-gconf
+++ b/autoscripts/prerm-gconf
@@ -1,5 +1,5 @@
if [ "$1" = remove ] || [ "$1" = upgrade ]; then
- SCHEMA_LOCATION=/etc/gconf/schemas
+ SCHEMA_LOCATION=/usr/share/gconf/schemas
SCHEMA_FILES="#SCHEMAS#"
for SCHEMA in $SCHEMA_FILES; do
if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
diff --git a/debian/changelog b/debian/changelog
index 53cce78..51cd23e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,28 @@
debhelper (4.2.13) UNRELEASED; urgency=low
* Spanish man page updates from Ruben Porras. Closes: #247382
+ * dh_gconf: gconf schemas moved to /usr/share/gconf/schemas. Relocate
+ schemas from /etc/gconf/schemas. (Josselin Mouette)
+ * dh_gconf: kill gconfd-2 so that the newly installed schemas
+ are available straight away. (Josselin Mouette)
+ * dh_gconf: fix bashism in restart of gconfd-2
+ * dh_gconf: fix innaccuracy in man page; gconfd-2 is HUPPed, not
+ killed.
+ * dh_scrollkeeper: stop adding scrollkeeper to misc:Depends, since
+ the postinst will not run it if it's not installed, and a single run after
+ it's installed is sufficient to find all documents. Closes: #256745
+ * dh_fixperms: make .ali files mode 444 to prevent recompilation by GNAT.
+ For speed, only scan for .ali files in usr/lib/ada. Closes: #245211
+ * dh_python: check to make sure compileall.py is available before running it
+ in the postinst. Closes: #253112
+ * dh_installmodules: install debian/package.modprobe into etc/modprobe.d/
+ for module-init-tools. These files can sometimes need to differ from the
+ etc/modutils/ files. Closes: #204336, #234495
+ * dh_installmanpages is now deprecated.
+ * Add a test case for bug #244157, and fixed the inverted ok() parameters
+ in the others, and added a few new tests.
+ * dh_link: applied GOTO Masanori's patch to fix conversion of existing
+ relative symlinks between top level directories. Closes: #244157
-- Joey Hess <joeyh@debian.org> Tue, 6 Jul 2004 12:52:30 -0400
diff --git a/dh_fixperms b/dh_fixperms
index 3f3babd..5bd39f3 100755
--- a/dh_fixperms
+++ b/dh_fixperms
@@ -96,6 +96,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
}
}
+ # ADA ali files should be mode 444 to avoid recompilation
+ if (-d "$tmp/usr/lib/ada") {
+ complex_doit("find $tmp/usr/lib/ada -type f",
+ "-name '*.ali' $find_options -print0",
+ "2>/dev/null | xargs -0r chmod uga-w");
+ }
}
=head1 SEE ALSO
diff --git a/dh_gconf b/dh_gconf
index a7e0e41..769dfa7 100755
--- a/dh_gconf
+++ b/dh_gconf
@@ -21,22 +21,36 @@ GConf schemas.
It automatically generates the postinst and prerm fragments needed
to register and unregister the schemas in etc/gconf/schemas.
These fragements will use gconftool-2, so the package should depend on
-gconf2. This rogram will add an apprioriate dependency to ${misc:Depends}.
+gconf2. This program will add an appropriate dependency to ${misc:Depends}.
+
+The postinst script will also signal gconfd-2 so that the newly installed
+schemas are available straight away.
=cut
init();
+
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
+ my $old_schemas_dir = "$tmp/etc/gconf/schemas";
+ my $new_schemas_dir = "$tmp/usr/share/gconf/schemas";
+
+ # Migrate schemas from /etc/gconf/schemas to /usr/share/gconf/schemas
+ if (-d $old_schemas_dir) {
+ doit("mkdir -p $new_schemas_dir") unless -d $new_schemas_dir;
+ doit("mv $old_schemas_dir/*.schemas $new_schemas_dir/");
+ doit("rmdir --ignore-fail-on-non-empty $old_schemas_dir");
+ }
- if (-d "$tmp/etc/gconf/schemas") {
+ if (-d "$new_schemas_dir") {
# Get a list of the schemas
- my $schemas = `find debian/$package/etc/gconf/schemas -type f -name \*.schemas -printf '%P '`;
+ my $schemas = `find $new_schemas_dir -type f -name \*.schemas -printf '%P '`;
if ($schemas ne '') {
autoscript($package,"postinst","postinst-gconf","s%#SCHEMAS#%$schemas%");
autoscript($package,"prerm","prerm-gconf","s%#SCHEMAS#%$schemas%");
- addsubstvar($package, "misc:Depends", "gconf2 (>= 2.4.0)");
+ autoscript($package,"postrm","postrm-gconf","s%#SCHEMAS#%$schemas%");
+ addsubstvar($package, "misc:Depends", "gconf2 (>= 2.6.2-1)");
}
}
}
diff --git a/dh_installmanpages b/dh_installmanpages
index 415c86b..93c8415 100755
--- a/dh_installmanpages
+++ b/dh_installmanpages
@@ -21,7 +21,8 @@ automatically installing man pages into usr/share/man/ and usr/X11R6/man/
in package build directories.
This is a DWIM-style program, with an interface unlike the rest of
-debhelper. You are encouraged to use L<dh_installman(1)> instead.
+debhelper. It is deprecated, and you are encouraged to use
+L<dh_installman(1)> instead.
dh_installmanpages scans the current directory and all subdirectories for
filenames that look like man pages. (Note that only real files are looked
@@ -61,6 +62,8 @@ not be processed properly.
=cut
+warning("This program is deprecated, switch to dh_installman.");
+
init();
# Check if a file is a man page, for use by File::Find.
diff --git a/dh_installmodules b/dh_installmodules
index 28f947c..132857a 100755
--- a/dh_installmodules
+++ b/dh_installmodules
@@ -21,12 +21,15 @@ dh_installmodules is a debhelper program that is responsible for
registering kernel modules with modutils.
Files named debian/package.modules will be installed as
-etc/modutils/package in the package build directory.
+etc/modutils/package in the package build directory. This is for use by
+modutils. Files named debian/package.modprobe will be installed in
+etc/modprobe.d/package in the package build directory, to be used by
+module-init-tools's version of modprobe.
Then postinst and postrm commands are automatically generated to register
the modules when the package is installed. See L<dh_installdeb(1)> for an
explanation of how this works. Note that this will be done for any
-package this program acts on which has either the above-mentioned file, or
+package this program acts on which has either a package.modules file, or
has .o or .ko files in /lib/modules.
=head1 OPTIONS
@@ -68,21 +71,29 @@ sub find_kernel_modules {
foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
- my $file=pkgfile($package,"modules");
+ my $modutils_file=pkgfile($package,"modules");
+ my $modprobe_file=pkgfile($package,"modprobe");
if (! -e $tmp) {
doit("install","-d",$tmp);
}
- if ($file) {
+ if ($modutils_file) {
if (! -e "$tmp/etc/modutils") {
doit("install","-d","$tmp/etc/modutils");
}
- doit("install","-m","0644",$file,"$tmp/etc/modutils/".pkgfilename($package));
+ doit("install","-m","0644",$modutils_file,"$tmp/etc/modutils/".pkgfilename($package));
}
+ if ($modprobe_file) {
+ if (! -e "$tmp/etc/modprobe.d") {
+ doit("install","-d","$tmp/etc/modprobe.d");
+ }
+ doit("install","-m","0644",$modprobe_file,"$tmp/etc/modprobe.d/".pkgfilename($package));
+ }
+
if (! $dh{NOSCRIPTS} &&
- ($file || find_kernel_modules("$tmp/lib/modules"))) {
+ ($modutils_file || find_kernel_modules("$tmp/lib/modules"))) {
autoscript($package,"postinst","postinst-modules","s/#PACKAGE#/$package/");
autoscript($package,"postrm","postrm-modules","s/#PACKAGE#/$package/");
}
diff --git a/dh_link b/dh_link
index 7c51d06..5dd9da3 100755
--- a/dh_link
+++ b/dh_link
@@ -76,6 +76,39 @@ the X man page foo.1x
=cut
+# This expand_path expands all path "." and ".." components, but doesn't
+# resolve symbolic links.
+sub expand_path {
+ my $start = @_ ? shift : '.';
+ my @pathname = split(m:/+:,$start);
+
+ my $entry;
+ my @respath;
+ foreach $entry (@pathname) {
+ if ($entry eq '.' || $entry eq '') {
+ # Do nothing
+ }
+ elsif ($entry eq '..') {
+ if ($#respath == -1) {
+ # Do nothing
+ }
+ else {
+ pop @respath;
+ }
+ }
+ else {
+ push @respath, $entry;
+ }
+ }
+
+ my $result;
+ foreach $entry (@respath) {
+ $result .= '/' . $entry;
+ }
+ return $result;
+}
+
+
init();
foreach my $package (@{$dh{DOPACKAGES}}) {
@@ -126,9 +159,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
while (@links) {
my $dest=pop @links;
- my $src=pop @links;
+ my $src=expand_path(pop @links);
- # Relavatize src and dest.
$src=~s:^/::;
$dest=~s:^/::;
diff --git a/dh_scrollkeeper b/dh_scrollkeeper
index 11d1adb..7e19ec7 100755
--- a/dh_scrollkeeper
+++ b/dh_scrollkeeper
@@ -20,9 +20,7 @@ registering OMF files that it finds in package build trees with
ScrollKeeper.
This command automatically adds maintainer script snippets for registering
-and unregistering files with ScrollKeeper (unless B<-n> is used). A
-dependency on scrollkeeper will be added to C<${misc:Depends}>, so be sure
-your package uses that variable in F<debian/control>. See
+and unregistering files with ScrollKeeper (unless B<-n> is used). See
L<dh_installdeb(1)> for an explantion of Debhelper maintainer script
snippets.
@@ -70,8 +68,6 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
autoscript($package,"postinst","postinst-scrollkeeper");
autoscript($package,"postrm","postrm-scrollkeeper");
}
- # scrollkeeper use xml catalogs so we require 0.3.14-5+.
- addsubstvar($package, "misc:Depends", "scrollkeeper", ">= 0.3.14-5");
}
}
}
diff --git a/doc/TODO b/doc/TODO
index 2605801..bb05d92 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -52,8 +52,7 @@ Deprecated:
some of them. I'd also like to deprecate/remove debian/compress files, -X is
a better idea.
* dh_suidregister. Once nothing in the archive uses it.
-* dh_installmanpages. Only mildly deprecated right now. Once dh_installman
- catches on, make it emit a warning, and then wait for it to go away.
+* dh_installmanpages.
* dh_testversion. Remove as soon as nothing uses it.
* dh_movefiles. I won't hold my breath.
* debconf-mergetemplates support and the debian/template.ll files and the
diff --git a/t/dh_link b/t/dh_link
index 3ab345e..68c7d4e 100755
--- a/t/dh_link
+++ b/t/dh_link
@@ -1,16 +1,28 @@
#!/usr/bin/perl
use Test;
-plan(tests => 3);
+plan(tests => 7);
# It used to not make absolute links in this situation, and it should.
# #37774
system("./dh_link","etc/foo","usr/lib/bar");
-ok("/etc/foo",readlink("debian/debhelper/usr/lib/bar"));
+ok(readlink("debian/debhelper/usr/lib/bar"), "/etc/foo");
# let's make sure it makes simple relative links ok.
system("./dh_link","usr/bin/foo","usr/bin/bar");
-ok("foo",readlink("debian/debhelper/usr/bin/bar"));
+ok(readlink("debian/debhelper/usr/bin/bar"), "foo");
# ok, more complex relative links.
system("./dh_link","usr/lib/1","usr/bin/2");
-ok("../lib/1",readlink("debian/debhelper/usr/bin/2"));
+ok(readlink("debian/debhelper/usr/bin/2"),"../lib/1");
+
+# Check conversion of realitive symlink to different top-level directory
+# into absolute symlink. (#244157)
+system("mkdir -p debian/debhelper/usr/lib; mkdir -p debian/debhelper/lib; touch debian/debhelper/lib/libm.so; cd debian/debhelper/usr/lib; ln -sf ../../lib/libm.so");
+system("./dh_link");
+ok(readlink("debian/debhelper/usr/lib/libm.so"), "/lib/libm.so");
+
+# Make sure the link conversion didn't change any of the previously made
+# links.
+ok(readlink("debian/debhelper/usr/lib/bar"), "/etc/foo");
+ok(readlink("debian/debhelper/usr/bin/bar"), "foo");
+ok(readlink("debian/debhelper/usr/bin/2"),"../lib/1");