Hongxu Jia : util-linux: use u-a for su
Quoted 10 lines · On Wed, Jul 31, 2013 at 05:51:35AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7Author: Hongxu Jia <[email protected]> Date: Fri Jul 26 20:09:08 2013 +0800util-linux: use u-a for su
Quoted 7 lines
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by Hongxu Jia <[email protected]>Signed-off-by Saul Wold <[email protected]>
Doesn't seem to work correctly:
Configuring util-linux.
update-alternatives: Linking //bin/dmesg to /bin/dmesg.util-linux
update-alternatives: Linking //bin/kill to /bin/kill.procps
update-alternatives: Linking //bin/more to /bin/more.util-linux
update-alternatives: Linking //sbin/mkswap to /sbin/mkswap.util-linux
update-alternatives: Linking //sbin/blockdev to /sbin/blockdev.util-linux
update-alternatives: Linking //sbin/pivot_root to /sbin/pivot_root.util-linux
update-alternatives: Linking //sbin/mkfs.minix to /sbin/mkfs.minix.util-linux
update-alternatives: Linking //usr/bin/hexdump to /usr/bin/hexdump.util-linux
update-alternatives: Linking //usr/bin/last to /usr/bin/last.util-linux
update-alternatives: Linking //usr/bin/logger to /usr/bin/logger.util-linux
update-alternatives: Linking //usr/bin/mesg to /usr/bin/mesg.util-linux
update-alternatives: Linking //usr/bin/renice to /usr/bin/renice.util-linux
update-alternatives: Linking //usr/bin/wall to /usr/bin/wall.util-linux
update-alternatives: Linking //usr/bin/setsid to /usr/bin/setsid.util-linux
update-alternatives: Linking //usr/bin/chrt to /usr/bin/chrt.util-linux
update-alternatives: Linking //usr/bin/flock to /usr/bin/flock.util-linux
update-alternatives: Linking //sbin/hwclock to /bin/busybox.nosuid
update-alternatives: Linking //usr/bin/utmpdump to /usr/bin/utmpdump.util-linux
update-alternatives: Linking //usr/bin/eject to /usr/bin/eject.util-linux
update-alternatives: Linking //bin/getopt to /usr/bin/getopt
update-alternatives: Error: cannot register alternative su to /usr/bin/su since it is already registered to /bin/su
SHR root@gjama ~ $ cat /var/lib/opkg/alternatives/su /bin/su/bin/busybox.suid 50
should base_bindir be used for ALTERNATIVE_LINK_NAME and bindir for TARGET?
Quoted 26 lines
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)meta/recipes-core/util-linux/util-linux.inc +7
-0@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" BBCLASSEXTEND = "native nativesdk" + +python do_package_prepend () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) + d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) +}_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 43 lines · Martin Jansa
Quoted 10 lines · On Wed, Jul 31, 2013 at 05:51:35AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7Author: Hongxu Jia <[email protected]> Date: Fri Jul 26 20:09:08 2013 +0800util-linux: use u-a for su
Quoted 7 lines
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by Hongxu Jia <[email protected]>Signed-off-by Saul Wold <[email protected]>Doesn't seem to work correctly:
Configuring util-linux.
update-alternatives: Linking //bin/dmesg to/bin/dmesg.util-linux
update-alternatives: Linking //bin/kill to/bin/kill.procps
update-alternatives: Linking //bin/more to/bin/more.util-linux
update-alternatives: Linking //sbin/mkswap to/sbin/mkswap.util-linux
update-alternatives: Linking //sbin/blockdev to/sbin/blockdev.util-linux
update-alternatives: Linking //sbin/pivot_root to/sbin/pivot_root.util-linux
update-alternatives: Linking //sbin/mkfs.minix to/sbin/mkfs.minix.util-linux
update-alternatives: Linking //usr/bin/hexdump to/usr/bin/hexdump.util-linux
update-alternatives: Linking //usr/bin/last to/usr/bin/last.util-linux
update-alternatives: Linking //usr/bin/logger to/usr/bin/logger.util-linux
update-alternatives: Linking //usr/bin/mesg to/usr/bin/mesg.util-linux
update-alternatives: Linking //usr/bin/renice to/usr/bin/renice.util-linux
update-alternatives: Linking //usr/bin/wall to/usr/bin/wall.util-linux
update-alternatives: Linking //usr/bin/setsid to/usr/bin/setsid.util-linux
update-alternatives: Linking //usr/bin/chrt to/usr/bin/chrt.util-linux
update-alternatives: Linking //usr/bin/flock to/usr/bin/flock.util-linux
update-alternatives: Linking //sbin/hwclock to/bin/busybox.nosuid
update-alternatives: Linking //usr/bin/utmpdump to/usr/bin/utmpdump.util-linux
update-alternatives: Linking //usr/bin/eject to/usr/bin/eject.util-linux
update-alternatives: Linking //bin/getopt to/usr/bin/getopt
update-alternatives: Error: cannot register alternative su to/usr/bin/susince it is already registered to/bin/su
Quoted 3 lines
SHR root@gjama ~ $ cat
/var/lib/opkg/alternatives/su/bin/su/bin/busybox.suid50
Are you sure the following patch has been updated to your local branch?
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=hongxu/fix-su&id=32eee3e731772da04ccb64b4da9ca9b413433674
busybox: move /bin/su to /usr/bin/su to match util-linux and shadow This patch is used to fix this issue.
Maybe you should rebuild busybox and try again.
Thanks,
Hongxu
Quoted 27 lines
should
base_bindirbe used forALTERNATIVE_LINK_NAMEand bindir for TARGET?Quoted 25 lines
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)meta/recipes-core/util-linux/util-linux.inc +7
-0@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" BBCLASSEXTEND = "native nativesdk" + +python do_package_prepend () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) + d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) +}_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Hi Martin,
I think this is the same problem we discussed before. The thread is "busybox: fix the on-target upgrade problem".
The problem roots in opkg's update-alternatives.
At that time, I made a patch to fix this problem.
I didn't send it out because I then found some other problems with update-alternatives in OE/Yocto. And I filed a bug to track these issues. I wanted to fix them all in one patchset.
(https://bugzilla.yoctoproject.org/show_bug.cgi?id=4836)
Best Regards,
Chen Qi
Quoted 80 lines · Martin Jansa
Quoted 10 lines · On Wed, Jul 31, 2013 at 05:51:35AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7Author: Hongxu Jia <[email protected]> Date: Fri Jul 26 20:09:08 2013 +0800util-linux: use u-a for su
Quoted 7 lines
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by Hongxu Jia <[email protected]>Signed-off-by Saul Wold <[email protected]>Doesn't seem to work correctly:
Configuring util-linux.
update-alternatives: Linking //bin/dmesg to/bin/dmesg.util-linux
update-alternatives: Linking //bin/kill to/bin/kill.procps
update-alternatives: Linking //bin/more to/bin/more.util-linux
update-alternatives: Linking //sbin/mkswap to/sbin/mkswap.util-linux
update-alternatives: Linking //sbin/blockdev to/sbin/blockdev.util-linux
update-alternatives: Linking //sbin/pivot_root to/sbin/pivot_root.util-linux
update-alternatives: Linking //sbin/mkfs.minix to/sbin/mkfs.minix.util-linux
update-alternatives: Linking //usr/bin/hexdump to/usr/bin/hexdump.util-linux
update-alternatives: Linking //usr/bin/last to/usr/bin/last.util-linux
update-alternatives: Linking //usr/bin/logger to/usr/bin/logger.util-linux
update-alternatives: Linking //usr/bin/mesg to/usr/bin/mesg.util-linux
update-alternatives: Linking //usr/bin/renice to/usr/bin/renice.util-linux
update-alternatives: Linking //usr/bin/wall to/usr/bin/wall.util-linux
update-alternatives: Linking //usr/bin/setsid to/usr/bin/setsid.util-linux
update-alternatives: Linking //usr/bin/chrt to/usr/bin/chrt.util-linux
update-alternatives: Linking //usr/bin/flock to/usr/bin/flock.util-linux
update-alternatives: Linking //sbin/hwclock to/bin/busybox.nosuid
update-alternatives: Linking //usr/bin/utmpdump to/usr/bin/utmpdump.util-linux
update-alternatives: Linking //usr/bin/eject to/usr/bin/eject.util-linux
update-alternatives: Linking //bin/getopt to/usr/bin/getopt
update-alternatives: Error: cannot register alternative su to/usr/bin/susince it is already registered to/bin/suSHR root@gjama ~ $ cat
/var/lib/opkg/alternatives/su/bin/su/bin/busybox.suid50should
base_bindirbe used forALTERNATIVE_LINK_NAMEand bindir for TARGET?Quoted 21 lines
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)meta/recipes-core/util-linux/util-linux.inc +7
-0@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" BBCLASSEXTEND = "native nativesdk" + +python do_package_prepend () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) + d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) +}Quoted 4 lines
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 47 lines · Hongxu Jia
Quoted 43 lines · Martin Jansa
Quoted 10 lines · On Wed, Jul 31, 2013 at 05:51:35AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7Author: Hongxu Jia <[email protected]> Date: Fri Jul 26 20:09:08 2013 +0800util-linux: use u-a for su
Quoted 7 lines
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by Hongxu Jia <[email protected]>Signed-off-by Saul Wold <[email protected]>Doesn't seem to work correctly:
Configuring util-linux.
update-alternatives: Linking //bin/dmesg to/bin/dmesg.util-linux
update-alternatives: Linking //bin/kill to/bin/kill.procps
update-alternatives: Linking //bin/more to/bin/more.util-linux
update-alternatives: Linking //sbin/mkswap to/sbin/mkswap.util-linux
update-alternatives: Linking //sbin/blockdev to/sbin/blockdev.util-linux
update-alternatives: Linking //sbin/pivot_root to/sbin/pivot_root.util-linux
update-alternatives: Linking //sbin/mkfs.minix to/sbin/mkfs.minix.util-linux
update-alternatives: Linking //usr/bin/hexdump to/usr/bin/hexdump.util-linux
update-alternatives: Linking //usr/bin/last to/usr/bin/last.util-linux
update-alternatives: Linking //usr/bin/logger to/usr/bin/logger.util-linux
update-alternatives: Linking //usr/bin/mesg to/usr/bin/mesg.util-linux
update-alternatives: Linking //usr/bin/renice to/usr/bin/renice.util-linux
update-alternatives: Linking //usr/bin/wall to/usr/bin/wall.util-linux
update-alternatives: Linking //usr/bin/setsid to/usr/bin/setsid.util-linux
update-alternatives: Linking //usr/bin/chrt to/usr/bin/chrt.util-linux
update-alternatives: Linking //usr/bin/flock to/usr/bin/flock.util-linux
update-alternatives: Linking //sbin/hwclock to/bin/busybox.nosuid
update-alternatives: Linking //usr/bin/utmpdump to/usr/bin/utmpdump.util-linux
update-alternatives: Linking //usr/bin/eject to/usr/bin/eject.util-linux
update-alternatives: Linking //bin/getopt to/usr/bin/getopt
update-alternatives: Error: cannot register alternative su to/usr/bin/susince it is already registered to/bin/suQuoted 3 lines
SHR root@gjama ~ $ cat
/var/lib/opkg/alternatives/su/bin/su/bin/busybox.suid50
Quoted 7 lines
Are you sure the following patch has been updated to your local branch?
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=hongxu/fix-su&id=32eee3e731772da04ccb64b4da9ca9b413433674busybox: move
/bin/suto/usr/bin/suto match util-linux and shadow This patch is used to fix this issue.Maybe you should rebuild busybox and try again.
Maybe opkg was upgrading them in different order and util-linux was upgraded before busybox, I don't have complete log from first 2 devices, but I'll keep whole log when upgrading other devices.
If there isn't runtime dependency between busybox and util-linux then it will probably install them in undeterministic order.
Quoted 28 lines
Quoted 27 lines
should
base_bindirbe used forALTERNATIVE_LINK_NAMEand bindir for TARGET?Quoted 25 lines
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)meta/recipes-core/util-linux/util-linux.inc +7
-0@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" BBCLASSEXTEND = "native nativesdk" + +python do_package_prepend () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) + d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) +}_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 54 lines · Martin Jansa
Quoted 53 lines · Hongxu Jia
Quoted 43 lines · Martin Jansa
Quoted 10 lines · On Wed, Jul 31, 2013 at 05:51:35AM +0000, [email protected] wrote:
Module: openembedded-core.git Branch: master Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7 URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7Author: Hongxu Jia <[email protected]> Date: Fri Jul 26 20:09:08 2013 +0800util-linux: use u-a for su
Quoted 7 lines
Use alternatives mechanism to prevent confliction of attempted installing su binary among busybox, shadow and util-linux.
[YOCTO #4926]
Signed-off-by Hongxu Jia <[email protected]>Signed-off-by Saul Wold <[email protected]>Doesn't seem to work correctly:
Configuring util-linux.
update-alternatives: Linking //bin/dmesg to/bin/dmesg.util-linux
update-alternatives: Linking //bin/kill to/bin/kill.procps
update-alternatives: Linking //bin/more to/bin/more.util-linux
update-alternatives: Linking //sbin/mkswap to/sbin/mkswap.util-linux
update-alternatives: Linking //sbin/blockdev to/sbin/blockdev.util-linux
update-alternatives: Linking //sbin/pivot_root to/sbin/pivot_root.util-linux
update-alternatives: Linking //sbin/mkfs.minix to/sbin/mkfs.minix.util-linux
update-alternatives: Linking //usr/bin/hexdump to/usr/bin/hexdump.util-linux
update-alternatives: Linking //usr/bin/last to/usr/bin/last.util-linux
update-alternatives: Linking //usr/bin/logger to/usr/bin/logger.util-linux
update-alternatives: Linking //usr/bin/mesg to/usr/bin/mesg.util-linux
update-alternatives: Linking //usr/bin/renice to/usr/bin/renice.util-linux
update-alternatives: Linking //usr/bin/wall to/usr/bin/wall.util-linux
update-alternatives: Linking //usr/bin/setsid to/usr/bin/setsid.util-linux
update-alternatives: Linking //usr/bin/chrt to/usr/bin/chrt.util-linux
update-alternatives: Linking //usr/bin/flock to/usr/bin/flock.util-linux
update-alternatives: Linking //sbin/hwclock to/bin/busybox.nosuid
update-alternatives: Linking //usr/bin/utmpdump to/usr/bin/utmpdump.util-linux
update-alternatives: Linking //usr/bin/eject to/usr/bin/eject.util-linux
update-alternatives: Linking //bin/getopt to/usr/bin/getopt
update-alternatives: Error: cannot register alternative su to/usr/bin/susince it is already registered to/bin/suQuoted 3 lines
SHR root@gjama ~ $ cat
/var/lib/opkg/alternatives/su/bin/su/bin/busybox.suid50Are you sure the following patch has been updated to your local branch?
http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=hongxu/fix-su&id=32eee3e731772da04ccb64b4da9ca9b413433674busybox: move
/bin/suto/usr/bin/suto match util-linux and shadow This patch is used to fix this issue.
Quoted 8 lines
Quoted 1 line
Maybe you should rebuild busybox and try again.
Maybe opkg was upgrading them in different order and util-linux was upgraded before busybox, I don't have complete log from first 2 devices, but I'll keep whole log when upgrading other devices.
If there isn't runtime dependency between busybox and util-linux then it will probably install them in undeterministic order.
Yes. You're right.
The problem is more complex than I thought.
I'll try to figure out a solution with as little trade-off as possible.
For now, what I can see is that we have to make the opkg's update-alternatives more complex to work correctly in such situation.
Best Regards,
Chen Qi
Quoted 33 lines
Quoted 23 lines
Quoted 23 lines
should
base_bindirbe used forALTERNATIVE_LINK_NAMEand bindir for TARGET?Quoted 21 lines
---
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)meta/recipes-core/util-linux/util-linux.inc +7
-0@@ -215,3 +215,10 @@ ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset" ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset" BBCLASSEXTEND = "native nativesdk" + +python do_package_prepend () { + if '--enable-su' in d.getVar('EXTRA_OECONF', True).split(): + alt_name = "su" + d.setVarFlag('ALTERNATIVE_LINK_NAME', alt_name, '%s/%s' % (d.getVar('bindir', True), alt_name)) + d.appendVar('ALTERNATIVE_%s' % (d.getVar('PN', True)), ' ' + alt_name) +}Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
_______________________________________________
Openembedded-commits mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-commits_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core