All of lore.kernel.org
 help / color / mirror / Atom feed
* busybox & syslog init script
@ 2009-06-03  1:27 Michael Smith
  2009-06-03  9:49 ` Phil Blundell
  2009-06-03 17:01 ` Otavio Salvador
  0 siblings, 2 replies; 7+ messages in thread
From: Michael Smith @ 2009-06-03  1:27 UTC (permalink / raw)
  To: openembedded-devel

Hi,

Currently busybox deb upgrades break (at least with Busybox dpkg): the 
prerm script returns failure because the last command executed is 
"/etc/init.d/syslog stop", and by then the /bin/sh link has been removed 
so the #!/bin/sh line fails to find the interpreter. (Even if it could, 
the start-stop-daemon link would be gone, too.)

busybox inherits update-rc.d, and updatercd_prerm() is always appended 
onto the end of the prerm; I don't know of a way to make it prepend 
instead. So I figure there are two ways to fix it:

1) split the syslog initscript into busybox-syslog, as is already done for 
busybox-httpd and busybox-udhcpd;
2) or, manually handle the stuff the update-rc.d class would normally take 
care of for busybox, so the syslog initscript stays in the busybox 
package.

I'd prefer #1, but I don't think I could ever track down all the in-tree 
and out-of-tree images that depend on busybox, and add "busybox-syslog" to 
all of them. I guess I'll try #2. Just checking if someone has a better 
idea.

Thanks,
Mike



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

* Re: busybox & syslog init script
  2009-06-03  1:27 busybox & syslog init script Michael Smith
@ 2009-06-03  9:49 ` Phil Blundell
  2009-06-03 14:09   ` Michael Smith
  2009-06-03 17:01 ` Otavio Salvador
  1 sibling, 1 reply; 7+ messages in thread
From: Phil Blundell @ 2009-06-03  9:49 UTC (permalink / raw)
  To: openembedded-devel

On Tue, 2009-06-02 at 21:27 -0400, Michael Smith wrote:
> 1) split the syslog initscript into busybox-syslog, as is already done for 
> busybox-httpd and busybox-udhcpd;
> 2) or, manually handle the stuff the update-rc.d class would normally take 
> care of for busybox, so the syslog initscript stays in the busybox 
> package.
> 
> I'd prefer #1, but I don't think I could ever track down all the in-tree 
> and out-of-tree images that depend on busybox, and add "busybox-syslog" to 
> all of them. I guess I'll try #2. Just checking if someone has a better 
> idea.

The only practical way to do #1 is to make busybox Depend: on the
newly-created busybox-syslog package.  Otherwise, folks who do "ipkg
install busybox" in the expectation of getting the syslog bits will be
disappointed.  This means that there's no need to root out all the
images and add busybox-syslog explicitly; it'll be pulled in
automatically when the images are created.

If that works for you then I think you might as well go ahead and do #1.
Otherwise, yes, I agree that #2 sounds like the only other viable
option.

p.





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

* Re: busybox & syslog init script
  2009-06-03  9:49 ` Phil Blundell
@ 2009-06-03 14:09   ` Michael Smith
  2009-06-03 14:23     ` Phil Blundell
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Smith @ 2009-06-03 14:09 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> On Tue, 2009-06-02 at 21:27 -0400, Michael Smith wrote:
>> 1) split the syslog initscript into busybox-syslog, as is already done for 
>> busybox-httpd and busybox-udhcpd;

> The only practical way to do #1 is to make busybox Depend: on the
> newly-created busybox-syslog package.  Otherwise, folks who do "ipkg
> install busybox" in the expectation of getting the syslog bits will be
> disappointed.

Would RRECOMMENDS have the same effect? It works for rootfs 
(busybox-syslog ends up in the root image). But I don't know if ipkg 
cares about recommends.

I'd prefer RRECOMMENDS to RDEPENDS, because if I don't have 
CONFIG_SYSLOGD=y, I can make busybox-syslog be empty so it won't get 
created and nothing will complain.

Mike



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

* Re: busybox & syslog init script
  2009-06-03 14:09   ` Michael Smith
@ 2009-06-03 14:23     ` Phil Blundell
  2009-06-03 14:54       ` Michael Smith
  0 siblings, 1 reply; 7+ messages in thread
From: Phil Blundell @ 2009-06-03 14:23 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-06-03 at 10:09 -0400, Michael Smith wrote:
> Phil Blundell wrote:
> > On Tue, 2009-06-02 at 21:27 -0400, Michael Smith wrote:
> >> 1) split the syslog initscript into busybox-syslog, as is already done for 
> >> busybox-httpd and busybox-udhcpd;
> 
> > The only practical way to do #1 is to make busybox Depend: on the
> > newly-created busybox-syslog package.  Otherwise, folks who do "ipkg
> > install busybox" in the expectation of getting the syslog bits will be
> > disappointed.
> 
> Would RRECOMMENDS have the same effect? It works for rootfs 
> (busybox-syslog ends up in the root image). But I don't know if ipkg 
> cares about recommends.
> 
> I'd prefer RRECOMMENDS to RDEPENDS, because if I don't have 
> CONFIG_SYSLOGD=y, I can make busybox-syslog be empty so it won't get 
> created and nothing will complain.

RRECOMMENDS would work, but ipkg will issue an ugly diagnostic
("unsatisfied recommendation for...") if busybox-syslog is missing.  I'm
not sure what other package managers will do here.

It might be better to stick with RDEPENDS and either (i) arrange for the
dependency to be conditional on CONFIG_SYSLOGD having been enabled,
which you could do with a bit of python in busybox.bb, or (ii) write a
bit of general-purpose post-processing code in package.bbclass to knock
out dependencies on empty packages that have been eliminated.

p.





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

* Re: busybox & syslog init script
  2009-06-03 14:23     ` Phil Blundell
@ 2009-06-03 14:54       ` Michael Smith
  2009-06-03 15:16         ` Phil Blundell
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Smith @ 2009-06-03 14:54 UTC (permalink / raw)
  To: openembedded-devel

Phil Blundell wrote:
> On Wed, 2009-06-03 at 10:09 -0400, Michael Smith wrote:
>> I'd prefer RRECOMMENDS to RDEPENDS, because if I don't have 
>> CONFIG_SYSLOGD=y, I can make busybox-syslog be empty so it won't get 
>> created and nothing will complain.

> RRECOMMENDS would work, but ipkg will issue an ugly diagnostic
> ("unsatisfied recommendation for...") if busybox-syslog is missing.  I'm
> not sure what other package managers will do here.

Yeah, me neither. I can say Busybox dpkg doesn't grok Recommends (or 
dependencies, as far as I know :)

apt-get (used in rootfs_deb) doesn't seem to print a warning when the 
recommended package is missing.

I'm reluctant to use RDEPENDS because for other, similar packages in the 
recipe (e.g. busybox-mdev), the dependency goes in the opposite 
direction: busybox-mdev depends on busybox.

> It might be better to stick with RDEPENDS and either (i) arrange for the
> dependency to be conditional on CONFIG_SYSLOGD having been enabled,
> which you could do with a bit of python in busybox.bb,

I was thinking about this and I'm not sure how to get the python bit to 
run after do_fetch (so defconfig is available in ${WORKDIR}). It's 
probably possible but it would take quite a bit of fiddling, and would 
only save an ipkg warning for the few of us who don't set 
CONFIG_SYSLOGD=y. Currently, all in-tree configs set CONFIG_SYSLOGD.

Mike



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

* Re: busybox & syslog init script
  2009-06-03 14:54       ` Michael Smith
@ 2009-06-03 15:16         ` Phil Blundell
  0 siblings, 0 replies; 7+ messages in thread
From: Phil Blundell @ 2009-06-03 15:16 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-06-03 at 10:54 -0400, Michael Smith wrote:
> I was thinking about this and I'm not sure how to get the python bit to 
> run after do_fetch (so defconfig is available in ${WORKDIR}). It's 
> probably possible but it would take quite a bit of fiddling, and would 
> only save an ipkg warning for the few of us who don't set 
> CONFIG_SYSLOGD=y. Currently, all in-tree configs set CONFIG_SYSLOGD.

Something like:

python do_dependency_massage() {
   # my python code here
}

addtask dependency_massage after do_configure before do_compile

But yeah, using RRECOMMENDS is probably an okay solution too.  I
wouldn't have a problem with that.

p.





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

* Re: busybox & syslog init script
  2009-06-03  1:27 busybox & syslog init script Michael Smith
  2009-06-03  9:49 ` Phil Blundell
@ 2009-06-03 17:01 ` Otavio Salvador
  1 sibling, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2009-06-03 17:01 UTC (permalink / raw)
  To: openembedded-devel

Hello,

On Tue, Jun 2, 2009 at 10:27 PM, Michael Smith <msmith@cbnco.com> wrote:
> 1) split the syslog initscript into busybox-syslog, as is already done for
> busybox-httpd and busybox-udhcpd;

I prefer this solution since it allows for more flexibilty; but
please, don't add it as dependency to busybox.

-- 
Otavio Salvador                  O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br



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

end of thread, other threads:[~2009-06-03 17:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-03  1:27 busybox & syslog init script Michael Smith
2009-06-03  9:49 ` Phil Blundell
2009-06-03 14:09   ` Michael Smith
2009-06-03 14:23     ` Phil Blundell
2009-06-03 14:54       ` Michael Smith
2009-06-03 15:16         ` Phil Blundell
2009-06-03 17:01 ` Otavio Salvador

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.