Patchwork iputils: Fix postinst to run on cross rootfs generation

login
register
mail settings
Submitter Khem Raj
Date Aug. 23, 2012, 1:31 a.m.
Message ID <1345685506-27178-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/35187/
State New
Headers show

Comments

Khem Raj - Aug. 23, 2012, 1:31 a.m.
rpm shows error messages like /bin/traceroute6 not found
when building cross rootfs

Yocto # 2894

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Saul Wold - Aug. 23, 2012, 3:42 a.m.
On 08/22/2012 06:31 PM, Khem Raj wrote:
> rpm shows error messages like /bin/traceroute6 not found
> when building cross rootfs
>
> Yocto # 2894
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb b/meta/recipes-extended/iputils/iputils_s20101006.bb
> index 62e2b5e..856bde4 100644
> --- a/meta/recipes-extended/iputils/iputils_s20101006.bb
> +++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
> @@ -59,15 +59,15 @@ ALTERNATIVE_${PN}-ping6 = "ping6"
>   ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
>
>   pkg_postinst_${PN}-ping () {
> -       chmod 4555 ${base_bindir}/ping
> +       chmod 4555 $D${base_bindir}/ping
So that's the magic!  I was trying to figure out what the right prefix 
was in there.  I think we need to do an audit of all pkg_postinst, 
because I saw other places where ${xxx} was used or even worse "/etc/..."

Sau!

>   }
>
>   pkg_postinst_${PN}-ping6 () {
> -       chmod 4555 ${base_bindir}/ping6
> +       chmod 4555 $D${base_bindir}/ping6
>   }
>
>   pkg_postinst_${PN}-traceroute6 () {
> -	chmod 4555 ${base_bindir}/traceroute6
> +	chmod 4555 $D${base_bindir}/traceroute6
>   }
>
>   PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
>
Khem Raj - Aug. 23, 2012, 5:24 a.m.
On Wed, Aug 22, 2012 at 8:42 PM, Saul Wold <sgw@linux.intel.com> wrote:
> On 08/22/2012 06:31 PM, Khem Raj wrote:
>>
>> rpm shows error messages like /bin/traceroute6 not found
>> when building cross rootfs
>>
>> Yocto # 2894
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>   meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb
>> b/meta/recipes-extended/iputils/iputils_s20101006.bb
>> index 62e2b5e..856bde4 100644
>> --- a/meta/recipes-extended/iputils/iputils_s20101006.bb
>> +++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
>> @@ -59,15 +59,15 @@ ALTERNATIVE_${PN}-ping6 = "ping6"
>>   ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
>>
>>   pkg_postinst_${PN}-ping () {
>> -       chmod 4555 ${base_bindir}/ping
>> +       chmod 4555 $D${base_bindir}/ping
>
> So that's the magic!  I was trying to figure out what the right prefix was
> in there.  I think we need to do an audit of all pkg_postinst, because I saw
> other places where ${xxx} was used or even worse "/etc/..."
>

yes a complete audit will fix many of these kind of issues.

> Sau!
>
>
>>   }
>>
>>   pkg_postinst_${PN}-ping6 () {
>> -       chmod 4555 ${base_bindir}/ping6
>> +       chmod 4555 $D${base_bindir}/ping6
>>   }
>>
>>   pkg_postinst_${PN}-traceroute6 () {
>> -       chmod 4555 ${base_bindir}/traceroute6
>> +       chmod 4555 $D${base_bindir}/traceroute6
>>   }
>>
>>   PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath
>> ${PN}-tracepath6 ${PN}-traceroute6"
>>
>
Koen Kooi - Aug. 23, 2012, 9:53 a.m.
Op 23 aug. 2012, om 03:31 heeft Khem Raj <raj.khem@gmail.com> het volgende geschreven:

> rpm shows error messages like /bin/traceroute6 not found
> when building cross rootfs
> 
> Yocto # 2894
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb b/meta/recipes-extended/iputils/iputils_s20101006.bb
> index 62e2b5e..856bde4 100644
> --- a/meta/recipes-extended/iputils/iputils_s20101006.bb
> +++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
> @@ -59,15 +59,15 @@ ALTERNATIVE_${PN}-ping6 = "ping6"
> ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
> 
> pkg_postinst_${PN}-ping () {
> -       chmod 4555 ${base_bindir}/ping
> +       chmod 4555 $D${base_bindir}/ping
> }
> 
> pkg_postinst_${PN}-ping6 () {
> -       chmod 4555 ${base_bindir}/ping6
> +       chmod 4555 $D${base_bindir}/ping6
> }
> 
> pkg_postinst_${PN}-traceroute6 () {
> -	chmod 4555 ${base_bindir}/traceroute6
> +	chmod 4555 $D${base_bindir}/traceroute6
> }
> 
> PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"

MIssing PR bump

Patch

diff --git a/meta/recipes-extended/iputils/iputils_s20101006.bb b/meta/recipes-extended/iputils/iputils_s20101006.bb
index 62e2b5e..856bde4 100644
--- a/meta/recipes-extended/iputils/iputils_s20101006.bb
+++ b/meta/recipes-extended/iputils/iputils_s20101006.bb
@@ -59,15 +59,15 @@  ALTERNATIVE_${PN}-ping6 = "ping6"
 ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
 
 pkg_postinst_${PN}-ping () {
-       chmod 4555 ${base_bindir}/ping
+       chmod 4555 $D${base_bindir}/ping
 }
 
 pkg_postinst_${PN}-ping6 () {
-       chmod 4555 ${base_bindir}/ping6
+       chmod 4555 $D${base_bindir}/ping6
 }
 
 pkg_postinst_${PN}-traceroute6 () {
-	chmod 4555 ${base_bindir}/traceroute6
+	chmod 4555 $D${base_bindir}/traceroute6
 }
 
 PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"