On Tue, Aug 16, 2011 at 11:21:44PM +0530, Kashyap Chamarthy wrote:
I see. From a quick look at the spec file, I do notice post, preun,
postun operations where it deals w/ seliux policy modules, and other
system commands etc. Can you please elaborate a little on what kind
of workarounds are we talking here?
You have to imagine that the appliance will boot with just the files
specified directly from the RPMs (ie. the %files sections). Any other
adjustments done by %pre or %post scripts will not be done.
Before you can boot the appliance (see [1]) you need to write a /init
script, which could jump into the existing initscripts/systemd/..., or
it could do its own thing. We do our own thing in libguestfs[2].
Therefore, this /init script can do all the operations that are needed
by the IPA %post scripts, such as (from the scripts you sent me)
enabling services, running ipa-upgradeconfig, and doing selinux
tweaks.
Interestingly Debian debootstrap has the same problem, and what they
do is to collect together all the scripts and generate an init script
automatically which does all the required operations. We don't do
this in febootstrap because we wanted a bit more control for
libguestfs.
Rich.
[1]
https://rwmj.wordpress.com/2010/12/10/tip-creating-throwaway-appliances-w...
[2]
http://git.annexia.org/?p=libguestfs.git;a=blob;f=appliance/init;hb=HEAD
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming blog:
http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora