From 5c99c5250d47600a699d70f5fcc825791fda0ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Mon, 4 Sep 2023 13:58:46 -0300 Subject: [PATCH 1/4] fix: substituir 12.04 pelo 14.04 para o NAOv4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit O Ubuntu 14.04 (ou o Debian 8) é o único sistema operacional compatível com a biblioteca faltante na SDK Python do NAOv4. --- scripts/vms/ubuntu-12/sources.list | 8 --- .../vms/{ubuntu-12 => ubuntu-14}/.gitignore | 0 .../vms/{ubuntu-12 => ubuntu-14}/README.md | 0 .../compress-drive.sh | 0 .../vms/{ubuntu-12 => ubuntu-14}/env-vars.sh | 10 ++-- .../{ubuntu-12 => ubuntu-14}/first-boot.sh | 0 .../{ubuntu-12 => ubuntu-14}/inject-home.sh | 0 .../{ubuntu-12 => ubuntu-14}/install-naov4.sh | 2 +- .../{ubuntu-12 => ubuntu-14}/nao4-downloads | 0 .../naov4-config.cmake | 0 .../naov4-qibuild.xml | 0 .../prepare-naoqi-requirements.sh | 9 ++-- .../reset-main-drive.sh | 0 .../run-usb-hostbus.sh | 0 .../run-usb-productid.sh | 0 scripts/vms/{ubuntu-12 => ubuntu-14}/run.sh | 0 scripts/vms/ubuntu-14/sources.list | 49 +++++++++++++++++++ .../ubuntu-14/ubuntu-14.04-desktop-amd64.iso | 1 + .../update-sources.sh | 0 19 files changed, 61 insertions(+), 18 deletions(-) delete mode 100644 scripts/vms/ubuntu-12/sources.list rename scripts/vms/{ubuntu-12 => ubuntu-14}/.gitignore (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/README.md (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/compress-drive.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/env-vars.sh (92%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/first-boot.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/inject-home.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/install-naov4.sh (99%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/nao4-downloads (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/naov4-config.cmake (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/naov4-qibuild.xml (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/prepare-naoqi-requirements.sh (71%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/reset-main-drive.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/run-usb-hostbus.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/run-usb-productid.sh (100%) rename scripts/vms/{ubuntu-12 => ubuntu-14}/run.sh (100%) create mode 100644 scripts/vms/ubuntu-14/sources.list create mode 120000 scripts/vms/ubuntu-14/ubuntu-14.04-desktop-amd64.iso rename scripts/vms/{ubuntu-12 => ubuntu-14}/update-sources.sh (100%) diff --git a/scripts/vms/ubuntu-12/sources.list b/scripts/vms/ubuntu-12/sources.list deleted file mode 100644 index f03a2d7..0000000 --- a/scripts/vms/ubuntu-12/sources.list +++ /dev/null @@ -1,8 +0,0 @@ -deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted universe multiverse -deb-src http://old-releases.ubuntu.com/ubuntu/ precise main restricted universe multiverse - -deb http://old-releases.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse -deb-src http://old-releases.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse - -deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse -deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse diff --git a/scripts/vms/ubuntu-12/.gitignore b/scripts/vms/ubuntu-14/.gitignore similarity index 100% rename from scripts/vms/ubuntu-12/.gitignore rename to scripts/vms/ubuntu-14/.gitignore diff --git a/scripts/vms/ubuntu-12/README.md b/scripts/vms/ubuntu-14/README.md similarity index 100% rename from scripts/vms/ubuntu-12/README.md rename to scripts/vms/ubuntu-14/README.md diff --git a/scripts/vms/ubuntu-12/compress-drive.sh b/scripts/vms/ubuntu-14/compress-drive.sh similarity index 100% rename from scripts/vms/ubuntu-12/compress-drive.sh rename to scripts/vms/ubuntu-14/compress-drive.sh diff --git a/scripts/vms/ubuntu-12/env-vars.sh b/scripts/vms/ubuntu-14/env-vars.sh similarity index 92% rename from scripts/vms/ubuntu-12/env-vars.sh rename to scripts/vms/ubuntu-14/env-vars.sh index cbebcd7..68b6d5e 100644 --- a/scripts/vms/ubuntu-12/env-vars.sh +++ b/scripts/vms/ubuntu-14/env-vars.sh @@ -4,19 +4,19 @@ [ -z "${SOURCED_ENV_VARS_SH}" ] || exit 0 readonly BIOS_LOCATION="/usr/share/seabios/vgabios-virtio.bin" -readonly IMAGE_LOCATION="ubuntu-12.04-desktop-amd64.iso" -readonly DISK_LOCATION="ubuntu-12.04-vm.qcow2" +readonly IMAGE_LOCATION="ubuntu-14.04-desktop-amd64.iso" +readonly DISK_LOCATION="ubuntu-14.04-vm.qcow2" readonly DISK_SIZE="50G" -readonly VM_INITIAL_NAME="ubuntu-12.04-nao-first-boot" -readonly VM_NAME="ubuntu-12.04-nao" +readonly VM_INITIAL_NAME="ubuntu-14.04-nao-first-boot" +readonly VM_NAME="ubuntu-14.04-nao" readonly IPV4_NETWORK="192.168.3.0/24" readonly IPV4_DHCP_FIRST_ADDR="192.168.3.220" readonly P22_FWD="10022" readonly MACHINE_TYPE="pc-q35-6.2" readonly MACHINE_CFG="type=${MACHINE_TYPE},accel=kvm" -readonly CPU_MODEL="Nehalem-v2" +readonly CPU_MODEL="Haswell-v4" readonly CPU_NUMBER="4" readonly MACHINE_MEMORY_SIZE="4G" readonly DISPLAY_DEVICE="qxl-vga" diff --git a/scripts/vms/ubuntu-12/first-boot.sh b/scripts/vms/ubuntu-14/first-boot.sh similarity index 100% rename from scripts/vms/ubuntu-12/first-boot.sh rename to scripts/vms/ubuntu-14/first-boot.sh diff --git a/scripts/vms/ubuntu-12/inject-home.sh b/scripts/vms/ubuntu-14/inject-home.sh similarity index 100% rename from scripts/vms/ubuntu-12/inject-home.sh rename to scripts/vms/ubuntu-14/inject-home.sh diff --git a/scripts/vms/ubuntu-12/install-naov4.sh b/scripts/vms/ubuntu-14/install-naov4.sh similarity index 99% rename from scripts/vms/ubuntu-12/install-naov4.sh rename to scripts/vms/ubuntu-14/install-naov4.sh index 6c9c5c7..33c0b33 100755 --- a/scripts/vms/ubuntu-12/install-naov4.sh +++ b/scripts/vms/ubuntu-14/install-naov4.sh @@ -67,7 +67,7 @@ mkdir -pv "${NAO_CHOREGRAPHE_DIR}" mkdir -pv "${NAO_FLASHER_DIR}" echo 'Install qibuild' -pip2 install qibuild pyreadline +"${PIP_PATH}/pip2" install qibuild pyreadline echo '# NAOv4 installation' >> "${HOME}/.bashrc" echo "readonly PIP_PATH=\"${PIP_PATH}\"" >> "${HOME}/.bashrc" echo 'export PATH="${PATH}:${PIP_PATH}"' >> "${HOME}/.bashrc" diff --git a/scripts/vms/ubuntu-12/nao4-downloads b/scripts/vms/ubuntu-14/nao4-downloads similarity index 100% rename from scripts/vms/ubuntu-12/nao4-downloads rename to scripts/vms/ubuntu-14/nao4-downloads diff --git a/scripts/vms/ubuntu-12/naov4-config.cmake b/scripts/vms/ubuntu-14/naov4-config.cmake similarity index 100% rename from scripts/vms/ubuntu-12/naov4-config.cmake rename to scripts/vms/ubuntu-14/naov4-config.cmake diff --git a/scripts/vms/ubuntu-12/naov4-qibuild.xml b/scripts/vms/ubuntu-14/naov4-qibuild.xml similarity index 100% rename from scripts/vms/ubuntu-12/naov4-qibuild.xml rename to scripts/vms/ubuntu-14/naov4-qibuild.xml diff --git a/scripts/vms/ubuntu-12/prepare-naoqi-requirements.sh b/scripts/vms/ubuntu-14/prepare-naoqi-requirements.sh similarity index 71% rename from scripts/vms/ubuntu-12/prepare-naoqi-requirements.sh rename to scripts/vms/ubuntu-14/prepare-naoqi-requirements.sh index 23d29e9..f053e3b 100755 --- a/scripts/vms/ubuntu-12/prepare-naoqi-requirements.sh +++ b/scripts/vms/ubuntu-14/prepare-naoqi-requirements.sh @@ -6,8 +6,11 @@ echo "Installing GCC and G++" sudo apt-get install --yes build-essential echo "Installing Python 2 Build dependencies" -sudo apt-get build-dep --yes python-dev -sudo apt-get install --yes python-dev +sudo apt-get build-dep --yes python-all-dev +sudo apt-get install --yes python-all-dev pkg-config \ + libbz2-dev libffi-dev libgdbm-dev liblzma-dev \ + libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ + lzma lzma-dev tk-dev uuid-dev zlib1g-dev echo "Downloading Python 2.7.11" wget 'https://www.python.org/ftp/python/2.7.11/Python-2.7.11.tar.xz' @@ -21,8 +24,6 @@ cd 'Python-2.7.11' make -j "$(nproc)" profile-opt make install -echo 'export PATH="${HOME}/.local/bin:${PATH}"' >> "${HOME}/.bashrc" - echo "Downloading pip for Python 2.7" wget 'https://bootstrap.pypa.io/pip/2.7/get-pip.py' diff --git a/scripts/vms/ubuntu-12/reset-main-drive.sh b/scripts/vms/ubuntu-14/reset-main-drive.sh similarity index 100% rename from scripts/vms/ubuntu-12/reset-main-drive.sh rename to scripts/vms/ubuntu-14/reset-main-drive.sh diff --git a/scripts/vms/ubuntu-12/run-usb-hostbus.sh b/scripts/vms/ubuntu-14/run-usb-hostbus.sh similarity index 100% rename from scripts/vms/ubuntu-12/run-usb-hostbus.sh rename to scripts/vms/ubuntu-14/run-usb-hostbus.sh diff --git a/scripts/vms/ubuntu-12/run-usb-productid.sh b/scripts/vms/ubuntu-14/run-usb-productid.sh similarity index 100% rename from scripts/vms/ubuntu-12/run-usb-productid.sh rename to scripts/vms/ubuntu-14/run-usb-productid.sh diff --git a/scripts/vms/ubuntu-12/run.sh b/scripts/vms/ubuntu-14/run.sh similarity index 100% rename from scripts/vms/ubuntu-12/run.sh rename to scripts/vms/ubuntu-14/run.sh diff --git a/scripts/vms/ubuntu-14/sources.list b/scripts/vms/ubuntu-14/sources.list new file mode 100644 index 0000000..2908db8 --- /dev/null +++ b/scripts/vms/ubuntu-14/sources.list @@ -0,0 +1,49 @@ +# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to +# newer versions of the distribution. +deb http://archive.ubuntu.com/ubuntu/ trusty main restricted +deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted + +## Major bug fix updates produced after the final release of the +## distribution. +deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted +deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team. Also, please note that software in universe WILL NOT receive any +## review or updates from the Ubuntu security team. +deb http://archive.ubuntu.com/ubuntu/ trusty universe +deb-src http://archive.ubuntu.com/ubuntu/ trusty universe +deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe +deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe + +## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu +## team, and may not be under a free licence. Please satisfy yourself as to +## your rights to use the software. Also, please note that software in +## multiverse WILL NOT receive any review or updates from the Ubuntu +## security team. +deb http://archive.ubuntu.com/ubuntu/ trusty multiverse +deb-src http://archive.ubuntu.com/ubuntu/ trusty multiverse +deb http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse +deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates multiverse + +## N.B. software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse +deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse + +## Uncomment the following two lines to add software from Canonical's +## 'partner' repository. +## This software is not part of Ubuntu, but is offered by Canonical and the +## respective vendors as a service to Ubuntu users. +# deb http://archive.canonical.com/ubuntu trusty partner +# deb-src http://archive.canonical.com/ubuntu trusty partner + +deb http://security.ubuntu.com/ubuntu trusty-security main restricted +deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted +deb http://security.ubuntu.com/ubuntu trusty-security universe +deb-src http://security.ubuntu.com/ubuntu trusty-security universe +deb http://security.ubuntu.com/ubuntu trusty-security multiverse +deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse diff --git a/scripts/vms/ubuntu-14/ubuntu-14.04-desktop-amd64.iso b/scripts/vms/ubuntu-14/ubuntu-14.04-desktop-amd64.iso new file mode 120000 index 0000000..ba1f346 --- /dev/null +++ b/scripts/vms/ubuntu-14/ubuntu-14.04-desktop-amd64.iso @@ -0,0 +1 @@ +/home/davi/ISOs/ubuntu-14.04.6-desktop-amd64.iso \ No newline at end of file diff --git a/scripts/vms/ubuntu-12/update-sources.sh b/scripts/vms/ubuntu-14/update-sources.sh similarity index 100% rename from scripts/vms/ubuntu-12/update-sources.sh rename to scripts/vms/ubuntu-14/update-sources.sh From e36b958c57c304d5c0f0ec8f04e7f55aeaf8ba72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Mon, 4 Sep 2023 14:07:41 -0300 Subject: [PATCH 2/4] =?UTF-8?q?docs:=20atualizar=20documenta=C3=A7=C3=A3o?= =?UTF-8?q?=20com=20mudan=C3=A7as=20do=2014.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - substituir menções ao Ubuntu 12.04 pelo 14.04 - atualizar o link de download da imagem - atualizar o parágrafo com as razões para compilar o Python mais novo mas continuar usando o disponibilizado pela distribuição --- scripts/vms/ubuntu-14/README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/vms/ubuntu-14/README.md b/scripts/vms/ubuntu-14/README.md index 879e1c2..ada12e1 100644 --- a/scripts/vms/ubuntu-14/README.md +++ b/scripts/vms/ubuntu-14/README.md @@ -32,11 +32,11 @@ Even though these scripts can be modified easily, they expect the following directory structure in their current form: - `env-vars.sh`, a script to centralise the VM's configurations -- an [image][1] from Ubuntu's installation disk version 12.04 named as -`ubuntu-12.04-desktop-amd64.iso` (this can be altered in the `IMAGE_LOCATION` +- an [image][1] from Ubuntu's installation disk version 14.04 named as +`ubuntu-14.04-desktop-amd64.iso` (this can be altered in the `IMAGE_LOCATION` variable at the `env-vars.sh` script) -[1]: https://old-releases.ubuntu.com/releases/precise/ubuntu-12.04.5-desktop-amd64.iso +[1]: https://releases.ubuntu.com/trusty/ubuntu-14.04.6-desktop-amd64.iso ### Creating the VM and preparing to compile NAOqi for NAOv4 @@ -46,7 +46,7 @@ the following order: 1. `reset-main-drive.sh` 2. `first-boot.sh` -After installing Ubuntu 12.04 in their virtual machine, the following scripts +After installing Ubuntu 14.04 in their virtual machine, the following scripts must be executed in their host machine: 1. `update-sources.sh` @@ -57,7 +57,8 @@ must run the `prepare-naoqi-requirements.sh` script to compile Python 2.7.11 and install Pip 20.3.4. Finally, the user will be able to install the NAOv4 development environment -using the `install-naov4.sh` script. +using the `install-naov4.sh` script. The newer Python will be used only to +download Pip, as it crashes the Python SDK. ## Starting the Virtual Machine up for the first time @@ -68,7 +69,7 @@ The initial images are created by the `reset-*` scripts ``` With the drives created, run the initialisation script and install a regular -Ubuntu 12.04 LTS installation: +Ubuntu 14.04 LTS installation: - Language and keyboard layout: Português Brasileiro - Erase disk and install Ubuntu @@ -81,9 +82,10 @@ Ubuntu 12.04 LTS installation: ## Running the VM -Ubuntu 12.04 is not a supported release anymore. This means that the repository -in the original release has been changed to the old release archive. In order to -fix this, run the following script when the VM is disabled: +Sometimes the Brazilian server takes too long to synchronise with the main +server, leading to failed installations or upgrades. In order to avoid this +problem, please run the following script to set the repository to the main +archive: ``` ./update-sources.sh @@ -94,7 +96,7 @@ if there are any updates available. ## Preparing to install NAOqi for NAOv4 -Ubuntu 12.04 has an old version of Python 2.7. It lacks support to download data +Ubuntu 14.04 has an old version of Python 2.7. It lacks support to download data from websites that enforce HTTPS, such as the modern Python packages index (`pip`). This requires a compilation of a newer Python version and the installation of the last compatible `pip` release. These steps can be automated From 946bc3d69002f46d018711c2ad4c93ed95d1d7e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Mon, 4 Sep 2023 21:13:49 -0300 Subject: [PATCH 3/4] docs: substituir no script ubuntu-12 por ubuntu-14 --- docs/mkdocs-kludge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mkdocs-kludge.sh b/docs/mkdocs-kludge.sh index 308db81..75b28e9 100755 --- a/docs/mkdocs-kludge.sh +++ b/docs/mkdocs-kludge.sh @@ -1,6 +1,6 @@ #!/bin/bash -readonly DOCDIRS=(ros1 ros2 vms/ubuntu-12 vms/ubuntu-16) +readonly DOCDIRS=(ros1 ros2 vms/ubuntu-14 vms/ubuntu-16) for docdir in "${DOCDIRS[@]}"; do # Create directory inside the current one From e7d859a45f73e436808a5d3fa772cfccaa988f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davi=20Ant=C3=B4nio=20da=20Silva=20Santos?= Date: Mon, 4 Sep 2023 21:33:06 -0300 Subject: [PATCH 4/4] =?UTF-8?q?docs:=20substituir=20men=C3=A7=C3=B5es=20ao?= =?UTF-8?q?=20Ubuntu=2012=20pelo=2014=20no=20site?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/vms/ubuntu-12/README.md | 1 - docs/vms/ubuntu-14/README.md | 1 + mkdocs.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 120000 docs/vms/ubuntu-12/README.md create mode 120000 docs/vms/ubuntu-14/README.md diff --git a/docs/vms/ubuntu-12/README.md b/docs/vms/ubuntu-12/README.md deleted file mode 120000 index 56751f4..0000000 --- a/docs/vms/ubuntu-12/README.md +++ /dev/null @@ -1 +0,0 @@ -../../../scripts/vms/ubuntu-12/README.md \ No newline at end of file diff --git a/docs/vms/ubuntu-14/README.md b/docs/vms/ubuntu-14/README.md new file mode 120000 index 0000000..2973c1d --- /dev/null +++ b/docs/vms/ubuntu-14/README.md @@ -0,0 +1 @@ +../../../scripts/vms/ubuntu-14/README.md \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index f72c9f2..f1f74b6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -76,7 +76,7 @@ nav: - Home: index.md - Máquina Virtual: Instruções/Maquina_Virtual.md - NAOv4: - - Máquina Virtual com scripts: vms/ubuntu-12/README.md + - Máquina Virtual com scripts: vms/ubuntu-14/README.md - NAO Flahser: Instruções/NAO_Flasher.md - SDK C++: Instruções/CPP_SDK_v4.md - Choregraphe: Instruções/Choregraphe_v4.md