lxc: Add PACKAGECONFIG for seccomp
PATCH 2/3 lxc: Add PACKAGECONFIG for seccomp
Determine whether libseccomp is installed in the Yocto image, and based on that, compile the necessary support for LXC as well.
--- recipes-containers/lxc/lxc_1.0.7.bb | 2 ++ 1 file changed, 2 insertions(+)
recipes-containers/lxc/lxc_1.0.7.bb +2 -0
@@ -43,12 +43,14 @@ EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" PACKAGECONFIG ??= "templates \ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ + ${@base_contains('IMAGE_INSTALL', 'libseccomp', 'seccomp', '', d)} \ " PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,," PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" PACKAGECONFIG[templates] = ",,, ${PN}-templates" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" +PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp" inherit autotools pkgconfig ptest update-rc.d systemd
Signature · 1 line
2.1.4
Quoted 13 lines · Bogdan Purcareata
Determine whether libseccomp is installed in the Yocto image, and based on that, compile the necessary support for LXC as well.
Signed-off-by Bogdan Purcareata <[email protected]>--- recipes-containers/lxc/lxc_1.0.7.bb | 2 ++ 1 file changed, 2 insertions(+)recipes-containers/lxc/lxc_1.0.7.bb +0
-0
recipes-containers/lxc/lxc_1.0.7.bb EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" · line 46
Quoted 4 lines
recipes-containers/lxc/lxc_1.0.7.bb +1
-0@@ -43,12 +43,14 @@ EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" PACKAGECONFIG ??= "templates \ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ + ${@base_contains('IMAGE_INSTALL', 'libseccomp', 'seccomp', '', d)} \
This doesn't seem correct, or at least not in the spirit of other package config options
and tests that I've used (and seen). But if you know of a reference that looks like this,
point me in its direction and I'll have a look.
Testing on distro features is one thing, as would be image features .. but IMAGE_INSTALL
is not the same, and isn't always used.
Part of the package config is to trigger both depends and rdepends on other packages
when it is enabled. In this case, we are doing the opposite, using the dependency to
trigger the package config.
Either this test needs to be patched into the lxc configuration phase, so it can detect
it at runtime, or just leave it at a package config option. Your layers can then enable
that packageconfig and everything works as expected, and we don't force all users
to enable this in lxc when they may not want it simply because libseccomp is present.
Bruce
Quoted 18 lines
recipes-containers/lxc/lxc_1.0.7.bb +1
-1" PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,," PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" PACKAGECONFIG[templates] = ",,, ${PN}-templates" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" +PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp" inherit autotools pkgconfig ptest update-rc.d systemd --2.1.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 36 lines · Bruce Ashfield
Quoted 13 lines · Bogdan Purcareata
Determine whether libseccomp is installed in the Yocto image, and based on that, compile the necessary support for LXC as well.
Signed-off-by Bogdan Purcareata <[email protected]>--- recipes-containers/lxc/lxc_1.0.7.bb | 2 ++ 1 file changed, 2 insertions(+)recipes-containers/lxc/lxc_1.0.7.bb +0
-0recipes-containers/lxc/lxc_1.0.7.bb EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" · line 46
Quoted 4 lines
recipes-containers/lxc/lxc_1.0.7.bb +1
-0@@ -43,12 +43,14 @@ EXTRA_OECONF += "--with-distro=${DISTRO} ${PTEST_CONF}" PACKAGECONFIG ??= "templates \ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \ + ${@base_contains('IMAGE_INSTALL', 'libseccomp', 'seccomp', '', d)} \This doesn't seem correct, or at least not in the spirit of other package config options
and tests that I've used (and seen). But if you know of a reference that looks like this,
point me in its direction and I'll have a look.Testing on distro features is one thing, as would be image features .. but
IMAGE_INSTALL
is not the same, and isn't always used.Part of the package config is to trigger both depends and rdepends on other packages
when it is enabled. In this case, we are doing the opposite, using the dependency to
trigger the package config.
Quoted 8 lines
Either this test needs to be patched into the lxc configuration phase, so it can detect
it at runtime, or just leave it at a package config option. Your layers can then enable
that packageconfig and everything works as expected, and we don't force all users
to enable this in lxc when they may not want it simply because libseccomp is present.
I understand, thank you for making it clear.
I don't have a strong argument for my patch, so I think the best option for now would be to leave the PACKAGECONFIG option only, and let the layers or image configuration file handle what's active at build time.
I will send a v2.
Best regards,
Bogdan P.
Quoted 23 lines
Bruce
Quoted 18 lines
recipes-containers/lxc/lxc_1.0.7.bb +1
-1" PACKAGECONFIG[doc] = "--enable-doc --enable-api-docs,--disable-doc --disable-api-docs,," PACKAGECONFIG[rpath] = "--enable-rpath,--disable-rpath,," PACKAGECONFIG[apparmour] = "--enable-apparmor,--disable-apparmor,apparmor,apparmor" PACKAGECONFIG[templates] = ",,, ${PN}-templates" PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" +PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp" inherit autotools pkgconfig ptest update-rc.d systemd --2.1.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization