Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "system security services daemon" |
| 2 | DESCRIPTION = "SSSD is a system security services daemon" |
| 3 | HOMEPAGE = "https://pagure.io/SSSD/sssd/" |
| 4 | SECTION = "base" |
| 5 | LICENSE = "GPLv3+" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 7 | |
| 8 | DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive" |
| 9 | DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent" |
| 10 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 11 | # If no crypto has been selected, default to DEPEND on nss, since that's what |
| 12 | # sssd will pick if no active choice is made during configure |
| 13 | DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'nss', '', \ |
| 14 | bb.utils.contains('PACKAGECONFIG', 'crypto', '', 'nss', d), d)}" |
| 15 | |
| 16 | SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \ |
| 17 | file://sssd.conf \ |
| 18 | file://volatiles.99_sssd \ |
| 19 | file://fix-ldblibdir.patch \ |
| 20 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | |
| 22 | SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50" |
| 23 | SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959" |
| 24 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 25 | inherit autotools pkgconfig gettext python3-dir features_check systemd |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 26 | |
| 27 | REQUIRED_DISTRO_FEATURES = "pam" |
| 28 | |
| 29 | SSSD_UID ?= "root" |
| 30 | SSSD_GID ?= "root" |
| 31 | |
| 32 | CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 33 | ac_cv_path_NSUPDATE=${bindir} ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 34 | " |
| 35 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 36 | PACKAGECONFIG ?="nss nscd autofs sudo infopipe" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 37 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 38 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 39 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 40 | PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no" |
| 41 | PACKAGECONFIG[crypto] = "--with-crypto=libcrypto, , libcrypto" |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 42 | PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 43 | PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, " |
| 44 | PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no" |
| 45 | PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" |
| 46 | PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no " |
| 47 | PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss," |
| 48 | PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 49 | PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" |
| 50 | PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 51 | PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " |
| 52 | PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, " |
| 53 | PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 55 | EXTRA_OECONF += " \ |
| 56 | --disable-cifs-idmap-plugin \ |
| 57 | --without-nfsv4-idmapd-plugin \ |
| 58 | --without-ipa-getkeytab \ |
| 59 | --without-python2-bindings \ |
| 60 | --enable-pammoddir=${base_libdir}/security \ |
| 61 | --without-python2-bindings \ |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 62 | --without-secrets \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 63 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 64 | |
| 65 | do_configure_prepend() { |
| 66 | mkdir -p ${AUTOTOOLS_AUXDIR}/build |
| 67 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/ |
| 68 | |
| 69 | # libresove has host path, remove it |
| 70 | sed -i -e "s#\$sss_extra_libdir##" ${S}/src/external/libresolv.m4 |
| 71 | } |
| 72 | |
| 73 | do_install () { |
| 74 | oe_runmake install DESTDIR="${D}" |
| 75 | rmdir --ignore-fail-on-non-empty "${D}/${bindir}" |
| 76 | install -d ${D}/${sysconfdir}/${BPN} |
| 77 | install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN} |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 78 | install -D -m 644 ${WORKDIR}/volatiles.99_sssd ${D}/${sysconfdir}/default/volatiles/99_sssd |
| 79 | |
| 80 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 81 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 82 | echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf |
| 83 | fi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 84 | |
| 85 | # Remove /var/run as it is created on startup |
| 86 | rm -rf ${D}${localstatedir}/run |
| 87 | |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 88 | rm -f ${D}${systemd_system_unitdir}/sssd-secrets.* |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | pkg_postinst_ontarget_${PN} () { |
| 92 | if [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 93 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 94 | fi |
| 95 | chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf |
| 96 | } |
| 97 | |
| 98 | CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf" |
| 99 | |
| 100 | INITSCRIPT_NAME = "sssd" |
| 101 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 102 | SYSTEMD_SERVICE_${PN} = " \ |
| 103 | ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \ |
| 104 | ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \ |
| 105 | ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \ |
| 106 | ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \ |
| 107 | ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \ |
| 108 | sssd-nss.service \ |
| 109 | sssd-nss.socket \ |
| 110 | sssd-pam-priv.socket \ |
| 111 | sssd-pam.service \ |
| 112 | sssd-pam.socket \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 113 | sssd.service \ |
| 114 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 115 | SYSTEMD_AUTO_ENABLE = "disable" |
| 116 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 117 | FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 118 | FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la" |
| 119 | |
| 120 | # The package contains symlinks that trip up insane |
| 121 | INSANE_SKIP_${PN} = "dev-so" |
| 122 | |
| 123 | RDEPENDS_${PN} = "bind dbus libldb libpam" |