config 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # vim: filetype=yaml sw=2
  2. filename: 'container-image_[% c("var/container/suite") %]-[% c("var/container/arch") %]-[% c("version") %].tar.gz'
  3. version: 1
  4. pkg_type: build
  5. container:
  6. use_container: 1
  7. var:
  8. ubuntu_version: 22.04
  9. pre: |
  10. #!/bin/sh
  11. set -e
  12. rootdir=$(pwd)
  13. export DEBIAN_FRONTEND=noninteractive
  14. apt-get update -y -q
  15. apt-get install -y -q debian-archive-keyring ubuntu-keyring mmdebstrap gnupg
  16. export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
  17. tar -xf [% c('input_files_by_name/mmdebstrap') %]
  18. ./mmdebstrap/mmdebstrap --mode=unshare [% c("var/container/mmdebstrap_opt") %] [% c("var/container/suite") %] output.tar.gz [% c("var/container/debian_mirror") %]
  19. [% IF c("var/minimal_apt_version") -%]
  20. mkdir base-image
  21. tar -C base-image -xf output.tar.gz ./var/lib/dpkg
  22. apt_version=$(dpkg --admindir=$rootdir/base-image/var/lib/dpkg -s apt | grep '^Version: ' | cut -d ' ' -f 2)
  23. echo "apt version: $apt_version"
  24. dpkg --compare-versions "$apt_version" ge '[% c("var/minimal_apt_version") %]'
  25. [% END -%]
  26. mv output.tar.gz [% dest_dir %]/[% c("filename") %]
  27. targets:
  28. jessie-amd64:
  29. var:
  30. minimal_apt_version: 1.0.9.8.6
  31. container:
  32. suite: jessie
  33. arch: amd64
  34. debian_mirror: >
  35. "deb [signed-by=/usr/share/keyrings/debian-archive-removed-keys.gpg] http://deb.debian.org/debian jessie main"
  36. "deb [signed-by=/usr/share/keyrings/debian-archive-removed-keys.gpg] http://deb.debian.org/debian jessie-updates main"
  37. "deb [signed-by=/usr/share/keyrings/debian-archive-removed-keys.gpg] http://security.debian.org/debian-security jessie/updates main"
  38. bullseye-amd64:
  39. var:
  40. minimal_apt_version: 2.2.4
  41. container:
  42. suite: bullseye
  43. arch: amd64
  44. input_files:
  45. - project: mmdebstrap
  46. name: mmdebstrap
  47. - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  48. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  49. sha256sum: df6fe77cee11bd216ac532f0ee082bdc4da3c0cc1f1d9cb20f3f743196bc4b07