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