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" |
| 42 | PACKAGECONFIG[curl] = "--with-secrets --with-kcm, --without-secrets --without-kcm, curl jansson" |
| 43 | PACKAGECONFIG[http] = "--with-secrets, --without-secrets, apache2" |
| 44 | PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, " |
| 45 | PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no" |
| 46 | PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" |
| 47 | PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no " |
| 48 | PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss," |
| 49 | PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 50 | PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" |
| 51 | PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 52 | PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " |
| 53 | PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, " |
| 54 | PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 55 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 56 | EXTRA_OECONF += " \ |
| 57 | --disable-cifs-idmap-plugin \ |
| 58 | --without-nfsv4-idmapd-plugin \ |
| 59 | --without-ipa-getkeytab \ |
| 60 | --without-python2-bindings \ |
| 61 | --enable-pammoddir=${base_libdir}/security \ |
| 62 | --without-python2-bindings \ |
| 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 | |
| 88 | } |
| 89 | |
| 90 | pkg_postinst_ontarget_${PN} () { |
| 91 | if [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 92 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 93 | fi |
| 94 | chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf |
| 95 | } |
| 96 | |
| 97 | CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf" |
| 98 | |
| 99 | INITSCRIPT_NAME = "sssd" |
| 100 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 101 | SYSTEMD_SERVICE_${PN} = " \ |
| 102 | ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \ |
| 103 | ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \ |
| 104 | ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \ |
| 105 | ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \ |
| 106 | ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \ |
| 107 | sssd-nss.service \ |
| 108 | sssd-nss.socket \ |
| 109 | sssd-pam-priv.socket \ |
| 110 | sssd-pam.service \ |
| 111 | sssd-pam.socket \ |
| 112 | sssd-secrets.service \ |
| 113 | sssd-secrets.socket \ |
| 114 | sssd.service \ |
| 115 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 116 | SYSTEMD_AUTO_ENABLE = "disable" |
| 117 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 118 | FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 119 | FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la" |
| 120 | |
| 121 | # The package contains symlinks that trip up insane |
| 122 | INSANE_SKIP_${PN} = "dev-so" |
| 123 | |
| 124 | RDEPENDS_${PN} = "bind dbus libldb libpam" |