All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [oe-commits] Hongxu Jia : util-linux: use u-a for su
Date: Fri, 9 Aug 2013 15:30:33 +0800	[thread overview]
Message-ID: <52049A99.9040809@windriver.com> (raw)
In-Reply-To: <20130809072212.GC17945@jama>

[-- Attachment #1: Type: text/plain, Size: 5202 bytes --]

On 08/09/2013 03:22 PM, Martin Jansa wrote:
> On Fri, Aug 09, 2013 at 02:47:22PM +0800, Hongxu Jia wrote:
>> On 08/09/2013 01:25 AM, Martin Jansa wrote:
>>> On Wed, Jul 31, 2013 at 05:51:35AM +0000, git@git.openembedded.org wrote:
>>>> Module: openembedded-core.git
>>>> Branch: master
>>>> Commit: 6190c69a9f78aeef951c39e4c8700e945bbec5f7
>>>> URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6190c69a9f78aeef951c39e4c8700e945bbec5f7
>>>>
>>>> Author: Hongxu Jia <hongxu.jia@windriver.com>
>>>> Date:   Fri Jul 26 20:09:08 2013 +0800
>>>>
>>>> util-linux: use u-a for su
>>>>
>>>> Use alternatives mechanism to prevent confliction of attempted
>>>> installing su binary among busybox, shadow and util-linux.
>>>>
>>>> [YOCTO #4926]
>>>>
>>>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>>>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>> 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
>> 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.
> 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

>>> should base_bindir be used for ALTERNATIVE_LINK_NAME and bindir for TARGET?
>>>
>>>> ---
>>>>
>>>>    meta/recipes-core/util-linux/util-linux.inc |    7 +++++++
>>>>    1 files changed, 7 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
>>>> index 3c8c246..961bcc5 100644
>>>> --- a/meta/recipes-core/util-linux/util-linux.inc
>>>> +++ b/meta/recipes-core/util-linux/util-linux.inc
>>>> @@ -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
>>>> Openembedded-commits@lists.openembedded.org
>>>> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


[-- Attachment #2: Type: text/html, Size: 7163 bytes --]

  reply	other threads:[~2013-08-09  7:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130731055135.A7345504BD@opal>
2013-08-08 17:25 ` [oe-commits] Hongxu Jia : util-linux: use u-a for su Martin Jansa
2013-08-09  6:47   ` Hongxu Jia
2013-08-09  7:22     ` Martin Jansa
2013-08-09  7:30       ` ChenQi [this message]
2013-08-09  7:11   ` ChenQi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52049A99.9040809@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.