On Wed, Jun 13, 2018 at 2:08 AM, Jeremy A. Puhlman <[email protected]> wrote:
> > > On 6/12/2018 10:57 PM, Bruce Ashfield wrote: > > > > On Tue, Jun 12, 2018 at 6:37 PM, Jeremy Puhlman <[email protected]> > wrote: > >> /etc/libvirt/qemu.conf doesn't exist if qemu is disabled causing a >> build failure. >> >> Signed-off-by: Jeremy Puhlman <[email protected]> >> --- >> 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 >> [email protected] >> 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. [email protected] > > -- "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
-- _______________________________________________ meta-virtualization mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-virtualization
