1SUMMARY = "Phosphor User Manager Daemon"
2DESCRIPTION = "Daemon that does user management"
3HOMEPAGE = "http://github.com/openbmc/phosphor-user-manager"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
6DEPENDS += "sdbusplus"
7DEPENDS += "phosphor-logging"
8DEPENDS += "phosphor-dbus-interfaces"
9DEPENDS += "boost"
10DEPENDS += "nss-pam-ldapd"
11DEPENDS += "systemd"
12SRCREV = "4b29462cd9873391e1e0414840515f76aeaeae89"
13PV = "1.0+git${SRCPV}"
14PR = "r1"
15
16SRC_URI = "git://github.com/openbmc/phosphor-user-manager;branch=master;protocol=https"
17SRC_URI += "file://upgrade_hostconsole_group.sh"
18
19S = "${WORKDIR}/git"
20
21inherit meson pkgconfig
22inherit obmc-phosphor-dbus-service
23inherit useradd
24
25EXTRA_OEMESON = "-Dtests=disabled"
26
27do_install:append() {
28  install -d ${D}${libexecdir}
29  install -m 0755 ${WORKDIR}/upgrade_hostconsole_group.sh ${D}${libexecdir}/upgrade_hostconsole_group.sh
30}
31
32FILES:phosphor-ldap += " \
33        ${bindir}/phosphor-ldap-conf \
34"
35FILES:${PN} += " \
36        ${systemd_unitdir} \
37        ${datadir}/dbus-1 \
38        ${datadir}/phosphor-certificate-manager \
39"
40
41USERADD_PACKAGES = "${PN} phosphor-ldap"
42
43PACKAGE_BEFORE_PN = "phosphor-ldap"
44DBUS_PACKAGES = "${USERADD_PACKAGES}"
45# add groups needed for privilege maintenance
46GROUPADD_PARAM:${PN} = "priv-admin; priv-operator; priv-user "
47GROUPADD_PARAM:phosphor-ldap = "priv-admin; priv-operator; priv-user "
48DBUS_SERVICE:${PN} += "xyz.openbmc_project.User.Manager.service"
49DBUS_SERVICE:phosphor-ldap = " \
50        xyz.openbmc_project.Ldap.Config.service \
51"
52
53EXTRA_USERS_PARAMS += " \
54   groupadd hostconsole; \
55   "
56
57EXTRA_USERS_PARAMS += " \
58  usermod --append --groups hostconsole root; \
59  "
60