1SUMMARY = "New user to do specific job"
2DESCRIPTION = "This recipe create a new user named ${PN}, who is used for specific jobs like building. The task can be auto started via mini X"
3SECTION = "x11"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
6
7SRC_URI = "file://builder_session.sh \
8          "
9
10S = "${WORKDIR}"
11
12RDEPENDS:${PN} = "mini-x-session"
13
14inherit useradd
15
16# builder user password is "builder"
17BUILDER_PASSWORD ?= ".gLibiNXn0P12"
18USERADD_PACKAGES = "${PN}"
19USERADD_PARAM:${PN} = "--system --create-home \
20                       --groups video,tty,audio \
21                       --password ${BUILDER_PASSWORD} \
22                       --user-group builder"
23
24do_install () {
25	install -d -m 755 ${D}${sysconfdir}/mini_x/session.d
26	install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/
27
28	chown  builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh
29}
30
31CVE_STATUS[CVE-2008-4178] = "cpe-incorrect: This CVE is for an unrelated builder"
32