* Busybox sh link @ 2014-11-17 14:07 Stefan Eichenberger 2014-11-18 3:07 ` ChenQi 0 siblings, 1 reply; 5+ messages in thread From: Stefan Eichenberger @ 2014-11-17 14:07 UTC (permalink / raw) To: Qi.Chen@windriver.com, yocto@yoctoproject.org Hello all I have a question regarding busybox and sh. If I want to install bash together with busybox ash, yocto does not consider the ALTERNATIVE_PRIORITY in each case (e.g. if bash is installed before busybox). The problem is that do_install of busybox creates a link to busybox.nosuid. Is there a reason for that? Shouldn't update-alternatives create that link for us? There is already a patch available that targets this problem (467b19efbaa9c0cb04d2665e8cd9a0919849a5ed ) but it only works if ash is completely disabled in the busybox config. So the main question is, wouldn't it be possible to remove this lines completely? Regards, Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Busybox sh link 2014-11-17 14:07 Busybox sh link Stefan Eichenberger @ 2014-11-18 3:07 ` ChenQi 2014-11-18 16:34 ` Stefan Eichenberger 0 siblings, 1 reply; 5+ messages in thread From: ChenQi @ 2014-11-18 3:07 UTC (permalink / raw) To: Stefan Eichenberger, yocto@yoctoproject.org On 11/17/2014 10:07 PM, Stefan Eichenberger wrote: > Hello all > > I have a question regarding busybox and sh. If I want to install bash together with busybox ash, yocto does not consider the ALTERNATIVE_PRIORITY in each case (e.g. if bash is installed before busybox). The problem is that do_install of busybox creates a link to busybox.nosuid. Is there a reason for that? Shouldn't update-alternatives create that link for us? There is already a patch available that targets this problem (467b19efbaa9c0cb04d2665e8cd9a0919849a5ed ) but it only works if ash is completely disabled in the busybox config. > > So the main question is, wouldn't it be possible to remove this lines completely? > > Regards, > Stefan > > I can confirm that this is indeed a problem. And we need to fix this. I think the reason for this line is mainly to make 'busybox' provide '/bin/sh' so that do_rootfs would succeed. Regards, Chen Qi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Busybox sh link 2014-11-18 3:07 ` ChenQi @ 2014-11-18 16:34 ` Stefan Eichenberger 2014-11-19 6:00 ` ChenQi 0 siblings, 1 reply; 5+ messages in thread From: Stefan Eichenberger @ 2014-11-18 16:34 UTC (permalink / raw) To: ChenQi, yocto@yoctoproject.org On 11/18/2014 04:07 AM, ChenQi wrote: > On 11/17/2014 10:07 PM, Stefan Eichenberger wrote: >> Hello all >> >> I have a question regarding busybox and sh. If I want to install bash >> together with busybox ash, yocto does not consider the >> ALTERNATIVE_PRIORITY in each case (e.g. if bash is installed before >> busybox). The problem is that do_install of busybox creates a link to >> busybox.nosuid. Is there a reason for that? Shouldn't >> update-alternatives create that link for us? There is already a patch >> available that targets this problem >> (467b19efbaa9c0cb04d2665e8cd9a0919849a5ed ) but it only works if ash >> is completely disabled in the busybox config. >> >> So the main question is, wouldn't it be possible to remove this lines >> completely? >> >> Regards, >> Stefan >> >> > > I can confirm that this is indeed a problem. And we need to fix this. > I think the reason for this line is mainly to make 'busybox' provide > '/bin/sh' so that do_rootfs would succeed. > > Regards, > Chen Qi Probably I miss something but I don't understand why do_rootfs fails if the link is not provided? Isn't the link created anyhow during package installation in the postinstall script with update-alternatives if necessary? For testing I removed the link creation temporary from the recipe and built the core-image-minimal for qemux86, it was creating the link correctly in this case. Regards, Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Busybox sh link 2014-11-18 16:34 ` Stefan Eichenberger @ 2014-11-19 6:00 ` ChenQi 2014-11-19 9:08 ` Stefan Eichenberger 0 siblings, 1 reply; 5+ messages in thread From: ChenQi @ 2014-11-19 6:00 UTC (permalink / raw) To: Stefan Eichenberger, yocto@yoctoproject.org On 11/19/2014 12:34 AM, Stefan Eichenberger wrote: > On 11/18/2014 04:07 AM, ChenQi wrote: >> On 11/17/2014 10:07 PM, Stefan Eichenberger wrote: >>> Hello all >>> >>> I have a question regarding busybox and sh. If I want to install >>> bash together with busybox ash, yocto does not consider the >>> ALTERNATIVE_PRIORITY in each case (e.g. if bash is installed before >>> busybox). The problem is that do_install of busybox creates a link >>> to busybox.nosuid. Is there a reason for that? Shouldn't >>> update-alternatives create that link for us? There is already a >>> patch available that targets this problem >>> (467b19efbaa9c0cb04d2665e8cd9a0919849a5ed ) but it only works if ash >>> is completely disabled in the busybox config. >>> >>> So the main question is, wouldn't it be possible to remove this >>> lines completely? >>> >>> Regards, >>> Stefan >>> >>> >> >> I can confirm that this is indeed a problem. And we need to fix this. >> I think the reason for this line is mainly to make 'busybox' provide >> '/bin/sh' so that do_rootfs would succeed. >> >> Regards, >> Chen Qi > > Probably I miss something but I don't understand why do_rootfs fails > if the link is not provided? Isn't the link created anyhow during > package installation in the postinstall script with > update-alternatives if necessary? > > For testing I removed the link creation temporary from the recipe and > built the core-image-minimal for qemux86, it was creating the link > correctly in this case. > > Regards, > Stefan > > Hi Stefan, I did some testing, and could not reproduce the problem. I then realized that as the sh link is managed by ALTERNATIVES mechanism, it will always point to bash instead of busybox. I tested it by the following steps: 1. build core-image-minimal with bash installed 2. reinstall bash 3. reinstall busybox So I think the current code is right. I'm not sure if I missed something. If so, could you please provide more information? Best Regards, Chen Qi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Busybox sh link 2014-11-19 6:00 ` ChenQi @ 2014-11-19 9:08 ` Stefan Eichenberger 0 siblings, 0 replies; 5+ messages in thread From: Stefan Eichenberger @ 2014-11-19 9:08 UTC (permalink / raw) To: ChenQi, yocto@yoctoproject.org On 11/19/2014 07:00 AM, ChenQi wrote: > On 11/19/2014 12:34 AM, Stefan Eichenberger wrote: >> On 11/18/2014 04:07 AM, ChenQi wrote: >>> On 11/17/2014 10:07 PM, Stefan Eichenberger wrote: >>>> Hello all >>>> >>>> I have a question regarding busybox and sh. If I want to install >>>> bash together with busybox ash, yocto does not consider the >>>> ALTERNATIVE_PRIORITY in each case (e.g. if bash is installed before >>>> busybox). The problem is that do_install of busybox creates a link >>>> to busybox.nosuid. Is there a reason for that? Shouldn't >>>> update-alternatives create that link for us? There is already a >>>> patch available that targets this problem >>>> (467b19efbaa9c0cb04d2665e8cd9a0919849a5ed ) but it only works if >>>> ash is completely disabled in the busybox config. >>>> >>>> So the main question is, wouldn't it be possible to remove this >>>> lines completely? >>>> >>>> Regards, >>>> Stefan >>>> >>>> >>> >>> I can confirm that this is indeed a problem. And we need to fix this. >>> I think the reason for this line is mainly to make 'busybox' provide >>> '/bin/sh' so that do_rootfs would succeed. >>> >>> Regards, >>> Chen Qi >> >> Probably I miss something but I don't understand why do_rootfs fails >> if the link is not provided? Isn't the link created anyhow during >> package installation in the postinstall script with >> update-alternatives if necessary? >> >> For testing I removed the link creation temporary from the recipe and >> built the core-image-minimal for qemux86, it was creating the link >> correctly in this case. >> >> Regards, >> Stefan >> >> > > Hi Stefan, > > I did some testing, and could not reproduce the problem. > I then realized that as the sh link is managed by ALTERNATIVES > mechanism, it will always point to bash instead of busybox. > > I tested it by the following steps: > 1. build core-image-minimal with bash installed > 2. reinstall bash > 3. reinstall busybox > > So I think the current code is right. > > I'm not sure if I missed something. If so, could you please provide > more information? > > Best Regards, > Chen Qi Hi Chen, You are right, sorry! I think I figured out what I've missed. On an image I have disabled busybox ash completely, therefore I didn't saw the update-alternative running for sh. Because it was an older version of yocto without the above patch, I've got an invalid image. I then tough the same problem would appear if I enable busybox ash again, but in this case update-alternative would run, so the problem wouldn't appear. Sorry for the false alarm! Regards, Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-19 9:11 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-17 14:07 Busybox sh link Stefan Eichenberger 2014-11-18 3:07 ` ChenQi 2014-11-18 16:34 ` Stefan Eichenberger 2014-11-19 6:00 ` ChenQi 2014-11-19 9:08 ` Stefan Eichenberger
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.