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