From 51417379f73474b78a8592a2aa933ed7a328d97a Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Mon, 9 Dec 2019 18:12:32 +0200 Subject: Install QEMU from .deb package from internal cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU cloning and building with each provisioning takes time, thus installing it from a prebuilt installable package can save lots of time in provisioning. Task-number: QTQAINFRA-3396 Change-Id: I3e9b0fedeecb6ddbae3997742827552ce9419399 Reviewed-by: Dimitrios Apostolou Reviewed-by: Tony Sarajärvi --- .../qtci-linux-Ubuntu-18.04-x86_64/03-qemu.sh | 86 +++++++++++++++------- 1 file changed, 59 insertions(+), 27 deletions(-) (limited to 'coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64') diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-qemu.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-qemu.sh index 3006af47..d4ad40b7 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-qemu.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-qemu.sh @@ -34,22 +34,35 @@ set -ex +# shellcheck source=../common/unix/DownloadURL.sh +source "${BASH_SOURCE%/*}/../common/unix/DownloadURL.sh" # shellcheck source=../common/unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh" -# build latest qemu to usermode sudo apt-get -y install automake autoconf libtool -tempDir=$(mktemp -d) -git clone git://git.qemu.org/qemu.git "$tempDir" -cd "$tempDir" - -#latest commit from the master proven to work -git checkout c7f1cf01b8245762ca5864e835d84f6677ae8b1f -git cherry-pick 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 -git cherry-pick 04b33e21866412689f18b7ad6daf0a54d8f959a7 -git cherry-pick cd8133679f7e0e2c292f631f1c78b2452d2435c7 -git submodule update --init pixman +DownloadAndBuiltQemu () { + tempDir=$(mktemp -d) + cd ${tempDir} + + commit_sha=c7f1cf01b8245762ca5864e835d84f6677ae8b1f + qemu_tarball="qemu_tarball.zip" + PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/qemu/${qemu_tarball}" + AltUrl="https://github.com/qemu/qemu/archive/${commit_sha}.zip" + SHA1="351289c4420f16575bff060f91ce540d7b3fa2ab" + DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$qemu_tarball" + unzip ${qemu_tarball} + cd qemu-${commit_sha} + + fixes=( 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 04b33e21866412689f18b7ad6daf0a54d8f959a7 cd8133679f7e0e2c292f631f1c78b2452d2435c7 ) + fixes_sha1sums=( e53c4f567b461e7e2905636b369c4458ee8c0277 1914e5fa2f707d69d86ceb7c94957d096c8e8db4 eeca01c307d37eb362913b3f811034d5ac77cac8 ) + for i in $(seq 0 $((${#fixes[@]} - 1))); do + PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/qemu/${fixes[$i]}.diff" + AltUrl="https://github.com/qemu/qemu/commit/${fixes[$i]}.diff" + SHA1="${fixes_sha1sums[$i]}" + DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "${fixes[$i]}.diff" + patch -p1 < ${fixes[$i]}.diff + done patch -p1 < ${tempDir}/qemu_prebuilt/DEBIAN/control +# +# dpkg-deb --build ${tempDir}/qemu_prebuilt/ + rm -rf ${tempDir} +} + +qemu_prebuilt="/tmp/qemu_prebuilt.deb" +PrimaryUrl="http://ci-files01-hki.intra.qt.io/input/qemu/qemu_prebuilt.deb" +AltUrl=${PrimaryUrl} +SHA1="a50bea7ee79ca7b7b6eebe55f02853997d445ea4" +DownloadURL "$PrimaryUrl" "$AltUrl" "$SHA1" "$qemu_prebuilt" 2>&1 && success=$? || success=$? +if [ $success -eq 0 ]; then + sudo dpkg -i ${qemu_prebuilt} +else + DownloadAndBuiltQemu +fi # Enable binfmt support sudo apt-get -y install binfmt-support # Install qemu binfmt for 32bit and 64bit arm architectures -sudo update-binfmts --package qemu-arm --install arm \ -/usr/local/bin/qemu-arm \ ---magic \ -"\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \ ---mask \ -"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" -sudo update-binfmts --package qemu-aarch64 --install aarch64 \ -/usr/local/bin/qemu-aarch64 \ ---magic \ -"\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00" \ ---mask \ -"\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" +sudo update-binfmts --package qemu-arm --install arm /usr/local/bin/qemu-arm \ +--magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \ +--mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" +sudo update-binfmts --package qemu-aarch64 --install aarch64 /usr/local/bin/qemu-aarch64 \ +--magic "\x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00" \ +--mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" # First test using QFont fails if fonts-noto-cjk is installed. This happens because # running fontcache for that font takes > 5 mins when run on QEMU. Running fc-cache -- cgit v1.2.3 From 154ae1ebef9d42e01dfacbfe5edee1ff3cc3195f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 3 Oct 2019 15:42:01 +0300 Subject: Remove default hostname from ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removing the default hostname makes system create unique hostname based on the IP address. This is needed to make NFS operations reliable. Task-number: QTQAINFRA-3257 Change-Id: I9e4dc4950f5d1a1b7f85372674f79d1701d1eab6 Reviewed-by: Tony Sarajärvi --- coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/01-systemsetup.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64') diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/01-systemsetup.sh index 96bf23f8..5198e230 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/01-systemsetup.sh @@ -57,6 +57,9 @@ echo "Setting up workaround for Ubuntu systemd resolve bug" sudo rm -f /etc/resolv.conf sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf +# remove hostname to get unique based on IP address +sudo rm /etc/hostname + echo "Set Network Test Server address to $NTS_IP in /etc/hosts" echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts -- cgit v1.2.3 From 7e126af82ffd02550b71d9eaeeb56b387ea89ab0 Mon Sep 17 00:00:00 2001 From: Heikki Halmet Date: Mon, 10 Feb 2020 12:43:31 +0200 Subject: Provisioning: Update GCC to version 9.2 for Ubuntu 18.04 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC bug which breaks Webengine build should be fixed in GCC 9.2 Task-number: QTQAINFRA-3534 Change-Id: Ie0df7c67e0e96cca5632bcd0e6a3db822fcbffbe Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Tony Sarajärvi --- coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-gcc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64') diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-gcc.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-gcc.sh index 947583da..6c6a90c8 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-gcc.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/03-gcc.sh @@ -5,4 +5,4 @@ set -ex # shellcheck source=../common/linux/gcc.sh source "${BASH_SOURCE%/*}/../common/linux/gcc.sh" -InstallGCC 9.1.0 50 3953fa0d34a467630088d2a43603f74a36a80468 ded538076858926d361af790d59c1f8440dd29b2 +InstallGCC 9.2.0 50 2b3873263d4d6b09b37102078d80dcd7016b9392 44975966b15bca922ba64efa8ec3257726a79153 -- cgit v1.2.3