Skip to content
Snippets Groups Projects
  1. Sep 08, 2023
  2. Sep 07, 2023
    • Paolo Bonzini's avatar
      Python: Drop support for Python 3.7 · ca056f44
      Paolo Bonzini authored
      
      Debian 10 is not anymore a supported distro, since Debian 12 was
      released on June 10, 2023.  Our supported build platforms as of today
      all support at least 3.8 (and all of them except for Ubuntu 20.04
      support 3.9):
      
      openSUSE Leap 15.5: 3.6.15 (3.11.2)
      CentOS Stream 8:    3.6.8  (3.8.13, 3.9.16, 3.11.4)
      CentOS Stream 9:    3.9.17 (3.11.4)
      Fedora 37:          3.11.4
      Fedora 38:          3.11.4
      Debian 11:          3.9.2
      Debian 12:          3.11.2
      Alpine 3.14, 3.15:  3.9.16
      Alpine 3.16, 3.17:  3.10.10
      Ubuntu 20.04 LTS:   3.8.10
      Ubuntu 22.04 LTS:   3.10.12
      NetBSD 9.3:         3.9.13*
      FreeBSD 12.4:       3.9.16
      FreeBSD 13.1:       3.9.18
      OpenBSD 7.2:        3.9.17
      
      Note: NetBSD does not appear to have a default meta-package, but offers
      several options, the lowest of which is 3.7.15. However, "python39"
      appears to be a pre-requisite to one of the other packages we request
      in tests/vm/netbsd.
      
      Since it is safe under our supported platform policy, bump our
      minimum supported version of Python to 3.8.  The two most interesting
      features to have by default include:
      
      - the importlib.metadata module, whose lack is responsible for over 100
        lines of code in mkvenv.py
      
      - improvements to asyncio, for example asyncio.CancelledError
        inherits from BaseException rather than Exception
      
      In addition, code can now use the assignment operator ':='
      
      Because mypy now learns about importlib.metadata, a small change to
      mkvenv.py is needed to pass type checking.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ca056f44
    • Paolo Bonzini's avatar
      configure, meson: move --enable-plugins to meson · 2c13c574
      Paolo Bonzini authored
      
      While the option still needs to be parsed in the configure script
      (it's needed by tests/tcg, and also to decide about recursing
      into contrib/plugins), passing it to Meson can be done with -D
      instead of using config-host.mak.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2c13c574
    • Paolo Bonzini's avatar
  3. Aug 31, 2023
  4. Aug 28, 2023
    • Paolo Bonzini's avatar
      Revert "tests: Use separate virtual environment for avocado" · c03f57fd
      Paolo Bonzini authored
      This reverts commit e8e4298f.
      
      ensuregroup allows to specify both the acceptable versions of avocado,
      and a locked version to be used when avocado is not installed as a system
      pacakge.  This lets us install avocado in pyvenv/ using "mkvenv.py" and
      reuse the distro package on Fedora and CentOS Stream (the only distros
      where it's available).
      
      ensuregroup's usage of "(>=..., <=...)" constraints when evaluating
      the distro package, and "==" constraints when installing it from PyPI,
      makes it possible to avoid conflicts between the known-good version and
      a package plugins included in the distro.
      
      This is because package plugins have "==" constraints on the version
      that is included in the distro, and, using "pip install avocado==88.1"
      on a venv that includes system packages will result in an error:
      
         avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
         avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
      
      But at the same time, if the venv does not include a system distribution
      of avocado then we can install a known-good version and stick to LTS
      releases.
      
      Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1663
      
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c03f57fd
  5. Jul 25, 2023
    • Peter Maydell's avatar
      tests/decode: Suppress "error: " string for expected-failure tests · 78cc9034
      Peter Maydell authored
      
      The "expected failure" tests for decodetree result in the
      error messages from decodetree ending up in logs and in
      V=1 output:
      
      >>> MALLOC_PERTURB_=226 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/pyvenv/bin/python3 /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/scripts/decodetree.py --output-null --test-for-error /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode
      ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
      /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/x86/../../tests/decode/err_argset1.decode:5: error: duplicate argument "a"
      ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
       1/44 qemu:decodetree / err_argset1                OK              0.05s
      
      This then produces false positives when scanning the
      logfiles for strings like "error: ".
      
      For the expected-failure tests, make decodetree print
      "detected:" instead of "error:".
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-id: 20230720131521.1325905-1-peter.maydell@linaro.org
      78cc9034
    • Peter Maydell's avatar
      scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour · f9540bb1
      Peter Maydell authored
      
      The POSIX definition of the 'read' utility requires that you
      specify the variable name to set; omitting the name and
      having it default to 'REPLY' is a bashism. If your system
      sh is dash, then it will print an error message during build:
      
      qemu/pc-bios/s390-ccw/../../scripts/git-submodule.sh: 106: read: arg count
      
      Specify the variable name explicitly.
      
      Fixes: fdb8fd8c ("git-submodule: allow partial update of .git-submodule-status")
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-id: 20230720153038.1587196-1-peter.maydell@linaro.org
      f9540bb1
  6. Jul 17, 2023
  7. Jul 07, 2023
  8. Jul 03, 2023
    • Alex Bennée's avatar
      scripts/oss-fuzz: add a suppression for keymap · 9ea2e69f
      Alex Bennée authored
      
      When updating to the latest fedora the santizer found more leaks
      inside xkbmap:
      
        FAILED: pc-bios/keymaps/ar
        /builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara
        =================================================================
        ==3604==ERROR: LeakSanitizer: detected memory leaks
        Direct leak of 1424 byte(s) in 1 object(s) allocated from:
            #0 0x56316418ebec in __interceptor_calloc (/builds/stsquad/qemu/build-oss-fuzz/qemu-keymap+0x127bec) (BuildId: a2ad9da3190962acaa010fa8f44a9269f9081e1c)
            #1 0x7f60d4dc067e  (/lib64/libxkbcommon.so.0+0x1c67e) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80)
            #2 0x7f60d4dc2137 in xkb_keymap_new_from_names (/lib64/libxkbcommon.so.0+0x1e137) (BuildId: b243a34e4e58e6a30b93771c256268b114d34b80)
            #3 0x5631641ca50f in main /builds/stsquad/qemu/build-oss-fuzz/../qemu-keymap.c:215:11
      
      and many more. As we can't do anything about the library add a
      suppression to keep the CI going with what its meant to be doing.
      
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20230630180423.558337-8-alex.bennee@linaro.org>
      9ea2e69f
  9. Jun 27, 2023
  10. Jun 26, 2023
  11. Jun 07, 2023
  12. Jun 06, 2023
    • Paolo Bonzini's avatar
      configure: remove --with-git-submodules= · 6f3ae23b
      Paolo Bonzini authored
      
      Reuse --enable/--disable-download to control git submodules as well.
      Adjust the error messages of git-submodule.sh to refer to the new
      option.
      
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      6f3ae23b
    • Paolo Bonzini's avatar
      meson: subprojects: replace berkeley-{soft,test}float-3 with wraps · d2dfe0b5
      Paolo Bonzini authored
      
      Unlike other subprojects, these require an overlay directory to include
      meson rules to build the libraries.  The rules are basically lifted
      from tests/fp/meson.build, with a few changes to create platform.h
      and publish a dependency.
      
      The build defines are passed through a subproject option, and posted
      back to users of the library via the dependency's compile_args.
      
      The only remaining user of GIT_SUBMODULES and GIT_SUBMODULES_ACTION
      is roms/SLOF, which is used to build pc-bios/s390-ccw.  All other
      roms submodules are only present to satisfy the license on pre-built
      firmware blobs.
      
      Best reviewed with --color-moved.
      
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d2dfe0b5
    • Paolo Bonzini's avatar
      meson: subprojects: replace submodules with wrap files · 2019cabf
      Paolo Bonzini authored
      
      Compared to submodules, .wrap files have several advantages:
      
      * option parsing and downloading is delegated to meson
      
      * the commit is stored in a text file instead of a magic entry in the
        git tree object
      
      * we could stop shipping external dependencies that are only used as a
        fallback, but not break compilation on platforms that lack them.
        For example it may make sense to download dtc at build time, controlled
        by --enable-download, even when building from a tarball.  Right now,
        this patch does the opposite: make-release treats dtc like libvfio-user
        (which is not stable API and therefore hasn't found its way into any
        distros) and keycodemap (which is a copylib, for better or worse).
      
      dependency() can fall back to a wrap automatically.  However, this
      is only possible for libraries that come with a .pc file, and this
      is not very common for libfdt even though the upstream project in
      principle provides it; it also removes the control that we provide with
      --enable-fdt={system,internal}.  Therefore, the logic to pick system
      vs. internal libfdt is left untouched.
      
      --enable-fdt=git is removed; it was already a synonym for
      --enable-fdt=internal.
      
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2019cabf
    • Paolo Bonzini's avatar
      build: log submodule update from git-submodule.sh · d120116b
      Paolo Bonzini authored
      
      Print exactly which submodules have been updated, by reusing the logic of
      "git-submodule.sh validate" after executing "git submodule update --init'.
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d120116b
    • Paolo Bonzini's avatar
      git-submodule: allow partial update of .git-submodule-status · fdb8fd8c
      Paolo Bonzini authored
      
      Allow a specific subdirectory to run git-submodule.sh with only a
      subset of submodules, without removing the others from the
      .git-submodule-status file.
      
      This also allows scripts/git-submodule.sh to be more lenient:
      validating an empty set of submodules is not a mistake.
      
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      fdb8fd8c
    • Paolo Bonzini's avatar
      configure: remove --with-git= option · 50cfed80
      Paolo Bonzini authored
      
      The scenario for which --with-git= was introduced was to use a SOCKS proxy
      such as tsocks.  However, this was back in 2017 when QEMU's submodules
      used the git:// protocol, and it is not as important when using the
      "smart HTTP" backend; for example, neither "meson subprojects download"
      nor scripts/checkpatch.pl obey the GIT environment variable.
      
      So remove the knob, but test for the presence of git in the configure and
      git-submodule.sh scripts, and suggest using --with-git-submodules=validate
      + a manual invocation of git-submodule.sh when git does not work.  Hopefully
      in the future the GIT environment variable will be supported by Meson.
      
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      50cfed80
    • Paolo Bonzini's avatar
      tests: Use separate virtual environment for avocado · e8e4298f
      Paolo Bonzini authored
      
      This reverts commits eea2d141 ("Makefile: remove $(TESTS_PYTHON)",
      2023-05-26) and 9c6692db ("tests: Use configure-provided pyvenv for
      tests", 2023-05-18).
      
      Right now, there is a conflict between wanting a ">=" constraint when
      using a distro-provided package and wanting a "==" constraint when
      installing Avocado from PyPI; this would provide the best of both worlds
      in terms of resiliency for both distros that have required packages and
      distros that don't.
      
      The conflict is visible also for meson, where we would like to install
      the latest 0.63.x version but also accept a distro 1.1.x version.
      But it is worse for avocado, for two reasons:
      
      1) we cannot use an "==" constraint to install avocado if the venv
      includes a system avocado.  The distro will package plugins that have
      "==" constraints on the version that is included in the distro, and, using
      "pip install avocado==88.1" on a venv that includes system packages will
      result in this error:
      
         ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
         avocado-framework-plugin-varianter-yaml-to-mux 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
         avocado-framework-plugin-result-html 98.0 requires avocado-framework==98.0, but you have avocado-framework 88.1 which is incompatible.
         make[1]: Leaving directory '/home/berrange/src/virt/qemu/build'
      
      2) we cannot use ">=" either if the venv does _not_ include a system
      avocado, because that would result in the installation of v101.0 which
      is the one we've just reverted.
      
      So the idea is to encode the dependencies as an (acceptable, locked)
      tuple, like this hypothetical TOML that would be committed inside
      python/ and used by mkvenv.py:
      
        [meson]
        meson = { minimum = "0.63.0", install = "0.63.3", canary = "meson" }
      
        [docs]
        # 6.0 drops support for Python 3.7
        sphinx = { minimum = "1.6", install = "<6.0", canary = "sphinx-build" }
        sphinx_rtd_theme = { minimum = "0.5" }
      
        [avocado]
        avocado-framework = { minimum = "88.1", install = "88.1", canary = "avocado" }
      
      Once this is implemented, it would also be possible to install avocado in
      pyvenv/ using "mkvenv.py ensure", thus using the distro package on Fedora
      and CentOS Stream (the only distros where it's available).  But until
      this is implemented, keep avocado in a separate venv.  There is still the
      benefit of using a single python for meson custom_targets and for sphinx.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e8e4298f
    • Paolo Bonzini's avatar
      scripts: remove dead file · 0dec4e6f
      Paolo Bonzini authored
      
      scripts/test-driver.py was used when "make check" was already using meson
      introspection data, but it did not execute "meson test".  It is dead since
      commit 3d2f73ef ("build: use "meson test" as the test harness", 2021-12-23).
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0dec4e6f
  13. Jun 05, 2023
  14. Jun 01, 2023
  15. May 30, 2023
  16. May 26, 2023
  17. May 24, 2023
Loading