[meta-virtualization] [PATCH] Check for qemu pkgconfig before qemu.conf modify
Bruce Ashfield
bruce.ashfield at gmail.com
Wed Jun 13 05:56:07 PDT 2018
On Wed, Jun 13, 2018 at 2:08 AM, Jeremy A. Puhlman <jpuhlman at mvista.com>
wrote:
>
>
> On 6/12/2018 10:57 PM, Bruce Ashfield wrote:
>
>
>
> On Tue, Jun 12, 2018 at 6:37 PM, Jeremy Puhlman <jpuhlman at mvista.com>
> wrote:
>
>> /etc/libvirt/qemu.conf doesn't exist if qemu is disabled causing a
>> build failure.
>>
>> Signed-off-by: Jeremy Puhlman <jpuhlman at mvista.com>
>> ---
>> recipes-extended/libvirt/libvirt_4.3.0.bb | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/recipes-extended/libvirt/libvirt_4.3.0.bb
>> b/recipes-extended/libvirt/libvirt_4.3.0.bb
>> index ef51b9e..5cae02b 100644
>> --- a/recipes-extended/libvirt/libvirt_4.3.0.bb
>> +++ b/recipes-extended/libvirt/libvirt_4.3.0.bb
>> @@ -266,8 +266,10 @@ do_install_append() {
>> fi
>>
>> # disable seccomp_sandbox
>> - sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
>> - ${D}${sysconfdir}/libvirt/qemu.conf
>> + if ${@bb.utils.contains('PACKAGECONFIG', 'qemu', 'true',
>> 'false', d)}; then
>>
>
> Rather than key off the package config, why not just test for the file's
> existence and then only operate on it if it is there ? That is always safe,
> simpler and protects us from build failures if the behaviour/output of
> libvirt changes with respect to qemu in the future.
>
> We could argue that we could check both, or warn if the package config is
> on, but the file isn't present .. but I'd still prefer to just keep it
> simple and all basic shell operations.
>
>
> That's reasonable. I was more or less just following the pattern of the
> other PACKAGECONFIG checks, i.e. systemd and polkit. I can change it to a
> file check, if that would work better.
>
>
I can convert the other ones later as well. I didn't write them, so I was
just going by what I could see in the context of the patch! But yah, if we
could set the precedent with this change that would be great.
Bruce
>
> Cheers,
>
> Bruce
>
>
>> + sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
>> + ${D}${sysconfdir}/libvirt/qemu.conf
>> + fi
>>
>> # Add hook support for libvirt
>> mkdir -p ${D}/etc/libvirt/hooks
>> --
>> 2.6.2
>>
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end"
>
>
> --
> Jeremy A. Puhlmanjpuhlman at mvista.com
>
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-virtualization/attachments/20180613/34b1ba62/attachment-0001.html>
More information about the meta-virtualization
mailing list