diff --git a/.gitignore b/.gitignore index 7185698e24e37f9851c4df5c86dd53b4910458cc..f11e606877e8f5c7b89ef2b1b5b4003d4cf54cf5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ __pycache__ /tools/android-sdk-linux *.pid server.url -/vagrant /tools/wa_user_directory/dependencies /src/buildroot custom_requirements.txt diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 7184037a859b27841755d3d456dd95ab5832c6b3..0000000000000000000000000000000000000000 --- a/Vagrantfile +++ /dev/null @@ -1,71 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - - -Vagrant.configure(2) do |config| - config.vm.box = "ubuntu/kinetic64" - - # Allow using tools like kernelshark - config.ssh.forward_x11 = true - - # Compiling pandas requires 1Gb of memory - config.vm.provider "virtualbox" do |v| - v.memory = 2048 - end - - # Forward ipython notebook's port to the host - config.vm.network "forwarded_port", guest: 8888, host: 8888 - - config.vm.provision "shell", inline: <<-SHELL - set -e - - if [ ! -e /home/vagrant/lisa ]; then - ln -s /vagrant /home/vagrant/lisa - fi - - cd /home/vagrant/lisa - # Install required packages - ./install_base.sh --install-all - - chown -R vagrant.vagrant /home/vagrant/lisa - - # Let' use a venv local to vagrant so that we don't pollute the host one. - # This allows to use LISA both from the host and the VM. - export LISA_VENV_PATH=/home/vagrant/venv - - # Jupyterlab config - mkdir -p /home/vagrant/.jupyter/ - # Listen on all addresses so that we can connect from outside the VM - echo 'c.NotebookApp.ip = "0.0.0.0"' >> /home/vagrant/.jupyter/jupyter_notebook_config.py - - # .bashrc setup - echo "cd /home/vagrant/lisa" >> /home/vagrant/.bashrc - for LC in $(locale | cut -d= -f1); - do - echo unset $LC >> /home/vagrant/.bashrc - done - echo "export LISA_VENV_PATH=$LISA_VENV_PATH" >> /home/vagrant/.bashrc - echo 'source init_env' >> /home/vagrant/.bashrc - - # Trigger the creation of a venv and check that everything works well - if ! su vagrant bash -c 'tools/tests.sh'; then - echo "Self tests FAILED !" - else - echo "Virtual Machine Installation completed successfully! " - fi - - echo "You can now access and use the virtual machine by running: " - echo " " - echo " $ vagrant ssh " - echo " " - echo "NOTE: if you exit, the virtual machine is still running. To shut it " - echo " down, please run: " - echo " " - echo " $ vagrant suspend " - echo " " - echo " To destroy it, use: " - echo " " - echo " $ vagrant destroy " - echo " " - SHELL -end diff --git a/doc/conf.py b/doc/conf.py index e811b51169fdded0b78c171749c0a854e37b9087..1a9f1278a73e099fd53f3e4d96c3fbfe3866dda1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -30,6 +30,7 @@ from operator import attrgetter import pickle import shutil import shlex +from urllib.parse import urlparse from sphinx.domains.python import PythonDomain @@ -195,17 +196,20 @@ def prepare(home, enable_plots, outdir): def update_theme_options(existing): existing = existing or {} - return { - **existing, - 'switcher': { - # TODO: If base_url is a file:/// URL, the browser will forbid - # the JS code access to the local file, so the switcher will be - # empty. Instead, this can be used: - # python -m http.server -d doc/_build/html/ - 'json_url': f'{base_url}/{versions_filename}', - 'version_match': doc_version, + # TODO: If base_url is a file:/// URL, the browser will forbid + # the JS code access to the local file, so the switcher will be + # empty. Instead, this can be used: + # python -m http.server -d doc/_build/html/ + if urlparse(base_url).scheme == 'file': + return existing + else: + return { + **existing, + 'switcher': { + 'json_url': f'{base_url}/{versions_filename}', + 'version_match': doc_version, + } } - } configs['html_theme_options'] = update_theme_options configs['html_title'] = lambda _: f'LISA {doc_version} documentation' diff --git a/doc/lisa_shell/man/man.rst b/doc/lisa_shell/man/man.rst index ed0845f1185bb3a0797e24eef19926462acc45fa..d245c54ddcba31f7dfc9d15601b776e94ac4b36e 100644 --- a/doc/lisa_shell/man/man.rst +++ b/doc/lisa_shell/man/man.rst @@ -21,11 +21,6 @@ In order to use the shell, source the script: source init_env -.. note:: - - This is done automatically by vagrant, so you don't have to issue this - command after doing a ``vagrant ssh`` - .. tip:: Run ``man lisa`` to see an overview of the provided LISA commands. diff --git a/doc/man1/lisa.1 b/doc/man1/lisa.1 index f5fd59c226fe5feb43d8ff62404dd54cf38a632b..de568cf03784257580f7474717d3075c96845a78 100644 --- a/doc/man1/lisa.1 +++ b/doc/man1/lisa.1 @@ -51,14 +51,6 @@ source init_env .UNINDENT .UNINDENT .sp -\fBNOTE:\fP -.INDENT 0.0 -.INDENT 3.5 -This is done automatically by vagrant, so you don\(aqt have to issue this -command after doing a \fBvagrant ssh\fP -.UNINDENT -.UNINDENT -.sp \fBTIP:\fP .INDENT 0.0 .INDENT 3.5 diff --git a/doc/sections/changes/release_process.rst b/doc/sections/changes/release_process.rst index 9a4a3740f473fd88fcb806309815b233d04927d9..fb4a251b2ce97bbf55cb3acd16c69779ff83c7b6 100644 --- a/doc/sections/changes/release_process.rst +++ b/doc/sections/changes/release_process.rst @@ -21,9 +21,8 @@ Making a new release involves the following steps: 5. Make the Python wheel. See ``tools/make-release.sh`` for some indications on that part. -6. Install that wheel in a _fresh_ :ref:`Vagrant VM`. Ensure - that the VM is reinstalled from scratch and that the vagrant box in use is - up to date. +6. Install that wheel in a _fresh_ environment. Ensure that the VM is + reinstalled from scratch. 7. Run ``tools/tests.sh`` in the VM and ensure no deprecated item scheduled for removal in the new version is still present in the sources (should diff --git a/doc/setup.rst b/doc/setup.rst index 8e762deaba7ba01b47690b27e36a77f957272bf5..25765c4591ab182c4159522f2c6af45458fc1a3d 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -127,41 +127,6 @@ practices, which includes a ``setup.py`` script, and a editable mode (including those that are not developped in that repository, but still included for convenience). -Virtual machine installation ----------------------------- -.. _setup-vagrant: - -LISA provides a Vagrant recipe which automates the generation of a -VirtualBox based virtual machine pre-configured to run LISA. To generate and -use such a virtual machine you need: - -- `VirtualBox `__ -- `Vagrant `__ - -Once these two components are available on your machine, issue these commands: - -.. code:: shell - - git clone https://gitlab.arm.com/tooling/lisa - cd lisa - vagrant up - -This last command builds and executes the VM according to the description provided -by the Vagrant file available in the root folder of the LISA source tree. - -Once the VM installation is complete, you can access that VM with: - -.. code:: shell - - vagrant ssh - -.. important:: In order to work around a - `Vagrant bug `_, all the - dependencies of LISA are installed in non-editable mode inside the VM. This - means that using `git pull` must be followed by a `lisa-install` if any of the - dependencies in `external/` are updated. - - Target installation +++++++++++++++++++ diff --git a/install_base.sh b/install_base.sh index a743b9a3d4e3507a7280d5e6a2748cce806004f8..28fd7b47e7a1716f38bbc77b65668800959b1178 100755 --- a/install_base.sh +++ b/install_base.sh @@ -19,7 +19,7 @@ # Script to install the depenencies for LISA on an Ubuntu-like system. # This is intended to be used for setting up containers and virtual machines to -# run LISA (e.g. for CI infrastructure or for Vagrant installation). +# run LISA (e.g. for CI infrastructure or for docker installation). # This can also work for a fresh LISA install on a workstation. # Read standard /etc/os-release file and extract the needed field lsb_release @@ -186,7 +186,7 @@ usage() { echo "Usage: $0 [--help] [--cleanup-android-sdk] [--install-android-tools] [--install-android-platform-tools] [--install-doc-extras] [--install-tests-extra] [--install-bisector-dbus] [--install-toolchains] - [--install-vagrant] [--install-all]" + [--install-all]" cat << EOF Install distribution packages and other bits that don't fit in the Python @@ -253,22 +253,6 @@ for arg in "${args[@]}"; do handled=1 ;;& - "--install-vagrant" | "--install-all") - # Only install the package if we are not already inside the VM to save - # some install time - vm=$(systemd-detect-virt 2>/dev/null) || true - if [[ $vm == 'oracle' ]] ; then - echo "VirtualBox detected, not installing virtualbox apt packages" >&2 - elif [[ $HOST_ARCH == 'aarch64' ]]; then - echo "VirtualBox not supported on $HOST_ARCH" >&2 - else - apt_packages+=(vagrant virtualbox) - pacman_packages+=(vagrant virtualbox virtualbox-host-dkms) - fi - - handled=1 - ;;& - "--install-kernel-build-dependencies" | "--install-all") apt_packages+=(build-essential gcc bc bison flex libssl-dev libncurses5-dev libelf-dev) handled=1 diff --git a/shell/lisa_shell b/shell/lisa_shell index f57065d41371302b0194a5ffe8ed7f376f38e431..56bc7c7240c060bf3a5715e655d080fec3b3bb08 100755 --- a/shell/lisa_shell +++ b/shell/lisa_shell @@ -240,14 +240,7 @@ function lisa-install { # installation source of any package local requirements=(custom_requirements.txt) - if [[ $(whoami) == "vagrant" ]]; then - # Special set of requirements to workaround vagrant issue: - # https://github.com/hashicorp/vagrant/issues/12057 - requirements+=( - vagrant_requirements.txt - devmode_extra_requirements.txt - ) - elif [[ "$LISA_DEVMODE" == 1 ]]; then + if [[ "$LISA_DEVMODE" == 1 ]]; then # This set of requirements will install all the shipped dependencies # in editable mode requirements+=( @@ -395,7 +388,7 @@ function _lisa-jupyter-start { return 1 fi - # Check required port is available (e.g. Vagrant could using the same port) + # Check required port is available if netstat -nlt | grep $PORT &>/dev/null; then echo echo "ERROR: required port [$PORT] already in use" @@ -431,16 +424,7 @@ function _lisa-jupyter-stop { function lisa-jupyter { CMD=${1:-start} - - if [[ -z "$2" && $USER == vagrant && -e /vagrant/shell/lisa_shell ]]; then - # NETIF not set and we are in a vagrant environment. Default to - # the ethernet interface as loopback won't let you connect from your - # host machine. - NETIF=$(ip route | awk '/default/ { print $5 }') - else - NETIF=${2:-lo} - fi - + NETIF=${2:-lo} PORT=${3:-8888} echo case "$CMD" in diff --git a/vagrant_requirements.txt b/vagrant_requirements.txt deleted file mode 100644 index f92ef0d8baaa04ac94f65845357820ea7f814423..0000000000000000000000000000000000000000 --- a/vagrant_requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ --e ./tools/exekall -./external/devlib/ -./external/workload-automation/ --e ./[all] --e ./tools/bisector --e ./tools/lisa-combine-gitlab-mr