diff options
Diffstat (limited to 'meta/recipes-extended/sudo/sudo_1.9.13p2.bb')
-rw-r--r-- | meta/recipes-extended/sudo/sudo_1.9.13p2.bb | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-extended/sudo/sudo_1.9.13p2.bb b/meta/recipes-extended/sudo/sudo_1.9.13p2.bb new file mode 100644 index 0000000000..a028bcc216 --- /dev/null +++ b/meta/recipes-extended/sudo/sudo_1.9.13p2.bb | |||
@@ -0,0 +1,62 @@ | |||
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-sudo.conf.in-fix-conflict-with-multilib.patch \ | ||
6 | file://0001-lib-util-mksigname.c-correctly-include-header-for-ou.patch \ | ||
7 | " | ||
8 | |||
9 | PAM_SRC_URI = "file://sudo.pam" | ||
10 | |||
11 | SRC_URI[sha256sum] = "df2004fde4c1033b1fdca339958e0ec633d393d604fcff9d1513abef1f94574d" | ||
12 | |||
13 | DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
14 | RDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}" | ||
15 | |||
16 | CACHED_CONFIGUREVARS = " \ | ||
17 | ac_cv_type_rsize_t=no \ | ||
18 | ac_cv_path_MVPROG=${base_bindir}/mv \ | ||
19 | ac_cv_path_BSHELLPROG=${base_bindir}/sh \ | ||
20 | ac_cv_path_SENDMAILPROG=${sbindir}/sendmail \ | ||
21 | ac_cv_path_VIPROG=${base_bindir}/vi \ | ||
22 | " | ||
23 | |||
24 | EXTRA_OECONF += " \ | ||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ | ||
26 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \ | ||
27 | --with-rundir=/run/sudo \ | ||
28 | --with-vardir=/var/lib/sudo \ | ||
29 | --libexecdir=${libdir} \ | ||
30 | " | ||
31 | |||
32 | do_install:append () { | ||
33 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | ||
34 | install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo | ||
35 | if ${@bb.utils.contains('PACKAGECONFIG', 'pam-wheel', 'true', 'false', d)} ; then | ||
36 | echo 'auth required pam_wheel.so use_uid' >>${D}${sysconfdir}/pam.d/sudo | ||
37 | sed -i 's/# \(%wheel ALL=(ALL) ALL\)/\1/' ${D}${sysconfdir}/sudoers | ||
38 | fi | ||
39 | fi | ||
40 | |||
41 | chmod 4111 ${D}${bindir}/sudo | ||
42 | chmod 0440 ${D}${sysconfdir}/sudoers | ||
43 | |||
44 | # Explicitly remove the /sudo directory to avoid QA error | ||
45 | rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo | ||
46 | } | ||
47 | |||
48 | FILES:${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \ | ||
49 | ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la" | ||
50 | |||
51 | CONFFILES:${PN}-lib = "${sysconfdir}/sudoers" | ||
52 | |||
53 | SUDO_PACKAGES = "${PN}-sudo\ | ||
54 | ${PN}-lib" | ||
55 | |||
56 | PACKAGE_BEFORE_PN = "${SUDO_PACKAGES}" | ||
57 | |||
58 | RDEPENDS:${PN}-sudo = "${PN}-lib" | ||
59 | RDEPENDS:${PN} += "${SUDO_PACKAGES}" | ||
60 | |||
61 | FILES:${PN}-sudo = "${bindir}/sudo ${bindir}/sudoedit" | ||
62 | FILES:${PN}-lib = "${localstatedir} ${libexecdir} ${sysconfdir} ${libdir} ${nonarch_libdir}" | ||