* [PATCH] perl: reorder tar arguments in do_install_ptest()
@ 2016-05-28 11:53 Renato Caldas
2016-05-30 13:04 ` [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Renato Caldas @ 2016-05-28 11:53 UTC (permalink / raw)
To: openembedded-core
On some distributions tar requires the FILE argument to be the last, and
the existing order was causing the subsequent --exclude options to be dropped.
Fixes [YOCTO #9673].
Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
---
meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index 948ea7c..66c5355 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -7,8 +7,8 @@ do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
+ --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
--
2.8.3
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-05-28 11:53 [PATCH] perl: reorder tar arguments in do_install_ptest() Renato Caldas
@ 2016-05-30 13:04 ` Enrico Jorns
2016-05-31 11:35 ` Renato Caldas
2016-05-30 20:11 ` [PATCH] perl: reorder tar arguments in do_install_ptest() Aníbal Limón
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Enrico Jorns @ 2016-05-30 13:04 UTC (permalink / raw)
To: openembedded-core
With tar version 1.29, the tar call used to copy the ptest files will
not work anymore. While the call did not match the man page (but worked)
before, anyway, the latest update of tar seems to have a more strict argument
handling.
With the current version of the tar call, the copying of files still
works with latest tar version, but the excludes will not be handled
properly anymore.
This results in having binaries compiled with host GCC in the package.
When doing the strip_and_split files in do_package() with the target
objcopy, bitbake will fail with this error:
ERROR: objcopy failed with exit code 256 (cmd was [...])
[...]
File format not recognized
Thus, the current argument issues and required changes are:
* Options must be placed _before_ the pathnames.
* --exclude must be followd by a '=' in order to work properly
* 'f' options is for providing an archive file, which is unnecessary in
this case
Note that this could also be a candidate for backporting.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
I just wanted to send my patch when I saw you had already send it. Will send
this one instead as I added some more changes that might be useful. Maybe we
can squash this into yours if its found to be useful, too.
Best regards, Enrico
meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
index 948ea7c..5f0989f 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -7,8 +7,8 @@ do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
--
2.8.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] perl: reorder tar arguments in do_install_ptest()
2016-05-28 11:53 [PATCH] perl: reorder tar arguments in do_install_ptest() Renato Caldas
2016-05-30 13:04 ` [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
@ 2016-05-30 20:11 ` Aníbal Limón
2016-05-30 20:39 ` Renato Caldas
2016-06-29 8:54 ` [PATCH][krogoth] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
2016-06-29 8:54 ` [PATCH][jethro] " Enrico Jorns
3 siblings, 1 reply; 12+ messages in thread
From: Aníbal Limón @ 2016-05-30 20:11 UTC (permalink / raw)
To: Renato Caldas, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]
Hi Renato,
I tested the patch and works very well.
Could you sent another patch with [krogoth] prefix to be backported?
Thanks a lot,
alimon
On 05/28/2016 06:53 AM, Renato Caldas wrote:
> On some distributions tar requires the FILE argument to be the last, and
> the existing order was causing the subsequent --exclude options to be dropped.
>
> Fixes [YOCTO #9673].
>
> Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
> ---
> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
> index 948ea7c..66c5355 100644
> --- a/meta/recipes-devtools/perl/perl-ptest.inc
> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
> @@ -7,8 +7,8 @@ do_install_ptest () {
> mkdir -p ${D}${PTEST_PATH}
> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
> + tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
> + --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
>
> sed -i -e "s,${D},,g" \
> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl: reorder tar arguments in do_install_ptest()
2016-05-30 20:11 ` [PATCH] perl: reorder tar arguments in do_install_ptest() Aníbal Limón
@ 2016-05-30 20:39 ` Renato Caldas
2016-05-30 21:06 ` Aníbal Limón
0 siblings, 1 reply; 12+ messages in thread
From: Renato Caldas @ 2016-05-30 20:39 UTC (permalink / raw)
To: Aníbal Limón; +Cc: openembedded-core
Hi Aníbal,
Sorry but I'm still a bit unfamiliar with the yocto workflow, should I
resubmit exact same patch with the [krogoth] prefix added, or should I
change the commit message in any way? It applies cleanly to both
master and krogoth.
Cheers,
Renato
2016-05-30 21:11 GMT+01:00 Aníbal Limón <anibal.limon@linux.intel.com>:
> Hi Renato,
>
> I tested the patch and works very well.
> Could you sent another patch with [krogoth] prefix to be backported?
>
> Thanks a lot,
> alimon
>
>
> On 05/28/2016 06:53 AM, Renato Caldas wrote:
>> On some distributions tar requires the FILE argument to be the last, and
>> the existing order was causing the subsequent --exclude options to be dropped.
>>
>> Fixes [YOCTO #9673].
>>
>> Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
> Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
>> ---
>> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
>> index 948ea7c..66c5355 100644
>> --- a/meta/recipes-devtools/perl/perl-ptest.inc
>> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
>> @@ -7,8 +7,8 @@ do_install_ptest () {
>> mkdir -p ${D}${PTEST_PATH}
>> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
>> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
>> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
>> + tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>> + --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>
>> sed -i -e "s,${D},,g" \
>> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl: reorder tar arguments in do_install_ptest()
2016-05-30 20:39 ` Renato Caldas
@ 2016-05-30 21:06 ` Aníbal Limón
2016-05-30 21:17 ` Aníbal Limón
0 siblings, 1 reply; 12+ messages in thread
From: Aníbal Limón @ 2016-05-30 21:06 UTC (permalink / raw)
To: Renato Caldas; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2428 bytes --]
On 05/30/2016 03:39 PM, Renato Caldas wrote:
> Hi Aníbal,
>
> Sorry but I'm still a bit unfamiliar with the yocto workflow, should I
> resubmit exact same patch with the [krogoth] prefix added, or should I
> change the commit message in any way? It applies cleanly to both
> master and krogoth.
You need to send two patches one with [krogoth] prefix and another
without it for master.
Also is a good practice to cc the maintainer of the release [krogoth]
release, since the 2.1 release was a little time ago i don't know who is
the current maintainer sorry.
Cheers,
alimon
>
> Cheers,
> Renato
>
> 2016-05-30 21:11 GMT+01:00 Aníbal Limón <anibal.limon@linux.intel.com>:
>> Hi Renato,
>>
>> I tested the patch and works very well.
>> Could you sent another patch with [krogoth] prefix to be backported?
>>
>> Thanks a lot,
>> alimon
>>
>>
>> On 05/28/2016 06:53 AM, Renato Caldas wrote:
>>> On some distributions tar requires the FILE argument to be the last, and
>>> the existing order was causing the subsequent --exclude options to be dropped.
>>>
>>> Fixes [YOCTO #9673].
>>>
>>> Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
>> Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
>>> ---
>>> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
>>> index 948ea7c..66c5355 100644
>>> --- a/meta/recipes-devtools/perl/perl-ptest.inc
>>> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
>>> @@ -7,8 +7,8 @@ do_install_ptest () {
>>> mkdir -p ${D}${PTEST_PATH}
>>> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
>>> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
>>> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>> + tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>> + --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>>
>>> sed -i -e "s,${D},,g" \
>>> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
>>>
>>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl: reorder tar arguments in do_install_ptest()
2016-05-30 21:06 ` Aníbal Limón
@ 2016-05-30 21:17 ` Aníbal Limón
2016-05-30 21:35 ` Renato Caldas
0 siblings, 1 reply; 12+ messages in thread
From: Aníbal Limón @ 2016-05-30 21:17 UTC (permalink / raw)
To: Renato Caldas; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]
On 05/30/2016 04:06 PM, Aníbal Limón wrote:
>
>
> On 05/30/2016 03:39 PM, Renato Caldas wrote:
>> Hi Aníbal,
>>
>> Sorry but I'm still a bit unfamiliar with the yocto workflow, should I
>> resubmit exact same patch with the [krogoth] prefix added, or should I
>> change the commit message in any way? It applies cleanly to both
>> master and krogoth.
>
> You need to send two patches one with [krogoth] prefix and another
> without it for master.
>
> Also is a good practice to cc the maintainer of the release [krogoth]
> release, since the 2.1 release was a little time ago i don't know who is
> the current maintainer sorry.
Reviewing this wiki [1] the maintainer for krogoth is Armin Kuster
<akuster@mvista.com>.
[1] https://wiki.yoctoproject.org/wiki/Releases
>
> Cheers,
> alimon
>
>
>>
>> Cheers,
>> Renato
>>
>> 2016-05-30 21:11 GMT+01:00 Aníbal Limón <anibal.limon@linux.intel.com>:
>>> Hi Renato,
>>>
>>> I tested the patch and works very well.
>>> Could you sent another patch with [krogoth] prefix to be backported?
>>>
>>> Thanks a lot,
>>> alimon
>>>
>>>
>>> On 05/28/2016 06:53 AM, Renato Caldas wrote:
>>>> On some distributions tar requires the FILE argument to be the last, and
>>>> the existing order was causing the subsequent --exclude options to be dropped.
>>>>
>>>> Fixes [YOCTO #9673].
>>>>
>>>> Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
>>> Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
>>>> ---
>>>> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
>>>> index 948ea7c..66c5355 100644
>>>> --- a/meta/recipes-devtools/perl/perl-ptest.inc
>>>> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
>>>> @@ -7,8 +7,8 @@ do_install_ptest () {
>>>> mkdir -p ${D}${PTEST_PATH}
>>>> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
>>>> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
>>>> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>>> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>>> + tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>>> + --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>>>
>>>> sed -i -e "s,${D},,g" \
>>>> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
>>>>
>>>
>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl: reorder tar arguments in do_install_ptest()
2016-05-30 21:17 ` Aníbal Limón
@ 2016-05-30 21:35 ` Renato Caldas
0 siblings, 0 replies; 12+ messages in thread
From: Renato Caldas @ 2016-05-30 21:35 UTC (permalink / raw)
To: Aníbal Limón; +Cc: openembedded-core
2016-05-30 22:17 GMT+01:00 Aníbal Limón <anibal.limon@linux.intel.com>:
>
>
> On 05/30/2016 04:06 PM, Aníbal Limón wrote:
>>
>>
>> On 05/30/2016 03:39 PM, Renato Caldas wrote:
>>> Hi Aníbal,
>>>
>>> Sorry but I'm still a bit unfamiliar with the yocto workflow, should I
>>> resubmit exact same patch with the [krogoth] prefix added, or should I
>>> change the commit message in any way? It applies cleanly to both
>>> master and krogoth.
>>
>> You need to send two patches one with [krogoth] prefix and another
>> without it for master.
>>
>> Also is a good practice to cc the maintainer of the release [krogoth]
>> release, since the 2.1 release was a little time ago i don't know who is
>> the current maintainer sorry.
>
> Reviewing this wiki [1] the maintainer for krogoth is Armin Kuster
> <akuster@mvista.com>.
>
> [1] https://wiki.yoctoproject.org/wiki/Releases
Thanks, will do so. And sorry for top-posting before, bad habits..
Cheers,
Renato
>>
>> Cheers,
>> alimon
>>
>>
>>>
>>> Cheers,
>>> Renato
>>>
>>> 2016-05-30 21:11 GMT+01:00 Aníbal Limón <anibal.limon@linux.intel.com>:
>>>> Hi Renato,
>>>>
>>>> I tested the patch and works very well.
>>>> Could you sent another patch with [krogoth] prefix to be backported?
>>>>
>>>> Thanks a lot,
>>>> alimon
>>>>
>>>>
>>>> On 05/28/2016 06:53 AM, Renato Caldas wrote:
>>>>> On some distributions tar requires the FILE argument to be the last, and
>>>>> the existing order was causing the subsequent --exclude options to be dropped.
>>>>>
>>>>> Fixes [YOCTO #9673].
>>>>>
>>>>> Signed-off-by: Renato Caldas <rm.santos.caldas@gmail.com>
>>>> Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
>>>>> ---
>>>>> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
>>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
>>>>> index 948ea7c..66c5355 100644
>>>>> --- a/meta/recipes-devtools/perl/perl-ptest.inc
>>>>> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
>>>>> @@ -7,8 +7,8 @@ do_install_ptest () {
>>>>> mkdir -p ${D}${PTEST_PATH}
>>>>> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
>>>>> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
>>>>> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>>>> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>>>> + tar -cf - --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
>>>>> + --exclude miniperl --exclude generate_uudmap --exclude patches * | ( cd ${D}${PTEST_PATH} && tar -xf - )
>>>>>
>>>>> sed -i -e "s,${D},,g" \
>>>>> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
>>>>>
>>>>
>>
>>
>>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-05-30 13:04 ` [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
@ 2016-05-31 11:35 ` Renato Caldas
2016-06-03 6:50 ` Enrico Joerns
0 siblings, 1 reply; 12+ messages in thread
From: Renato Caldas @ 2016-05-31 11:35 UTC (permalink / raw)
To: Enrico Jorns; +Cc: openembedded-core
Hi Enrico,
Sorry for the late reply, I missed this e-mail... Your suggestions are
very valid, although not strictly needed to fix this particular bug.
My suggestion is that you submit a new patch with those improvements
on top of the quick fix I made. I suggest you also add quotes to the
--exclude options per tar's man page.
You might also want to simplify the commit message a bit. I'm fairly
new to yocto (and my view may be wrong), but this is how I would do
it:
- change the component name from "perl-ptest.inc:" to "perl:"
- use the commit title to describe the change you made, not exactly
what bug it fixed. Example: "fix tar call according to its man page"
(or something like that)
- describe the change in simpler terms. Taking what you wrote, I would
rewrite it like this:
"The existing tar call on do_install_ptest() did not match the man
page, but worked with older tar versions. The new 1.29 version of tar
has stricter argument handling, and future versions may be even
stricter. Failure to use it according to its manual may result in
arguments being silently ignored and breaking the build."
So while changing the position of the "*" fixed it for tar 1.29, your
proposed changes are important to future-proof the perl recipe for
newer tar versions. As such, please do submit a new patch.
Cheers,
Renato
2016-05-30 14:04 GMT+01:00 Enrico Jorns <ejo@pengutronix.de>:
> With tar version 1.29, the tar call used to copy the ptest files will
> not work anymore. While the call did not match the man page (but worked)
> before, anyway, the latest update of tar seems to have a more strict argument
> handling.
>
> With the current version of the tar call, the copying of files still
> works with latest tar version, but the excludes will not be handled
> properly anymore.
> This results in having binaries compiled with host GCC in the package.
> When doing the strip_and_split files in do_package() with the target
> objcopy, bitbake will fail with this error:
>
> ERROR: objcopy failed with exit code 256 (cmd was [...])
> [...]
> File format not recognized
>
> Thus, the current argument issues and required changes are:
>
> * Options must be placed _before_ the pathnames.
>
> * --exclude must be followd by a '=' in order to work properly
>
> * 'f' options is for providing an archive file, which is unnecessary in
> this case
>
> Note that this could also be a candidate for backporting.
>
> Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
> ---
>
>
> I just wanted to send my patch when I saw you had already send it. Will send
> this one instead as I added some more changes that might be useful. Maybe we
> can squash this into yours if its found to be useful, too.
>
> Best regards, Enrico
>
>
> meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/perl/perl-ptest.inc b/meta/recipes-devtools/perl/perl-ptest.inc
> index 948ea7c..5f0989f 100644
> --- a/meta/recipes-devtools/perl/perl-ptest.inc
> +++ b/meta/recipes-devtools/perl/perl-ptest.inc
> @@ -7,8 +7,8 @@ do_install_ptest () {
> mkdir -p ${D}${PTEST_PATH}
> sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
> sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
> - tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile --exclude makefile --exclude hostperl \
> - --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd ${D}${PTEST_PATH} && tar -xf - )
> + tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile --exclude=makefile --exclude=hostperl \
> + --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | ( cd ${D}${PTEST_PATH} && tar -x )
>
> sed -i -e "s,${D},,g" \
> -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
> --
> 2.8.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-05-31 11:35 ` Renato Caldas
@ 2016-06-03 6:50 ` Enrico Joerns
2016-06-06 11:35 ` Renato Caldas
0 siblings, 1 reply; 12+ messages in thread
From: Enrico Joerns @ 2016-06-03 6:50 UTC (permalink / raw)
To: Renato Caldas; +Cc: openembedded-core
Hi Renato,
thanks for the comments on my changes.
On 05/31/2016 01:35 PM, Renato Caldas wrote:
> My suggestion is that you submit a new patch with those improvements
> on top of the quick fix I made. I suggest you also add quotes to the
> --exclude options per tar's man page.
I did not find any hints about quotes, where is it written? It also
seems to me that the man page in current tar (1.29) is a bit incomplete
as it does not mention any 'exclude' option, anymore. At least on my
distro (debian).
> You might also want to simplify the commit message a bit. I'm fairly
> new to yocto (and my view may be wrong), but this is how I would do
> it:
> - change the component name from "perl-ptest.inc:" to "perl:"
Maybe "perl-ptest" would be ok, too, as it matches the resulting
packages name.
> - use the commit title to describe the change you made, not exactly
> what bug it fixed. Example: "fix tar call according to its man page"
> (or something like that)
> - describe the change in simpler terms. Taking what you wrote, I would
> rewrite it like this:
>
> "The existing tar call on do_install_ptest() did not match the man
> page, but worked with older tar versions. The new 1.29 version of tar
> has stricter argument handling, and future versions may be even
> stricter. Failure to use it according to its manual may result in
> arguments being silently ignored and breaking the build."
>
Yes, sounds good to me. And my original message does not match the
remaining changes anymore. Is it ok if I take your text, and add you as
Signed-off for the patch then?
>
> So while changing the position of the "*" fixed it for tar 1.29, your
> proposed changes are important to future-proof the perl recipe for
> newer tar versions. As such, please do submit a new patch.
I will do so, then.
Best regard, Enrico
--
Pengutronix e.K. | Enrico Jörns |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-06-03 6:50 ` Enrico Joerns
@ 2016-06-06 11:35 ` Renato Caldas
0 siblings, 0 replies; 12+ messages in thread
From: Renato Caldas @ 2016-06-06 11:35 UTC (permalink / raw)
To: Enrico Joerns; +Cc: openembedded-core
Hi Enrico,
2016-06-03 7:50 GMT+01:00 Enrico Joerns <ejo@pengutronix.de>:
> Hi Renato,
>
> thanks for the comments on my changes.
>
> On 05/31/2016 01:35 PM, Renato Caldas wrote:
>>
>> My suggestion is that you submit a new patch with those improvements
>> on top of the quick fix I made. I suggest you also add quotes to the
>> --exclude options per tar's man page.
>
>
> I did not find any hints about quotes, where is it written? It also seems to
> me that the man page in current tar (1.29) is a bit incomplete as it does
> not mention any 'exclude' option, anymore. At least on my distro (debian).
You can find the man page online, this is the relevant section about
the recommended --exclude option quotes:
http://www.gnu.org/software/tar/manual/tar.html#SEC112
>
>> You might also want to simplify the commit message a bit. I'm fairly
>> new to yocto (and my view may be wrong), but this is how I would do
>> it:
>> - change the component name from "perl-ptest.inc:" to "perl:"
>
>
> Maybe "perl-ptest" would be ok, too, as it matches the resulting packages
> name.
>
>> - use the commit title to describe the change you made, not exactly
>> what bug it fixed. Example: "fix tar call according to its man page"
>> (or something like that)
>> - describe the change in simpler terms. Taking what you wrote, I would
>> rewrite it like this:
>>
>> "The existing tar call on do_install_ptest() did not match the man
>> page, but worked with older tar versions. The new 1.29 version of tar
>> has stricter argument handling, and future versions may be even
>> stricter. Failure to use it according to its manual may result in
>> arguments being silently ignored and breaking the build."
>>
>
> Yes, sounds good to me. And my original message does not match the remaining
> changes anymore. Is it ok if I take your text, and add you as Signed-off for
> the patch then?
Yes, it would be fine, but your patch was already merged as-was. Maybe
next time :)
Cheers,
Renato
>
>>
>> So while changing the position of the "*" fixed it for tar 1.29, your
>> proposed changes are important to future-proof the perl recipe for
>> newer tar versions. As such, please do submit a new patch.
>
>
> I will do so, then.
>
>
> Best regard, Enrico
>
> --
> Pengutronix e.K. | Enrico Jörns |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5080 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH][jethro] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-05-28 11:53 [PATCH] perl: reorder tar arguments in do_install_ptest() Renato Caldas
` (2 preceding siblings ...)
2016-06-29 8:54 ` [PATCH][krogoth] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
@ 2016-06-29 8:54 ` Enrico Jorns
3 siblings, 0 replies; 12+ messages in thread
From: Enrico Jorns @ 2016-06-29 8:54 UTC (permalink / raw)
To: openembedded-core
Hi,
I recived some request to send this patch for backporting to
jethro/krogoth. It is required for building Yocto with tar >= 1.29.
It is already in oe-core master, id
2e498879098f7d84610aed7961d92433083d9a02.
Best regards, Enrico
--->8---->8---->8-----
With tar version 1.29, the tar call used to copy the ptest files will
not work anymore. While the call did not match the man page (but worked)
before, anyway, the latest update of tar seems to have a more strict
argument
handling.
With the current version of the tar call, the copying of files still
works with latest tar version, but the excludes will not be handled
properly anymore.
This results in having binaries compiled with host GCC in the package.
When doing the strip_and_split files in do_package() with the target
objcopy, bitbake will fail with this error:
ERROR: objcopy failed with exit code 256 (cmd was [...])
[...]
File format not recognized
Thus, the current argument issues and required changes are:
* Options must be placed _before_ the pathnames.
* --exclude must be followd by a '=' in order to work properly
* 'f' options is for providing an archive file, which is unnecessary in
this case
Note that this could also be a candidate for backporting.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc
b/meta/recipes-devtools/perl/perl-ptest.inc
index 948ea7c..5f0989f 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -7,8 +7,8 @@ do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile
--exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd
${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile
--exclude=makefile --exclude=hostperl \
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | (
cd ${D}${PTEST_PATH} && tar -x )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
--
2.8.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH][krogoth] perl-ptest.inc: fix tar call to prevent objcopy failure
2016-05-28 11:53 [PATCH] perl: reorder tar arguments in do_install_ptest() Renato Caldas
2016-05-30 13:04 ` [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
2016-05-30 20:11 ` [PATCH] perl: reorder tar arguments in do_install_ptest() Aníbal Limón
@ 2016-06-29 8:54 ` Enrico Jorns
2016-06-29 8:54 ` [PATCH][jethro] " Enrico Jorns
3 siblings, 0 replies; 12+ messages in thread
From: Enrico Jorns @ 2016-06-29 8:54 UTC (permalink / raw)
To: openembedded-core; +Cc: Armin Kuster
Hi,
I recived some request to send this patch for backporting to
jethro/krogoth. It is required for building Yocto with tar >= 1.29.
It is already in oe-core master, id
2e498879098f7d84610aed7961d92433083d9a02.
Best regards, Enrico
--->8---->8---->8-----
With tar version 1.29, the tar call used to copy the ptest files will
not work anymore. While the call did not match the man page (but worked)
before, anyway, the latest update of tar seems to have a more strict
argument
handling.
With the current version of the tar call, the copying of files still
works with latest tar version, but the excludes will not be handled
properly anymore.
This results in having binaries compiled with host GCC in the package.
When doing the strip_and_split files in do_package() with the target
objcopy, bitbake will fail with this error:
ERROR: objcopy failed with exit code 256 (cmd was [...])
[...]
File format not recognized
Thus, the current argument issues and required changes are:
* Options must be placed _before_ the pathnames.
* --exclude must be followd by a '=' in order to work properly
* 'f' options is for providing an archive file, which is unnecessary in
this case
Note that this could also be a candidate for backporting.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
meta/recipes-devtools/perl/perl-ptest.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/perl/perl-ptest.inc
b/meta/recipes-devtools/perl/perl-ptest.inc
index 948ea7c..5f0989f 100644
--- a/meta/recipes-devtools/perl/perl-ptest.inc
+++ b/meta/recipes-devtools/perl/perl-ptest.inc
@@ -7,8 +7,8 @@ do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}
sed -e "s:\/opt:\/usr:" -i Porting/add-package.pl
sed -e "s:\/local\/gnu\/:\/:" -i hints/cxux.sh
- tar -cf - * --exclude \*.o --exclude libperl.so --exclude Makefile
--exclude makefile --exclude hostperl \
- --exclude miniperl --exclude generate_uudmap --exclude patches | ( cd
${D}${PTEST_PATH} && tar -xf - )
+ tar -c --exclude=\*.o --exclude=libperl.so --exclude=Makefile
--exclude=makefile --exclude=hostperl \
+ --exclude=miniperl --exclude=generate_uudmap --exclude=patches * | (
cd ${D}${PTEST_PATH} && tar -x )
sed -i -e "s,${D},,g" \
-e "s,--sysroot=${STAGING_DIR_HOST},,g" \
--
2.8.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-06-29 8:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-28 11:53 [PATCH] perl: reorder tar arguments in do_install_ptest() Renato Caldas
2016-05-30 13:04 ` [PATCH] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
2016-05-31 11:35 ` Renato Caldas
2016-06-03 6:50 ` Enrico Joerns
2016-06-06 11:35 ` Renato Caldas
2016-05-30 20:11 ` [PATCH] perl: reorder tar arguments in do_install_ptest() Aníbal Limón
2016-05-30 20:39 ` Renato Caldas
2016-05-30 21:06 ` Aníbal Limón
2016-05-30 21:17 ` Aníbal Limón
2016-05-30 21:35 ` Renato Caldas
2016-06-29 8:54 ` [PATCH][krogoth] perl-ptest.inc: fix tar call to prevent objcopy failure Enrico Jorns
2016-06-29 8:54 ` [PATCH][jethro] " Enrico Jorns
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox