Update to latest
This commit is contained in:
@@ -6,22 +6,23 @@ bionic_json=$(gcloud compute images list --project ubuntu-os-cloud --filter="fam
|
||||
bionic_image=$(echo ${bionic_json} | jq -rc '.[] | select(.architecture == "X86_64") | .name' | sort | tail -n 1)
|
||||
echo ${bionic_image}
|
||||
|
||||
|
||||
# Grab IDs for the other images
|
||||
|
||||
families="ubuntu-2004-lts ubuntu-2204-lts ubuntu-2404-lts-amd64 ubuntu-minimal-2404-lts-amd64"
|
||||
families="ubuntu-2004-lts ubuntu-2204-lts ubuntu-2404-lts-amd64"
|
||||
|
||||
for family in ${families}
|
||||
do
|
||||
distro_json=$(gcloud compute images list --project ubuntu-os-cloud --filter="family:${family}" --format=json)
|
||||
|
||||
distro_image=$(echo ${distro_json} | jq -rc '.[] | select(.architecture == "X86_64") | .name')
|
||||
|
||||
echo $distro_image
|
||||
|
||||
done
|
||||
|
||||
latest_sup_rev="2410"
|
||||
|
||||
gcloud compute images list --project ubuntu-os-cloud --filter="family:ubuntu-${latest_sup_rev}-amd64"
|
||||
gcloud compute images list --project ubuntu-os-cloud --filter="family:ubuntu-minimal-${latest_sup_rev}-amd64"
|
||||
|
||||
# For testing for the next daily release depdning on LTS or non-LTS
|
||||
|
||||
gcloud compute images list --project ubuntu-os-cloud-devel --filter="family:ubuntu-2410-amd64"
|
||||
gcloud compute images list --project ubuntu-os-cloud-devel --filter="family:ubuntu-2504-amd64"
|
||||
gcloud compute images list --project ubuntu-os-cloud-devel --filter="family:ubuntu-2404-lts-amd64"
|
||||
|
||||
@@ -13,14 +13,7 @@ config:
|
||||
packages:
|
||||
- python3-pip
|
||||
- tox
|
||||
- sbuild
|
||||
- mmdebstrap
|
||||
- uidmap
|
||||
- lintian
|
||||
- pbuilder
|
||||
- dh-python
|
||||
- reprotest
|
||||
- licenserecon
|
||||
- sbuild-debian-developer-setup
|
||||
- devscripts
|
||||
- piuparts
|
||||
@@ -49,10 +42,10 @@ config:
|
||||
$uploader_name = 'Arif Ali <arif.ali@canonical.com>';
|
||||
|
||||
# Default distribution to build.
|
||||
$distribution = "unstable";
|
||||
#$distribution = "unstable";
|
||||
|
||||
# Default chroot (defaults to distribution[-arch][-sbuild])
|
||||
$chroot = 'unstable-amd64-sbuild';
|
||||
#$chroot = 'unstable-amd64-sbuild';
|
||||
|
||||
# Build arch-all by default.
|
||||
$build_arch_all = 1;
|
||||
@@ -99,6 +92,60 @@ config:
|
||||
# Directory for writing build logs to
|
||||
$log_dir=$ENV{HOME}."/Development/builder/debian/sbuild_logs";
|
||||
|
||||
# don't remove this, Perl needs it:
|
||||
1;
|
||||
- path: /root/.sbuildrc_unshare
|
||||
owner: root:root
|
||||
content: |
|
||||
$chroot_mode = 'unshare';
|
||||
$external_commands = { "build-failed-commands" => [ [ '%SBUILD_SHELL' ] ] };
|
||||
|
||||
# Build arch-all by default.
|
||||
$build_arch_all = 1;
|
||||
|
||||
$build_source = 1;
|
||||
|
||||
# --source-only-changes (applicable for dput. irrelevant for dgit push-source).
|
||||
$source_only_changes = 1;
|
||||
|
||||
# By default, the -s option only includes the .orig.tar.gz when needed
|
||||
# (i.e. when the Debian revision is 0 or 1). By setting this option
|
||||
# to 1, the .orig.tar.gz will always be included when -s is used.
|
||||
# This is equivalent to --force-orig-source.
|
||||
$force_orig_source = 0;
|
||||
|
||||
# Verbose (-v)
|
||||
$verbose = 1;
|
||||
|
||||
# Parallel build
|
||||
$ENV{'DEB_BUILD_OPTIONS'} = 'parallel=12';
|
||||
|
||||
# Time to wait for a source dependency lock. The default is 1 minute.
|
||||
my $srcdep_lock_wait = 1; # 1 minute
|
||||
|
||||
$run_lintian = 1;
|
||||
$lintian_opts = ['-v', '-i', '-I', '--pedantic', '--profile=debian'];
|
||||
|
||||
$run_piuparts = 1;
|
||||
$piuparts_root_args = ['PATH=/usr/sbin:/usr/bin:/sbin:/bin', 'unshare', '--pid', '--fork', '--mount-proc', '--map-root-user', '--map-auto'];
|
||||
$piuparts_opts = ["--basetgz=$HOME/.cache/sbuild/%r-%a.tar.zst", '--fake-essential-packages=systemd-sysv', '--distribution=%r'];
|
||||
|
||||
$run_autopkgtest = 1;
|
||||
$autopkgtest_root_args = '';
|
||||
$autopkgtest_opts = [ '--apt-upgrade', '--', 'unshare', '--release', '%r', '--arch', '%a' ];
|
||||
|
||||
# When to purge the build directory afterwards; possible values are "never",
|
||||
# "successful", and "always". "always" is the default. It can be helpful
|
||||
# to preserve failing builds for debugging purposes. Switch these comments
|
||||
# if you want to preserve even successful builds, and then use
|
||||
# "schroot -e --all-sessions" to clean them up manually.
|
||||
$purge_build_directory = 'successful';
|
||||
$purge_session = 'successful';
|
||||
$purge_build_deps = 'successful';
|
||||
|
||||
# Directory for writing build logs to
|
||||
$log_dir=$ENV{HOME}."/Development/temporary/sbuild_logs";
|
||||
|
||||
# don't remove this, Perl needs it:
|
||||
1;
|
||||
- path: /root/deb_build_check.sh
|
||||
@@ -107,20 +154,26 @@ config:
|
||||
content: |
|
||||
#!bin/bash
|
||||
|
||||
LICENSECHECK=1
|
||||
PBUILDER=1
|
||||
LINTIAN=1
|
||||
REPROTEST=1
|
||||
SBUILD=1
|
||||
LICENSECHECK=0
|
||||
PBUILDER=0
|
||||
LINTIAN=0
|
||||
REPROTEST=0
|
||||
SBUILD=0
|
||||
SBUILD_UNSHARE=1
|
||||
|
||||
|
||||
prod="${1}"
|
||||
|
||||
rm -rf /root/${prod} ~/.cache/sbuild
|
||||
mkdir -p ~/.cache/sbuild /root/${prod}
|
||||
|
||||
cd /root/${prod}
|
||||
tar xfz ../${prod}.tgz
|
||||
|
||||
series=$(head -n 1 debian/changelog | awk '{print $3}' | sed 's/;//g')
|
||||
|
||||
if [[ $LICENSECHECK -eq 1 ]] ; then
|
||||
apt -y install licenserecon
|
||||
lrc | tee /root/license-check.log
|
||||
fi
|
||||
|
||||
@@ -135,12 +188,14 @@ config:
|
||||
rm -rf ./*${prod}-build-deps*
|
||||
|
||||
if [[ $PBUILDER -eq 1 ]] ; then
|
||||
apt install -y pbuilder
|
||||
pbuilder create
|
||||
pbuilder build --twice ../*${prod}*.dsc \
|
||||
| tee /root/pbuilder.log
|
||||
fi
|
||||
|
||||
if [[ $LINTIAN -eq 1 ]] ; then
|
||||
apt -y install lintian
|
||||
lintian -v -i -I -E --pedantic --profile debian ../*${prod}*.dsc \
|
||||
| tee /root/lintian-dsc.log
|
||||
lintian -v -i -I -E --pedantic --profile debian ../*${prod}*.changes \
|
||||
@@ -149,31 +204,50 @@ config:
|
||||
| tee /root/lintian-buildinfo.log
|
||||
fi
|
||||
|
||||
|
||||
if [[ $REPROTEST -eq 1 ]] ; then
|
||||
sbuild-createchroot --include=eatmydata,ccache unstable /srv/chroot/unstable-amd64-sbuild
|
||||
apt install -y reprotest
|
||||
chroot="${series}-amd64-sbuild"
|
||||
sbuild-createchroot --include=eatmydata,ccache ${series} /srv/chroot/${chroot}
|
||||
|
||||
reprotest --print-sudoers \
|
||||
--variations=user_group.available+=guest-builder,domain_host.use_sudo=1 \
|
||||
| EDITOR=tee visudo -f /etc/sudoers.d/local-reprotest
|
||||
|
||||
echo "/etc/sudoers.d/local-reprotest /etc/sudoers.d/local-reprotest none bind 0 0" \
|
||||
| tee -a /srv/chroot/unstable-amd64-sbuild/etc/fstab
|
||||
| tee -a /srv/chroot/${chroot}/etc/fstab
|
||||
|
||||
cd -
|
||||
reprotest --vary=-build_path,domain_host.use_sudo=1 --auto-build ./*${prod}*.dsc -- schroot unstable-amd64-sbuild \
|
||||
reprotest --vary=-build_path,domain_host.use_sudo=1 --auto-build ./*${prod}*.dsc -- schroot ${chroot} \
|
||||
| tee /root/reprotest.log
|
||||
|
||||
rm -rf /srv/chroot/${chroot}
|
||||
fi
|
||||
|
||||
if [[ $SBUILD -eq 1 ]] ; then
|
||||
apt install -y sbuild mmdebstrap uidmap
|
||||
cd /root/${prod}
|
||||
mv /root/.sbuildrc_sbuild /root/.sbuildrc
|
||||
#sbuild-createchroot unstable /srv/chroot/unstable-amd64-sbuild
|
||||
cp /root/.sbuildrc_sbuild /root/.sbuildrc
|
||||
|
||||
mmdebstrap --variant=buildd unstable ~/.cache/sbuild/${series}-amd64.tar.zst
|
||||
echo "$(id -un):120000:65536" | sudo tee -a /etc/subuid /etc/subgid
|
||||
|
||||
sbuild | tee /root/sbuild.log
|
||||
cd -
|
||||
fi
|
||||
|
||||
if [[ $SBUILD_UNSHARE -eq 1 ]] ; then
|
||||
apt install -y sbuild mmdebstrap uidmap
|
||||
cd /root/${prod}
|
||||
cp /root/.sbuildrc_unshare /root/.sbuildrc
|
||||
|
||||
mmdebstrap --variant=buildd unstable ~/.cache/sbuild/${series}-amd64.tar.zst
|
||||
echo "$(id -un):120000:65536" | sudo tee -a /etc/subuid /etc/subgid
|
||||
|
||||
sbuild | tee /root/sbuild_unshare.log
|
||||
cd -
|
||||
fi
|
||||
|
||||
cd /root
|
||||
tar cf build-logs-${prod}.tgz *.log
|
||||
- path: /root/enable_proposed.sh
|
||||
permissions: '0755'
|
||||
|
||||
Reference in New Issue
Block a user