Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 1/8] overlayfs-qa: common functions for overlayfs
@ 2021-07-09 11:31 Vyacheslav Yurkov
  2021-07-09 11:31 ` [PATCH v2 2/8] overlayfs.bbclass: generate overlayfs mount units Vyacheslav Yurkov
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Vyacheslav Yurkov @ 2021-07-09 11:31 UTC (permalink / raw)
  To: Openembedded-core; +Cc: Vyacheslav Yurkov

This class provides commom functions for overlayfs and its QA check,
which is performed in ROOTFS_POSTPROCESS_COMMAND

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
---
 meta/classes/overlayfs-qa.bbclass | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 meta/classes/overlayfs-qa.bbclass

diff --git a/meta/classes/overlayfs-qa.bbclass b/meta/classes/overlayfs-qa.bbclass
new file mode 100644
index 0000000000..54fa8316a2
--- /dev/null
+++ b/meta/classes/overlayfs-qa.bbclass
@@ -0,0 +1,14 @@
+# This class contains common functions for overlayfs and its QA check,
+# which is performed in ROOTFS_POSTPROCESS_COMMAND
+
+# this function is based on https://github.com/systemd/systemd/blob/main/src/basic/unit-name.c
+def escapeSystemdUnitName(path):
+    escapeMap = {
+        '/': '-',
+        '-': "\\x2d",
+        '\\': "\\x5d"
+    }
+    return "".join([escapeMap.get(c, c) for c in path.strip('/')])
+
+def mountUnitName(unit):
+    return escapeSystemdUnitName(unit) + '.mount'
-- 
2.28.0


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

end of thread, other threads:[~2021-07-12  9:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-09 11:31 [PATCH v2 1/8] overlayfs-qa: common functions for overlayfs Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 2/8] overlayfs.bbclass: generate overlayfs mount units Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 3/8] maintainers.inc: overlayfs bbclass maintainer Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 4/8] rootfs-postcommands: add QA check for overlayfs Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 5/8] systemd-machine-units: add bbappend for meta-selftest Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 6/8] overlayfs: meta-selftest recipe Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 7/8] oeqa/selftest: overlayfs unit tests Vyacheslav Yurkov
2021-07-10  9:01   ` [OE-core] " Alexander Kanavin
2021-07-10  9:41   ` Alexandre Belloni
2021-07-10 12:47     ` Vyacheslav Yurkov
2021-07-10 17:15       ` Alexandre Belloni
2021-07-11 15:16         ` Vyacheslav Yurkov
2021-07-12  9:14           ` Alexandre Belloni
2021-07-12  9:42             ` Vyacheslav Yurkov
2021-07-09 11:31 ` [PATCH v2 8/8] docs: add overlayfs class Vyacheslav Yurkov

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