From: Adriaan Schmidt <adriaan.schmidt@siemens.com>
To: isar-users@googlegroups.com
Cc: Adriaan Schmidt <adriaan.schmidt@siemens.com>
Subject: [RFC PATCH 0/5] Refactor mount logic
Date: Tue, 12 Oct 2021 15:04:08 +0200 [thread overview]
Message-ID: <20211012130413.1719424-1-adriaan.schmidt@siemens.com> (raw)
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
next reply other threads:[~2021-10-12 13:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 13:04 Adriaan Schmidt [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211012130413.1719424-1-adriaan.schmidt@siemens.com \
--to=adriaan.schmidt@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox