mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] installing different config files for lighttpd depending on some config variable
Date: Wed, 9 Nov 2011 18:09:37 +0100	[thread overview]
Message-ID: <20111109170937.GC10633@pengutronix.de> (raw)
In-Reply-To: <ed6a071e10906b08e187c3b5e29a3961@idefix.lespocky.dyndns.org>

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

      reply	other threads:[~2011-11-09 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09 12:26 Alexander Dahl
2011-11-09 17:09 ` Michael Olbrich [this message]

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=20111109170937.GC10633@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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