mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] installing different config files for lighttpd depending on some config variable
@ 2011-11-09 12:26 Alexander Dahl
  2011-11-09 17:09 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2011-11-09 12:26 UTC (permalink / raw)
  To: PTXdist Developer Mailinglist

Hei hei, 

we build or BSP in different configurations depending on some options
in the menuconfig, see:

    choice
        prompt "Vendor name     "

        config VENDOR_FOO
            bool
            prompt "foo"

        config VENDOR_BAR
            bool
            prompt "bar"

        config VENDOR_BAZ
            bool
            prompt "baz"

    endchoice

This is evaluated in several rules and in combination with collections
works quite well. In all configurations we use lighttpd as webserver,
previously with equal lighttpd.conf, but now we need different webserver
configs for each vendor/collection.

I could copy the rules/lighttpd.make from ptxdist distribution to our
BSP now and adapt it, but this would require manual attention on merging
both with each migration to a new ptxdist release and I'd like to avoid
that. 

I came across the possibility of postinst/preinst scripts in
targetinstall stage and assume I could use this. A preinst script would
populate projectroot/etc/lighttpd/lighttpd.conf with the right config
just before install_alternative() is called inside the distributed rule.

If this is a reasonable idea, where do I find documentation to these
preinst/postinst stuff? The »Don't Panic« guide doesn't cover this
topic. :-/

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***


-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

* Re: [ptxdist] installing different config files for lighttpd depending on some config variable
  2011-11-09 12:26 [ptxdist] installing different config files for lighttpd depending on some config variable Alexander Dahl
@ 2011-11-09 17:09 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2011-11-09 17:09 UTC (permalink / raw)
  To: ptxdist

On Wed, Nov 09, 2011 at 01:26:48PM +0100, Alexander Dahl wrote:
> we build or BSP in different configurations depending on some options
> in the menuconfig, see:
> 
>     choice
>         prompt "Vendor name     "
> 
>         config VENDOR_FOO
>             bool
>             prompt "foo"
> 
>         config VENDOR_BAR
>             bool
>             prompt "bar"
> 
>         config VENDOR_BAZ
>             bool
>             prompt "baz"
> 
>     endchoice
> 
> This is evaluated in several rules and in combination with collections
> works quite well. In all configurations we use lighttpd as webserver,
> previously with equal lighttpd.conf, but now we need different webserver
> configs for each vendor/collection.
> 
> I could copy the rules/lighttpd.make from ptxdist distribution to our
> BSP now and adapt it, but this would require manual attention on merging
> both with each migration to a new ptxdist release and I'd like to avoid
> that. 
> 
> I came across the possibility of postinst/preinst scripts in
> targetinstall stage and assume I could use this. A preinst script would
> populate projectroot/etc/lighttpd/lighttpd.conf with the right config
> just before install_alternative() is called inside the distributed rule.
> 
> If this is a reasonable idea, where do I find documentation to these
> preinst/postinst stuff? The »Don't Panic« guide doesn't cover this
> topic. :-/

Thre pre-/postinst scripts are run when installing the ipkg, not before
targetistall.
It't not very nice but what about this:

-------- /etc/lighttpd/lighttpd.conf -----------
include "real-lighttpd.conf"
------------------------------------------------

and install real-lighttpd.conf in a local package depending on VENDOR_*

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

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

end of thread, other threads:[~2011-11-09 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 12:26 [ptxdist] installing different config files for lighttpd depending on some config variable Alexander Dahl
2011-11-09 17:09 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox