seccomp: change configure to avoid arm 32 to break
PATCH 1/1 seccomp: change configure to avoid arm 32 to break
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
--- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
configure +11 -9
@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" - fi - seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; then + libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" + seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" + fi + seccomp="no" + fi fi fi ##########################################
Signature · 1 line
1.9.1
Quoted 33 lines · Eduardo Otubo
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
Signed-off-by Eduardo Otubo <[email protected]>--- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)configure +2
-9@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" - fi - seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; then
configure fi · line 1837
Quoted 10 lines
configure +9
-0+ libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" + seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" + fi + seccomp="no" + fi fi
This is missing the logic for turning "" into "no" or printing the feature_not_found message if the probe failed because of the CPU being wrong. The easiest fix for that is just to roll the whole check into one if:
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } &&
$pkg_config --atleast-version=2.1.0 libseccomp; then(the { ... ; } are not strictly necessary since the shell's precedence rules mean we'll evaluate the || before the && but I think they make the intent clearer.)
thanks
-- PMM
Quoted 49 lines · Peter Maydell
Quoted 33 lines · Eduardo Otubo
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
Signed-off-by Eduardo Otubo <[email protected]>--- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)configure +2
-9@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" - fi - seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; thenconfigure fi · line 1837
Quoted 10 lines
configure +9
-0+ libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" + seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.0" + fi + seccomp="no" + fi fiThis is missing the logic for turning "" into "no" or printing the
feature_not_foundmessage if the probe failed because of the CPU being wrong. The easiest fix for that is just to roll the whole check into one if:
Quoted 3 lines
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } &&
$pkg_config --atleast-version=2.1.0 libseccomp; thenYep, I think that does make a lot of sense looking from the perspective of feature_not_found. I'll just roll out a v3 if you don't mind (I guess this was supposed to be the v2)
Thanks for the review,
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH
Quoted 40 lines · Eduardo Otubo
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
Signed-off-by Eduardo Otubo <[email protected]>--- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)configure +0
-7@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >=2.1.0" - fi
configure +8
-1- seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; then + libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" + seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccomp devel >=2.1.0" + fi
configure fi · line 1839
Quoted 5 lines
configure +2
-0+ seccomp="no" + fi fi fi ##########################################
Also, note the current release of libseccomp is v2.1.1 which has a number of bug fixes on top of v2.1.0.
Signature · 2 lines
paul moore security and virtualization @ redhat
Quoted 41 lines · Paul Moore
Quoted 40 lines · Eduardo Otubo
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
Signed-off-by Eduardo Otubo <[email protected]>--- configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)configure +0
-7@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >=2.1.0" - fi
configure +8
-1- seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; then + libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" + QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" + seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccomp devel >=2.1.0" + fi
Quoted 9 lines
configure fi · line 1839
Quoted 5 lines
configure +2
-0+ seccomp="no" + fi fi fi ##########################################Also, note the current release of libseccomp is v2.1.1 which has a number of bug fixes on top of v2.1.0.
Does that applies to the distros package version? I'm running Ubuntu 14.04 and it's still 2.1.0. A regular user would have to download and install from scratch in order to build Qemu, then.
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH
Quoted 52 lines · Eduardo Otubo
Quoted 51 lines · Paul Moore
Quoted 50 lines · Eduardo Otubo
Right now seccomp is breaking the compilation of Qemu on armv7l due to libsecomp current lack of support for this arch. This problem is already fixed on libseccomp upstream but no release date for that is scheduled to far. This patch disables support for seccomp on armv7l temporarily until libseccomp does a new release. Then I'll remove the hack and update libseccomp dependency on configure script.
Related bug: https://bugs.launchpad.net/qemu/+bug/1363641
Signed-off-by Eduardo Otubo <[email protected]>---
configure | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)configure +0
-7@@ -1823,15 +1823,17 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then - libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" - QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" - else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >=2.1.0" - fi
configure +3
-1- seccomp="no" + if test "$cpu" = "i386" || test "$cpu" = "x86_64"; then + if $pkg_config --atleast-version=2.1.0 libseccomp; then + libs_softmmu="$libs_softmmu `$pkg_config --libslibseccomp`"
+ QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags
libseccomp`"configure +4
-0+ seccomp="yes" + else + if test "$seccomp" = "yes"; then + feature_not_found "libseccomp" "Install libseccompdevel >= 2.1.0" + fi
configure +2
-0+ seccomp="no" + fi fi
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
fi
##########################################Also, note the current release of libseccomp is v2.1.1 which has a number of bug fixes on top of v2.1.0.
Does that applies to the distros package version?
Well, I can't speak for all distros, but I always recommend the latest bug-fix version for obvious reasons. While I do control the libseccomp package for some distributions, I don't control them all. I've got enough to worry about, I'll let others worry about packaging :)
Quoted 2 lines
I'm running Ubuntu 14.04 and it's still 2.1.0. A regular user would have to download and install from scratch in order to build Qemu, then.
I would recommend filing a request for Debian/Ubuntu to package the latest libseccomp; v2.1.1 is over a year old at this point.
Signature · 2 lines
paul moore security and virtualization @ redhat