diff mbox series

[oe,meta-oe,1/2] sanlock: Use python3 and add sanlock user/group

Message ID 20191122012527.3260265-1-raj.khem@gmail.com
State Accepted
Commit 8de5a24311ae8b3b5042996b4271c4f713f15082
Headers show
Series [oe,meta-oe,1/2] sanlock: Use python3 and add sanlock user/group | expand

Commit Message

Khem Raj Nov. 22, 2019, 1:25 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

-- 
2.24.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
index 9f7ce9c570..8e411e4969 100644
--- a/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
+++ b/meta-oe/recipes-extended/sanlock/sanlock_3.8.0.bb
@@ -17,7 +17,7 @@  S = "${WORKDIR}/git"
 
 DEPENDS = "libaio util-linux"
 
-inherit distutils
+inherit distutils3 useradd
 
 do_configure[noexec] = "1"
 
@@ -32,3 +32,11 @@  do_install_prepend () {
     oe_runmake -C src DESTDIR=${D} LIBDIR=${libdir} install
     cd ${S}/python
 }
+
+SANLOCKGROUP ?= "sanlock"
+SANLOCKUSER ?= "sanlock"
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system ${SANLOCKGROUP}"
+USERADD_PARAM_${PN} = "--system -g ${SANLOCKGROUP} -G disk \
+                       --home-dir /run/${SANLOCKUSER} --no-create-home \
+                       --shell /sbin/nologin ${SANLOCKUSER}"