All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] busybox: allow building when prefix is "", not "/usr".
@ 2009-05-26  3:35 Michael Smith
  2009-05-26  3:40 ` Michael Smith
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Michael Smith @ 2009-05-26  3:35 UTC (permalink / raw)
  To: openembedded-devel

There was code to handle this, but it needed a tweak to prevent copying
a directory on top of itself. Other prefixes (besides /usr) may also
work now, but this is untested.

busybox will also build when base_sbindir is "/bin" instead of "/sbin".

Signed-off-by: Michael Smith <msmith@cbnco.com>
---

For insane backwards compatibility reasons (my own fault) I would like
to be able to create packages with no /usr and /sbin == /bin. Most
autoconf packages are happy about this; busybox just needs a little
help.

btw, I have not yet figured out where ${layout_blah} vs. ${blah}
should be used (e.g. ${layout_prefix} and ${prefix}). I've tried to be
consistent, so I figure there's a 50% chance I guessed right.

 recipes/busybox/busybox.inc |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index acf47f2..04f2cf4 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -62,12 +62,15 @@ do_compile() {
 
 do_install () {
 	oe_runmake busybox.links
-	if [ "x${layout_prefix}" = "x" ]; then
-		sed 's:^/usr/:/:' < busybox.links >busybox.links.new
+	if [ "${prefix}" != "/usr" ]; then
+		sed "s:^/usr/:${prefix}/:" busybox.links > busybox.links.new
 		mv busybox.links.new busybox.links
-        elif [ "${layout_prefix}" != "/usr" ]; then
-		echo "warning, busybox.links will lose with this prefix"
 	fi
+	if [ "${base_sbindir}" != "/sbin" ]; then
+		sed "s:^/sbin/:${base_sbindir}/:" busybox.links > busybox.links.new
+		mv busybox.links.new busybox.links
+	fi
+
 	unset CFLAGS CPPFLAGS CXXFLAGS
 	install -d ${D}${sysconfdir}/init.d
 	oe_runmake "PREFIX=${D}" install
@@ -77,9 +80,11 @@ do_install () {
 	install -d ${D}/busybox
 	ls ${D} -R
 
-	for i in ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ; do
+	# Copy /bin and /sbin -- and /usr, if prefix is not "".
+	for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
+	do
 		if [ -d $i ]; then
-			cp -dPr $i ${D}/busybox/
+			cp -pPR $i ${D}/busybox/
 		fi
 	done
 	# Move the busybox binary back to /bin
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:35 [PATCH] busybox: allow building when prefix is "", not "/usr" Michael Smith
@ 2009-05-26  3:40 ` Michael Smith
  2009-05-26  3:44   ` Michael Smith
  2009-05-26 16:01   ` [PATCH] busybox: allow building when prefix is "", not "/usr" Phil Blundell
  2009-05-26 16:16 ` Phil Blundell
  2009-06-05 13:11 ` Phil Blundell
  2 siblings, 2 replies; 23+ messages in thread
From: Michael Smith @ 2009-05-26  3:40 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 25 May 2009, Michael Smith wrote:

> +	for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
> +	do
>  		if [ -d $i ]; then
> -			cp -dPr $i ${D}/busybox/
> +			cp -pPR $i ${D}/busybox/
>  		fi
>  	done

I missed this in the commit message: I changed cp -dPr -> -pPR to match 
the options given a few lines above. -d implies -P, and -r/-R are 
equivalent, so I suspected a typo. I'll resend with a new description.

Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:40 ` Michael Smith
@ 2009-05-26  3:44   ` Michael Smith
  2009-06-03 18:44     ` Phil Blundell
  2009-05-26 16:01   ` [PATCH] busybox: allow building when prefix is "", not "/usr" Phil Blundell
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-05-26  3:44 UTC (permalink / raw)
  To: openembedded-devel

There was code to handle this, but it needed a tweak to prevent copying
a directory on top of itself. Other prefixes (besides /usr) may also
work now, but this is untested.

busybox will also build when base_sbindir is "/bin" instead of "/sbin".

Also correct possible typo: "cp -dPr" to "cp -pPR", to match the usage
a few lines above. -d implies -P.

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/busybox/busybox.inc |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index acf47f2..04f2cf4 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -62,12 +62,15 @@ do_compile() {
 
 do_install () {
 	oe_runmake busybox.links
-	if [ "x${layout_prefix}" = "x" ]; then
-		sed 's:^/usr/:/:' < busybox.links >busybox.links.new
+	if [ "${prefix}" != "/usr" ]; then
+		sed "s:^/usr/:${prefix}/:" busybox.links > busybox.links.new
 		mv busybox.links.new busybox.links
-        elif [ "${layout_prefix}" != "/usr" ]; then
-		echo "warning, busybox.links will lose with this prefix"
 	fi
+	if [ "${base_sbindir}" != "/sbin" ]; then
+		sed "s:^/sbin/:${base_sbindir}/:" busybox.links > busybox.links.new
+		mv busybox.links.new busybox.links
+	fi
+
 	unset CFLAGS CPPFLAGS CXXFLAGS
 	install -d ${D}${sysconfdir}/init.d
 	oe_runmake "PREFIX=${D}" install
@@ -77,9 +80,11 @@ do_install () {
 	install -d ${D}/busybox
 	ls ${D} -R
 
-	for i in ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ; do
+	# Copy /bin and /sbin -- and /usr, if prefix is not "".
+	for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
+	do
 		if [ -d $i ]; then
-			cp -dPr $i ${D}/busybox/
+			cp -pPR $i ${D}/busybox/
 		fi
 	done
 	# Move the busybox binary back to /bin
-- 
1.5.6.5




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:40 ` Michael Smith
  2009-05-26  3:44   ` Michael Smith
@ 2009-05-26 16:01   ` Phil Blundell
  2009-05-27  1:53     ` Michael Smith
  1 sibling, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-05-26 16:01 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-05-25 at 23:40 -0400, Michael Smith wrote:
> On Mon, 25 May 2009, Michael Smith wrote:
> 
> > +	for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
> > +	do
> >  		if [ -d $i ]; then
> > -			cp -dPr $i ${D}/busybox/
> > +			cp -pPR $i ${D}/busybox/
> >  		fi
> >  	done
> 
> I missed this in the commit message: I changed cp -dPr -> -pPR to match 
> the options given a few lines above. -d implies -P, and -r/-R are 
> equivalent, so I suspected a typo. I'll resend with a new description.

Good spotting.  There seems to be more wrong with this code than that,
though: the comment above says "Move everything to /busybox...", but the
code (both before and after your change) seems to copy rather than
moving which would appear to defeat the point of this whole block of
code.  We had a discussion about this on IRC a few weeks ago but I don't
think there was any real conclusion to that.

It looks from the git history as though this stuff has been broken for a
while (since busybox_1.9.1 at least) but I didn't have the patience to
chase it back any further than that. 

Anyway, if you felt like having a go at fixing this too, that'd be
awesome. 

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:35 [PATCH] busybox: allow building when prefix is "", not "/usr" Michael Smith
  2009-05-26  3:40 ` Michael Smith
@ 2009-05-26 16:16 ` Phil Blundell
  2009-06-05 13:11 ` Phil Blundell
  2 siblings, 0 replies; 23+ messages in thread
From: Phil Blundell @ 2009-05-26 16:16 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-05-25 at 23:35 -0400, Michael Smith wrote:
> For insane backwards compatibility reasons (my own fault) I would like
> to be able to create packages with no /usr and /sbin == /bin. Most
> autoconf packages are happy about this; busybox just needs a little
> help.

This looks pretty cool.  I've been thinking for a while that it would be
nice to eliminate /usr for embedded distros such as micro (and maybe
minimal).  That separation is basically just a waste of time and space
on those kinds of devices.

> btw, I have not yet figured out where ${layout_blah} vs. ${blah}
> should be used (e.g. ${layout_prefix} and ${prefix}). I've tried to be
> consistent, so I figure there's a 50% chance I guessed right.

I'm not quite sure either but I think the recipes should probably always
be using ${blah}, as you've done.  I don't remember now why I introduced
${layout_blah} into busybox.bb in the first place but I suspect it was
probably an attempt to work around some kind of Qt and/or MythTV-related
path lossage.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26 16:01   ` [PATCH] busybox: allow building when prefix is "", not "/usr" Phil Blundell
@ 2009-05-27  1:53     ` Michael Smith
  2009-05-27 10:36       ` Phil Blundell
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-05-27  1:53 UTC (permalink / raw)
  To: openembedded-devel

On Tue, 26 May 2009, Phil Blundell wrote:

> Good spotting.  There seems to be more wrong with this code than that,
> though: the comment above says "Move everything to /busybox...", but the
> code (both before and after your change) seems to copy rather than
> moving which would appear to defeat the point of this whole block of
> code.  We had a discussion about this on IRC a few weeks ago but I don't
> think there was any real conclusion to that.

Oh yeah... heh... I guess that copy kind of defeats the purpose. The 
package ends up containing all the symlinks instead of letting 
update-alternatives take care of it in postinst.

I changed the "cp" back to "mv" and the package looks a bit lighter on 
symlinks, and the final rootfs is the same. I'd still want to play a bit 
with upgrades though, and that may be a while. If it looks OK, I'll send 
it up as a separate patch later.

This is where it changed from mv to cp:

commit f7f1ac27e90f042fa1c4322b193b5b6a27cd4c07
Author: Koen Kooi <koen@openembedded.org>
Date:   Sat Aug 26 14:02:37 2006 +0000

    busybox 1.2.1: replace mv with a non-gnu-ish cp


Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-27  1:53     ` Michael Smith
@ 2009-05-27 10:36       ` Phil Blundell
  0 siblings, 0 replies; 23+ messages in thread
From: Phil Blundell @ 2009-05-27 10:36 UTC (permalink / raw)
  To: openembedded-devel

On Tue, 2009-05-26 at 21:53 -0400, Michael Smith wrote:
> I changed the "cp" back to "mv" and the package looks a bit lighter on 
> symlinks, and the final rootfs is the same. I'd still want to play a bit 
> with upgrades though, and that may be a while. If it looks OK, I'll send 
> it up as a separate patch later.
> 
> This is where it changed from mv to cp:
> 
> commit f7f1ac27e90f042fa1c4322b193b5b6a27cd4c07
> Author: Koen Kooi <koen@openembedded.org>
> Date:   Sat Aug 26 14:02:37 2006 +0000
> 
>     busybox 1.2.1: replace mv with a non-gnu-ish cp

Okay, great.  Yeah, that commit f7f1ac27e90f042fa1c4322b193b5b6a27cd4c07
looks fairly bogus: I don't know what the intent of it was, but it
doesn't seem like it can be the right way to solve any problem.

Keep us posted once you've had a chance to test the upgrades.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:44   ` Michael Smith
@ 2009-06-03 18:44     ` Phil Blundell
  2009-06-03 19:50       ` Michael Smith
  0 siblings, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-06-03 18:44 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-05-25 at 23:44 -0400, Michael Smith wrote:
> There was code to handle this, but it needed a tweak to prevent copying
> a directory on top of itself. Other prefixes (besides /usr) may also
> work now, but this is untested.
> 
> busybox will also build when base_sbindir is "/bin" instead of "/sbin".
> 
> Also correct possible typo: "cp -dPr" to "cp -pPR", to match the usage
> a few lines above. -d implies -P.

I've checked this in now.  Thanks for the patch.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-06-03 18:44     ` Phil Blundell
@ 2009-06-03 19:50       ` Michael Smith
  2009-06-03 20:14         ` Phil Blundell
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-06-03 19:50 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> On Mon, 2009-05-25 at 23:44 -0400, Michael Smith wrote:
>> There was code to handle this, but it needed a tweak to prevent copying
>> a directory on top of itself. Other prefixes (besides /usr) may also
>> work now, but this is untested.
>>
>> busybox will also build when base_sbindir is "/bin" instead of "/sbin".
>>
>> Also correct possible typo: "cp -dPr" to "cp -pPR", to match the usage
>> a few lines above. -d implies -P.
> 
> I've checked this in now.  Thanks for the patch.

Heh... I actually did up a new series this morning with a simpler fix. 
Was going to send it in tonight. :)

I don't know if you want to revert it, or I can just rebase.

Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-06-03 19:50       ` Michael Smith
@ 2009-06-03 20:14         ` Phil Blundell
  2009-06-03 20:31           ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Michael Smith
  0 siblings, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-06-03 20:14 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-06-03 at 15:50 -0400, Michael Smith wrote:
> Phil Blundell wrote:
> > On Mon, 2009-05-25 at 23:44 -0400, Michael Smith wrote:
> >> There was code to handle this, but it needed a tweak to prevent copying
> >> a directory on top of itself. Other prefixes (besides /usr) may also
> >> work now, but this is untested.
> >>
> >> busybox will also build when base_sbindir is "/bin" instead of "/sbin".
> >>
> >> Also correct possible typo: "cp -dPr" to "cp -pPR", to match the usage
> >> a few lines above. -d implies -P.
> > 
> > I've checked this in now.  Thanks for the patch.
> 
> Heh... I actually did up a new series this morning with a simpler fix. 
> Was going to send it in tonight. :)
> 
> I don't know if you want to revert it, or I can just rebase.

Doh!  Oh well, probably easiest for you to just rebase your tree and
diff against what's there now.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR
  2009-06-03 20:14         ` Phil Blundell
@ 2009-06-03 20:31           ` Michael Smith
  2009-06-03 20:31             ` [PATCH 2/2] busybox: Split syslog initscript into busybox-syslog Michael Smith
  2009-06-05 11:27             ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Phil Blundell
  0 siblings, 2 replies; 23+ messages in thread
From: Michael Smith @ 2009-06-03 20:31 UTC (permalink / raw)
  To: openembedded-devel

Back in 2005, commit 5e01906b set this up; in f7f1ac27 the recipe
was changed to keep all the links in the package.

This changes it back, and also removes special treatment of the
links for crond, httpd, udhcpd, hwclock, and udhcpc.

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/busybox/busybox-static_1.11.3.bb |    2 +-
 recipes/busybox/busybox.inc              |   46 ++++-------------------------
 recipes/busybox/busybox_1.11.3.bb        |    2 +-
 recipes/busybox/busybox_1.13.2.bb        |    2 +-
 recipes/busybox/busybox_1.2.1.bb         |    2 +-
 recipes/busybox/busybox_1.2.2.bb         |    2 +-
 recipes/busybox/busybox_1.3.1.bb         |    2 +-
 recipes/busybox/busybox_1.7.2.bb         |    2 +-
 recipes/busybox/busybox_1.9.2.bb         |    2 +-
 9 files changed, 15 insertions(+), 47 deletions(-)

diff --git a/recipes/busybox/busybox-static_1.11.3.bb b/recipes/busybox/busybox-static_1.11.3.bb
index 9529ab7..6523fa9 100644
--- a/recipes/busybox/busybox-static_1.11.3.bb
+++ b/recipes/busybox/busybox-static_1.11.3.bb
@@ -1,5 +1,5 @@
 require busybox_${PV}.bb
-PR = "r4"
+PR = "${INC_PR}.1"
 
 FILESPATH = "${FILE_DIRNAME}/busybox-${PV}:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
 S = "${WORKDIR}/busybox-${PV}"
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 04f2cf4..e312147 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,6 +11,8 @@ LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
 
+INC_PR = "r20"
+
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
   file://busybox-cron \
@@ -71,64 +73,30 @@ do_install () {
 		mv busybox.links.new busybox.links
 	fi
 
-	unset CFLAGS CPPFLAGS CXXFLAGS
 	install -d ${D}${sysconfdir}/init.d
-	oe_runmake "PREFIX=${D}" install
-	cp -pPR ${S}/_install/* ${D}/
-
-	# Move everything to /busybox (not supposed to end up in any package)
-	install -d ${D}/busybox
-	ls ${D} -R
 
-	# Copy /bin and /sbin -- and /usr, if prefix is not "".
-	for i in ${D}${base_bindir} ${D}${base_sbindir} ${prefix:+${D}${prefix}}
-	do
-		if [ -d $i ]; then
-			cp -pPR $i ${D}/busybox/
-		fi
-	done
-	# Move the busybox binary back to /bin
+	# Install /bin/busybox, and the /bin/sh link so the postinst script
+	# can run. Let update-alternatives handle the rest.
 	install -d ${D}${base_bindir}
-	mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
-	# Move back the sh symlink
-	test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+	install -m 0755 ${S}/busybox ${D}${base_bindir}
+	ln -sf busybox ${D}${base_bindir}/sh
 
 	install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
 	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
 	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
-		# Move crond back to /usr/sbin/crond
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
-
 		install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
 	fi
 	if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
-		# Move httpd back to /usr/sbin/httpd
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
-
 		install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
 		install -d ${D}/srv/www
 	fi
 	if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
-		# Move udhcpd back to /usr/sbin/udhcpd
-		install -d ${D}${sbindir}
-		mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
-
 		install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
 	fi
 	if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
-		# Move hwclock back to /sbin/hwclock
-		install -d ${D}${base_sbindir}
-		mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
-
 		install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
 	fi
 	if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
-		# Move dhcpc back to /usr/sbin/udhcpc
-		install -d ${D}${base_sbindir}
-		mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
-
 		install -d ${D}${sysconfdir}/udhcpc.d
 		install -d ${D}${datadir}/udhcpc
 		install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index bd03aa8..673fe15 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r15"
+PR = "${INC_PR}.1"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index 96d0f0b..c1cc51b 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r19"
+PR = "${INC_PR}.1"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
diff --git a/recipes/busybox/busybox_1.2.1.bb b/recipes/busybox/busybox_1.2.1.bb
index 63a93df..3630a46 100644
--- a/recipes/busybox/busybox_1.2.1.bb
+++ b/recipes/busybox/busybox_1.2.1.bb
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r19"
+PR = "${INC_PR}.1"
 
 SRC_URI += "file://wget-long-options.patch;patch=1 \
 	   file://df_rootfs.patch;patch=1 \
diff --git a/recipes/busybox/busybox_1.2.2.bb b/recipes/busybox/busybox_1.2.2.bb
index fe9d07e..43a15d0 100644
--- a/recipes/busybox/busybox_1.2.2.bb
+++ b/recipes/busybox/busybox_1.2.2.bb
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r5"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
diff --git a/recipes/busybox/busybox_1.3.1.bb b/recipes/busybox/busybox_1.3.1.bb
index 2cdb81b..e0fd63b 100644
--- a/recipes/busybox/busybox_1.3.1.bb
+++ b/recipes/busybox/busybox_1.3.1.bb
@@ -1,6 +1,6 @@
 require busybox.inc
 
-PR = "r5"
+PR = "${INC_PR}.1"
 
 DEFAULT_PREFERENCE = "-1"
 
diff --git a/recipes/busybox/busybox_1.7.2.bb b/recipes/busybox/busybox_1.7.2.bb
index 87d336b..6af073f 100644
--- a/recipes/busybox/busybox_1.7.2.bb
+++ b/recipes/busybox/busybox_1.7.2.bb
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r13"
+PR = "${INC_PR}.1"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
            file://busybox-cron \
diff --git a/recipes/busybox/busybox_1.9.2.bb b/recipes/busybox/busybox_1.9.2.bb
index e9aa820..64f9c62 100644
--- a/recipes/busybox/busybox_1.9.2.bb
+++ b/recipes/busybox/busybox_1.9.2.bb
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r6"
+PR = "${INC_PR}.1"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
            file://udhcpscript.patch;patch=1 \
-- 
1.6.3




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH 2/2] busybox: Split syslog initscript into busybox-syslog
  2009-06-03 20:31           ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Michael Smith
@ 2009-06-03 20:31             ` Michael Smith
  2009-06-05 11:27             ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Phil Blundell
  1 sibling, 0 replies; 23+ messages in thread
From: Michael Smith @ 2009-06-03 20:31 UTC (permalink / raw)
  To: openembedded-devel

The same is already done for httpd and udhcpd.

This fixes Busybox deb upgrades: the prerm script was failing because
the last command "/etc/init.d/syslog stop", added by the update-rc.d
class, runs after the /bin/sh symlink has been removed.

Many images expect busybox to contain the syslog initscript, so busybox
RRECOMMENDS busybox-syslog.

busybox-{syslog,httpd,udhcpd} now RDEPEND on busybox, for consistency
with other packages in the recipe (e.g. busybox-mdev).

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/busybox/busybox.inc |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index e312147..1f2731d 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -33,24 +33,34 @@ SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
 
 export EXTRA_CFLAGS = "${CFLAGS}"
 EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
-PACKAGES =+ "${PN}-httpd ${PN}-udhcpd"
+PACKAGES =+ "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+
 # We need this RRECOMMENDS because libc dlopens libgcc
 # and shlib mechanism can not detect it because its not
 # listed in the NEEDED field.
 RRECOMMENDS += "libgcc"
+
+# Make busybox recommend busybox-syslog for those images that expect it
+RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
+
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 
 FILES_${PN} += "${datadir}/udhcpc"
 
-INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
+INITSCRIPT_NAME_${PN}-syslog = "syslog"
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
-INITSCRIPT_NAME_${PN} = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf"
 
 # This disables the syslog startup links in slugos (see slugos-init)
-INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
+INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
+
+RDEPENDS_${PN}-httpd += "${PN}"
+RDEPENDS_${PN}-syslog += "${PN}"
+RDEPENDS_${PN}-udhcpd += "${PN}"
 
 # Use gcc for linking so LDFLAGS actually makes sense
 LD = "${CC} -nostdlib"
@@ -81,8 +91,10 @@ do_install () {
 	install -m 0755 ${S}/busybox ${D}${base_bindir}
 	ln -sf busybox ${D}${base_bindir}/sh
 
-	install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
-	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+	if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
+		install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+		install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+	fi
 	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
 		install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
 	fi
-- 
1.6.3




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR
  2009-06-03 20:31           ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Michael Smith
  2009-06-03 20:31             ` [PATCH 2/2] busybox: Split syslog initscript into busybox-syslog Michael Smith
@ 2009-06-05 11:27             ` Phil Blundell
  1 sibling, 0 replies; 23+ messages in thread
From: Phil Blundell @ 2009-06-05 11:27 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-06-03 at 16:31 -0400, Michael Smith wrote:
> Back in 2005, commit 5e01906b set this up; in f7f1ac27 the recipe
> was changed to keep all the links in the package.
> 
> This changes it back, and also removes special treatment of the
> links for crond, httpd, udhcpd, hwclock, and udhcpc.
> 
> Signed-off-by: Michael Smith <msmith@cbnco.com>

Thanks, looks good (and it works for me with the "micro" distro).  I
checked this in.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-05-26  3:35 [PATCH] busybox: allow building when prefix is "", not "/usr" Michael Smith
  2009-05-26  3:40 ` Michael Smith
  2009-05-26 16:16 ` Phil Blundell
@ 2009-06-05 13:11 ` Phil Blundell
  2009-06-05 13:29   ` Michael Smith
  2 siblings, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-06-05 13:11 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-05-25 at 23:35 -0400, Michael Smith wrote:
> For insane backwards compatibility reasons (my own fault) I would like
> to be able to create packages with no /usr and /sbin == /bin. Most
> autoconf packages are happy about this; busybox just needs a little

I found one more issuette: busybox udhcpc still expects to find its
scripts in /usr/share/udhcpc irrespective of where ${datadir} actually
points to (/share in my case).  Can I persuade you to take a look at
that?

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-06-05 13:11 ` Phil Blundell
@ 2009-06-05 13:29   ` Michael Smith
  2009-06-05 13:57     ` Phil Blundell
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-06-05 13:29 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> On Mon, 2009-05-25 at 23:35 -0400, Michael Smith wrote:
>> For insane backwards compatibility reasons (my own fault) I would like
>> to be able to create packages with no /usr and /sbin == /bin. Most
>> autoconf packages are happy about this; busybox just needs a little
> 
> I found one more issuette: busybox udhcpc still expects to find its
> scripts in /usr/share/udhcpc irrespective of where ${datadir} actually
> points to (/share in my case).  Can I persuade you to take a look at
> that?

This is in the defconfig (CONFIG_UDHCPC_DEFAULT_SCRIPT). We might be 
able to get around it by passing 
-DCONFIG_UDHCPC_DEFAULT_SCRIPT=${datadir}/udhcpc/default.script as a CFLAG.

It would make it a bit harder for someone to change the script name for 
their distro. Should just leave it up to distros to fix the script name, 
or should I force it as a CFLAG? (BTW, in my distro I pass a flag to 
udhcpc to use an entirely different script path.)

I've also found it makes life easier to have symlinks for /usr pointing 
to ., and /sbin pointing to /bin. It means if I miss a hardcoded path in 
a binary like this, the package still works. But I have to chase down 
any packages that actually install files to /usr or /sbin -- otherwise 
when they're upgraded, dpkg removes the symlink and creates a /usr/bin 
or /sbin with one file in it :)

Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-06-05 13:29   ` Michael Smith
@ 2009-06-05 13:57     ` Phil Blundell
  2009-06-07 20:38       ` Michael Smith
  0 siblings, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-06-05 13:57 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 2009-06-05 at 09:29 -0400, Michael Smith wrote:
> This is in the defconfig (CONFIG_UDHCPC_DEFAULT_SCRIPT). We might be 
> able to get around it by passing 
> -DCONFIG_UDHCPC_DEFAULT_SCRIPT=${datadir}/udhcpc/default.script as a CFLAG.

Ah, so it is.

How about changing the defconfig file to read:

CONFIG_UDHCPC_DEFAULT_SCRIPT="!DATADIR!/udhcpc/default.script"

and then, in do_configure, replacing the straight "install" with
something like:

sed 's#!DATADIR!#${datadir}#' < ${WORKDIR}/defconfig > ${S}/.config

Those folks with custom defconfigs shouldn't notice any difference
unless they were unlucky enough to have written "!DATADIR!" somewhere in
them. :-}

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: allow building when prefix is "", not "/usr".
  2009-06-05 13:57     ` Phil Blundell
@ 2009-06-07 20:38       ` Michael Smith
  2009-06-07 20:43         ` [PATCH] busybox: Split syslog initscript into busybox-syslog Michael Smith
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-06-07 20:38 UTC (permalink / raw)
  To: openembedded-devel

On Fri, 5 Jun 2009, Phil Blundell wrote:

> On Fri, 2009-06-05 at 09:29 -0400, Michael Smith wrote:
> > This is in the defconfig (CONFIG_UDHCPC_DEFAULT_SCRIPT).
> 
> Ah, so it is.
> 
> How about changing the defconfig file to read:
> 
> CONFIG_UDHCPC_DEFAULT_SCRIPT="!DATADIR!/udhcpc/default.script"

OK, sounds good. I'll do that for busybox-1.13.2/defconfig, but I'll leave 
the defconfigs for distros (angstrom, slugos, kaeilos) as they were.

Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [PATCH] busybox: Split syslog initscript into busybox-syslog
  2009-06-07 20:38       ` Michael Smith
@ 2009-06-07 20:43         ` Michael Smith
  2009-06-07 20:43           ` [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr" Michael Smith
  2009-06-08  9:52           ` [PATCH] busybox: Split syslog initscript into busybox-syslog Phil Blundell
  0 siblings, 2 replies; 23+ messages in thread
From: Michael Smith @ 2009-06-07 20:43 UTC (permalink / raw)
  To: openembedded-devel

The same is already done for httpd and udhcpd.

This fixes Busybox deb upgrades: the prerm script was failing because
the last command "/etc/init.d/syslog stop", added by the update-rc.d
class, runs after the /bin/sh symlink has been removed.

Many images expect busybox to contain the syslog initscript, so busybox
RRECOMMENDS busybox-syslog.

busybox-{syslog,httpd,udhcpd} now RDEPEND on busybox, for consistency
with other packages in the recipe (e.g. busybox-mdev).

Signed-off-by: Michael Smith <msmith@cbnco.com>
---

Resend, rebased after Koen's change to add busybox-mountall.

 recipes/busybox/busybox.inc |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 106938e..19e49fa 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -33,26 +33,37 @@ SRC_URI_append_nylon = " file://xargs-double-size.patch;patch=1"
 
 export EXTRA_CFLAGS = "${CFLAGS}"
 EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
-PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-udhcpd"
+PACKAGES =+ "${PN}-mountall ${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+
 # We need this RRECOMMENDS because libc dlopens libgcc
 # and shlib mechanism can not detect it because its not
 # listed in the NEEDED field.
 RRECOMMENDS += "libgcc"
+
 FILES_${PN}-mountall = "${sysconfdir}/default/mountall"
 RDEPENDS_${PN} += "${PN}-mountall"
+
+# Make busybox recommend busybox-syslog for those images that expect it
+RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
+
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
 FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
 
 FILES_${PN} += "${datadir}/udhcpc"
 
-INITSCRIPT_PACKAGES = "${PN} ${PN}-httpd ${PN}-udhcpd"
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
+INITSCRIPT_NAME_${PN}-syslog = "syslog"
 INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
-INITSCRIPT_NAME_${PN} = "syslog"
-CONFFILES_${PN} = "${sysconfdir}/syslog.conf"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog.conf"
 
 # This disables the syslog startup links in slugos (see slugos-init)
-INITSCRIPT_PARAMS_${PN}_slugos = "start 20 ."
+INITSCRIPT_PARAMS_${PN}-syslog_slugos = "start 20 ."
+
+RDEPENDS_${PN}-httpd += "${PN}"
+RDEPENDS_${PN}-syslog += "${PN}"
+RDEPENDS_${PN}-udhcpd += "${PN}"
 
 # Use gcc for linking so LDFLAGS actually makes sense
 LD = "${CC} -nostdlib"
@@ -83,8 +94,10 @@ do_install () {
 	install -m 0755 ${S}/busybox ${D}${base_bindir}
 	ln -sf busybox ${D}${base_bindir}/sh
 
-	install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
-	install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+	if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
+		install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+		install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+	fi
 	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
 		install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
 	fi
-- 
1.6.3




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr"
  2009-06-07 20:43         ` [PATCH] busybox: Split syslog initscript into busybox-syslog Michael Smith
@ 2009-06-07 20:43           ` Michael Smith
  2009-06-08  9:39             ` Phil Blundell
  2009-06-08  9:52           ` [PATCH] busybox: Split syslog initscript into busybox-syslog Phil Blundell
  1 sibling, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-06-07 20:43 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/busybox/busybox-1.13.2/defconfig |    2 +-
 recipes/busybox/busybox.inc              |    8 +++++++-
 recipes/busybox/busybox_1.11.3.bb        |    5 -----
 recipes/busybox/busybox_1.13.2.bb        |    6 ++----
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/recipes/busybox/busybox-1.13.2/defconfig b/recipes/busybox/busybox-1.13.2/defconfig
index 0db650f..ddbaa08 100644
--- a/recipes/busybox/busybox-1.13.2/defconfig
+++ b/recipes/busybox/busybox-1.13.2/defconfig
@@ -720,7 +720,7 @@ CONFIG_FEATURE_UDHCPC_ARPING=y
 # CONFIG_FEATURE_UDHCP_PORT is not set
 # CONFIG_UDHCP_DEBUG is not set
 # CONFIG_FEATURE_UDHCP_RFC3397 is not set
-CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
+CONFIG_UDHCPC_DEFAULT_SCRIPT="@DATADIR@/udhcpc/default.script"
 CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
 # CONFIG_VCONFIG is not set
 CONFIG_WGET=y
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 19e49fa..7b9b929 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPL"
 SECTION = "base"
 PRIORITY = "required"
 
-INC_PR = "r20"
+INC_PR = "r21"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
@@ -70,6 +70,12 @@ LD = "${CC} -nostdlib"
 
 inherit cml1 update-rc.d
 
+do_configure () {
+	sed -e 's#@DATADIR@#${datadir}#g' \
+		< ${WORKDIR}/defconfig > ${S}/.config
+	cml1_do_configure
+}
+
 do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS
 	base_do_compile
diff --git a/recipes/busybox/busybox_1.11.3.bb b/recipes/busybox/busybox_1.11.3.bb
index 673fe15..5518264 100644
--- a/recipes/busybox/busybox_1.11.3.bb
+++ b/recipes/busybox/busybox_1.11.3.bb
@@ -25,11 +25,6 @@ SRC_URI = "\
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
 
-do_configure () {
-	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
-	cml1_do_configure
-}
-
 do_install_append() {
     install -m 0644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/
     install -d ${D}${sysconfdir}/init.d/
diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb
index c1cc51b..03a7208 100644
--- a/recipes/busybox/busybox_1.13.2.bb
+++ b/recipes/busybox/busybox_1.13.2.bb
@@ -39,12 +39,10 @@ SRC_URI = "\
 
 EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
 
-do_configure () {
-	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+do_configure_prepend () {
 	if [ "${TARGET_ARCH}" = "avr32" ] ; then
-		sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${S}/.config
+		sed -i s:CONFIG_FEATURE_OSF_LABEL=y:CONFIG_FEATURE_OSF_LABEL=n: ${WORKDIR}/defconfig
 	fi
-	cml1_do_configure
 }
 
 do_install_append() {
-- 
1.6.3




^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr"
  2009-06-07 20:43           ` [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr" Michael Smith
@ 2009-06-08  9:39             ` Phil Blundell
  0 siblings, 0 replies; 23+ messages in thread
From: Phil Blundell @ 2009-06-08  9:39 UTC (permalink / raw)
  To: openembedded-devel

On Sun, 2009-06-07 at 16:43 -0400, Michael Smith wrote:
> -CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
> +CONFIG_UDHCPC_DEFAULT_SCRIPT="@DATADIR@/udhcpc/default.script"

Great, thanks.  I tested this with a qemux86 build and it seems to work
fine, so I checked it in.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: Split syslog initscript into busybox-syslog
  2009-06-07 20:43         ` [PATCH] busybox: Split syslog initscript into busybox-syslog Michael Smith
  2009-06-07 20:43           ` [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr" Michael Smith
@ 2009-06-08  9:52           ` Phil Blundell
  2009-06-08 13:24             ` Michael Smith
  1 sibling, 1 reply; 23+ messages in thread
From: Phil Blundell @ 2009-06-08  9:52 UTC (permalink / raw)
  To: openembedded-devel

On Sun, 2009-06-07 at 16:43 -0400, Michael Smith wrote:
> +# Make busybox recommend busybox-syslog for those images that expect it
> +RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"

I guess it'd be a good idea to make this conditional on
CONFIG_SYSLOGD=y.  Otherwise, folks who build with syslogd off will see
a confusing "unsatisfied recommendation" diagnostic whenever they
install busybox.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: Split syslog initscript into busybox-syslog
  2009-06-08  9:52           ` [PATCH] busybox: Split syslog initscript into busybox-syslog Phil Blundell
@ 2009-06-08 13:24             ` Michael Smith
  2009-06-08 14:06               ` Phil Blundell
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Smith @ 2009-06-08 13:24 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> On Sun, 2009-06-07 at 16:43 -0400, Michael Smith wrote:
>> +# Make busybox recommend busybox-syslog for those images that expect it
>> +RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
> 
> I guess it'd be a good idea to make this conditional on
> CONFIG_SYSLOGD=y.  Otherwise, folks who build with syslogd off will see
> a confusing "unsatisfied recommendation" diagnostic whenever they
> install busybox.

Hi Phil,

I think you had suggested using add_task to insert a Python block after 
do_fetch and before do_compile to modify RRECOMMENDS_${PN} conditionally 
based on ${WORKDIR}/defconfig.

What I'm wondering is how would that modification get persisted if, say, 
bitbake failed during do_compile, and then I restarted it? Would it 
think from the stamp that it's already done do_mangle_rrecommmends, and 
not bother running it again? Then RRECOMMENDS_${PN} would go back to 
whatever it was at parse time, i.e. no busybox-syslog. Is there a way 
around that?

Thanks,
Mike



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [PATCH] busybox: Split syslog initscript into busybox-syslog
  2009-06-08 13:24             ` Michael Smith
@ 2009-06-08 14:06               ` Phil Blundell
  0 siblings, 0 replies; 23+ messages in thread
From: Phil Blundell @ 2009-06-08 14:06 UTC (permalink / raw)
  To: openembedded-devel

On Mon, 2009-06-08 at 09:24 -0400, Michael Smith wrote:
> What I'm wondering is how would that modification get persisted if, say, 
> bitbake failed during do_compile, and then I restarted it? Would it 
> think from the stamp that it's already done do_mangle_rrecommmends, and 
> not bother running it again? Then RRECOMMENDS_${PN} would go back to 
> whatever it was at parse time, i.e. no busybox-syslog. Is there a way 
> around that?

Ah, yes, right.  The easiest way to deal with that would be to have the
function that does the mangling be called during do_package (i.e. listed
in PACKAGEFUNCS) rather than as a separate task.  This is where things
like the shared library dependencies are computed as well.

p.





^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-06-08 14:16 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26  3:35 [PATCH] busybox: allow building when prefix is "", not "/usr" Michael Smith
2009-05-26  3:40 ` Michael Smith
2009-05-26  3:44   ` Michael Smith
2009-06-03 18:44     ` Phil Blundell
2009-06-03 19:50       ` Michael Smith
2009-06-03 20:14         ` Phil Blundell
2009-06-03 20:31           ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Michael Smith
2009-06-03 20:31             ` [PATCH 2/2] busybox: Split syslog initscript into busybox-syslog Michael Smith
2009-06-05 11:27             ` [PATCH 1/2] busybox: let update-alternatives create all symlinks, and use INC_PR Phil Blundell
2009-05-26 16:01   ` [PATCH] busybox: allow building when prefix is "", not "/usr" Phil Blundell
2009-05-27  1:53     ` Michael Smith
2009-05-27 10:36       ` Phil Blundell
2009-05-26 16:16 ` Phil Blundell
2009-06-05 13:11 ` Phil Blundell
2009-06-05 13:29   ` Michael Smith
2009-06-05 13:57     ` Phil Blundell
2009-06-07 20:38       ` Michael Smith
2009-06-07 20:43         ` [PATCH] busybox: Split syslog initscript into busybox-syslog Michael Smith
2009-06-07 20:43           ` [PATCH] busybox: fix udhcpc default script location when prefix is not "/usr" Michael Smith
2009-06-08  9:39             ` Phil Blundell
2009-06-08  9:52           ` [PATCH] busybox: Split syslog initscript into busybox-syslog Phil Blundell
2009-06-08 13:24             ` Michael Smith
2009-06-08 14:06               ` Phil Blundell

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.