summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Karjalainen <juha.karjalainen@qt.io>2018-11-14 10:04:40 +0200
committerLiang Qi <liang.qi@qt.io>2019-01-17 09:45:12 +0000
commit33322231304252d5dc140d8e5b4cbe802b5e74ec (patch)
tree8a0f6c2ff6026ca62b866d6b7da561b67e99c5d9
parent34c751db5eef459ea508265330620824faf9636e (diff)
Provisioning: breakpad for qt3dstudio
Breakpad https://chromium.googlesource.com/breakpad/breakpad/ sources are needed for qt3studio. Also Breakpad need sources for https://chromium.googlesource.com/linux-syscall-support. Task-number: QT3DS-2650 Change-Id: I13c7534e1c6e97a1e345dad3c2c82eeb6428313d Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
-rwxr-xr-xcoin/provisioning/common/unix/install-breakpad.sh81
-rw-r--r--coin/provisioning/common/windows/helpers.ps122
-rw-r--r--coin/provisioning/common/windows/install-breakpad.ps194
-rw-r--r--coin/provisioning/qtci-linux-RHEL-7.4-x86_64/35-install-breakpad.sh6
-rw-r--r--coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/35-install-breakpad.sh6
-rw-r--r--coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/35-install-breakpad.sh6
-rw-r--r--coin/provisioning/qtci-macos-10.13-x86_64/35-install-breakpad.sh6
-rw-r--r--coin/provisioning/qtci-windows-10-x86_64/35-install-breakpad.ps11
-rw-r--r--coin/provisioning/qtci-windows-7-x86/35-install-breakpad.ps11
-rw-r--r--coin/provisioning/qtci-windows-7-x86_64/35-install-breakpad.ps11
10 files changed, 224 insertions, 0 deletions
diff --git a/coin/provisioning/common/unix/install-breakpad.sh b/coin/provisioning/common/unix/install-breakpad.sh
new file mode 100755
index 00000000..669469be
--- /dev/null
+++ b/coin/provisioning/common/unix/install-breakpad.sh
@@ -0,0 +1,81 @@
+#!/usr/bin/env bash
+
+############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the provisioning scripts of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+# shellcheck source=../unix/DownloadURL.sh
+source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
+# shellcheck source=../unix/SetEnvVar.sh
+source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
+
+set -ex
+
+breakpad_commit_sha="b988fa74ec18de6214b18f723e48331d9a7802ae"
+breakpad_tar="breakpad_$breakpad_commit_sha.tar.gz"
+breakpad_tar_url="http://ci-files01-hki.intra.qt.io/input/breakpad/$breakpad_tar"
+breakpad_tar_sha="a2d404d2aebc947cdac5840a9bccd65dfafae24c"
+
+linux_syscall_support_commit_sha1="93426bda6535943ff1525d0460aab5cc0870ccaf"
+linux_syscall_support_tar="linux-syscall-support_$linux_syscall_support_commit_sha1.tar.gz"
+linux_syscall_support_tar_url="http://ci-files01-hki.intra.qt.io/input/linux-syscall-support/$linux_syscall_support_tar"
+linux_syscall_support_tar_sha="62565be0920f3661e138d68026b79fbbdc2a11e4"
+
+targetBreakpad="/tmp/$breakpad_tar"
+targetSyscall="/tmp/$linux_syscall_support_tar"
+installFolder="$HOME"
+breakpadHome="$HOME/breakpad"
+
+# shellcheck disable=SC2015
+( DownloadURL "$breakpad_tar_url" "$breakpad_tar_url" "$breakpad_tar_sha" "$targetBreakpad" ) && (
+ DownloadURL "$linux_syscall_support_tar_url" "$linux_syscall_support_tar_url" "$linux_syscall_support_tar_sha" "$targetSyscall"
+ ) && (
+ tar -xzf "$targetBreakpad" -C "$installFolder"
+ tar -xzf "$targetSyscall" -C "/tmp"
+ mv "/tmp/linux-syscall-support/" "$breakpadHome/src/third_party/lss/"
+ rm -rf $targetBreakpad
+ rm -rf $targetSyscall
+ ) || (
+ cd "$HOME"
+ git clone https://chromium.googlesource.com/breakpad/breakpad "$breakpadHome"
+ git clone https://chromium.googlesource.com/linux-syscall-support "$breakpadHome/src/third_party/lss"
+ cd "$breakpadHome"
+ git checkout "$breakpad_commit_sha"
+ cd "$breakpadHome/src/third_party/lss"
+ git checkout "$linux_syscall_support_commit_sha1"
+ )
+
+
+SetEnvVar "BREAKPAD_SOURCE_DIR" "$breakpadHome/src"
+
+echo "breakpad = $breakpad_commit_sha" >> ~/versions.txt
+echo "linux_syscall_support = $linux_syscall_support_commit_sha1" >> ~/versions.txt
diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1
index cbf2371f..76ad4867 100644
--- a/coin/provisioning/common/windows/helpers.ps1
+++ b/coin/provisioning/common/windows/helpers.ps1
@@ -35,6 +35,28 @@ function Run-Executable
}
}
+function Extract-tar_gz
+{
+ Param (
+ [string]$Source,
+ [string]$Destination
+ )
+ Write-Host "Extracting '$Source' to '$Destination'..."
+
+ if ((Get-Command "7z.exe" -ErrorAction SilentlyContinue) -eq $null) {
+ $zipExe = join-path (${env:ProgramFiles(x86)}, ${env:ProgramFiles}, ${env:ProgramW6432} -ne $null)[0] '7-zip\7z.exe'
+ if (-not (test-path $zipExe)) {
+ $zipExe = "C:\Utils\sevenzip\7z.exe"
+ if (-not (test-path $zipExe)) {
+ throw "Could not find 7-zip."
+ }
+ }
+ } else {
+ $zipExe = "7z.exe"
+ }
+ Run-Executable "cmd.exe" "/C $zipExe x -y `"$Source`" -so | $zipExe x -y -aoa -si -ttar `"-o$Destination`""
+}
+
function Extract-7Zip
{
Param (
diff --git a/coin/provisioning/common/windows/install-breakpad.ps1 b/coin/provisioning/common/windows/install-breakpad.ps1
new file mode 100644
index 00000000..4a9544cc
--- /dev/null
+++ b/coin/provisioning/common/windows/install-breakpad.ps1
@@ -0,0 +1,94 @@
+############################################################################
+##
+## Copyright (C) 2019 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the provisioning scripts of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:LGPL21$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see http://www.qt.io/terms-conditions. For further
+## information use the contact form at http://www.qt.io/contact-us.
+##
+## GNU Lesser General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU Lesser
+## General Public License version 2.1 or version 3 as published by the Free
+## Software Foundation and appearing in the file LICENSE.LGPLv21 and
+## LICENSE.LGPLv3 included in the packaging of this file. Please review the
+## following information to ensure the GNU Lesser General Public License
+## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+##
+## As a special exception, The Qt Company gives you certain additional
+## rights. These rights are described in The Qt Company LGPL Exception
+## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+# This script install breakpad from sources.
+# for manual install.. remember to checkout correct version
+# git clone https://chromium.googlesource.com/breakpad/breakpad
+# git clone https://chromium.googlesource.com/linux-syscall-support breakpad/src/third_party/lss
+
+# Commit used to make this zip breakpad_20181113.tar.gz
+# breakpad
+# commit 66571f4838b2306161f072555cb199049bc68142 (HEAD -> master, origin/master, origin/HEAD)
+# linux-syscall-support
+# commit 93426bda6535943ff1525d0460aab5cc0870ccaf (HEAD -> master, origin/master, origin/HEAD)
+
+# This script installs breakpad.
+
+
+. "$PSScriptRoot\helpers.ps1"
+
+
+$breakpad_commit_sha="b988fa74ec18de6214b18f723e48331d9a7802ae"
+$breakpad_tar="breakpad_$breakpad_commit_sha.tar.gz"
+$breakpad_tar_url="http://ci-files01-hki.intra.qt.io/input/breakpad/$breakpad_tar"
+$breakpad_tar_sha="a2d404d2aebc947cdac5840a9bccd65dfafae24c"
+
+$linux_syscall_support_commit_sha1="93426bda6535943ff1525d0460aab5cc0870ccaf"
+$linux_syscall_support_tar="linux-syscall-support_$linux_syscall_support_commit_sha1.tar.gz"
+$linux_syscall_support_tar_url="http://ci-files01-hki.intra.qt.io/input/linux-syscall-support/$linux_syscall_support_tar"
+$linux_syscall_support_tar_sha="62565be0920f3661e138d68026b79fbbdc2a11e4"
+
+$targetBreakpad="$env:tmp\$breakpad_tar"
+$targetSyscall="$env:tmp\$linux_syscall_support_tar"
+$installFolder = "C:\Utils"
+
+# breakpad
+try {
+ Download $breakpad_tar_url $breakpad_tar_url $targetBreakpad
+ Verify-Checksum $targetBreakpad $breakpad_tar_sha
+ Extract-tar_gz $targetBreakpad $installFolder
+ Remove-Item -Path $targetBreakpad
+ # linux-syscall-support
+ Download $linux_syscall_support_tar_url $linux_syscall_support_tar_url $targetSyscall
+ Verify-Checksum $targetSyscall $linux_syscall_support_tar_sha
+ Extract-tar_gz $targetSyscall "$env:tmp\"
+ New-Item -ItemType directory -Path "$installFolder\breakpad\third_party\lss"
+ Get-ChildItem -Path "$env:tmp\linux-syscall-support\*" -Recurse | Move-Item -Destination "$installFolder\breakpad\third_party\lss"
+ Remove-Item -Path $targetSyscall
+}
+catch {
+ Write-Host "Cached download failed: Attempping fallback method eg git."
+ Set-Location $installFolder
+ git.exe clone "https://chromium.googlesource.com/breakpad/breakpad"
+ git.exe clone "https://chromium.googlesource.com/linux-syscall-support breakpad\third_party\ssl"
+ Set-Location "breakpad"
+ git checkout $breakpad_commit_sha
+ Set-Location "src/third_party/lss"
+ git checkout $linux_syscall_support_commit_sha1
+}
+
+Set-EnvironmentVariable "BREAKPAD_SOURCE_DIR" "$installFolder\breakpad\src"
+
+# Write HEAD commit sha to versions txt, so build can be repeated at later date
+Write-Output "breakpad = $breakpad_commit_sha" >> ~/versions.txt
+Write-Output "linux-syscall-support = $linux_syscall_support_tar" >> ~/versions.txt
diff --git a/coin/provisioning/qtci-linux-RHEL-7.4-x86_64/35-install-breakpad.sh b/coin/provisioning/qtci-linux-RHEL-7.4-x86_64/35-install-breakpad.sh
new file mode 100644
index 00000000..74dd1579
--- /dev/null
+++ b/coin/provisioning/qtci-linux-RHEL-7.4-x86_64/35-install-breakpad.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# shellcheck source=../common/unix/install-breakpad.sh
+source "${BASH_SOURCE%/*}/../common/unix/install-breakpad.sh"
diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/35-install-breakpad.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/35-install-breakpad.sh
new file mode 100644
index 00000000..74dd1579
--- /dev/null
+++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/35-install-breakpad.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# shellcheck source=../common/unix/install-breakpad.sh
+source "${BASH_SOURCE%/*}/../common/unix/install-breakpad.sh"
diff --git a/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/35-install-breakpad.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/35-install-breakpad.sh
new file mode 100644
index 00000000..74dd1579
--- /dev/null
+++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/35-install-breakpad.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# shellcheck source=../common/unix/install-breakpad.sh
+source "${BASH_SOURCE%/*}/../common/unix/install-breakpad.sh"
diff --git a/coin/provisioning/qtci-macos-10.13-x86_64/35-install-breakpad.sh b/coin/provisioning/qtci-macos-10.13-x86_64/35-install-breakpad.sh
new file mode 100644
index 00000000..74dd1579
--- /dev/null
+++ b/coin/provisioning/qtci-macos-10.13-x86_64/35-install-breakpad.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -ex
+
+# shellcheck source=../common/unix/install-breakpad.sh
+source "${BASH_SOURCE%/*}/../common/unix/install-breakpad.sh"
diff --git a/coin/provisioning/qtci-windows-10-x86_64/35-install-breakpad.ps1 b/coin/provisioning/qtci-windows-10-x86_64/35-install-breakpad.ps1
new file mode 100644
index 00000000..9360a326
--- /dev/null
+++ b/coin/provisioning/qtci-windows-10-x86_64/35-install-breakpad.ps1
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\windows\install-breakpad.ps1"
diff --git a/coin/provisioning/qtci-windows-7-x86/35-install-breakpad.ps1 b/coin/provisioning/qtci-windows-7-x86/35-install-breakpad.ps1
new file mode 100644
index 00000000..9360a326
--- /dev/null
+++ b/coin/provisioning/qtci-windows-7-x86/35-install-breakpad.ps1
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\windows\install-breakpad.ps1"
diff --git a/coin/provisioning/qtci-windows-7-x86_64/35-install-breakpad.ps1 b/coin/provisioning/qtci-windows-7-x86_64/35-install-breakpad.ps1
new file mode 100644
index 00000000..9360a326
--- /dev/null
+++ b/coin/provisioning/qtci-windows-7-x86_64/35-install-breakpad.ps1
@@ -0,0 +1 @@
+. "$PSScriptRoot\..\common\windows\install-breakpad.ps1"