Re: [libvirt PATCH 26/42] systemd: Switch virtchd to common templates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 26, 2023 at 01:14:33PM +0100, Daniel P. Berrangé wrote:
> On Tue, Sep 26, 2023 at 07:02:19AM -0500, Andrea Bolognani wrote:
> > I don't think it helps much with not storing additional data inside
> > the build system, unless we want to store the contents of the various
> > common snippets in separate files? Something like
> >
> >   common_service = fs.read('common_service.inc')
> >   unit_conf = configuration_data({
> >     'common_service' = common_service,
> >   })
> >
> > We'd have to fake fs.read() because it was introduced in 0.57 though.
> > And we'd have to run the contents of the common parts through
> > variable substitution anyway, because they will contain a bunch of
> > lines like
> >
> >   Also=@service@.socket
> >   Also=@service@-ro.socket
> >   Also=@service@-admin.socket
> >
> > I'm not sure the result would look much better, but I can give it a
> > try.
>
> Don't try to do any of this in meson.  We should just have a standalone
> python script that can combine the daemon specific unit file contents
> with the common unit file contents. eg
>
>   scripts/merge-unit-file.py \
>      src/qemu/virtqemud.service.in \
>      src/rpc/virtd.service.in \
>      build/src/virtqemud.service

It feels a bit silly to shell out to Python to perform what is
ultimately a bunch of variable substitutions, as if that wasn't part
of Meson's core feature set... But I'll give it a try and see how it
turns out.

Can you please take a look at the remaining patches in the meantime,
and provide feedback on the changes that are made to the various
services and sockets as part of them? Thanks in advance :)

-- 
Andrea Bolognani / Red Hat / Virtualization





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux