43 lines
749 B
Bash
Executable File
43 lines
749 B
Bash
Executable File
#!/bin/bash
|
|
|
|
source /opt/build-tools/default.conf
|
|
|
|
source /opt/build-tools/common.sh
|
|
|
|
function exit_(){
|
|
exit 0
|
|
}
|
|
trap exit_ 0 1 2 3 15
|
|
|
|
#
|
|
work_dir=$(mktemp -d /tmp/pbuilder-mini.XXXXX)
|
|
mkdir -p $TOOLS_COMMOD_DIR
|
|
|
|
mkdir -p $work_dir
|
|
|
|
debootstrap --arch $ARCH --foreign --include=apt --variant=buildd --force-check-gpg $DISTRIBUTION $work_dir $MIRRORS
|
|
|
|
cp /usr/bin/qemu-aarch64-static "$work_dir/usr/bin/"
|
|
|
|
chroot $work_dir /debootstrap/debootstrap --second-stage
|
|
|
|
copy_host_conf $work_dir
|
|
|
|
mounting_filesystem $work_dir
|
|
|
|
ln_aptcache $work_dir
|
|
|
|
set_sources_update $work_dir
|
|
|
|
save_aptcache $work_dir
|
|
|
|
umount_filesystem $work_dir
|
|
|
|
chroot $work_dir /usr/bin/apt-get clean
|
|
|
|
rmln_aptcache $work_dir
|
|
|
|
save_base_tgz $work_dir
|
|
|
|
rm_mount_dir $work_dir
|