123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- # vim: filetype=yaml sw=2
- filename: 'container-image_[% c("var/container/suite") %]-[% c("var/container/arch") %]-[% c("version") %].tar.gz'
- version: 1
- pkg_type: build
- var:
- ubuntu_version: 20.04.1
- container:
- use_container: 1
- pre: |
- #!/bin/sh
- set -e
- rootdir=$(pwd)
- export DEBIAN_FRONTEND=noninteractive
- apt-get update -y -q
- apt-get install -y -q debian-archive-keyring ubuntu-keyring mmdebstrap gnupg patch
- export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
- tar -xf [% c('input_files_by_name/mmdebstrap') %]
- # As a user namespace inside an other user namespace doesn't seem to work,
- # we patch mmdebstrap to avoid creating a new user namespace
- patch -d mmdebstrap -p1 < mmdebstrap-no-user-ns.patch
- ./mmdebstrap/mmdebstrap --mode=unshare --arch=[% c("var/container/arch") %] [% c("var/container/mmdebstrap_opt") %] [% c("var/container/suite") %] output.tar.gz [% c("var/container/debian_mirror") %]
- [% IF c("var/minimal_apt_version") -%]
- mkdir base-image
- tar -C base-image -xf output.tar.gz ./var/lib/dpkg
- apt_version=$(dpkg --admindir=$rootdir/base-image/var/lib/dpkg -s apt | grep '^Version: ' | cut -d ' ' -f 2)
- echo "apt version: $apt_version"
- dpkg --compare-versions "$apt_version" ge '[% c("var/minimal_apt_version") %]'
- [% END -%]
- mv output.tar.gz [% dest_dir %]/[% c("filename") %]
- targets:
- jessie-amd64:
- var:
- minimal_apt_version: 1.0.9.8.6
- container:
- suite: jessie
- arch: amd64
- jessie-armhf:
- var:
- minimal_apt_version: 1.0.9.8.6
- container:
- suite: jessie
- arch: armhf
- stretch-arm64:
- var:
- minimal_apt_version: 1.4.9
- container:
- suite: stretch
- arch: arm64
- buster-amd64:
- var:
- minimal_apt_version: 1.8.2
- container:
- suite: buster
- arch: amd64
- buster-arm64:
- var:
- minimal_apt_version: 1.8.2
- container:
- suite: buster
- arch: arm64
- input_files:
- - project: mmdebstrap
- name: mmdebstrap
- - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
- filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
- sha256sum: 97f6cbcf41f39272c84e32b6f926ed5d6906c6e463a557025181f4aa191ad667
- enable: '[% c("buildconf/deb_native_arch") == "amd64" %]'
- - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
- filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
- sha256sum: 269709ecd5c506f229f10983f990c394278b202ca29f089844e2e5c2b80ad8b4
- enable: '[% c("buildconf/deb_native_arch") == "arm64" %]'
- - filename: mmdebstrap-no-user-ns.patch
|