mirror of
git://code.qt.io/qt/qt5.git
synced 2026-04-21 04:16:39 +08:00
We need to use older chroot to build debian packages.
Task-number: QTBUG-117120
Change-Id: I044e398324c380716b309dad5b087e97bc6688ab
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 43e1a3d2f5)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
57 lines
1.7 KiB
Bash
Executable File
57 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) 2021 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
# 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-arm64-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-arm64
|
|
# For ubuntu 20.04
|
|
echo "Create chroot for Ubuntu Focal"
|
|
sudo sbuild-createchroot --include=eatmydata,ccache,gnupg,ca-certificates focal /srv/chroot/focal-arm64 http://ports.ubuntu.com/ubuntu-ports/
|
|
echo "Done creating chroot for Ubuntu Focal"
|
|
|
|
# Update chroot
|
|
sudo sbuild-update -udcar stable
|
|
sudo sbuild-update -udcar focal
|
|
|
|
|
|
|
|
|
|
|