* [PATCH v2 0/4] Patches and bugfixes for overlayfs
@ 2022-03-10 13:13 Claudius Heine
2022-03-10 13:13 ` [PATCH v2 1/4] overlayfs-etc: add condition to package-management feature conflict Claudius Heine
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Vyacheslav Yurkov, Claudius Heine
Hi,
I bundled my patches to overlayfs and overlayfs-etc togehter in this
patchset and fixed the whitespace issues.
regards,
Claudius
--
Changes from v1:
- fixed whitespace issues: converted tabs to 4 spaces.
- changed git commit title of patch 4
Claudius Heine (4):
overlayfs-etc: add condition to package-management feature conflict
overlayfs: add systemd unit path prefix to FILES:${PN} array
files: overlayfs-etc: wrap long lines of preinit file
files: overlayfs-etc: add overlay mount options to preinit
meta/classes/overlayfs-etc.bbclass | 3 ++-
meta/classes/overlayfs.bbclass | 3 ++-
meta/files/overlayfs-etc-preinit.sh.in | 12 ++++++++++--
3 files changed, 14 insertions(+), 4 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/4] overlayfs-etc: add condition to package-management feature conflict
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
@ 2022-03-10 13:13 ` Claudius Heine
2022-03-10 13:13 ` [PATCH v2 2/4] overlayfs: add systemd unit path prefix to FILES:${PN} array Claudius Heine
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Vyacheslav Yurkov, Claudius Heine
The conflict with the `package-managment` only happens if the
`overlayfs-etc` class overwrites `/sbin/init`, which is not the case
when `OVERLAYFS_ETC_USE_ORIG_INIT_NAME` is set to `0`.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/classes/overlayfs-etc.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/overlayfs-etc.bbclass b/meta/classes/overlayfs-etc.bbclass
index 4ced07ba11..b593a4d9eb 100644
--- a/meta/classes/overlayfs-etc.bbclass
+++ b/meta/classes/overlayfs-etc.bbclass
@@ -26,7 +26,8 @@
# overlay is out of scope of this class
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "overlayfs-etc", "create_overlayfs_etc_preinit;", "", d)}'
-IMAGE_FEATURES_CONFLICTS_overlayfs-etc = "package-management"
+IMAGE_FEATURES_CONFLICTS_overlayfs-etc = " \
+ ${@ 'package-management' if bb.utils.to_boolean(d.getVar('OVERLAYFS_ETC_USE_ORIG_INIT_NAME'), True) else ''}"
OVERLAYFS_ETC_MOUNT_POINT ??= ""
OVERLAYFS_ETC_FSTYPE ??= ""
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/4] overlayfs: add systemd unit path prefix to FILES:${PN} array
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
2022-03-10 13:13 ` [PATCH v2 1/4] overlayfs-etc: add condition to package-management feature conflict Claudius Heine
@ 2022-03-10 13:13 ` Claudius Heine
2022-03-10 13:13 ` [PATCH v2 3/4] files: overlayfs-etc: wrap long lines of preinit file Claudius Heine
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Vyacheslav Yurkov, Claudius Heine
The 'FILES:${PN}' array is missing the systemd unit dir prefix causing
them to not be packaged and the build fails with the
`installed-vs-shipped` error.
This adds the `systemd_system_unitdir` variable in front of every unit
file added with this class.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/classes/overlayfs.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/overlayfs.bbclass b/meta/classes/overlayfs.bbclass
index 4a860f7308..25e30aee83 100644
--- a/meta/classes/overlayfs.bbclass
+++ b/meta/classes/overlayfs.bbclass
@@ -103,7 +103,8 @@ python () {
unitList = unitFileList(d)
for unit in unitList:
d.appendVar('SYSTEMD_SERVICE:' + d.getVar('PN'), ' ' + unit)
- d.appendVar('FILES:' + d.getVar('PN'), ' ' + strForBash(unit))
+ d.appendVar('FILES:' + d.getVar('PN'), ' ' +
+ d.getVar('systemd_system_unitdir') + '/' + strForBash(unit))
d.setVar('OVERLAYFS_UNIT_LIST', ' '.join([strForBash(s) for s in unitList]))
}
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/4] files: overlayfs-etc: wrap long lines of preinit file
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
2022-03-10 13:13 ` [PATCH v2 1/4] overlayfs-etc: add condition to package-management feature conflict Claudius Heine
2022-03-10 13:13 ` [PATCH v2 2/4] overlayfs: add systemd unit path prefix to FILES:${PN} array Claudius Heine
@ 2022-03-10 13:13 ` Claudius Heine
2022-03-10 13:13 ` [PATCH v2 4/4] files: overlayfs-etc: add overlay mount options to preinit Claudius Heine
2022-03-10 14:28 ` [PATCH v2 0/4] Patches and bugfixes for overlayfs Vyacheslav Yurkov
4 siblings, 0 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Vyacheslav Yurkov, Claudius Heine
Make it easier to see what is happening by wrapping the overly long
lines in the preinit file for the overlayfs-etc.
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/files/overlayfs-etc-preinit.sh.in | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/meta/files/overlayfs-etc-preinit.sh.in b/meta/files/overlayfs-etc-preinit.sh.in
index 2ebb6c9224..e5f5001a05 100644
--- a/meta/files/overlayfs-etc-preinit.sh.in
+++ b/meta/files/overlayfs-etc-preinit.sh.in
@@ -16,11 +16,18 @@ mount -t sysfs sysfs /sys
[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}
-if mount -n -t {OVERLAYFS_ETC_FSTYPE} -o {OVERLAYFS_ETC_MOUNT_OPTIONS} {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT}
+if mount -n -t {OVERLAYFS_ETC_FSTYPE} \
+ -o {OVERLAYFS_ETC_MOUNT_OPTIONS} \
+ {OVERLAYFS_ETC_DEVICE} {OVERLAYFS_ETC_MOUNT_POINT}
then
mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper
mkdir -p {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work
- mount -n -t overlay -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper,lowerdir=/etc,workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || echo "PREINIT: Mounting etc-overlay failed!"
+ mount -n -t overlay \
+ -o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper \
+ -o lowerdir=/etc \
+ -o workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work \
+ {OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || \
+ echo "PREINIT: Mounting etc-overlay failed!"
else
echo "PREINIT: Mounting </data> failed!"
fi
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/4] files: overlayfs-etc: add overlay mount options to preinit
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
` (2 preceding siblings ...)
2022-03-10 13:13 ` [PATCH v2 3/4] files: overlayfs-etc: wrap long lines of preinit file Claudius Heine
@ 2022-03-10 13:13 ` Claudius Heine
2022-03-10 14:28 ` [PATCH v2 0/4] Patches and bugfixes for overlayfs Vyacheslav Yurkov
4 siblings, 0 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 13:13 UTC (permalink / raw)
To: openembedded-core; +Cc: Vyacheslav Yurkov, Claudius Heine
Overlayfs-etc is useful if the rootfs is read-only. One reason to have
the rootfs read-only is to allow image based updating.
Image based updating will change the underlying root file system, which
is unsupported by overlayfs when with some mount options [1].
This disables those options.
[1] https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html?highlight=overlayfs#changes-to-underlying-filesystems
Signed-off-by: Claudius Heine <ch@denx.de>
---
meta/files/overlayfs-etc-preinit.sh.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/files/overlayfs-etc-preinit.sh.in b/meta/files/overlayfs-etc-preinit.sh.in
index e5f5001a05..43c9b04eb9 100644
--- a/meta/files/overlayfs-etc-preinit.sh.in
+++ b/meta/files/overlayfs-etc-preinit.sh.in
@@ -26,6 +26,7 @@ then
-o upperdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper \
-o lowerdir=/etc \
-o workdir={OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/work \
+ -o index=off,xino=off,redirect_dir=off,metacopy=off \
{OVERLAYFS_ETC_MOUNT_POINT}/overlay-etc/upper /etc || \
echo "PREINIT: Mounting etc-overlay failed!"
else
--
2.35.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/4] Patches and bugfixes for overlayfs
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
` (3 preceding siblings ...)
2022-03-10 13:13 ` [PATCH v2 4/4] files: overlayfs-etc: add overlay mount options to preinit Claudius Heine
@ 2022-03-10 14:28 ` Vyacheslav Yurkov
2022-03-10 14:35 ` Claudius Heine
4 siblings, 1 reply; 7+ messages in thread
From: Vyacheslav Yurkov @ 2022-03-10 14:28 UTC (permalink / raw)
To: Claudius Heine, openembedded-core
On 10.03.2022 14:13, Claudius Heine wrote:
> Hi,
>
> I bundled my patches to overlayfs and overlayfs-etc togehter in this
> patchset and fixed the whitespace issues.
>
> regards,
> Claudius
>
> --
> Changes from v1:
> - fixed whitespace issues: converted tabs to 4 spaces.
> - changed git commit title of patch 4
>
> Claudius Heine (4):
> overlayfs-etc: add condition to package-management feature conflict
> overlayfs: add systemd unit path prefix to FILES:${PN} array
> files: overlayfs-etc: wrap long lines of preinit file
> files: overlayfs-etc: add overlay mount options to preinit
>
> meta/classes/overlayfs-etc.bbclass | 3 ++-
> meta/classes/overlayfs.bbclass | 3 ++-
> meta/files/overlayfs-etc-preinit.sh.in | 12 ++++++++++--
> 3 files changed, 14 insertions(+), 4 deletions(-)
>
Hi Claudius,
Thanks for the patches. It seems like the first 2 are already in master
branch or I'm missing something?
Cheers,
Vyacheslav
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/4] Patches and bugfixes for overlayfs
2022-03-10 14:28 ` [PATCH v2 0/4] Patches and bugfixes for overlayfs Vyacheslav Yurkov
@ 2022-03-10 14:35 ` Claudius Heine
0 siblings, 0 replies; 7+ messages in thread
From: Claudius Heine @ 2022-03-10 14:35 UTC (permalink / raw)
To: Vyacheslav Yurkov, openembedded-core
Hi Vyacheslav,
On 2022-03-10 15:28, Vyacheslav Yurkov wrote:
> On 10.03.2022 14:13, Claudius Heine wrote:
>> Hi,
>>
>> I bundled my patches to overlayfs and overlayfs-etc togehter in this
>> patchset and fixed the whitespace issues.
>>
>> regards,
>> Claudius
>>
>> --
>> Changes from v1:
>> - fixed whitespace issues: converted tabs to 4 spaces.
>> - changed git commit title of patch 4
>>
>> Claudius Heine (4):
>> overlayfs-etc: add condition to package-management feature conflict
>> overlayfs: add systemd unit path prefix to FILES:${PN} array
>> files: overlayfs-etc: wrap long lines of preinit file
>> files: overlayfs-etc: add overlay mount options to preinit
>>
>> meta/classes/overlayfs-etc.bbclass | 3 ++-
>> meta/classes/overlayfs.bbclass | 3 ++-
>> meta/files/overlayfs-etc-preinit.sh.in | 12 ++++++++++--
>> 3 files changed, 14 insertions(+), 4 deletions(-)
>>
>
> Hi Claudius,
> Thanks for the patches. It seems like the first 2 are already in master
> branch or I'm missing something?
Yes, that seems to be the case, I missed that.
There are only non-essential white space differences between those and
mine, so my first two patches can be ignored.
Thanks for spotting that.
regards,
Claudius
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-10 14:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 13:13 [PATCH v2 0/4] Patches and bugfixes for overlayfs Claudius Heine
2022-03-10 13:13 ` [PATCH v2 1/4] overlayfs-etc: add condition to package-management feature conflict Claudius Heine
2022-03-10 13:13 ` [PATCH v2 2/4] overlayfs: add systemd unit path prefix to FILES:${PN} array Claudius Heine
2022-03-10 13:13 ` [PATCH v2 3/4] files: overlayfs-etc: wrap long lines of preinit file Claudius Heine
2022-03-10 13:13 ` [PATCH v2 4/4] files: overlayfs-etc: add overlay mount options to preinit Claudius Heine
2022-03-10 14:28 ` [PATCH v2 0/4] Patches and bugfixes for overlayfs Vyacheslav Yurkov
2022-03-10 14:35 ` Claudius Heine
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.