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 | |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 8 | DEPENDS = "acl attr openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | DEPENDS:append = " libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent bind p11-kit" |
Andrew Geissler | d1d22e6 | 2020-10-16 10:14:32 -0500 | [diff] [blame] | 10 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 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 | |
Andrew Geissler | 59125e0 | 2021-07-23 12:56:22 -0400 | [diff] [blame] | 18 | SRC_URI = "https://github.com/SSSD/sssd/releases/download/${PV}/sssd-${PV}.tar.gz \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 19 | file://sssd.conf \ |
| 20 | file://volatiles.99_sssd \ |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 21 | file://no_gen.patch \ |
| 22 | file://fix_gid.patch \ |
| 23 | file://drop_ntpdate_chk.patch \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 24 | file://fix-ldblibdir.patch \ |
Andrew Geissler | 59125e0 | 2021-07-23 12:56:22 -0400 | [diff] [blame] | 25 | file://musl_fixup.patch \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 26 | " |
Andrew Geissler | 59125e0 | 2021-07-23 12:56:22 -0400 | [diff] [blame] | 27 | |
| 28 | SRC_URI[sha256sum] = "ce2f5d84a3f1750093318afd27f4fd75b1e3e75f7d80fc42d21a40cc54b58ea4" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 30 | inherit autotools pkgconfig gettext python3-dir features_check systemd |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | |
| 32 | REQUIRED_DISTRO_FEATURES = "pam" |
| 33 | |
| 34 | SSSD_UID ?= "root" |
| 35 | SSSD_GID ?= "root" |
| 36 | |
| 37 | CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \ |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 38 | ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 39 | " |
| 40 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 41 | PACKAGECONFIG ?="nss nscd autofs sudo infopipe" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 42 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 43 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" |
| 44 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 45 | PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no" |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 46 | PACKAGECONFIG[crypto] = ", , libcrypto" |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 47 | PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 48 | PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, " |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 49 | 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] | 50 | PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" |
| 51 | PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no " |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 52 | PACKAGECONFIG[nss] = ", ,nss," |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 53 | PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 54 | PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" |
| 55 | PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 56 | PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " |
| 57 | PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, " |
| 58 | PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 59 | |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 60 | EXTRA_OECONF += " \ |
| 61 | --disable-cifs-idmap-plugin \ |
| 62 | --without-nfsv4-idmapd-plugin \ |
| 63 | --without-ipa-getkeytab \ |
| 64 | --without-python2-bindings \ |
| 65 | --enable-pammoddir=${base_libdir}/security \ |
| 66 | --without-python2-bindings \ |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 67 | --without-secrets \ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 68 | --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \ |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 69 | --with-pid-path=/run \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 70 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | do_configure:prepend() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 73 | mkdir -p ${AUTOTOOLS_AUXDIR}/build |
| 74 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/ |
| 75 | |
| 76 | # libresove has host path, remove it |
| 77 | sed -i -e "s#\$sss_extra_libdir##" ${S}/src/external/libresolv.m4 |
| 78 | } |
| 79 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 80 | do_compile:prepend () { |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 81 | echo '#define NSUPDATE_PATH "${bindir}"' >> ${B}/config.h |
| 82 | } |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 83 | do_install () { |
| 84 | oe_runmake install DESTDIR="${D}" |
| 85 | rmdir --ignore-fail-on-non-empty "${D}/${bindir}" |
| 86 | install -d ${D}/${sysconfdir}/${BPN} |
| 87 | install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN} |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 88 | install -D -m 644 ${WORKDIR}/volatiles.99_sssd ${D}/${sysconfdir}/default/volatiles/99_sssd |
| 89 | |
| 90 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 91 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 92 | echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf |
| 93 | fi |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 94 | |
Andrew Geissler | a1a6aef | 2021-06-25 14:23:58 -0500 | [diff] [blame] | 95 | # Remove /run as it is created on startup |
| 96 | rm -rf ${D}/run |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 97 | |
Andrew Geissler | 064f75b | 2020-06-27 00:14:46 -0500 | [diff] [blame] | 98 | rm -f ${D}${systemd_system_unitdir}/sssd-secrets.* |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 99 | } |
| 100 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 101 | pkg_postinst_ontarget:${PN} () { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 102 | if [ -e /etc/init.d/populate-volatile.sh ] ; then |
| 103 | ${sysconfdir}/init.d/populate-volatile.sh update |
| 104 | fi |
| 105 | chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf |
| 106 | } |
| 107 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 108 | CONFFILES:${PN} = "${sysconfdir}/${BPN}/${BPN}.conf" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 109 | |
| 110 | INITSCRIPT_NAME = "sssd" |
| 111 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 112 | SYSTEMD_SERVICE:${PN} = " \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 113 | ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \ |
| 114 | ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \ |
| 115 | ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \ |
| 116 | ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \ |
| 117 | ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \ |
| 118 | sssd-nss.service \ |
| 119 | sssd-nss.socket \ |
| 120 | sssd-pam-priv.socket \ |
| 121 | sssd-pam.service \ |
| 122 | sssd-pam.socket \ |
Andrew Geissler | 1fe918a | 2020-05-15 14:16:47 -0500 | [diff] [blame] | 123 | sssd.service \ |
| 124 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 125 | SYSTEMD_AUTO_ENABLE = "disable" |
| 126 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 127 | FILES:${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss*.so" |
| 128 | FILES:${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 129 | |
| 130 | # The package contains symlinks that trip up insane |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 131 | INSANE_SKIP:${PN} = "dev-so" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 132 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 133 | RDEPENDS:${PN} = "bind bind-utils dbus libldb libpam" |