Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "New user to do specific job" |
| 2 | DESCRIPTION = "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" |
| 3 | SECTION = "x11" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | LICENSE = "MIT" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 7 | SRC_URI = "file://builder_session.sh \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | " |
| 9 | |
| 10 | S = "${WORKDIR}" |
| 11 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | RDEPENDS:${PN} = "mini-x-session" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
| 14 | inherit useradd |
| 15 | |
| 16 | # builder user password is "builder" |
| 17 | BUILDER_PASSWORD ?= ".gLibiNXn0P12" |
| 18 | USERADD_PACKAGES = "${PN}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 19 | USERADD_PARAM:${PN} = "--system --create-home \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | --groups video,tty,audio \ |
| 21 | --password ${BUILDER_PASSWORD} \ |
| 22 | --user-group builder" |
| 23 | |
| 24 | do_install () { |
| 25 | install -d -m 755 ${D}${sysconfdir}/mini_x/session.d |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 26 | install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 28 | chown builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | } |
| 30 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 31 | CVE_STATUS[CVE-2008-4178] = "cpe-incorrect: This CVE is for an unrelated builder" |