[Libguestfs] [PATCH (incomplete)] Rewrite virt-sysprep in OCaml.

Richard W.M. Jones rjones at redhat.com
Sun Apr 1 15:59:09 UTC 2012


On Sun, Apr 01, 2012 at 11:33:17PM +0800, Wanlong Gao wrote:
> On 04/01/2012 10:55 PM, Richard W.M. Jones wrote:
> 
> > On Sun, Apr 01, 2012 at 10:31:44PM +0800, Wanlong Gao wrote:
> >> On 04/01/2012 02:25 AM, Richard W.M. Jones wrote:
> >>
> >>> This patch is incomplete but it illustrates the idea.  virt-sysprep is
> >>> rewritten as a modular tool in OCaml.
> >>>
> >>> Only the 'utmp' and 'hostname' operations are implemented at the
> >>> moment.
> >>
> >>
> >> ocamlfind ocamlopt -g -warn-error CDEFLMPSUVYZX -package unix -I ../src/.libs -I ../ocaml \
> >>   mlguestfs.cmxa -linkpkg utils.cmx sysprep_operation.cmx sysprep_operation_cron_spool.cmx sysprep_operation_dhcp_client_state.cmx sysprep_operation_dhcp_server_state.cmx sysprep_operation_hostname.cmx sysprep_operation_logfiles.cmx sysprep_operation_mail_spool.cmx sysprep_operation_net_hwaddr.cmx sysprep_operation_random_seed.cmx sysprep_operation_rhn_systemid.cmx sysprep_operation_script.cmx sysprep_operation_smolt_uuid.cmx sysprep_operation_ssh_hostkeys.cmx sysprep_operation_udev_persistent_net.cmx sysprep_operation_utmp.cmx sysprep_operation_yum_uuid.cmx main.cmx -cclib -lncurses -o virt-sysprep
> >> rm -f sysprep-extra-options.pod sysprep-extra-options.pod-t
> >> ./virt-sysprep --dump-pod-options > sysprep-extra-options.pod-t
> >> ./virt-sysprep: error while loading shared libraries: libguestfs.so.0: cannot open shared object file: No such file or directory
> >> make[2]: *** [sysprep-extra-options.pod] Error 127
> >>
> >>
> >> some thing wrong with this "-I ../src/.libs" ? I just can't complete compiling :(
> > 
> > I fixed this earlier:
> > 
> > https://github.com/libguestfs/libguestfs/commit/7ed21d9a5c11d6bc8e9da3912cfcfc8a873ddef0
> 
> 
> Yes, I see, then another one,
> ../../podwrapper.sh --man virt-sparsify.1 virt-sparsify.pod
> make[3]: *** No rule to make target `sysprep-extra-options.pod', needed by `virt-sysprep.1'.  Stop.

I don't see this one.  Most likely you just need to
make -C sysprep clean all

Rich.

-- 
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




More information about the Libguestfs mailing list