From 62ddab7eddcf9d590d1213cf9acecf6201774db5 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 23 Jan 2018 17:55:48 +0100 Subject: [PATCH] buildserver: remove Qt installer, its huge, outdated, and being replaced The currently included Qt has known security issues and is outdated. This can now be replaced by downloading and installing the Qt installer using the sudo= build field. @relan's provisioner system will also replace this once that's done. There are only two apps that currently use the Qt stuff: * csd.qtproject.minesweeper * org.openorienteering.mapper --- MANIFEST.in | 1 - buildserver/Vagrantfile | 2 - buildserver/config.buildserver.py | 1 - buildserver/provision-apt-get-install | 2 - buildserver/provision-qt-sdk | 83 --------------------------- examples/config.py | 3 - fdroidserver/common.py | 2 - makebuildserver | 6 -- 8 files changed, 100 deletions(-) delete mode 100644 buildserver/provision-qt-sdk diff --git a/MANIFEST.in b/MANIFEST.in index acc7cfb8..4b6681ae 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,7 +6,6 @@ include buildserver/provision-apt-get-install include buildserver/provision-apt-proxy include buildserver/provision-gradle include buildserver/provision-pip -include buildserver/provision-qt-sdk include buildserver/setup-env-vars include buildserver/Vagrantfile include completion/bash-completion diff --git a/buildserver/Vagrantfile b/buildserver/Vagrantfile index 731d1304..1d1859a6 100644 --- a/buildserver/Vagrantfile +++ b/buildserver/Vagrantfile @@ -72,8 +72,6 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", path: "provision-android-sdk" config.vm.provision "shell", path: "provision-android-ndk", args: ["/home/vagrant/android-ndk"] - config.vm.provision "shell", path: "provision-qt-sdk", - args: ["/home/vagrant/qt-sdk"] config.vm.provision "shell", path: "provision-pip", args: ["compare-locales"] config.vm.provision "shell", path: "provision-gradle" diff --git a/buildserver/config.buildserver.py b/buildserver/config.buildserver.py index 1ecf43ce..3cefcb8d 100644 --- a/buildserver/config.buildserver.py +++ b/buildserver/config.buildserver.py @@ -9,7 +9,6 @@ ndk_paths = { 'r15c': "/home/vagrant/android-ndk/r15c", 'r16': "/home/vagrant/android-ndk/r16", } -qt_sdk_path = "/home/vagrant/qt-sdk/5.7.0/5.7" java_paths = { '8': "/usr/lib/jvm/java-8-openjdk-amd64", } diff --git a/buildserver/provision-apt-get-install b/buildserver/provision-apt-get-install index ef4ad1ee..87a4f879 100644 --- a/buildserver/provision-apt-get-install +++ b/buildserver/provision-apt-get-install @@ -95,8 +95,6 @@ packages=" python3-requests python3-yaml python3-ruamel.yaml - qt5-default - qtbase5-dev quilt realpath rsync diff --git a/buildserver/provision-qt-sdk b/buildserver/provision-qt-sdk deleted file mode 100644 index cc1ec256..00000000 --- a/buildserver/provision-qt-sdk +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash - -set -e - -QT_DIR=$1 - -test -e $QT_DIR || mkdir -p $QT_DIR - -cat << EOF > $QT_DIR/5.7.0-installer.qs -// Bases on script from http://stackoverflow.com/a/34032216 - -function Controller() { - installer.autoRejectMessageBoxes(); - installer.installationFinished.connect(function() { - gui.clickButton(buttons.NextButton); - }) -} - -Controller.prototype.WelcomePageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.CredentialsPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.IntroductionPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.TargetDirectoryPageCallback = function() -{ - gui.currentPageWidget().TargetDirectoryLineEdit.setText("$QT_DIR/5.7.0"); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ComponentSelectionPageCallback = function() { - var widget = gui.currentPageWidget(); - - // You can get these component names by running the installer with the - // --verbose flag. It will then print out a resource tree. - - widget.deselectAll(); - widget.selectComponent("qt.55.gcc_64"); - widget.selectComponent("qt.57.qtwebengine.gcc_64"); - widget.selectComponent("qt.57.android_x86"); - widget.selectComponent("qt.57.android_armv7"); - - // widget.deselectComponent("..."); - - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.LicenseAgreementPageCallback = function() { - gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true); - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.StartMenuDirectoryPageCallback = function() { - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.ReadyForInstallationPageCallback = function() -{ - gui.clickButton(buttons.NextButton); -} - -Controller.prototype.FinishedPageCallback = function() { -var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm -if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) { - checkBoxForm.launchQtCreatorCheckBox.checked = false; -} - gui.clickButton(buttons.FinishButton); -} -EOF - -if [ ! -e $QT_DIR/5.7.0 ]; then - echo "Installing Qt SDK 5.7.0 to $QT_DIR/5.7.0 ..." - /vagrant/cache/qt-opensource-linux-x64-android-5.7.0.run --platform minimal --script $QT_DIR/5.7.0-installer.qs --verbose - echo "Qt SDK 5.7.0 installation done." -fi - -rm $QT_DIR/5.7.0-installer.qs diff --git a/examples/config.py b/examples/config.py index f36d51d2..a065bbd3 100644 --- a/examples/config.py +++ b/examples/config.py @@ -21,9 +21,6 @@ # 'r16': None, # } -# Path to the Qt SDK. It is of the form "/path/to/Qt5.7.0/5.7" -# qt_sdk_path = "" - # java_paths = { # '1.8': "/usr/lib/jvm/java-8-openjdk", # } diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 9784ecb6..5ca32df2 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -86,7 +86,6 @@ default_config = { 'r15c': None, 'r16': None, }, - 'qt_sdk_path': None, 'build_tools': MINIMUM_AAPT_VERSION, 'force_build_tools': False, 'java_paths': None, @@ -2209,7 +2208,6 @@ def replace_config_vars(cmd, build): cmd = cmd.replace('$$SDK$$', config['sdk_path']) cmd = cmd.replace('$$NDK$$', build.ndk_path()) cmd = cmd.replace('$$MVN3$$', config['mvn3']) - cmd = cmd.replace('$$QT$$', config['qt_sdk_path'] or '') if build is not None: cmd = replace_build_vars(cmd, build) return cmd diff --git a/makebuildserver b/makebuildserver index 0deccae1..e0573fd6 100755 --- a/makebuildserver +++ b/makebuildserver @@ -358,8 +358,6 @@ cachefiles = [ 'f01788946733bf6294a36727b99366a18369904eb068a599dde8cca2c1d2ba3c'), ('https://dl.google.com/android/repository/android-ndk-r16-linux-x86_64.zip', 'a8550b81771c67cc6ab7b479a6918d29aa78de3482901762b4f9e0132cd9672e'), - ('https://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-android-5.7.0.run', - 'f7e55b7970e59bdaabb88cb7afc12e9061e933992bda2f076f52600358644586'), ] @@ -460,10 +458,6 @@ def main(): else: update_cache(cachedir, cachefiles) - local_qt_filename = os.path.join(cachedir, 'qt-opensource-linux-x64-android-5.7.0.run') - logger.info("Setting executable bit for %s", local_qt_filename) - os.chmod(local_qt_filename, 0o755) - # use VirtualBox software virtualization if hardware is not available, # like if this is being run in kvm or some other VM platform, like # http://jenkins.debian.net, the values are 'on' or 'off'