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