config 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # vim: filetype=yaml sw=2
  2. filename: 'container-image_[% c("var/container/suite") %]-[% c("var/container/arch") %]-[% c("version") %].tar.gz'
  3. version: 3
  4. pkg_type: build
  5. var:
  6. ubuntu_version: 20.04.1
  7. container:
  8. use_container: 1
  9. # We need CAP_SYS_ADMIN for debootstrap to work
  10. CAP_SYS_ADMIN: 1
  11. pre: |
  12. #!/bin/sh
  13. set -e
  14. export DEBIAN_FRONTEND=noninteractive
  15. apt-get update -y -q
  16. apt-get install -y -q debian-archive-keyring ubuntu-keyring debootstrap
  17. debootstrap --arch=[% c("var/container/arch") %] [% c("var/container/debootstrap_opt") %] [% c("var/container/suite") %] base-image [% c("var/container/debootstrap_mirror") %]
  18. [% IF c("var/apt_package_filename") || c("var/apt_utils_package_filename") || c("var/libapt_inst_package_filename") || c("var/libapt_pkg_package_filename") -%]
  19. mkdir ./base-image/apt-update
  20. mv [% c("var/apt_package_filename") %] [% c("var/apt_utils_package_filename") %] \
  21. [% c("var/libapt_inst_package_filename") %] [% c("var/libapt_pkg_package_filename") %] \
  22. ./base-image/apt-update
  23. mount proc ./base-image/proc -t proc
  24. mount sysfs ./base-image/sys -t sysfs
  25. chroot ./base-image dpkg -i -R /apt-update
  26. umount ./base-image/proc
  27. umount ./base-image/sys
  28. [% END -%]
  29. [% IF c("var/minimal_apt_version") -%]
  30. apt_version=$(dpkg --admindir=$(pwd)/base-image/var/lib/dpkg -s apt | grep '^Version: ' | cut -d ' ' -f 2)
  31. echo "apt version: $apt_version"
  32. dpkg --compare-versions "$apt_version" ge '[% c("var/minimal_apt_version") %]'
  33. [% END -%]
  34. tar -C ./base-image -czf [% dest_dir %]/[% c("filename") %] .
  35. targets:
  36. wheezy-amd64:
  37. var:
  38. minimal_apt_version: '0.9.7.9+deb7u9'
  39. # https://deb.freexian.com/extended-lts/updates/ela-76-1-apt/
  40. apt_packages_baseurl: http://deb.freexian.com/extended-lts/pool/main/a/apt
  41. apt_package_filename: apt_0.9.7.9+deb7u9_amd64.deb
  42. apt_package_sha256sum: b8a218da2ae21979323dd02551d983938d94308ac56930a2d238e822f062dc61
  43. apt_utils_package_filename: apt-utils_0.9.7.9+deb7u9_amd64.deb
  44. apt_utils_package_sha256sum: d635a166aae03b24cdabe277bb46d584156836637c0b9bef2220fb0bc0928e40
  45. libapt_inst_package_filename: libapt-inst1.5_0.9.7.9+deb7u9_amd64.deb
  46. libapt_inst_package_sha256sum: 332083172e00d39e55dec4c7078c3522989e45e12b0a1306889e90b8e2c0a0db
  47. libapt_pkg_package_filename: libapt-pkg4.12_0.9.7.9+deb7u9_amd64.deb
  48. libapt_pkg_package_sha256sum: c3ae83c4ea691074250bf6fb175e71042c4bb7418bf19779ceda0a53eea0a257
  49. container:
  50. suite: wheezy
  51. arch: amd64
  52. debootstrap_mirror: "http://archive.debian.org/debian/"
  53. jessie-armhf:
  54. var:
  55. minimal_apt_version: 1.0.9.8.6
  56. apt_packages_baseurl: http://security.debian.org/debian-security/pool/updates/main/a/apt
  57. apt_package_filename: apt_1.0.9.8.6_armhf.deb
  58. apt_package_sha256sum: cdae944dd0e51b690befee867fd00fd7b5c20fe1227d1c76600b5300b1d2b955
  59. apt_utils_package_filename: apt-utils_1.0.9.8.6_armhf.deb
  60. apt_utils_package_sha256sum: 18bf2c6d871eaafb586744ccffede9f15499ba1313fb652cfebfdfc045ad3700
  61. libapt_inst_package_filename: libapt-inst1.5_1.0.9.8.6_armhf.deb
  62. libapt_inst_package_sha256sum: 5f85da2a59e9f6634b166e4a0a376f9c7777adf5b6767d91274c4242a28743c1
  63. libapt_pkg_package_filename: libapt-pkg4.12_1.0.9.8.6_armhf.deb
  64. libapt_pkg_package_sha256sum: 28a56875af6f1312f4af53faba6dab1a1c90437fab2829707561bb68e9bc385f
  65. container:
  66. suite: jessie
  67. arch: armhf
  68. stretch-armhf:
  69. var:
  70. minimal_apt_version: 1.4.9
  71. container:
  72. suite: stretch
  73. arch: armhf
  74. stretch-arm64:
  75. var:
  76. minimal_apt_version: 1.4.9
  77. container:
  78. suite: stretch
  79. arch: arm64
  80. buster-amd64:
  81. var:
  82. minimal_apt_version: 1.8.2
  83. container:
  84. suite: buster
  85. arch: amd64
  86. buster-arm64:
  87. var:
  88. minimal_apt_version: 1.8.2
  89. container:
  90. suite: buster
  91. arch: arm64
  92. input_files:
  93. - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  94. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  95. sha256sum: 97f6cbcf41f39272c84e32b6f926ed5d6906c6e463a557025181f4aa191ad667
  96. enable: '[% c("buildconf/deb_native_arch") == "amd64" %]'
  97. - URL: 'https://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
  98. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-arm64.tar.gz'
  99. sha256sum: 269709ecd5c506f229f10983f990c394278b202ca29f089844e2e5c2b80ad8b4
  100. enable: '[% c("buildconf/deb_native_arch") == "arm64" %]'
  101. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/apt_package_filename") %]'
  102. sha256sum: '[% c("var/apt_package_sha256sum") %]'
  103. enable: '[% c("var/apt_package_filename") %]'
  104. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/apt_utils_package_filename") %]'
  105. sha256sum: '[% c("var/apt_utils_package_sha256sum") %]'
  106. enable: '[% c("var/apt_utils_package_filename") %]'
  107. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/libapt_inst_package_filename") %]'
  108. sha256sum: '[% c("var/libapt_inst_package_sha256sum") %]'
  109. enable: '[% c("var/libapt_inst_package_filename") %]'
  110. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/libapt_pkg_package_filename") %]'
  111. sha256sum: '[% c("var/libapt_pkg_package_sha256sum") %]'
  112. enable: '[% c("var/libapt_pkg_package_filename") %]'