Provisioning: Install debian packaging dependencies to Ubuntu

Change-Id: I320adf737c7ac9da45e27b30b385318f1d925905
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
(cherry picked from commit 442f28b534)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Simo Fält
2023-06-21 13:36:13 +03:00
committed by Qt Cherry-pick Bot
parent f89575f6b3
commit 16905c60c1
3 changed files with 153 additions and 0 deletions

View File

@@ -212,6 +212,8 @@ sudo dpkg --add-architecture i386
installPackages+=(nfs-kernel-server)
installPackages+=(net-tools)
installPackages+=(bridge-utils)
# For Debian packaging
installPackages+=(sbuild)
echo "Running update for apt"
waitLoop

View File

@@ -0,0 +1,90 @@
#!/usr/bin/env bash
#############################################################################
##
## Copyright (C) 2021 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
## 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 https://www.qt.io/terms-conditions. For further
## information use the contact form at https://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 3 as published by the Free Software
## Foundation and appearing in the file LICENSE.LGPL3 included in the
## packaging of this file. Please review the following information to
## ensure the GNU Lesser General Public License version 3 requirements
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
##
## GNU General Public License Usage
## Alternatively, this file may be used under the terms of the GNU
## General Public License version 2.0 or (at your option) the GNU General
## Public license version 3 or any later version approved by the KDE Free
## Qt Foundation. The licenses are as published by the Free Software
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
## included in the packaging of this file. Please review the following
## information to ensure the GNU General Public License requirements will
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
## https://www.gnu.org/licenses/gpl-3.0.html.
##
## $QT_END_LICENSE$
##
#############################################################################
# Setups sbuild environment
tee ~/.sbuildrc << EOF
##############################################################################
# PACKAGE BUILD RELATED (additionally produce _source.changes)
##############################################################################
# -d
\$distribution = 'stable';
# -A
\$build_arch_all = 1;
# -s
\$build_source = 1;
# -v
\$verbose = 1;
# parallel build
\$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=8';
##############################################################################
# POST-BUILD RELATED (turn off functionality by setting variables to 0)
##############################################################################
\$run_lintian = 1;
\$lintian_opts = ['-i', '-I'];
\$run_piuparts = 0;
\$piuparts_opts = ['--schroot', 'stable-amd64-sbuild', '--no-eatmydata'];
\$run_autopkgtest = 0;
\$autopkgtest_root_args = '';
\$autopkgtest_opts = [ '--', 'schroot', '%r-%a-sbuild' ];
##############################################################################
# PERL MAGIC
##############################################################################
1;
EOF
# Add user group
sudo sbuild-adduser $LOGNAME
newgrp sbuild
# Create chroot
#sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,ca-certificates stable /srv/chroot/stable-amd64-sbuild http://127.0.0.1:3142/deb.debian.org/debian
sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,ca-certificates stable /srv/chroot/stable-amd64-sbuild
# Update chroot
sudo sbuild-update -udcar stable

View File

@@ -0,0 +1,61 @@
#!/usr/bin/env bash
#############################################################################
##
## Copyright (C) 2023 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the provisioning scripts of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
## 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 https://www.qt.io/terms-conditions. For further
## information use the contact form at https://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 3 as published by the Free Software
## Foundation and appearing in the file LICENSE.LGPL3 included in the
## packaging of this file. Please review the following information to
## ensure the GNU Lesser General Public License version 3 requirements
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
##
## GNU General Public License Usage
## Alternatively, this file may be used under the terms of the GNU
## General Public License version 2.0 or (at your option) the GNU General
## Public license version 3 or any later version approved by the KDE Free
## Qt Foundation. The licenses are as published by the Free Software
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
## included in the packaging of this file. Please review the following
## information to ensure the GNU General Public License requirements will
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
## https://www.gnu.org/licenses/gpl-3.0.html.
##
## $QT_END_LICENSE$
##
#############################################################################
# Get required deb files for sbuild to build qt debian packages for Ubuntu focal
mkdir -p /home/qt/debian_packages
cd /home/qt/debian_packages
# Backported cmake 3.24
wget https://ci-files01-hki.intra.qt.io/input/debian/cmake/amd64-focal/cmake-3.24-deb.tar.gz
tar xzf cmake-3.24-deb.tar.gz
# get rest of ready made Ubuntu focal arm debian packages
# so that sbuild can find those
# QtWebEngine dependencies
wget http://ci-files01-hki.ci.qt.io/input/debian/libuv1/amd64-focal/libuv1_1.43.0.tar.gz
tar -xzf libuv1_1.43.0.tar.gz
rm -rf libuv1_1.43.0.tar.gz
wget http://ci-files01-hki.ci.qt.io/input/debian/nghttp2/amd64-focal/nghttp2_1.43.0.tar.gz
tar -xzf nghttp2_1.43.0.tar.gz
rm -rf nghttp2_1.43.0.tar.gz
wget http://ci-files01-hki.ci.qt.io/input/debian/nodejs/amd64-focal/nodejs_12.22.9.tar.gz
tar -xzf nodejs_12.22.9.tar.gz
rm -rf nodejs_12.22.9.tar.gz
# get ICU
wget http://ci-files01-hki.ci.qt.io/input/debian/icu/amd64-focal/libicu-56.1-qt_56.1-1_amd64.deb
wget http://ci-files01-hki.ci.qt.io/input/debian/icu/amd64-focal/libicu-56.1-qt-dev_56.1-1_amd64.deb