diff options
Diffstat (limited to 'meta/recipes-extended/sudo/sudo_1.8.32.bb')
-rw-r--r-- | meta/recipes-extended/sudo/sudo_1.8.32.bb | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-extended/sudo/sudo_1.8.32.bb b/meta/recipes-extended/sudo/sudo_1.8.32.bb new file mode 100644 index 0000000000..8d16ec2538 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.8.32.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | require sudo.inc | ||
2 | |||
3 | SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \ | ||
4 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
5 | file://0001-Include-sys-types.h-for-id_t-definition.patch \ | ||
6 | file://0001-Fix-includes-when-building-with-musl.patch \ | ||
7 | " | ||
8 | |||
9 | PAM_SRC_URI = "file://sudo.pam" | ||
10 | |||
11 | SRC_URI[md5sum] = "a7318202ba391079a0e32933f0fb8bd6" | ||
12 | SRC_URI[sha256sum] = "5ce3c18c5efbecd5437a0945f314f1822423eaf9a2d7eb7ecf80857bc32246c5" | ||
13 | |||
14 | DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
15 | RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" | ||
16 | |||
17 | CACHED_CONFIGUREVARS = " \ | ||
18 | ac_cv_type_rsize_t=no \ | ||
19 | ac_cv_path_MVPROG=${base_bindir}/mv \ | ||
20 | ac_cv_path_BSHELLPROG=${base_bindir}/sh \ | ||
21 | ac_cv_path_SENDMAILPROG=${sbindir}/sendmail \ | ||
22 | ac_cv_path_VIPROG=${base_bindir}/vi \ | ||
23 | " | ||
24 | |||
25 | EXTRA_OECONF += " \ | ||
26 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ | ||
27 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ | ||
28 | --with-vardir=/var/lib/sudo \ | ||
29 | " | ||
30 | |||
31 | do_install_append () { | ||
32 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | ||
33 | install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo | ||
34 | if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then | ||
35 | echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo | ||
36 | sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers | ||
37 | fi | ||
38 | fi | ||
39 | |||
40 | chmod 4111 ${D}${bindir}/sudo | ||
41 | chmod 0440 ${D}${sysconfdir}/sudoers | ||
42 | |||
43 | # Explicitly remove the /run directory to avoid QA error | ||
44 | rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo | ||
45 | } | ||
46 | |||
47 | FILES_${PN} += "${nonarch_libdir}/tmpfiles.d" | ||
48 | FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \ | ||
49 | ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la" | ||