All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vyacheslav Yurkov" <uvv.mail@gmail.com>
To: Openembedded-core@lists.openembedded.org
Cc: Vyacheslav Yurkov <uvv.mail@gmail.com>
Subject: [PATCH v3 1/8] overlayfs-qa: common functions for overlayfs
Date: Thu, 15 Jul 2021 21:39:26 +0200	[thread overview]
Message-ID: <20210715193933.66120-1-uvv.mail@gmail.com> (raw)

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


             reply	other threads:[~2021-07-15 19:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 19:39 Vyacheslav Yurkov [this message]
2021-07-15 19:39 ` [PATCH v3 2/8] overlayfs.bbclass: generate overlayfs mount units Vyacheslav Yurkov
2021-07-22 21:13   ` [OE-core] " Richard Purdie
2021-07-30  5:14     ` Vyacheslav Yurkov
2021-07-30  8:11       ` Richard Purdie
2021-07-15 19:39 ` [PATCH v3 3/8] maintainers.inc: overlayfs bbclass maintainer Vyacheslav Yurkov
2021-07-22 21:09   ` [OE-core] " Richard Purdie
2021-07-15 19:39 ` [PATCH v3 4/8] rootfs-postcommands: add QA check for overlayfs Vyacheslav Yurkov
2021-07-15 19:39 ` [PATCH v3 5/8] systemd-machine-units: add bbappend for meta-selftest Vyacheslav Yurkov
2021-07-15 19:39 ` [PATCH v3 6/8] overlayfs: meta-selftest recipe Vyacheslav Yurkov
2021-07-15 19:39 ` [PATCH v3 7/8] oeqa/selftest: overlayfs unit tests Vyacheslav Yurkov
2021-07-15 19:39 ` [PATCH v3 8/8] docs: add overlayfs class Vyacheslav Yurkov
2021-07-22 21:07 ` [OE-core] [PATCH v3 1/8] overlayfs-qa: common functions for overlayfs Richard Purdie

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=20210715193933.66120-1-uvv.mail@gmail.com \
    --to=uvv.mail@gmail.com \
    --cc=Openembedded-core@lists.openembedded.org \
    /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 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.