On Fri, Aug 14, 2009 at 07:56:55PM +0200, Daniel Leidert wrote:
> Joey Hess wrote:
> > Colin Watson wrote:
> > > /usr/share/perl5/Debian/Debhelper/Buildsystem/autoconf.pm sets
> > > libexecdir to $prefix/lib/$sourcepackage. This is unhelpful - Autoconf's
> > > default for libexecdir is $prefix/libexec (which should obviously be
> > > $prefix/lib instead on Debian), and in Automake you're supposed to use
> > > pkglibexecdir if you want a package-specific subdirectory.
> > > 
> > > The effect of defining libexecdir this way is that, after conversion to
> > > dh_auto_configure, man-db installs a couple of files into
> > > /usr/lib/man-db/man-db/ rather than just /usr/lib/man-db/ as it's
> > > supposed to.
> > > 
> > > Could you please pass just --libexecdir=\${prefix}/lib instead?
> > 
> > I copied all the default parameters from cdbs, on the assumption it got
> > something right. :-)
> > 
> > Changing this stuff is hard. It really calls for a regression test build
> > of all possibly affected packages..
> > 
> > But, autoconf doesn't have a pkglibexecdir, so changing it would dump
> > stuff directly in /usr/lib.
> 
> JFTR: autoconf AFAIK doesn't set any pkg* variable. pkgdatadir and
> pkglibdir are defined by automake simply as as $libdir/@PACKAGE@
> and $datarootdir/@PACKAGE@. So you can only affect $libdir and
> $datarootdir. Further there is no variable $pkglibexecdir.

I just ran into this issue when converting schroot to use dh.
schroot uses the standard GNU autoconf/automake, and this
includes using pkglibexecdir.  While pkglibexecdir didn't used to
be a standard location in autoconf/make (I defined it by hand), it's
now supported by current autoconf/make versions.  However,
irrespective of the existence of pkglibexecdir, adding the package
name to libexecdir was wrong in any case.


Before:
../../configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr 
--sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var 
--mandir=${prefix}/share/man --infodir=${prefix}/share/info --enable-dchroot 
--enable-dchroot-dsa --enable-static --disable-shared 
--with-bash-completion-dir=/etc/bash_completion.d --enable-lvm-snapshot 
--enable-btrfs-snapshot --enable-uuid BTRFS=/sbin/btrfs BTRFSCTL=/sbin/btrfsctl 
LVCREATE=/sbin/lvcreate LVREMOVE=/sbin/lvremove

libdir=/usr/lib/ARCH
libexecdir=/usr/lib/ARCH
pkglibexecdir=/usr/lib/ARCH/schroot

After:
../../configure --build=x86_64-linux-gnu --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--libdir=${prefix}/lib/x86_64-linux-gnu 
--libexecdir=${prefix}/lib/x86_64-linux-gnu/schroot --disable-maintainer-mode 
--disable-dependency-tracking --enable-dchroot --enable-dchroot-dsa 
--enable-static --disable-shared 
--with-bash-completion-dir=/etc/bash_completion.d --disable-lvm-snapshot 
--disable-btrfs-snapshot --enable-uuid BTRFS=/sbin/btrfs 
BTRFSCTL=/sbin/btrfsctl LVCREATE=/sbin/lvcreate LVREMOVE=/sbin/lvremove

libdir=/usr/lib/ARCH
libexecdir=/usr/lib/ARCH/schroot
pkglibexecdir=/usr/lib/ARCH/schroot/schroot

should be:
libdir=/usr/lib/ARCH
libexecdir=/usr/lib/ARCH
pkglibexecdir=/usr/lib/ARCH/schroot


The current behaviour of dh_auto_configure is clearly broken in this
regard.  It's completely contrary to the specified role of libexecdir,
and the autoconf defaults, and conflicts badly with existing practice
of using pkglibexecdir where a package-specific subdirectory is
required.  Maintainers who do need to add the package name can just add
--libexecdir=$(LIBDIR)/$(PACKAGE) to the configure options.  The
current default breaks packages which conform to the specification
and existing standard practice.

Please could you revert this behaviour in v9?
(patch attached).  Could arguably be done for v8 since it's broken,
unless there are packages dependent upon it being incorrect.


Thanks,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
From 5ce7bb42ddbb3ad9bd59500ce1f601d1619da107 Mon Sep 17 00:00:00 2001
From: Roger Leigh <rle...@debian.org>
Date: Tue, 14 Jun 2011 20:43:03 +0100
Subject: [PATCH 2/2] Don't add package name to libexecdir in v9

---
 Debian/Debhelper/Buildsystem/autoconf.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Debian/Debhelper/Buildsystem/autoconf.pm b/Debian/Debhelper/Buildsystem/autoconf.pm
index c211d8d..1fbc80d 100644
--- a/Debian/Debhelper/Buildsystem/autoconf.pm
+++ b/Debian/Debhelper/Buildsystem/autoconf.pm
@@ -40,7 +40,7 @@ sub configure {
 	my $multiarch=dpkg_architecture_value("DEB_HOST_MULTIARCH");
 	if (! compat(8) && defined $multiarch) {
 		push @opts, "--libdir=\${prefix}/lib/$multiarch";
-		push @opts, "--libexecdir=\${prefix}/lib/$multiarch/" . sourcepackage();
+		push @opts, "--libexecdir=\${prefix}/lib/$multiarch";
 	}
 	else {
 		push @opts, "--libexecdir=\${prefix}/lib/" . sourcepackage();
-- 
1.7.5.4

Attachment: signature.asc
Description: Digital signature

Reply via email to