Hi all,

With liquidsoap 2.0.3, we introduced an operator named
`liquidsoap.chroot.make`. This operator copies all the required files from
an existing liquidsoap install (don't run it from the source directory!),
excluding the dynamic libraries required for the liquidsoap binary. You can
use it to entirely wipe out the .opam directory after an install and only
keep the files exported by this operator.

If you're not on `2.0.3`, the files that are needed are:
* Everything from configure.libdir (this is a liquidsoap script variable)
* Everything from configure.bindir (this is a liquidsoap script variable)
* The camomile files. In 2.0.3, this was added as liquidsoap script
variable configure.camomile_dir. Before that, you can use this command:
  `ocamlfind -toolchain windows ocamlc -where`/../../share/camomile

Optional:
* The configured default font, if it exists. This is liquidsoap
variable configure.default_font
* The default log dir: configure.logdir, with appropriate permissions
* The default rundir for pid files: configure.piddir

Then, of course, the liquidsoap binary and all it's executable. I haven't
tested it but I can also pretty much expect the binary located in the
~/.opam folder to work when copied to /usr/bin provided you have all the
required files above and the right dynamic libraries.

The implementation of `liquidsoap.chroot.make` can be used as guideline
too: https://github.com/savonet/liquidsoap/blob/main/libs/liquidsoap.liq

Hope this helps!
-- Romain

Le mer. 16 févr. 2022 à 04:06, Romain Chambe <chamberom...@gmail.com> a
écrit :

> Hi Mark, thanks for that ! I'd be really interested to see the dockerfile
> you used to make it work. I also struggle with it. Thank you very much,
>
> Romain Chambe
>
> Le mer. 16 févr. 2022 à 09:58, Mark Jeghers <mark.jegh...@gmail.com> a
> écrit :
>
>> Ok I got LS 1.4 running in docker!  Very pleased with that.
>>
>> However, the docker image is really large because I've included *many*
>> files found under the /home/liquidsoap/.opam subdirectories.  I'd like to
>> remove the files not needed at runtime, but I'm not sure which ones they
>> are.
>>
>> Can someone plz advise which files under /home/liquidsoap/.opam are
>> actually used at runtime?  I really want to remove all the rest,
>>
>> Thanks,
>> /Mark
>> _______________________________________________
>> Savonet-users mailing list
>> Savonet-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>
>
>
> --
> Romain
>
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to