config 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # vim: filetype=yaml sw=2
  2. filename: 'container-image_[% c("var/container/suite") %]-[% c("var/container/arch") %]-[% c("version") %].tar.gz'
  3. version: 2
  4. pkg_type: build
  5. var:
  6. ubuntu_version: 19.10
  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. stretch-amd64:
  54. var:
  55. minimal_apt_version: 1.4.9
  56. container:
  57. suite: stretch
  58. arch: amd64
  59. buster-amd64:
  60. var:
  61. minimal_apt_version: 1.8.2
  62. container:
  63. suite: buster
  64. arch: amd64
  65. input_files:
  66. - URL: 'http://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  67. filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
  68. sha256sum: eedcb1dc0ccc86b59eb1f89960c322a2ba3ed3e0323a20a1da8bcc0e6f100f4f
  69. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/apt_package_filename") %]'
  70. sha256sum: '[% c("var/apt_package_sha256sum") %]'
  71. enable: '[% c("var/apt_package_filename") %]'
  72. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/apt_utils_package_filename") %]'
  73. sha256sum: '[% c("var/apt_utils_package_sha256sum") %]'
  74. enable: '[% c("var/apt_utils_package_filename") %]'
  75. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/libapt_inst_package_filename") %]'
  76. sha256sum: '[% c("var/libapt_inst_package_sha256sum") %]'
  77. enable: '[% c("var/libapt_inst_package_filename") %]'
  78. - URL: '[% c("var/apt_packages_baseurl") %]/[% c("var/libapt_pkg_package_filename") %]'
  79. sha256sum: '[% c("var/libapt_pkg_package_sha256sum") %]'
  80. enable: '[% c("var/libapt_pkg_package_filename") %]'