config 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. var:
  6. ubuntu_version: 20.04.1
  7. container:
  8. use_container: 1
  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 patch
  16. export SOURCE_DATE_EPOCH='[% c("timestamp") %]'
  17. tar -xf [% c('input_files_by_name/mmdebstrap') %]
  18. # As a user namespace inside an other user namespace doesn't seem to work,
  19. # we patch mmdebstrap to avoid creating a new user namespace
  20. patch -d mmdebstrap -p1 < mmdebstrap-no-user-ns.patch
  21. ./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") %]
  22. [% IF c("var/minimal_apt_version") -%]
  23. mkdir base-image
  24. tar -C base-image -xf output.tar.gz ./var/lib/dpkg
  25. apt_version=$(dpkg --admindir=$rootdir/base-image/var/lib/dpkg -s apt | grep '^Version: ' | cut -d ' ' -f 2)
  26. echo "apt version: $apt_version"
  27. dpkg --compare-versions "$apt_version" ge '[% c("var/minimal_apt_version") %]'
  28. [% END -%]
  29. mv output.tar.gz [% dest_dir %]/[% c("filename") %]
  30. targets:
  31. jessie-amd64:
  32. var:
  33. minimal_apt_version: 1.0.9.8.6
  34. container:
  35. suite: jessie
  36. arch: amd64
  37. jessie-armhf:
  38. var:
  39. minimal_apt_version: 1.0.9.8.6
  40. container:
  41. suite: jessie
  42. arch: armhf
  43. stretch-arm64:
  44. var:
  45. minimal_apt_version: 1.4.9
  46. container:
  47. suite: stretch
  48. arch: arm64
  49. buster-amd64:
  50. var:
  51. minimal_apt_version: 1.8.2
  52. container:
  53. suite: buster
  54. arch: amd64
  55. buster-arm64:
  56. var:
  57. minimal_apt_version: 1.8.2
  58. container:
  59. suite: buster
  60. arch: arm64
  61. input_files:
  62. - project: mmdebstrap
  63. name: mmdebstrap
  64. - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  65. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  66. sha256sum: 97f6cbcf41f39272c84e32b6f926ed5d6906c6e463a557025181f4aa191ad667
  67. enable: '[% c("buildconf/deb_native_arch") == "amd64" %]'
  68. - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
  69. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
  70. sha256sum: 269709ecd5c506f229f10983f990c394278b202ca29f089844e2e5c2b80ad8b4
  71. enable: '[% c("buildconf/deb_native_arch") == "arm64" %]'
  72. - filename: mmdebstrap-no-user-ns.patch