94dd1a2bfcbebec64e292d4467b66b2b9dd3a8fb
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-extended / sudo / sudo_%.bbappend
1 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
2
3 DEPENDS += " \
4         openldap \
5         libgcrypt \
6         "
7
8 SRCREV_FORMAT = "opendev"
9 SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
10 SUBPATH0 = "sudo-config"
11 DSTSUFX0 = "stx-configfiles"
12
13 LICENSE_append = "& Apache-2.0"
14 LIC_FILES_CHKSUM += "\
15         file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
16         "
17
18 SRC_URI += " \
19         git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
20         file://sudo-1.6.7p5-strip.patch \
21         file://sudo-1.7.2p1-envdebug.patch \
22         file://sudo-1.8.23-sudoldapconfman.patch \
23         file://sudo-1.8.23-legacy-group-processing.patch \
24         file://sudo-1.8.23-ldapsearchuidfix.patch \
25         file://sudo-1.8.6p7-logsudouser.patch \
26         file://sudo-1.8.23-nowaitopt.patch \
27         file://sudo-1.8.23-fix-double-quote-parsing-for-Defaults-values.patch \
28         "
29
30 EXTRA_OECONF += " \
31         --with-pam-login \
32         --with-editor=${base_bindir}/vi \
33         --with-env-editor \
34         --with-ignore-dot \
35         --with-tty-tickets \
36         --with-ldap \
37         --with-ldap-conf-file="${sysconfdir}/sudo-ldap.conf" \
38         --with-passprompt="[sudo] password for %Zp: " \
39         --with-sssd \
40         "
41
42 do_unpack_append() {
43     bb.build.exec_func('do_copy_config_files', d)
44 }
45
46 do_copy_config_files () {
47     cp -pf ${WORKDIR}/${DSTSUFX0}/files/LICENSE ${S}/stx-configfiles-LICENSE
48 }
49
50 do_install_append () {
51         install -m755 -d ${D}/${sysconfdir}/openldap/schema
52         install -m644 ${S}/doc/schema.OpenLDAP  ${D}/${sysconfdir}/openldap/schema/sudo.schema
53         install -m 440 ${WORKDIR}/${DSTSUFX0}/files/sysadmin.sudo  ${D}/${sysconfdir}/sudoers.d/sysadmin
54 }
55
56 # This means sudo package only owns files
57 # to avoid install conflict with openldap on
58 # /etc/openldap. Sure there is a better way.
59 DIRFILES = "1"