mbox

[v3,0/5] Improving base-apt usage PoC

Message ID 20220325103226.27033-1-ubely@ilbers.de
State Superseded, archived
Headers show

Message

Uladzimir Bely March 25, 2022, 12:32 a.m. UTC
Currently, base-apt is used in the following way:
* At first build every deb file that took part in installing is cached
in directory $DL_DIR/deb/. Debootstrap is done from remote source.
* At second build, `base-apt` repo is created from previously downloaded
debs (if ISAR_USE_CACHED_BASE_REPO is set). Debootstrap and installing
packages later is done from this local repo

The idea of this patchset is to precreate `base-apt` at first build and
use it later for all steps that require any package downloads (build
dependencies. rootfs populate, etc). So, no second build is required
to get ready-to-use base-apt.

Currently, only native builds are supported. Architecture related
dependencies predownloading is not yet ready, so cross-builds are not
working at the moment.

In the future, there are plans to switch from debootstrap to mmdebstrap
that is able to work without sudo and uses more clean (apt/python-apt)
approach in comparison with debootstrap.

Changes since v2:
 - populate base-apt before using at all steps of native build.

Changes since v1:
 - rebased on latest next;
 - updated patchset description.

Uladzimir Bely (5):
  Add debrepo python script handling base-apt
  meta: Use cached base-apt repo to debootstrap
  meta: always use base-apt repo in local mode
  base-apt: Predownload packages to base-apt before install.
  draft: make isar-apt repo visible for base-apt

 meta-isar/conf/distro/ubuntu-focal.conf       |   4 +
 meta-isar/conf/distro/ubuntu.public.key       |  53 +++
 meta/classes/buildchroot.bbclass              |  10 +-
 meta/classes/dpkg-base.bbclass                |   8 +
 meta/classes/dpkg-gbp.bbclass                 |   7 +
 meta/classes/dpkg.bbclass                     |   7 +
 meta/classes/image-locales-extension.bbclass  |   7 +
 meta/classes/image-tools-extension.bbclass    |   7 +
 meta/classes/rootfs.bbclass                   |  30 +-
 .../isar-bootstrap/isar-bootstrap.inc         |  59 ++-
 scripts/debrepo                               | 363 ++++++++++++++++++
 11 files changed, 526 insertions(+), 29 deletions(-)
 create mode 100644 meta-isar/conf/distro/ubuntu.public.key
 create mode 100755 scripts/debrepo