From: Sadoon Albader Date: Fri, 18 Aug 2023 12:16:57 +0000 (+0300) Subject: Add script to install sbuild and its configs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58f2f3dc6f28a9609a689a5b24a58a47ab6c776d;p=dev-env-setup.git Add script to install sbuild and its configs --- diff --git a/install-sbuild-apt-reqs b/install-sbuild-apt-reqs new file mode 100644 index 0000000..d294941 --- /dev/null +++ b/install-sbuild-apt-reqs @@ -0,0 +1,61 @@ +#!/bin/bash + +echo "SCRIPT IS STILL WIP, DO NOT RUN" + +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + +# This should not be changed until we want to build a future release +RELEASE=bookworm + +apt-get update -y + +# Following lines are from the Debian wiki page with some options disabled +# https://wiki.debian.org/sbuild +# They setup sbuild with their recommended options, please do +# not deviate unless you know what you're doing! + +apt-get install sbuild schroot debootstrap apt-cacher-ng devscripts piuparts +tee ~/.sbuildrc << EOF +############################################################################## +# PACKAGE BUILD RELATED (additionally produce _source.changes) +############################################################################## +# -d +$distribution = '$RELEASE'; +# -A +$build_arch_all = 1; +# -s +$build_source = 1; +# --source-only-changes (applicable for dput. irrelevant for dgit push-source). +$source_only_changes = 1; +# -v +$verbose = 1; +# parallel build +$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=5'; +############################################################################## +# POST-BUILD RELATED (turn off functionality by setting variables to 0) +############################################################################## + +# We are not running lintian, piuparts, and autopkgtest for now to speed +# up builds. Will be enabled in the future when necessary. +$run_lintian = 0; +$lintian_opts = ['-i', '-I']; +$run_piuparts = 0; +$piuparts_opts = ['--schroot', '%r-%a-sbuild', '--no-eatmydata']; +$run_autopkgtest = 0; +$autopkgtest_root_args = ''; +$autopkgtest_opts = [ '--', 'schroot', '%r-%a-sbuild' ]; + +############################################################################## +# PERL MAGIC +############################################################################## +1; +EOF +sbuild-adduser $LOGNAME +ln -sf ~/.sbuildrc /root/.sbuildrc + + +# end of lines from Debian Wiki page. +