From: Martin Jansa <martin.jansa@gmail.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] busybox: move watch to /usr/bin for compatibility with procps
Date: Mon, 26 Mar 2012 11:26:13 +0200 [thread overview]
Message-ID: <20120326092613.GA3941@jama.jama.net> (raw)
In-Reply-To: <1332618407-30816-1-git-send-email-obi@opendreambox.org>
[-- Attachment #1: Type: text/plain, Size: 6010 bytes --]
On Sat, Mar 24, 2012 at 08:46:47PM +0100, Andreas Oberritter wrote:
> Commit 68dc2a3fa30c03a196d650de34d0c657a7b85454 broke opkg upgrade:
>
> | update-alternatives: Error: cannot register alternative watch to
> | /usr/bin/watch since it is already registered to /bin/watch
>
> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
> * Martin, can you please verify whether this really helps? I've built a
> rootfs with both busybox watch and procps installed. I didn't actually
> do an opkg upgrade.
Maybe it does for 2nd and later upgrades, but for some reason I now get
the same error from busybox upgrade too, probably because old u-a for
watch is removed only in busybox's prerm and not during upgrade.
SHR root@Nokia-N900 / $ ll /usr/bin/watch*
lrwxrwxrwx 1 root root 17 Mar 26 09:13 /usr/bin/watch ->
../../bin/busybox
-r-xr-xr-x 1 root root 9508 Mar 26 08:48 /usr/bin/watch.procps
SHR root@Nokia-N900 / $ ls -l /bin/watch
lrwxrwxrwx 1 root root 7 Mar 23 16:06 /bin/watch -> busybox
SHR root@Nokia-N900 / $ cat /etc/busybox.links | grep watch
/usr/bin/watch
SHR root@Nokia-N900 / $ cat /var/lib/opkg/alternatives/watch
/bin/watch
busybox 50
And also busybox is upgraded after procps so even with old alternative
removed it would take 2 opkg upgrades to get it sorted.. but that's
quite common issue :/. e.g. u-a for runlevel causes many postinst issues
because update-rc.d assumes that runlevel is available during upgrade,
but if sysvinit (as runlevel provider) is configured after e.g. dbus you
get:
Configuring dbus-1.
Cannot create link over existing -/etc/resolv.conf-.
/usr/sbin/update-rc.d: line 173: runlevel: not found
Unable to determine current runlevel
...
Configuring busybox-syslog.
update-alternatives: Linking //etc/init.d/syslog to syslog.busybox
update-alternatives: Linking //etc/syslog-startup.conf to syslog-startup.conf.busybox
/usr/sbin/update-rc.d: line 173: runlevel: not found
Unable to determine current runlevel
...
Configuring busybox-udhcpc.
/usr/sbin/update-rc.d: line 173: runlevel: not found
Unable to determine current runlevel
...
Configuring sysvinit.
update-alternatives: Linking //bin/mountpoint to mountpoint.sysvinit
update-alternatives: Linking //sbin/halt to halt.sysvinit
update-alternatives: Linking //sbin/reboot to reboot.sysvinit
update-alternatives: Linking //sbin/runlevel to runlevel.sysvinit
update-alternatives: Linking //sbin/shutdown to shutdown.sysvinit
update-alternatives: Linking //sbin/poweroff to poweroff.sysvinit
update-alternatives: Linking //usr/bin/last to last.sysvinit
update-alternatives: Linking //usr/bin/mesg to mesg.sysvinit
update-alternatives: Linking //usr/bin/wall to wall.sysvinit
update-alternatives: Linking //sbin/init to /sbin/init.sysvinit
And dbus-1. busybox-syslog. busybox-udhcpc. postinsts are fine on 2nd run.
So this patch looks good, but there are still issues with u-a calls in postinst.
Cheers,
>
> .../busybox/busybox-1.19.4/watch.in.usr-bin.patch | 29 ++++++++++++++++++++
> meta/recipes-core/busybox/busybox_1.19.4.bb | 3 +-
> 2 files changed, 31 insertions(+), 1 deletions(-)
> create mode 100644 meta/recipes-core/busybox/busybox-1.19.4/watch.in.usr-bin.patch
>
> diff --git a/meta/recipes-core/busybox/busybox-1.19.4/watch.in.usr-bin.patch b/meta/recipes-core/busybox/busybox-1.19.4/watch.in.usr-bin.patch
> new file mode 100644
> index 0000000..e8e1edf
> --- /dev/null
> +++ b/meta/recipes-core/busybox/busybox-1.19.4/watch.in.usr-bin.patch
> @@ -0,0 +1,29 @@
> +Upstream-Status: Inappropriate [configuration]
> +
> +From f2372ab626a395d067704f4c318180fb6039de15 Mon Sep 17 00:00:00 2001
> +From: Andreas Oberritter <obi@opendreambox.org>
> +Date: Sat, 24 Mar 2012 17:36:48 +0100
> +Subject: [PATCH] watch: move from /bin to /usr/bin for compatibility with
> + procps
> +
> +Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> +---
> + include/applets.src.h | 2 +-
> + 1 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/include/applets.src.h b/include/applets.src.h
> +index 87d9cbb..c148a8c 100644
> +--- a/include/applets.src.h
> ++++ b/include/applets.src.h
> +@@ -404,7 +404,7 @@ IF_VLOCK(APPLET(vlock, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
> + IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP))
> + /* Needs to be run by root or be suid root - needs to write to /dev/TTY: */
> + IF_WALL(APPLET(wall, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
> +-IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
> ++IF_WATCH(APPLET(watch, BB_DIR_USR_BIN, BB_SUID_DROP))
> + IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP))
> + IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
> + IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
> +--
> +1.7.5.4
> +
> diff --git a/meta/recipes-core/busybox/busybox_1.19.4.bb b/meta/recipes-core/busybox/busybox_1.19.4.bb
> index dff616d..3f22669 100644
> --- a/meta/recipes-core/busybox/busybox_1.19.4.bb
> +++ b/meta/recipes-core/busybox/busybox_1.19.4.bb
> @@ -1,5 +1,5 @@
> require busybox.inc
> -PR = "r0"
> +PR = "r1"
>
> SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://udhcpscript.patch \
> @@ -8,6 +8,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
> file://get_header_tar.patch \
> file://busybox-appletlib-dependency.patch \
> file://run-parts.in.usr-bin.patch \
> + file://watch.in.usr-bin.patch \
> file://busybox-udhcpc-no_deconfig.patch \
> file://find-touchscreen.sh \
> file://busybox-cron \
> --
> 1.7.5.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2012-03-26 9:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 19:46 [PATCH] busybox: move watch to /usr/bin for compatibility with procps Andreas Oberritter
2012-03-26 9:26 ` Martin Jansa [this message]
2012-03-26 11:02 ` Richard Purdie
2012-03-26 11:11 ` Martin Jansa
2012-04-17 9:40 ` Koen Kooi
2012-04-17 10:44 ` Richard Purdie
2012-04-17 10:46 ` Koen Kooi
2012-04-17 10:51 ` Martin Jansa
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=20120326092613.GA3941@jama.jama.net \
--to=martin.jansa@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox