Skip to contentSkip to conversation

iputils: Fix postinst to run on cross rootfs generation

PATCH Superseded Khem Raj 3 participants 4 messages Aug 23, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 iputils: Fix postinst to run on cross rootfs generation

rpm shows error messages like /bin/traceroute6 not found when building cross rootfs

Yocto # 2894

---
 meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/iputils/iputils_s20101006.bb +3 -3
index 62e2b5e..856bde4 100644
@@ -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"
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 15 lines · Khem Raj

rpm shows error messages like /bin/traceroute6 not found when building cross rootfs

Yocto # 2894

---
  meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/iputils/iputils_s20101006.bb +0 -0
index 62e2b5e..856bde4 100644

meta/recipes-extended/iputils/iputils_s20101006.bb ALTERNATIVE_${PN}-ping6 = "ping6" · line 62

Quoted 5 lines
meta/recipes-extended/iputils/iputils_s20101006.bb +1 -1
@@ -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!

Quoted 14 lines
meta/recipes-extended/iputils/iputils_s20101006.bb +2 -2
  }
 
  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"
author
#2 lore raw
Quoted 20 lines · Saul Wold
Quoted 19 lines · Khem Raj

rpm shows error messages like /bin/traceroute6 not found when building cross rootfs

Yocto # 2894

---
  meta/recipes-extended/iputils/iputils_s20101006.bb |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/iputils/iputils_s20101006.bb +0 -0
index 62e2b5e..856bde4 100644
@@ -59,15 +59,15 @@ ALTERNATIVE_${PN}-ping6 = "ping6"
  ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
 
Quoted 8 lines

meta/recipes-extended/iputils/iputils_s20101006.bb ALTERNATIVE_${PN}-ping6 = "ping6" · line 62

Quoted 3 lines
meta/recipes-extended/iputils/iputils_s20101006.bb +1 -1
  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.

Quoted 19 lines

Sau!

Quoted 15 lines
meta/recipes-extended/iputils/iputils_s20101006.bb +2 -2
  }
 
  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"

#3 lore raw
In reply to Khem Raj

Op 23 aug. 2012, om 03:31 heeft Khem Raj <[email protected]> het volgende geschreven:

Quoted 32 lines

rpm shows error messages like /bin/traceroute6 not found when building cross rootfs

Yocto # 2894

---
meta/recipes-extended/iputils/iputils_s20101006.bb | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/iputils/iputils_s20101006.bb +0 -0
index 62e2b5e..856bde4 100644
@@ -59,15 +59,15 @@ ALTERNATIVE_${PN}-ping6 = "ping6"

ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"

pkg_postinst_${PN}-ping () {

meta/recipes-extended/iputils/iputils_s20101006.bb +1 -1
-       chmod 4555 ${base_bindir}/ping
+       chmod 4555 $D${base_bindir}/ping

}

pkg_postinst_${PN}-ping6 () {

meta/recipes-extended/iputils/iputils_s20101006.bb +1 -1
-       chmod 4555 ${base_bindir}/ping6
+       chmod 4555 $D${base_bindir}/ping6

}

pkg_postinst_${PN}-traceroute6 () {

meta/recipes-extended/iputils/iputils_s20101006.bb +1 -1
-	chmod 4555 ${base_bindir}/traceroute6
+	chmod 4555 $D${base_bindir}/traceroute6

}

Quoted 1 line

PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"

MIssing PR bump