diff mbox series

[1/2] host-perl-autodie: new package

Message ID 20180603081134.1933-1-fontaine.fabrice@gmail.com
State Not Applicable
Headers show
Series [1/2] host-perl-autodie: new package | expand

Commit Message

Fabrice Fontaine June 3, 2018, 8:11 a.m. UTC
Replace functions with ones that succeed or die with lexical scope

https://metacpan.org/release/autodie

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/perl-autodie/perl-autodie.hash |  6 ++++++
 package/perl-autodie/perl-autodie.mk   | 13 +++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 package/perl-autodie/perl-autodie.hash
 create mode 100644 package/perl-autodie/perl-autodie.mk

Comments

Thomas Petazzoni June 4, 2018, 9:04 p.m. UTC | #1
Hello,

On Sun,  3 Jun 2018 10:11:33 +0200, Fabrice Fontaine wrote:
> Replace functions with ones that succeed or die with lexical scope
> 
> https://metacpan.org/release/autodie
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/perl-autodie/perl-autodie.hash |  6 ++++++
>  package/perl-autodie/perl-autodie.mk   | 13 +++++++++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 package/perl-autodie/perl-autodie.hash
>  create mode 100644 package/perl-autodie/perl-autodie.mk

This series doesn't fix the problem for me. Indeed, whois seems to be
using /usr/bin/perl explicitly, so it doesn't find the perl-autodie
built by Buildroot:

>>> host-perl-autodie 2.29 Extracting
>>> host-perl-autodie 2.29 Patching
>>> host-perl-autodie 2.29 Configuring
>>> host-perl-autodie 2.29 Building
>>> host-perl-autodie 2.29 Installing to host directory
>>> whois 5.3.0 Extracting
/home/buildroot/output/host/bin/xzcat /home/buildroot/buildroot/dl/whois/whois_5.3.0.tar.xz | /home/buildroot/output/host/bin/tar --strip-components=1 -C /home/buildroot/output/build/whois-5.3.0   -xf -
>>> whois 5.3.0 Patching
>>> whois 5.3.0 Configuring
>>> whois 5.3.0 Building
PATH="/home/buildroot/output/host/bin:/home/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" /usr/bin/make -j5 CC="/home/buildroot/output/host/bin/arm-linux-gcc" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os " LIBS="" Makefile.depend whois mkpasswd -C /home/buildroot/output/build/whois-5.3.0
/home/buildroot/output/host/bin/arm-linux-gcc   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -MM -MG *.c > Makefile.depend
make[2]: 'Makefile.depend' is up to date.
/usr/bin/perl make_version_h.pl debian/changelog > version.h
/usr/bin/perl make_ip_del.pl < ip_del_list > ip_del.h
/usr/bin/perl make_ip6_del.pl < ip6_del_list > ip6_del.h
/usr/bin/perl make_as_del.pl < as_del_list > as_del.h
/usr/bin/perl make_as32_del.pl < as32_del_list > as32_del.h
Can't locate autodie.pm in @INC (you may need to install the autodie module) (@INC contains: /home/buildroot/output/host/lib/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at make_version_h.pl line 5.
BEGIN failed--compilation aborted at make_version_h.pl line 5.
make[2]: *** [Makefile:82: version.h] Error 2
make[2]: *** Deleting file 'version.h'
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [package/pkg-generic.mk:232: /home/buildroot/output/build/whois-5.3.0/.stamp_built] Error 2
make: *** [Makefile:16: _all] Error 2

The second issue that I have is I'm not sure we want to add host-perl
as a dependency of whois (and that's what your series is indirectly
doing). host-perl is a pretty heavy dependency. I see three
possibilities here:

 - Keep it as you do, with perl-autodie using the host-perl-package
   infrastructure, which means adding a host-perl dependency to the
   dependency chain of whois.

 - Implement perl-autodie like libxml-parser-perl, i.e explicitly avoid
   using host-perl-package to avoid the host-perl dependency.

 - Add a requirement on perl-autodie to be installed system-wide in
   support/dependencies/dependencies.sh, like we're already doing for a
   few other Perl packages.

Best regards,

Thomas
Fabrice Fontaine June 4, 2018, 9:34 p.m. UTC | #2
Dear Thomas,

2018-06-04 23:04 GMT+02:00 Thomas Petazzoni <thomas.petazzoni@bootlin.com>:

> Hello,
>
> On Sun,  3 Jun 2018 10:11:33 +0200, Fabrice Fontaine wrote:
> > Replace functions with ones that succeed or die with lexical scope
> >
> > https://metacpan.org/release/autodie
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> >  package/perl-autodie/perl-autodie.hash |  6 ++++++
> >  package/perl-autodie/perl-autodie.mk   | 13 +++++++++++++
> >  2 files changed, 19 insertions(+)
> >  create mode 100644 package/perl-autodie/perl-autodie.hash
> >  create mode 100644 package/perl-autodie/perl-autodie.mk
>
> This series doesn't fix the problem for me. Indeed, whois seems to be
> using /usr/bin/perl explicitly, so it doesn't find the perl-autodie
> built by Buildroot:
>
> >>> host-perl-autodie 2.29 Extracting
> >>> host-perl-autodie 2.29 Patching
> >>> host-perl-autodie 2.29 Configuring
> >>> host-perl-autodie 2.29 Building
> >>> host-perl-autodie 2.29 Installing to host directory
> >>> whois 5.3.0 Extracting
> /home/buildroot/output/host/bin/xzcat /home/buildroot/buildroot/dl/whois/whois_5.3.0.tar.xz
> | /home/buildroot/output/host/bin/tar --strip-components=1 -C
> /home/buildroot/output/build/whois-5.3.0   -xf -
> >>> whois 5.3.0 Patching
> >>> whois 5.3.0 Configuring
> >>> whois 5.3.0 Building
> PATH="/home/buildroot/output/host/bin:/home/buildroot/
> output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
> /usr/bin/make -j5 CC="/home/buildroot/output/host/bin/arm-linux-gcc"
> CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> -Os " LIBS="" Makefile.depend whois mkpasswd -C
> /home/buildroot/output/build/whois-5.3.0
> /home/buildroot/output/host/bin/arm-linux-gcc   -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -MM -MG *.c >
> Makefile.depend
> make[2]: 'Makefile.depend' is up to date.
> /usr/bin/perl make_version_h.pl debian/changelog > version.h
> /usr/bin/perl make_ip_del.pl < ip_del_list > ip_del.h
> /usr/bin/perl make_ip6_del.pl < ip6_del_list > ip6_del.h
> /usr/bin/perl make_as_del.pl < as_del_list > as_del.h
> /usr/bin/perl make_as32_del.pl < as32_del_list > as32_del.h
> Can't locate autodie.pm in @INC (you may need to install the autodie
> module) (@INC contains: /home/buildroot/output/host/lib/perl
> /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at
> make_version_h.pl line 5.
> BEGIN failed--compilation aborted at make_version_h.pl line 5.
> make[2]: *** [Makefile:82: version.h] Error 2
> make[2]: *** Deleting file 'version.h'
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [package/pkg-generic.mk:232: /home/buildroot/output/build/whois-5.3.0/.stamp_built]
> Error 2
> make: *** [Makefile:16: _all] Error 2
>
> The second issue that I have is I'm not sure we want to add host-perl
> as a dependency of whois (and that's what your series is indirectly
> doing). host-perl is a pretty heavy dependency. I see three
> possibilities here:
>
>  - Keep it as you do, with perl-autodie using the host-perl-package
>    infrastructure, which means adding a host-perl dependency to the
>    dependency chain of whois.
>
>  - Implement perl-autodie like libxml-parser-perl, i.e explicitly avoid
>    using host-perl-package to avoid the host-perl dependency.
>
>  - Add a requirement on perl-autodie to be installed system-wide in
>    support/dependencies/dependencies.sh, like we're already doing for a
>    few other Perl packages.
>
Second or third solution are definitely better than first one. Which one do
yo prefer?
Perhaps, the second option is better, I don't know if all our users run the
dependencies.sh script?

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Best Regards,

Fabrice
<div dir="ltr">Dear Thomas,<br><div class="gmail_extra"><br><div class="gmail_quote">2018-06-04 23:04 GMT+02:00 Thomas Petazzoni <span dir="ltr">&lt;<a href="mailto:thomas.petazzoni@bootlin.com" target="_blank">thomas.petazzoni@bootlin.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<span class=""><br>
On Sun,  3 Jun 2018 10:11:33 +0200, Fabrice Fontaine wrote:<br>
&gt; Replace functions with ones that succeed or die with lexical scope<br>
&gt; <br>
&gt; <a href="https://metacpan.org/release/autodie" rel="noreferrer" target="_blank">https://metacpan.org/release/<wbr>autodie</a><br>
&gt; <br>
&gt; Signed-off-by: Fabrice Fontaine &lt;<a href="mailto:fontaine.fabrice@gmail.com">fontaine.fabrice@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  package/perl-autodie/perl-<wbr>autodie.hash |  6 ++++++<br>
&gt;  package/perl-autodie/<a href="http://perl-autodie.mk" rel="noreferrer" target="_blank">perl-<wbr>autodie.mk</a>   | 13 +++++++++++++<br>
&gt;  2 files changed, 19 insertions(+)<br>
&gt;  create mode 100644 package/perl-autodie/perl-<wbr>autodie.hash<br>
&gt;  create mode 100644 package/perl-autodie/<a href="http://perl-autodie.mk" rel="noreferrer" target="_blank">perl-<wbr>autodie.mk</a><br>
<br>
</span>This series doesn&#39;t fix the problem for me. Indeed, whois seems to be<br>
using /usr/bin/perl explicitly, so it doesn&#39;t find the perl-autodie<br>
built by Buildroot:<br>
<br>
&gt;&gt;&gt; host-perl-autodie 2.29 Extracting<br>
&gt;&gt;&gt; host-perl-autodie 2.29 Patching<br>
&gt;&gt;&gt; host-perl-autodie 2.29 Configuring<br>
&gt;&gt;&gt; host-perl-autodie 2.29 Building<br>
&gt;&gt;&gt; host-perl-autodie 2.29 Installing to host directory<br>
&gt;&gt;&gt; whois 5.3.0 Extracting<br>
/home/buildroot/output/host/<wbr>bin/xzcat /home/buildroot/buildroot/dl/<wbr>whois/whois_5.3.0.tar.xz | /home/buildroot/output/host/<wbr>bin/tar --strip-components=1 -C /home/buildroot/output/build/<wbr>whois-5.3.0   -xf -<br>
&gt;&gt;&gt; whois 5.3.0 Patching<br>
&gt;&gt;&gt; whois 5.3.0 Configuring<br>
&gt;&gt;&gt; whois 5.3.0 Building<br>
PATH=&quot;/home/buildroot/output/<wbr>host/bin:/home/buildroot/<wbr>output/host/sbin:/usr/local/<wbr>sbin:/usr/local/bin:/usr/sbin:<wbr>/usr/bin:/sbin:/bin&quot; /usr/bin/make -j5 CC=&quot;/home/buildroot/output/<wbr>host/bin/arm-linux-gcc&quot; CFLAGS=&quot;-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os &quot; LIBS=&quot;&quot; Makefile.depend whois mkpasswd -C /home/buildroot/output/build/<wbr>whois-5.3.0<br>
/home/buildroot/output/host/<wbr>bin/arm-linux-gcc   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -MM -MG *.c &gt; Makefile.depend<br>
make[2]: &#39;Makefile.depend&#39; is up to date.<br>
/usr/bin/perl <a href="http://make_version_h.pl" rel="noreferrer" target="_blank">make_version_h.pl</a> debian/changelog &gt; version.h<br>
/usr/bin/perl <a href="http://make_ip_del.pl" rel="noreferrer" target="_blank">make_ip_del.pl</a> &lt; ip_del_list &gt; ip_del.h<br>
/usr/bin/perl <a href="http://make_ip6_del.pl" rel="noreferrer" target="_blank">make_ip6_del.pl</a> &lt; ip6_del_list &gt; ip6_del.h<br>
/usr/bin/perl <a href="http://make_as_del.pl" rel="noreferrer" target="_blank">make_as_del.pl</a> &lt; as_del_list &gt; as_del.h<br>
/usr/bin/perl <a href="http://make_as32_del.pl" rel="noreferrer" target="_blank">make_as32_del.pl</a> &lt; as32_del_list &gt; as32_del.h<br>
Can&#39;t locate <a href="http://autodie.pm" rel="noreferrer" target="_blank">autodie.pm</a> in @INC (you may need to install the autodie module) (@INC contains: /home/buildroot/output/host/<wbr>lib/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at <a href="http://make_version_h.pl" rel="noreferrer" target="_blank">make_version_h.pl</a> line 5.<br>
BEGIN failed--compilation aborted at <a href="http://make_version_h.pl" rel="noreferrer" target="_blank">make_version_h.pl</a> line 5.<br>
make[2]: *** [Makefile:82: version.h] Error 2<br>
make[2]: *** Deleting file &#39;version.h&#39;<br>
make[2]: *** Waiting for unfinished jobs....<br>
make[1]: *** [package/<a href="http://pkg-generic.mk:232" rel="noreferrer" target="_blank">pkg-generic.mk:232</a>: /home/buildroot/output/build/<wbr>whois-5.3.0/.stamp_built] Error 2<br>
make: *** [Makefile:16: _all] Error 2<br>
<br>
The second issue that I have is I&#39;m not sure we want to add host-perl<br>
as a dependency of whois (and that&#39;s what your series is indirectly<br>
doing). host-perl is a pretty heavy dependency. I see three<br>
possibilities here:<br>
<br>
 - Keep it as you do, with perl-autodie using the host-perl-package<br>
   infrastructure, which means adding a host-perl dependency to the<br>
   dependency chain of whois.<br>
<br>
 - Implement perl-autodie like libxml-parser-perl, i.e explicitly avoid<br>
   using host-perl-package to avoid the host-perl dependency.<br>
<br>
 - Add a requirement on perl-autodie to be installed system-wide in<br>
   support/dependencies/<wbr>dependencies.sh, like we&#39;re already doing for a<br>
   few other Perl packages.<br></blockquote>Second or third solution are definitely better than first one. Which one do yo prefer?<br>Perhaps, the second option is better, I don&#39;t know if all our users run the dependencies.sh script?<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best regards,<br>
<br>
Thomas<br>
<span class="HOEnZb"><font color="#888888">-- <br>
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)<br>
Embedded Linux and Kernel engineering<br>
<a href="https://bootlin.com" rel="noreferrer" target="_blank">https://bootlin.com</a><br>
</font></span></blockquote></div>Best Regards,<br><br></div><div class="gmail_extra">Fabrice<br></div></div>
Thomas Petazzoni June 4, 2018, 9:46 p.m. UTC | #3
Hello,

On Mon, 4 Jun 2018 23:34:34 +0200, Fabrice Fontaine wrote:

> Second or third solution are definitely better than first one. Which one do
> yo prefer?
> Perhaps, the second option is better, I don't know if all our users run the
> dependencies.sh script?

dependencies.sh is run by Buildroot at the beginning of every build,
and if it fails to find a required dependency, the build doesn't even
start.

Best regards,

Thomas
diff mbox series

Patch

diff --git a/package/perl-autodie/perl-autodie.hash b/package/perl-autodie/perl-autodie.hash
new file mode 100644
index 0000000000..7eb157c73a
--- /dev/null
+++ b/package/perl-autodie/perl-autodie.hash
@@ -0,0 +1,6 @@ 
+# retrieved by scancpan from http://cpan.metacpan.org/
+md5    2739e6599a2aa47601fe91b2a27b29d9 autodie-2.29.tar.gz
+sha256 f5b77917e7004179c93ff8511c8a4c1ea19df3da6379f78b55b57791c45229bf autodie-2.29.tar.gz
+
+# computed by scancpan
+sha256 d03cbb6193f7c27bcdce8464624624275cdbde207a94896c4ebb3bac1f9f5c5c LICENSE
diff --git a/package/perl-autodie/perl-autodie.mk b/package/perl-autodie/perl-autodie.mk
new file mode 100644
index 0000000000..dbe458854b
--- /dev/null
+++ b/package/perl-autodie/perl-autodie.mk
@@ -0,0 +1,13 @@ 
+################################################################################
+#
+# perl-autodie
+#
+################################################################################
+
+PERL_AUTODIE_VERSION = 2.29
+PERL_AUTODIE_SOURCE = autodie-$(PERL_AUTODIE_VERSION).tar.gz
+PERL_AUTODIE_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PJ/PJF
+PERL_AUTODIE_LICENSE = Artistic or GPL-1.0+
+PERL_AUTODIE_LICENSE_FILES = LICENSE
+
+$(eval $(host-perl-package))