Debian Bug report logs - #496157
debhelper: dh, Makefile.PL and Build.PL glitch

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>; Source for debhelper is src:debhelper.

Reported by: gregor herrmann <gregoa@debian.org>

Date: Sat, 23 Aug 2008 01:00:01 UTC

Severity: normal

Found in version debhelper/7.0.16

Fixed in version debhelper/7.0.17

Done: Joey Hess <joeyh@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, debian-perl@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#496157; Package debhelper. Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
New Bug report received and forwarded. Copy sent to debian-perl@lists.debian.org, Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: debhelper: dh, Makefile.PL and Build.PL glitch
Date: Fri, 22 Aug 2008 21:55:38 -0300
Package: debhelper
Version: 7.0.16
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When using dh7 and the nice small debian/rules files for perl modules
I saw several times that stuff gets installed into /usr/usr with
dh_auto_install.

Today I again stumbled over this phenomenon -- with
libdata-serializer-perl, in the pkg-perl repo.

After some investigation (and looking at other modules) it seems that
the problem comes up with modules where Makefile(.PL) is just a
wrapper for Module::Build; in the case of libdata-serializer-perl
dh_auto_install calls 
make install DESTDIR=/tmp/buildd/libdata-serializer-perl-0.48/debian/libdata-serializer-perl PREFIX=/usr
which is perfectly fine but the previously generated Makefile then
calls
/usr/bin/perl Build --makefile_env_macros 1 install
which AFAICS adds the "PREFIX=/usr" to "perl Build" -- and so we end
up with files in /tmp/buildd/libdata-serializer-perl-0.48/debian/libdata-serializer-perl/usr/usr/

I'm not sure if and what debhelper can do about it; one option might
be to prefer Build(.PL) over Makefile(.PL) for dh_auto_{configure,build,install}
(or at least _install); in general I prefer MakeMaker over
Module::Build magic, but in this case it would solve the problem.

But maybe someone else has some other ideas.

Cheers,
gregor

- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'oldstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages debhelper depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  dpkg-dev            1.14.19              package building tools for Debian
ii  file                4.25-1               Determines file type using "magic"
ii  html2text           1.3.2a-5             advanced HTML to text converter
ii  man-db              2.5.2-2              on-line manual pager
ii  perl                5.10.0-13            Larry Wall's Practical Extraction 
ii  po-debconf          1.0.15               manage translated Debconf template

debhelper recommends no packages.

Versions of packages debhelper suggests:
ii  dh-make                       0.46       tool that converts source archives

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkivYAoACgkQOzKYnQDzz+RCwQCfbOswQaOjM9uGbw2kax3jJRfF
zBMAnieRUhopm0AGBnVRntjLrecfpuOv
=Ay0b
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#496157; Package debhelper. Full text and rfc822 format available.

Acknowledgement sent to Joey Hess <joeyh@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #10 received at 496157@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: gregor herrmann <gregoa@debian.org>, 496157@bugs.debian.org
Subject: Re: Bug#496157: debhelper: dh, Makefile.PL and Build.PL glitch
Date: Fri, 22 Aug 2008 22:30:54 -0400
[Message part 1 (text/plain, inline)]
gregor herrmann wrote:
> When using dh7 and the nice small debian/rules files for perl modules
> I saw several times that stuff gets installed into /usr/usr with
> dh_auto_install.
> 
> Today I again stumbled over this phenomenon -- with
> libdata-serializer-perl, in the pkg-perl repo.
> 
> After some investigation (and looking at other modules) it seems that
> the problem comes up with modules where Makefile(.PL) is just a
> wrapper for Module::Build; in the case of libdata-serializer-perl
> dh_auto_install calls 
> make install DESTDIR=/tmp/buildd/libdata-serializer-perl-0.48/debian/libdata-serializer-perl PREFIX=/usr
> which is perfectly fine but the previously generated Makefile then
> calls
> /usr/bin/perl Build --makefile_env_macros 1 install
> which AFAICS adds the "PREFIX=/usr" to "perl Build" -- and so we end
> up with files in /tmp/buildd/libdata-serializer-perl-0.48/debian/libdata-serializer-perl/usr/usr/
> 
> I'm not sure if and what debhelper can do about it; one option might
> be to prefer Build(.PL) over Makefile(.PL) for dh_auto_{configure,build,install}
> (or at least _install); in general I prefer MakeMaker over
> Module::Build magic, but in this case it would solve the problem.

Changing it to prefer Build.PL is dangerous, because:

* An unknown number of packages may be using dh and have both a
  Makefile.PL and a Build.PL, and some subset of those may fail when the
  Build.PL is used. No way to know w/o testing.
* A package may ship a Makefile that calls Build.PL, but also does other
  things. Prefering Build.PL would break such a package. Maybe such
  packages don't currently exist, but they could in future, and if the
  change were made, they couldn't easily use dh.

Instead I think dh_auto_install should get an improved check for whether
a Makefile was generated by MakeMaker, and only do the prefix hack if
that is clearly the case.

-- 
see shy jo
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#496157; Package debhelper. Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #15 received at 496157@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: Joey Hess <joeyh@debian.org>, 496157@bugs.debian.org
Subject: Re: Bug#496157: debhelper: dh, Makefile.PL and Build.PL glitch
Date: Fri, 22 Aug 2008 23:47:24 -0300
[Message part 1 (text/plain, inline)]
On Fri, 22 Aug 2008 22:30:54 -0400, Joey Hess wrote:

> > I'm not sure if and what debhelper can do about it; one option might
> > be to prefer Build(.PL) over Makefile(.PL) for dh_auto_{configure,build,install}
> > (or at least _install); in general I prefer MakeMaker over
> > Module::Build magic, but in this case it would solve the problem.
> Changing it to prefer Build.PL is dangerous, because:

[..]

Good points.

> Instead I think dh_auto_install should get an improved check for whether
> a Makefile was generated by MakeMaker, and only do the prefix hack if
> that is clearly the case.

Sounds like a good idea to me, thanks.

Cheers,
gregor 
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  debian gnu/linux user, admin & developer - http://www.debian.org/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    BOFH excuse #331:  those damn raccoons! 
[signature.asc (application/pgp-signature, inline)]

Reply sent to Joey Hess <joeyh@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to gregor herrmann <gregoa@debian.org>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #20 received at 496157-close@bugs.debian.org (full text, mbox):

From: Joey Hess <joeyh@debian.org>
To: 496157-close@bugs.debian.org
Subject: Bug#496157: fixed in debhelper 7.0.17
Date: Sat, 23 Aug 2008 02:47:02 +0000
Source: debhelper
Source-Version: 7.0.17

We believe that the bug you reported is fixed in the latest version of
debhelper, which is due to be installed in the Debian FTP archive:

debhelper_7.0.17.dsc
  to pool/main/d/debhelper/debhelper_7.0.17.dsc
debhelper_7.0.17.tar.gz
  to pool/main/d/debhelper/debhelper_7.0.17.tar.gz
debhelper_7.0.17_all.deb
  to pool/main/d/debhelper/debhelper_7.0.17_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 496157@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated debhelper package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 22 Aug 2008 22:30:12 -0400
Source: debhelper
Binary: debhelper
Architecture: source all
Version: 7.0.17
Distribution: unstable
Urgency: low
Maintainer: Joey Hess <joeyh@debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 debhelper  - helper programs for debian/rules
Closes: 492719 493062 496157
Changes: 
 debhelper (7.0.17) unstable; urgency=low
 .
   [ Per Olofsson ]
   * dh_auto_install: Fix man page, was referring to dh_auto_clean.
 .
   [ Joey Hess ]
   * dh_gencontrol: Drop the Homepage field from udebs. Closes: #492719
   * Typo. Closes: #493062
   * dh_auto_install: Improve check for MakeMaker, to avoid passing PREFIX
     if the Makefile was generated by Module::Build::Compat. Closes: #496157
Checksums-Sha1: 
 44922b7634ccbf921584f9d3d6787b5891c3c789 838 debhelper_7.0.17.dsc
 2e56c9e4c16d8942402b9bd2698a77410670c798 293812 debhelper_7.0.17.tar.gz
 ebc1404fa484b36b7631aebf4c73d68c1e438360 554060 debhelper_7.0.17_all.deb
Checksums-Sha256: 
 ef224982d2996f4faf6a0bfbcd132cc50dcb31c2eab909a54665eff5ad7a2fc6 838 debhelper_7.0.17.dsc
 626c669b4f6429fd9facc3ad4b4b5249a4f389936a60ba7ac5893764490a5c8a 293812 debhelper_7.0.17.tar.gz
 171d42d191fad77052ef72ff8f6ec7f281dd6b8b937ed2a471b8250384881479 554060 debhelper_7.0.17_all.deb
Files: 
 2c8b568353476e19a147cd9eaa60447c 838 devel optional debhelper_7.0.17.dsc
 0575c1ee83ae6ebf52d55eb5276bd239 293812 devel optional debhelper_7.0.17.tar.gz
 b836ff6390caf14398058ab1430097e1 554060 devel optional debhelper_7.0.17_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFIr3ae2tp5zXiKP0wRAmacAJ94xEwatbmg/nGkMDhLJJT+fh/UJQCgjwlB
2AZUAWcK0rG+pCyNlQ6HK4Y=
=yL1J
-----END PGP SIGNATURE-----





Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#496157; Package debhelper. Full text and rfc822 format available.

Message #23 received at 496157@bugs.debian.org (full text, mbox):

From: Damyan Ivanov <dmn@debian.org>
To: 496157@bugs.debian.org
Cc: debian-perl@lists.debian.org
Subject: Re: Bug#496157: debhelper: dh, Makefile.PL and Build.PL glitch
Date: Sat, 23 Aug 2008 08:04:51 +0300
[Message part 1 (text/plain, inline)]
-=| gregor herrmann, Fri, Aug 22, 2008 at 09:55:38PM -0300 |=-
> When using dh7 and the nice small debian/rules files for perl 
> modules
> I saw several times that stuff gets installed into /usr/usr with
> dh_auto_install.
> 
> I'm not sure if and what debhelper can do about it; one option might
> be to prefer Build(.PL) over Makefile(.PL) for dh_auto_{configure,build,install}
> (or at least _install); in general I prefer MakeMaker over
> Module::Build magic, but in this case it would solve the problem.

Back in the days when dh7 didn't exist yet, debian/rules of the perl 
module packages of pkg-perl were such that Build.PL was always 
preferred over Makefile.PL. dh-make-perl also follows that.

So to me it preferring Build.PL over Makefile.PL seems like the right 
thing to do and would conform to the existing practice.

-- 
dam            JabberID: dam@jabber.minus273.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Joey Hess <joeyh@debian.org>:
Bug#496157; Package debhelper. Full text and rfc822 format available.

Acknowledgement sent to gregor herrmann <gregoa@debian.org>:
Extra info received and forwarded to list. Copy sent to Joey Hess <joeyh@debian.org>. Full text and rfc822 format available.

Message #28 received at 496157@bugs.debian.org (full text, mbox):

From: gregor herrmann <gregoa@debian.org>
To: 496157@bugs.debian.org, debian-perl@lists.debian.org
Subject: Re: Bug#496157: debhelper: dh, Makefile.PL and Build.PL glitch
Date: Sat, 23 Aug 2008 10:53:22 -0300
[Message part 1 (text/plain, inline)]
On Sat, 23 Aug 2008 08:04:51 +0300, Damyan Ivanov wrote:

> Back in the days when dh7 didn't exist yet, debian/rules of the perl 
> module packages of pkg-perl were such that Build.PL was always 
> preferred over Makefile.PL. dh-make-perl also follows that.

Right, and every now and then I wonder why :)

Does anybody know what was the reason for this decision (for
dh-make-perl)? Should we change it?
 
> So to me it preferring Build.PL over Makefile.PL seems like the right 
> thing to do and would conform to the existing practice.

Joey has explained in the bug report why has chosen a different
solution.

Cheers,
gregor
-- 
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  debian gnu/linux user, admin & developer - http://www.debian.org/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    BOFH excuse #178:  short leg on process table 
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 21 Sep 2008 07:29:17 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 00:55:01 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.