* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-21 19:44 ` Junio C Hamano
@ 2009-09-21 19:54 ` Craig Taylor
2009-09-22 11:13 ` Craig Taylor
` (2 subsequent siblings)
3 siblings, 0 replies; 22+ messages in thread
From: Craig Taylor @ 2009-09-21 19:54 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brandon Casey, git
On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
> Craig Taylor <c@gryning.com> writes:
>
> > Exactly as you describe here, different paths but same goal.
> > All binaries follow the DESTDIR path except the perl modules.
> >
> > To register this as a bug do I need to do more than send this email?
>
> Do you use NO_PERL_MAKEMAKER in your build?
>
> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
> this issue, but if you do, perhaps you can try this patch and report how
> well it works for you.
>
> ---
> perl/Makefile | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/perl/Makefile b/perl/Makefile
> index e3dd1a5..4ab21d6 100644
> --- a/perl/Makefile
> +++ b/perl/Makefile
> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
> echo install: >> $@
> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> echo instlibdir: >> $@
> echo ' echo $(instdir_SQ)' >> $@
> else
I have 2 perl environments available to me on the system (at home now so
can't dig further).
Both can pretty stripped which can make thing "challenging" it's
possible ExtUtils::MakeMaker doesn't even exist.
Please everyone who is looking at this thread let it sleep for 24h and I
shall test further/revive it tomorrow.
Many thanks
CraigT
--
c^ [c%5e]
Learn first whatever hardship you may have to endure is but temporary
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-21 19:44 ` Junio C Hamano
2009-09-21 19:54 ` Craig Taylor
@ 2009-09-22 11:13 ` Craig Taylor
2009-09-22 11:31 ` Craig Taylor
2009-09-22 11:55 ` install does not obey DESTDIR or --prefix for perl modules c^
3 siblings, 0 replies; 22+ messages in thread
From: Craig Taylor @ 2009-09-22 11:13 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brandon Casey, git
On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
> Craig Taylor <c@gryning.com> writes:
>
> > Exactly as you describe here, different paths but same goal.
> > All binaries follow the DESTDIR path except the perl modules.
> >
> > To register this as a bug do I need to do more than send this email?
>
> Do you use NO_PERL_MAKEMAKER in your build?
>
> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
> this issue, but if you do, perhaps you can try this patch and report how
> well it works for you.
>
> ---
> perl/Makefile | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/perl/Makefile b/perl/Makefile
> index e3dd1a5..4ab21d6 100644
> --- a/perl/Makefile
> +++ b/perl/Makefile
> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
> echo install: >> $@
> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> echo instlibdir: >> $@
> echo ' echo $(instdir_SQ)' >> $@
> else
ExtUtils::MakeMaker is available and I am using it.
The problem seems to be in the generated perl.mak.
On line 1652 of my git-1.6.4.3/Makefile
$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
I see that it is passing DESTDIR to the makefile in git-1.6.4.3/perl.
However, the DESTDIR variable is not seemingly included in perl/perl.mak for
use by the perl/Makefile. It is all absolute paths which I think is the
main cause.
I have manually manipulated the perl.mak file and install works fine.
I'm just updating my build area to 1.6.4.4 and then will try something
more permanent. However I am moving outside my knowldge of 'make' now so
may request assistance later ;)
CraigT
--
c^ [c%5e]
Never talk about your knowledge, it might make it disappear.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-21 19:44 ` Junio C Hamano
2009-09-21 19:54 ` Craig Taylor
2009-09-22 11:13 ` Craig Taylor
@ 2009-09-22 11:31 ` Craig Taylor
2009-09-22 14:52 ` Brandon Casey
2009-09-22 11:55 ` install does not obey DESTDIR or --prefix for perl modules c^
3 siblings, 1 reply; 22+ messages in thread
From: Craig Taylor @ 2009-09-22 11:31 UTC (permalink / raw)
To: git
On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
> Craig Taylor <c@gryning.com> writes:
>
> > Exactly as you describe here, different paths but same goal.
> > All binaries follow the DESTDIR path except the perl modules.
> >
> > To register this as a bug do I need to do more than send this email?
>
> Do you use NO_PERL_MAKEMAKER in your build?
>
> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
> this issue, but if you do, perhaps you can try this patch and report how
> well it works for you.
>
> ---
> perl/Makefile | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/perl/Makefile b/perl/Makefile
> index e3dd1a5..4ab21d6 100644
> --- a/perl/Makefile
> +++ b/perl/Makefile
> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
> echo install: >> $@
> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> echo instlibdir: >> $@
> echo ' echo $(instdir_SQ)' >> $@
> else
Further to my last email, modifying the perl.mak file as below resolves
the problem for me to a satisfactory level.
I will have to leave a more permanent solution to someone more familar with
make/makemaker.
--- git-1.6.4.4/perl/perl.mak_to20090922 2009-09-22 12:07:18.000000000 +0100
+++ git-1.6.4.4/perl/perl.mak 2009-09-22 12:21:17.791887000 +0100
@@ -57,7 +57,7 @@
INST_LIB = blib/lib
INST_ARCHLIB = blib/arch
INST_SCRIPT = blib/script
-PREFIX = /usr/local/git-1.6.4.4
+PREFIX = $(DESTDIR)/usr/local/git-1.6.4.4
INSTALLDIRS = site
INSTALLPRIVLIB = $(PREFIX)/lib/5.6.1
INSTALLARCHLIB = $(PREFIX)/lib/5.6.1/sun4-solaris
Many thanks...
CraigT
--
c^ [c%5e]
Failure is natural.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-22 11:31 ` Craig Taylor
@ 2009-09-22 14:52 ` Brandon Casey
2009-09-22 15:21 ` Brandon Casey
2009-09-22 16:29 ` Junio C Hamano
0 siblings, 2 replies; 22+ messages in thread
From: Brandon Casey @ 2009-09-22 14:52 UTC (permalink / raw)
To: c; +Cc: git
Craig Taylor wrote:
> On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
>> Craig Taylor <c@gryning.com> writes:
>>
>>> Exactly as you describe here, different paths but same goal.
>>> All binaries follow the DESTDIR path except the perl modules.
>>>
>>> To register this as a bug do I need to do more than send this email?
>> Do you use NO_PERL_MAKEMAKER in your build?
>>
>> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
>> this issue, but if you do, perhaps you can try this patch and report how
>> well it works for you.
>>
>> ---
>> perl/Makefile | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/perl/Makefile b/perl/Makefile
>> index e3dd1a5..4ab21d6 100644
>> --- a/perl/Makefile
>> +++ b/perl/Makefile
>> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
>> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
>> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
>> echo install: >> $@
>> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
>> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
>> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
>> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
>> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
>> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
>> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
>> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
>> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
>> echo instlibdir: >> $@
>> echo ' echo $(instdir_SQ)' >> $@
>> else
>
>
> Further to my last email, modifying the perl.mak file as below resolves
> the problem for me to a satisfactory level.
> I will have to leave a more permanent solution to someone more familar with
> make/makemaker.
>
> --- git-1.6.4.4/perl/perl.mak_to20090922 2009-09-22 12:07:18.000000000 +0100
> +++ git-1.6.4.4/perl/perl.mak 2009-09-22 12:21:17.791887000 +0100
> @@ -57,7 +57,7 @@
> INST_LIB = blib/lib
> INST_ARCHLIB = blib/arch
> INST_SCRIPT = blib/script
> -PREFIX = /usr/local/git-1.6.4.4
> +PREFIX = $(DESTDIR)/usr/local/git-1.6.4.4
> INSTALLDIRS = site
> INSTALLPRIVLIB = $(PREFIX)/lib/5.6.1
> INSTALLARCHLIB = $(PREFIX)/lib/5.6.1/sun4-solaris
I have not been able to reproduce your problem on Solaris. The DESTDIR
feature is working for me.
Possibly it is related to the version of MakeMaker? I am using version
6.17 (Revision: 1.133) along with Perl 5.8.4 on Solaris 10 x86. The
MakeMaker version should be in the header at the top of the perl.mak
file.
The perl.mak snippet that you provided above looks different than mine.
In mine, in the vicinity of the 'PREFIX = ' line I also have a
'DESTDIR = ' line. The right hand side of 'DESTDIR = ' is empty even
when I specify a DESTDIR on the make command line.
Here's a snippet from my perl.mak file:
DESTDIR =
PREFIX = /usr/local/git-1.6.4.4
PERLPREFIX = $(PREFIX)
SITEPREFIX = $(PREFIX)
VENDORPREFIX = $(PREFIX)
INSTALLPRIVLIB = $(PERLPREFIX)/lib
DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
INSTALLSITELIB = $(SITEPREFIX)/lib/site_perl
DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
INSTALLVENDORLIB = $(VENDORPREFIX)/lib
DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
INSTALLARCHLIB = $(PERLPREFIX)/lib/i86pc-solaris-64int
DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
Notice the variable assignments that begin with 'DEST'. Does your
perl.mak file have those? If not, then it seems MakeMaker is not
producing them for some reason.
Did you try Junio's patch? If the version of MakeMaker is the problem,
then perhaps setting NO_PERL_MAKER=1 on the make command line along
with Junio's patch is the best way forward for you.
-brandon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-22 14:52 ` Brandon Casey
@ 2009-09-22 15:21 ` Brandon Casey
2009-09-22 16:29 ` Junio C Hamano
1 sibling, 0 replies; 22+ messages in thread
From: Brandon Casey @ 2009-09-22 15:21 UTC (permalink / raw)
To: c; +Cc: git
Brandon Casey wrote:
> Did you try Junio's patch? If the version of MakeMaker is the problem,
> then perhaps setting NO_PERL_MAKER=1 on the make command line along
^^^^^^^^^^^^^
Should be NO_PERL_MAKEMAKER=1
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-22 14:52 ` Brandon Casey
2009-09-22 15:21 ` Brandon Casey
@ 2009-09-22 16:29 ` Junio C Hamano
2009-09-24 18:02 ` [PATCH] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR Brandon Casey
1 sibling, 1 reply; 22+ messages in thread
From: Junio C Hamano @ 2009-09-22 16:29 UTC (permalink / raw)
To: Brandon Casey; +Cc: c, git
Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:
> Possibly it is related to the version of MakeMaker? I am using version
> 6.17 (Revision: 1.133) along with Perl 5.8.4 on Solaris 10 x86. The
> MakeMaker version should be in the header at the top of the perl.mak
> file.
I think that is it. DESTDIR support in MakeMaker seems to be lacking in
medieval versions of Perl. It appears that it started being usable at
around its 6.11 (and 6.17 you have is fine).
http://kobesearch.cpan.org/htdocs/ExtUtils-MakeMaker/Changes.html
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6131#c7
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
2009-09-22 16:29 ` Junio C Hamano
@ 2009-09-24 18:02 ` Brandon Casey
2009-09-24 18:21 ` [PATCH v2] " Brandon Casey
0 siblings, 1 reply; 22+ messages in thread
From: Brandon Casey @ 2009-09-24 18:02 UTC (permalink / raw)
To: gitster; +Cc: git, c, Brandon Casey
From: Brandon Casey <drafnel@gmail.com>
It appears that ExtUtils::MakeMaker versions older than 6.11 do not
implement the DESTDIR mechanism. So add a test to the generated perl.mak
to detect when DESTDIR is used along with a too old ExtUtils::MakeMaker and
abort with a message suggesting the use of NO_PERL_MAKEMAKER.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
Junio C Hamano wrote:
> Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:
>
>> Possibly it is related to the version of MakeMaker? I am using version
>> 6.17 (Revision: 1.133) along with Perl 5.8.4 on Solaris 10 x86. The
>> MakeMaker version should be in the header at the top of the perl.mak
>> file.
>
> I think that is it. DESTDIR support in MakeMaker seems to be lacking in
> medieval versions of Perl. It appears that it started being usable at
> around its 6.11 (and 6.17 you have is fine).
>
> http://kobesearch.cpan.org/htdocs/ExtUtils-MakeMaker/Changes.html
> https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6131#c7
How about something like this?
Seems to work correctly for me on IRIX 6.5 and Solaris 7 with
ExtUtils::MakeMaker 6.03.
-brandon
perl/Makefile.PL | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 320253e..8974015 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -5,6 +5,14 @@ sub MY::postamble {
instlibdir:
@echo '$(INSTALLSITELIB)'
+ifneq (,$(DESTDIR))
+ifeq (1,$(shell expr '$(MM_VERSION)' '<' 6.11))
+$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
+ is likely incompatible with the DESTDIR mechanism. Try setting \
+ NO_PERL_MAKEMAKER=1 instead)
+endif
+endif
+
MAKE_FRAG
}
--
1.6.4.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
2009-09-24 18:02 ` [PATCH] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR Brandon Casey
@ 2009-09-24 18:21 ` Brandon Casey
2009-10-08 13:21 ` Johannes Sixt
0 siblings, 1 reply; 22+ messages in thread
From: Brandon Casey @ 2009-09-24 18:21 UTC (permalink / raw)
To: gitster; +Cc: git, c, Brandon Casey
From: Brandon Casey <drafnel@gmail.com>
It appears that ExtUtils::MakeMaker versions older than 6.11 do not
implement the DESTDIR mechanism. So add a test to the generated perl.mak
to detect when DESTDIR is used along with a too old ExtUtils::MakeMaker and
abort with a message suggesting the use of NO_PERL_MAKEMAKER.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
This just reverses the logic in the test on $(MM_VERSION) so that the test
will also fail if MM_VERSION is unset. Who knows if ancient versions set
it. Sorry for the quick v2.
-brandon
perl/Makefile.PL | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 320253e..0b9deca 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -5,6 +5,14 @@ sub MY::postamble {
instlibdir:
@echo '$(INSTALLSITELIB)'
+ifneq (,$(DESTDIR))
+ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
+$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
+ is likely incompatible with the DESTDIR mechanism. Try setting \
+ NO_PERL_MAKEMAKER=1 instead)
+endif
+endif
+
MAKE_FRAG
}
--
1.6.4.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v2] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
2009-09-24 18:21 ` [PATCH v2] " Brandon Casey
@ 2009-10-08 13:21 ` Johannes Sixt
2009-10-08 13:34 ` Brandon Casey
0 siblings, 1 reply; 22+ messages in thread
From: Johannes Sixt @ 2009-10-08 13:21 UTC (permalink / raw)
To: Brandon Casey; +Cc: gitster, git, c, Brandon Casey
Brandon Casey schrieb:
> From: Brandon Casey <drafnel@gmail.com>
>
> It appears that ExtUtils::MakeMaker versions older than 6.11 do not
> implement the DESTDIR mechanism. So add a test to the generated perl.mak
> to detect when DESTDIR is used along with a too old ExtUtils::MakeMaker and
> abort with a message suggesting the use of NO_PERL_MAKEMAKER.
>
> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
> ---
>
>
> This just reverses the logic in the test on $(MM_VERSION) so that the test
> will also fail if MM_VERSION is unset. Who knows if ancient versions set
> it. Sorry for the quick v2.
>
> -brandon
>
>
> perl/Makefile.PL | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/perl/Makefile.PL b/perl/Makefile.PL
> index 320253e..0b9deca 100644
> --- a/perl/Makefile.PL
> +++ b/perl/Makefile.PL
> @@ -5,6 +5,14 @@ sub MY::postamble {
> instlibdir:
> @echo '$(INSTALLSITELIB)'
>
> +ifneq (,$(DESTDIR))
> +ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
I don't think the test works as intended, because 6.2 *is* greater than
6.10 (aka 6.1).
(Found while staring at git diff v1.6.5-rc2..v1.6.5-rc3 in a spare minute.)
> +$(error ExtUtils::MakeMaker version "$(MM_VERSION)" is older than 6.11 and so \
> + is likely incompatible with the DESTDIR mechanism. Try setting \
> + NO_PERL_MAKEMAKER=1 instead)
> +endif
> +endif
> +
> MAKE_FRAG
> }
-- Hannes
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
2009-10-08 13:21 ` Johannes Sixt
@ 2009-10-08 13:34 ` Brandon Casey
2009-10-08 16:58 ` Brandon Casey
0 siblings, 1 reply; 22+ messages in thread
From: Brandon Casey @ 2009-10-08 13:34 UTC (permalink / raw)
To: Johannes Sixt; +Cc: gitster, git, c, Brandon Casey
Johannes Sixt wrote:
> Brandon Casey schrieb:
>> From: Brandon Casey <drafnel@gmail.com>
>>
>> It appears that ExtUtils::MakeMaker versions older than 6.11 do not
>> implement the DESTDIR mechanism. So add a test to the generated perl.mak
>> to detect when DESTDIR is used along with a too old ExtUtils::MakeMaker and
>> abort with a message suggesting the use of NO_PERL_MAKEMAKER.
>>
>> Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
>> ---
>>
>>
>> This just reverses the logic in the test on $(MM_VERSION) so that the test
>> will also fail if MM_VERSION is unset. Who knows if ancient versions set
>> it. Sorry for the quick v2.
>>
>> -brandon
>>
>>
>> perl/Makefile.PL | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/perl/Makefile.PL b/perl/Makefile.PL
>> index 320253e..0b9deca 100644
>> --- a/perl/Makefile.PL
>> +++ b/perl/Makefile.PL
>> @@ -5,6 +5,14 @@ sub MY::postamble {
>> instlibdir:
>> @echo '$(INSTALLSITELIB)'
>>
>> +ifneq (,$(DESTDIR))
>> +ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
>
> I don't think the test works as intended, because 6.2 *is* greater than
> 6.10 (aka 6.1).
Hmm... I think you're right.
-brandon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2] perl/Makefile.PL: detect MakeMaker versions incompatible with DESTDIR
2009-10-08 13:34 ` Brandon Casey
@ 2009-10-08 16:58 ` Brandon Casey
2009-10-09 6:51 ` Junio C Hamano
0 siblings, 1 reply; 22+ messages in thread
From: Brandon Casey @ 2009-10-08 16:58 UTC (permalink / raw)
To: Johannes Sixt; +Cc: gitster, git, c, Brandon Casey
Brandon Casey wrote:
> Johannes Sixt wrote:
>> Brandon Casey schrieb:
>>> diff --git a/perl/Makefile.PL b/perl/Makefile.PL
>>> index 320253e..0b9deca 100644
>>> --- a/perl/Makefile.PL
>>> +++ b/perl/Makefile.PL
>>> @@ -5,6 +5,14 @@ sub MY::postamble {
>>> instlibdir:
>>> @echo '$(INSTALLSITELIB)'
>>>
>>> +ifneq (,$(DESTDIR))
>>> +ifeq (0,$(shell expr '$(MM_VERSION)' '>' 6.10))
>> I don't think the test works as intended, because 6.2 *is* greater than
>> 6.10 (aka 6.1).
>
> Hmm... I think you're right.
I think we're safe. Looks like the MakeMaker folks have always used two
digits for the minor number. So version 6.2 was written like 6.02.
Here's their repo:
git://github.com/schwern/extutils-makemaker.git
git log -p -- lib/ExtUtils/MakeMaker.pm | grep -- '$VERSION = ' | less
I didn't search exhaustively, but I think all of 6.X has two digit minor
numbers, which means all versions should compare correctly since 5.X will
always compare less than 6.X and 7.X will be greater, etc.
-brandon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-21 19:44 ` Junio C Hamano
` (2 preceding siblings ...)
2009-09-22 11:31 ` Craig Taylor
@ 2009-09-22 11:55 ` c^
2009-09-22 15:16 ` Brandon Casey
3 siblings, 1 reply; 22+ messages in thread
From: c^ @ 2009-09-22 11:55 UTC (permalink / raw)
To: git
On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
> Craig Taylor <c@gryning.com> writes:
>
> > Exactly as you describe here, different paths but same goal.
> > All binaries follow the DESTDIR path except the perl modules.
> >
> > To register this as a bug do I need to do more than send this email?
>
> Do you use NO_PERL_MAKEMAKER in your build?
>
> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
> this issue, but if you do, perhaps you can try this patch and report how
> well it works for you.
>
> ---
> perl/Makefile | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/perl/Makefile b/perl/Makefile
> index e3dd1a5..4ab21d6 100644
> --- a/perl/Makefile
> +++ b/perl/Makefile
> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
> echo install: >> $@
> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
> echo instlibdir: >> $@
> echo ' echo $(instdir_SQ)' >> $@
> else
Frustratingly the last change forces the lib referenced in the perl
scripts to include the DESTDIR.
I will work around this for now, but would apprieciate it if someone
more familair could fix for the future.
CraigT
--
c^ [c%5e]
Failure is natural.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: install does not obey DESTDIR or --prefix for perl modules
2009-09-22 11:55 ` install does not obey DESTDIR or --prefix for perl modules c^
@ 2009-09-22 15:16 ` Brandon Casey
0 siblings, 0 replies; 22+ messages in thread
From: Brandon Casey @ 2009-09-22 15:16 UTC (permalink / raw)
To: c; +Cc: git, Junio C Hamano
c^ wrote:
> On Mon, Sep 21, 2009 at 12:44:05PM -0700, Junio C Hamano wrote:
>> Craig Taylor <c@gryning.com> writes:
>>
>>> Exactly as you describe here, different paths but same goal.
>>> All binaries follow the DESTDIR path except the perl modules.
>>>
>>> To register this as a bug do I need to do more than send this email?
>> Do you use NO_PERL_MAKEMAKER in your build?
>>
>> If not, we need to summon an expert on ExtUtils::MakeMaker to look into
>> this issue, but if you do, perhaps you can try this patch and report how
>> well it works for you.
>>
>> ---
>> perl/Makefile | 8 ++++----
>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/perl/Makefile b/perl/Makefile
>> index e3dd1a5..4ab21d6 100644
>> --- a/perl/Makefile
>> +++ b/perl/Makefile
>> @@ -29,11 +29,11 @@ $(makfile): ../GIT-CFLAGS Makefile
>> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
>> echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
>> echo install: >> $@
>> - echo ' mkdir -p "$(instdir_SQ)"' >> $@
>> - echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
>> - echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
>> + echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
>> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
>> + echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
>> '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
>> - echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
>> + echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
>> echo instlibdir: >> $@
>> echo ' echo $(instdir_SQ)' >> $@
>> else
>
> Frustratingly the last change forces the lib referenced in the perl
> scripts to include the DESTDIR.
> I will work around this for now, but would apprieciate it if someone
> more familair could fix for the future.
Craig, you're referring to _your_ last change where you hand modified the
perl.mak file so that the 'PREFIX =' line contained $(DESTDIR) right? And
not something in the above patch?
Junio, your patch looks good and seems to work for me.
-brandon
ps. Craig, it's best to hit 'Reply-All' when replying so that everyone is kept
in the cc list. People often filter their mail based on the 'To:' and 'cc:'
fields and are more likely to notice mail that includes their address in one
of those fields. I added Junio back to this reply.
^ permalink raw reply [flat|nested] 22+ messages in thread