public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] Refactor mount logic
@ 2021-10-12 13:04 Adriaan Schmidt
  2021-10-12 13:04 ` [RFC PATCH 1/5] oe imports in central location Adriaan Schmidt
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Adriaan Schmidt @ 2021-10-12 13:04 UTC (permalink / raw)
  To: isar-users; +Cc: Adriaan Schmidt

After some reports on problems with mounting and unmounting, here is a proposal
to refactor the whole mount logic.

The main idea is to have all actual mounting happen in mounts.bbclass, which
also takes care of things like reference counting.
Any task that needs mounts uses a `do_my_task[mounts] = "..."` varflag annotation.

One thing that may need some thoughts: the original rootfs_do_mounts also
writes /etc/resolv.conf. This proposal introduces another varflag
(`do_my_task[buildchroot] = "1"`) for tasks that need that. Alternatively,
we could simply provide a function that needs to be called explicitly.

Current status: the code works, but there may be some issues with cleanup/unmounting.
The existing ("legacy") cleanup code in isar-events still finds active mounts,
which should actually be covered by cleanup code in mounts.bbclass.


Adriaan Schmidt (5):
  oe imports in central location
  meta: refactor containerization
  meta: add oe.utils
  meta: add mounts class
  meta: refactor to use the new mounting mechanism

 meta/classes/base.bbclass                     |  28 +
 meta/classes/buildchroot.bbclass              |  52 +-
 meta/classes/cpiogz-img.bbclass               |   3 +-
 meta/classes/dpkg-base.bbclass                |  49 +-
 meta/classes/dpkg-gbp.bbclass                 |   2 -
 meta/classes/dpkg.bbclass                     |   4 +-
 meta/classes/ext4-img.bbclass                 |   3 +-
 meta/classes/fit-img.bbclass                  |   4 +-
 .../classes/image-container-extension.bbclass |   3 +-
 meta/classes/image-sdk-extension.bbclass      |   6 +-
 meta/classes/image-tools-extension.bbclass    |   4 +-
 meta/classes/image.bbclass                    |  30 +-
 meta/classes/initramfs.bbclass                |   2 +-
 meta/classes/isar-events.bbclass              |   4 +-
 meta/classes/mounts.bbclass                   | 271 +++++++++
 meta/classes/patch.bbclass                    |   5 -
 meta/classes/rootfs.bbclass                   |  50 +-
 meta/classes/ubi-img.bbclass                  |   3 +-
 meta/classes/ubifs-img.bbclass                |   3 +-
 meta/classes/vm-img.bbclass                   |   7 +-
 meta/classes/wic-img.bbclass                  |  31 +-
 meta/conf/bitbake.conf                        |   2 +-
 meta/lib/oe/utils.py                          | 569 ++++++++++++++++++
 .../isar-bootstrap/isar-bootstrap.inc         |  43 +-
 .../buildchroot/buildchroot.inc               |   8 +-
 25 files changed, 976 insertions(+), 210 deletions(-)
 create mode 100644 meta/classes/mounts.bbclass
 create mode 100644 meta/lib/oe/utils.py

-- 
2.30.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-22 14:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 13:04 [RFC PATCH 0/5] Refactor mount logic Adriaan Schmidt
2021-10-12 13:04 ` [RFC PATCH 1/5] oe imports in central location Adriaan Schmidt
2021-10-12 13:04 ` [RFC PATCH 2/5] meta: refactor containerization Adriaan Schmidt
2021-10-13 10:17   ` Jan Kiszka
2021-10-12 13:04 ` [RFC PATCH 3/5] meta: add oe.utils Adriaan Schmidt
2021-10-13 10:17   ` Jan Kiszka
2021-10-20  6:49     ` Schmidt, Adriaan
2021-10-12 13:04 ` [RFC PATCH 4/5] meta: add mounts class Adriaan Schmidt
2021-10-13 10:31   ` Jan Kiszka
2021-10-20  7:02     ` Schmidt, Adriaan
2021-10-12 13:04 ` [RFC PATCH 5/5] meta: refactor to use the new mounting mechanism Adriaan Schmidt
2021-10-13 10:42   ` Jan Kiszka
2021-10-20  9:20     ` Schmidt, Adriaan
2021-11-22 14:45 ` [RFC PATCH 0/5] Refactor mount logic Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox