Debian Bug report logs - #288806
cdbs: support for perl modules that use Module::Build

version graph

Package: cdbs; Maintainer for cdbs is CDBS Hackers <build-common-hackers@lists.alioth.debian.org>; Source for cdbs is src:cdbs.

Reported by: Jay Berkenbilt <ejb@ql.org>

Date: Wed, 5 Jan 2005 19:33:02 UTC

Severity: wishlist

Tags: confirmed

Found in versions 0.4.25-1, cdbs/0.4.32, cdbs/0.4.49

Reply or subscribe to this bug.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, ejb@ql.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Jay Berkenbilt <ejb@ql.org>:
New Bug report received and forwarded. Copy sent to ejb@ql.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Jay Berkenbilt <ejb@ql.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cdbs: support for perl modules that use Module::Build
Date: Wed, 05 Jan 2005 14:20:18 -0500
Package: cdbs
Version: 0.4.25-1
Severity: wishlist

It would be nice to see support for perl modules that use
Module::Build instead of MakeMaker.  Adding this support would not be
terribly difficult.  Instead of perl Makefile.PL, make, make test,
make install, you have perl Build.PL, ./Build, ./Build test, ./Build
install.  Also, the destdir=path flag is used to specify a destdir
rather than setting PREFIX.

I build a local package for a module that uses CPAN but don't have a
proper patch.  I fudged around it by creating a local Makefile with a
patch and just overriding the DEB_MAKEMAKER_INVOKE variable locally as

override DEB_MAKEMAKER_INVOKE = /usr/bin/perl Build.PL INSTALLDIRS=vendor

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Charles Fry <debian@frogcircus.org>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Charles Fry <debian@frogcircus.org>
To: Debian Bug Tracking System <288806@bugs.debian.org>
Subject: cdbs: Module::Build info
Date: Wed, 05 Oct 2005 13:22:49 -0400
Package: cdbs
Version: 0.4.32
Followup-For: Bug #288806

At least in my case, the only change necessary to make Module::Build
work was:

DEB_MAKEMAKER_INVOKE = /usr/bin/perl Makefile.PL installdirs=vendor \
    destdir=$(DEB_DESTDIR) noprompts=1
DEB_MAKE_INSTALL_TARGET = install

The Module::Build documentation said that destdir could be specified as
an install parameter, but I couldn't get that to work.

Charles

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable'), (70, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-386
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

cdbs depends on no packages.

Versions of packages cdbs recommends:
ii  autotools-dev                 20050803.1 Update infrastructure for config.{
ii  debhelper                     4.9.8      helper programs for debian/rules

-- no debconf information



Tags added: confirmed Request was from Peter Eisentraut <petere@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Frédéric Brière <fbriere@fbriere.net>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Frédéric Brière <fbriere@fbriere.net>
To: 288806@bugs.debian.org
Subject: Re: cdbs: support for perl modules that use Module::Build
Date: Fri, 29 Jun 2007 22:11:34 -0400
On Wed, Oct 05, 2005 at 01:22:49PM -0400, Charles Fry wrote:
> At least in my case, the only change necessary to make Module::Build
> work was:
> 
> DEB_MAKEMAKER_INVOKE = /usr/bin/perl Makefile.PL installdirs=vendor \
>     destdir=$(DEB_DESTDIR) noprompts=1
> DEB_MAKE_INSTALL_TARGET = install

My own approach was slightly different:

  DEB_MAKE_INVOKE := ./Build

  DEB_MAKE_BUILD_TARGET := build
  DEB_MAKE_INSTALL_TARGET := install --destdir $(if $(DEB_MAKEMAKER_PACKAGE),$(CURDIR)/debian/$(DEB_MAKEMAKER_PACKAGE),$(DEB_DESTDIR))

(Whether one has any advantage over the other is left as an exercise to
the reader.)

> The Module::Build documentation said that destdir could be specified as
> an install parameter, but I couldn't get that to work.

It's Module::Build::Compat, which is responsible for the Makefile legacy
support, that's crippled in that way.  ./Build supports install-time
options correctly.


-- 
Packages should build-depend on what they should build-depend.
		-- Santiago Vila on debian-devel



Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Peter Makholm <peter@makholm.net>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Peter Makholm <peter@makholm.net>
To: Debian Bug Tracking System <288806@bugs.debian.org>
Subject: cdbs: support for perl modules that use Module::Build
Date: Fri, 09 Nov 2007 11:08:28 +0000
[Message part 1 (text/plain, inline)]
Package: cdbs
Version: 0.4.49
Followup-For: Bug #288806

Just overriding DEB_MAKE_INVOKE doesn't work for me. It fails when the
makefile class tries to run $(DEB_MAKE_INVOKE) -k $(DEB_MAKE_CLEAN_TARGET)

Instead I've made the attached patch which provides native support for
Module::Build including code to detect which build system is used by
prefering Build.PL over Makefile.PL.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.18-4-xen-amd64 (SMP w/1 CPU core)
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_DK.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

cdbs depends on no packages.

Versions of packages cdbs recommends:
ii  autotools-dev                 20070725.1 Update infrastructure for config.{
ii  debhelper                     5.0.57     helper programs for debian/rules

-- no debconf information
[cdbs_module-build.patch (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Jonas Smedegaard <dr@jones.dk>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: Peter Makholm <peter@makholm.net>, 288806@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#288806: cdbs: support for perl modules that use Module::Build
Date: Fri, 09 Nov 2007 12:41:41 +0100
[Message part 1 (text/plain, inline)]
> +ifneq ($(DEB_BUILDDIR),$(DEB_SRCDIR))
> +$(error DEB_BUILDDIR and DEB_SRCDIR must be the same for Perl builds)
> +endif

If I understand Fr=C3=A9d=C3=A9ric correctly, the above restriction is no=
t
necessary when using Build directly. I haven't tested, so this is just
speculation for now...

Another thing is worrying about existing packages - do we not risk
breaking some current use of CDBS by changing this now?

If so, it might be better to check for Build.PL but instead of setting
DEB_PERL_BUILDSYSTEM only warn about it.


 - Jonas


--=20
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er n=C3=A6r: http://www.shibumi.org/eoti.htm

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Peter Makholm <peter@makholm.net>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Peter Makholm <peter@makholm.net>
To: 288806@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#288806: cdbs: support for perl modules that use Module::Build
Date: Fri, 09 Nov 2007 15:30:17 +0000
Jonas Smedegaard <dr@jones.dk> writes:

> Looks sane to me, generally. But...
>
>> +ifneq ($(DEB_BUILDDIR),$(DEB_SRCDIR))
>> +$(error DEB_BUILDDIR and DEB_SRCDIR must be the same for Perl builds)
>> +endif
>
> If I understand Fr=C3=A9d=C3=A9ric correctly, the above restriction is not
> necessary when using Build directly. I haven't tested, so this is just
> speculation for now...

Wasn't sure about this either. So I just left it in for both systems.


> Another thing is worrying about existing packages - do we not risk
> breaking some current use of CDBS by changing this now?
>
> If so, it might be better to check for Build.PL but instead of setting
> DEB_PERL_BUILDSYSTEM only warn about it.

I would really hate having a long term solution prefering a
compatability layer over using Module::Build directly. It is a problem
that you can't easily override the test som it might be preferable to
make the setting

DEB_PERL_BUILDSYSTEM ?= $(shell test -e Build.PL && echo Module::Build)
DEB_PERL_BUILDSYSTEM ?= MakeMaker

Yes, exisitng packages may fail but it is easily fixed by setting
DEB_PERL_BUILDSYSTEM to MakeMaker (or anything but Module::Build).

//Makholm




Information forwarded to debian-bugs-dist@lists.debian.org, CDBS Hackers <build-common-hackers@lists.alioth.debian.org>:
Bug#288806; Package cdbs. Full text and rfc822 format available.

Acknowledgement sent to Jonas Smedegaard <dr@jones.dk>:
Extra info received and forwarded to list. Copy sent to CDBS Hackers <build-common-hackers@lists.alioth.debian.org>. Full text and rfc822 format available.

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

From: Jonas Smedegaard <dr@jones.dk>
To: Peter Makholm <peter@makholm.net>, 288806@bugs.debian.org
Subject: Re: [Build-common-hackers] Bug#288806: Bug#288806: cdbs: support for perl modules that use Module::Build
Date: Fri, 09 Nov 2007 17:15:25 +0100
[Message part 1 (text/plain, inline)]
>> speculation for now...
>=20
> Wasn't sure about this either. So I just left it in for both systems.

Ah, ok. Makes sense :-)


>> Another thing is worrying about existing packages - do we not risk
>> breaking some current use of CDBS by changing this now?
>>
>> If so, it might be better to check for Build.PL but instead of setting=

>> DEB_PERL_BUILDSYSTEM only warn about it.
>=20
> I would really hate having a long term solution prefering a
> compatability layer over using Module::Build directly.

Agreed, but we must remain backwards compatible:

# TODO: Favor Module::Build over MakeMaker
DEB_PERL_BUILDSYSTEM ?=3D MakeMaker
$(and $(filter MakeMaker,$(DEB_PERL_BUILDSYSTEM)),$(wildcard
Build.PL),$(warning use of MakeMaker is deprecated, please set
DEB_PERL_BUILDSYSTEM=3DModule::Build)

(the last 3 lines above as a single line).

When (or if) it is some day decided to bump the cdbs ABI, we can favor
Module::Build and only use MakeMaker as fallback.


Is that acceptable?

(do my reasoning make sense at all?)

-  Jonas

--=20
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

 - Enden er n=E6r: http://www.shibumi.org/eoti.htm

[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 08:48:03 2014; Machine Name: beach.debian.org

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