1# Copyright (c) 2021 Red Hat, Inc. 2# 3# Author: 4# Cleber Rosa <crosa@redhat.com> 5# 6# This work is licensed under the terms of the GNU GPL, version 2 or 7# later. See the COPYING file in the top-level directory. 8# 9# This is an ansible playbook file. Run it to set up systems with the 10# environment needed to build QEMU. 11--- 12- name: Installation of basic packages to build QEMU 13 hosts: all 14 tasks: 15 - name: Check for suitable ansible version 16 delegate_to: localhost 17 assert: 18 that: 19 - '((ansible_version.major == 2) and (ansible_version.minor >= 8)) or (ansible_version.major >= 3)' 20 msg: "Unsuitable ansible version, please use version 2.8.0 or later" 21 22 - name: Add armhf foreign architecture to aarch64 hosts 23 command: dpkg --add-architecture armhf 24 when: 25 - ansible_facts['distribution'] == 'Ubuntu' 26 - ansible_facts['architecture'] == 'aarch64' 27 28 - name: Update apt cache / upgrade packages via apt 29 apt: 30 update_cache: yes 31 upgrade: yes 32 when: 33 - ansible_facts['distribution'] == 'Ubuntu' 34 35 # lcitool variables -f json ubuntu-2204 qemu | jq -r '.pkgs[]' | xargs -n 1 echo "-" 36 - name: Install basic packages to build QEMU on Ubuntu 22.04 37 package: 38 name: 39 - bash 40 - bc 41 - bison 42 - bsdextrautils 43 - bzip2 44 - ca-certificates 45 - ccache 46 - clang 47 - dbus 48 - debianutils 49 - diffutils 50 - exuberant-ctags 51 - findutils 52 - flex 53 - g++ 54 - gcc 55 - gcovr 56 - genisoimage 57 - gettext 58 - git 59 - hostname 60 - libaio-dev 61 - libasan5 62 - libasound2-dev 63 - libattr1-dev 64 - libbpf-dev 65 - libbrlapi-dev 66 - libbz2-dev 67 - libc6-dev 68 - libcacard-dev 69 - libcap-ng-dev 70 - libcapstone-dev 71 - libcmocka-dev 72 - libcurl4-gnutls-dev 73 - libdaxctl-dev 74 - libdrm-dev 75 - libepoxy-dev 76 - libfdt-dev 77 - libffi-dev 78 - libgbm-dev 79 - libgcrypt20-dev 80 - libglib2.0-dev 81 - libglusterfs-dev 82 - libgnutls28-dev 83 - libgtk-3-dev 84 - libibumad-dev 85 - libibverbs-dev 86 - libiscsi-dev 87 - libjemalloc-dev 88 - libjpeg-turbo8-dev 89 - libjson-c-dev 90 - liblttng-ust-dev 91 - liblzo2-dev 92 - libncursesw5-dev 93 - libnfs-dev 94 - libnuma-dev 95 - libpam0g-dev 96 - libpcre2-dev 97 - libpixman-1-dev 98 - libpng-dev 99 - libpulse-dev 100 - librbd-dev 101 - librdmacm-dev 102 - libsasl2-dev 103 - libsdl2-dev 104 - libsdl2-image-dev 105 - libseccomp-dev 106 - libslirp-dev 107 - libsnappy-dev 108 - libspice-protocol-dev 109 - libssh-dev 110 - libsystemd-dev 111 - libtasn1-6-dev 112 - libubsan1 113 - libudev-dev 114 - liburing-dev 115 - libusb-1.0-0-dev 116 - libusbredirhost-dev 117 - libvdeplug-dev 118 - libvirglrenderer-dev 119 - libvte-2.91-dev 120 - libxml2-dev 121 - libzstd-dev 122 - llvm 123 - locales 124 - make 125 - meson 126 - multipath-tools 127 - ncat 128 - nettle-dev 129 - ninja-build 130 - openssh-client 131 - pkgconf 132 - python3 133 - python3-numpy 134 - python3-opencv 135 - python3-pillow 136 - python3-pip 137 - python3-sphinx 138 - python3-sphinx-rtd-theme 139 - python3-venv 140 - python3-yaml 141 - rpm2cpio 142 - sed 143 - sparse 144 - systemtap-sdt-dev 145 - tar 146 - tesseract-ocr 147 - tesseract-ocr-eng 148 - texinfo 149 - xfslibs-dev 150 - zlib1g-dev 151 state: present 152 when: 153 - ansible_facts['distribution'] == 'Ubuntu' 154 - ansible_facts['distribution_version'] == '22.04' 155 156 # not all packages are available for all architectures 157 - name: Install additional packages to build QEMU on Ubuntu 22.04 158 package: 159 name: 160 - libpmem-dev 161 - libspice-server-dev 162 - libxen-dev 163 state: present 164 when: 165 - ansible_facts['distribution'] == 'Ubuntu' 166 - ansible_facts['distribution_version'] == '22.04' 167 - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64' 168 169 - name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 22.04 170 package: 171 name: 172 - binutils-arm-linux-gnueabihf 173 - gcc-arm-linux-gnueabihf 174 - libblkid-dev:armhf 175 - libc6-dev:armhf 176 - libffi-dev:armhf 177 - libglib2.0-dev:armhf 178 - libmount-dev:armhf 179 - libpcre2-dev:armhf 180 - libpixman-1-dev:armhf 181 - zlib1g-dev:armhf 182 when: 183 - ansible_facts['distribution'] == 'Ubuntu' 184 - ansible_facts['distribution_version'] == '22.04' 185 - ansible_facts['architecture'] == 'aarch64' 186 187