On Mon, May 19, 2025 at 5:28 PM 'Cedric Hombourger' via isar-users <isar-users@googlegroups.com> wrote:
When building root file-systems for a foreign architecture and needing
to cache source packages, apt will be called from within the rootfs and
consequently be executed under QEMU: this is terribly slow especially
considering that source packages are downloaded one by one. This patch
series introduces a wrapper function to run native commands against a
rootfs with our special mounts such as /isar-apt. Some basic tests were
performed to smoke test this approach and evaluate its performance. It
should be noted that the changes introduce a new host tool dependency:
bubblewrap. Alignment with projects such as kas would be required (had
a positive discussion with Felix but no actions will be taken prior to
receiving some form of agreement for this patch series).

Changes since RFC patch:
  - Let caller decide where to bind-mount the rootfs to
  - Make the rootfs argument optional
  - Support 32-bit rootfs (no lib64 there)

Validated with "citest.py -t dev" (in a kas-container):

 (1/6) citest.py:DevTest.test_dev: STARTED
 (1/6) citest.py:DevTest.test_dev: PASS (752.07 s)
 (2/6) citest.py:DevTest.test_dev_apps: STARTED
 (2/6) citest.py:DevTest.test_dev_apps: PASS (770.95 s)
 (3/6) citest.py:DevTest.test_dev_rebuild: STARTED
 (3/6) citest.py:DevTest.test_dev_rebuild: PASS (275.02 s)
 (4/6) citest.py:DevTest.test_dev_run_amd64_bookworm: STARTED
 (4/6) citest.py:DevTest.test_dev_run_amd64_bookworm: PASS (47.87 s)
 (5/6) citest.py:DevTest.test_dev_run_arm64_bookworm: STARTED
 (5/6) citest.py:DevTest.test_dev_run_arm64_bookworm: PASS (31.20 s)
 (6/6) citest.py:DevTest.test_dev_run_arm_bookworm: STARTED
 (6/6) citest.py:DevTest.test_dev_run_arm_bookworm: PASS (32.34 s)

Cedric Hombourger (4):
  rootfs: introduce wrapper to run commands against a rootfs
  deb-dl-dir: optimize caching of source packages using apt natively
  image-postproc-extension: refactor systemd version checks
  image-postproc-extension: extract systemd's version using rootfs_cmd

 RECIPE-API-CHANGELOG.md                       |  6 ++
 doc/user_manual.md                            |  1 +
 meta/classes/deb-dl-dir.bbclass               | 37 +++--------
 meta/classes/image-postproc-extension.bbclass | 12 ++--
 meta/classes/rootfs.bbclass                   | 66 +++++++++++++++++++
 5 files changed, 89 insertions(+), 33 deletions(-)


 Tested-by: Srinuvasan Arjunan <srinuvasan.a@siemens.com> 

--
2.39.5

--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250519115750.3195300-1-cedric.hombourger%40siemens.com.

--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/CAB2Z2nPp5uOcv1m%3DOw1%3DLyJ2XwiGcwZkujeWDkP%2BZO3EQk%3DR-g%40mail.gmail.com.