blob: 92058437d30722f1c6fd0233d09faa328af118b9 [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "system security services daemon"
2DESCRIPTION = "SSSD is a system security services daemon"
3HOMEPAGE = "https://pagure.io/SSSD/sssd/"
4SECTION = "base"
5LICENSE = "GPLv3+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
Andrew Geisslera1a6aef2021-06-25 14:23:58 -05008DEPENDS = "acl attr openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
9DEPENDS_append = " libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent bind p11-kit"
Andrew Geisslerd1d22e62020-10-16 10:14:32 -050010
11DEPENDS_append_libc-musl = " musl-nscd"
Brad Bishop19323692019-04-05 15:28:33 -040012
Andrew Geissler1fe918a2020-05-15 14:16:47 -050013# 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
15DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'nss', '', \
16 bb.utils.contains('PACKAGECONFIG', 'crypto', '', 'nss', d), d)}"
17
Andrew Geissler59125e02021-07-23 12:56:22 -040018SRC_URI = "https://github.com/SSSD/sssd/releases/download/${PV}/sssd-${PV}.tar.gz \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050019 file://sssd.conf \
20 file://volatiles.99_sssd \
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050021 file://no_gen.patch \
22 file://fix_gid.patch \
23 file://drop_ntpdate_chk.patch \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050024 file://fix-ldblibdir.patch \
Andrew Geissler59125e02021-07-23 12:56:22 -040025 file://musl_fixup.patch \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050026 "
Andrew Geissler59125e02021-07-23 12:56:22 -040027
28SRC_URI[sha256sum] = "ce2f5d84a3f1750093318afd27f4fd75b1e3e75f7d80fc42d21a40cc54b58ea4"
Brad Bishop19323692019-04-05 15:28:33 -040029
Andrew Geissler1fe918a2020-05-15 14:16:47 -050030inherit autotools pkgconfig gettext python3-dir features_check systemd
Brad Bishop19323692019-04-05 15:28:33 -040031
32REQUIRED_DISTRO_FEATURES = "pam"
33
34SSSD_UID ?= "root"
35SSSD_GID ?= "root"
36
37CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050038 ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \
Brad Bishop19323692019-04-05 15:28:33 -040039 "
40
Andrew Geissler1fe918a2020-05-15 14:16:47 -050041PACKAGECONFIG ?="nss nscd autofs sudo infopipe"
Brad Bishop19323692019-04-05 15:28:33 -040042PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
43PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
44
Andrew Geissler1fe918a2020-05-15 14:16:47 -050045PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no"
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050046PACKAGECONFIG[crypto] = ", , libcrypto"
Andrew Geissler064f75b2020-06-27 00:14:46 -050047PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050048PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
Andrew Geisslercc589282020-09-18 13:34:40 -050049PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050050PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
51PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050052PACKAGECONFIG[nss] = ", ,nss,"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050053PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
Brad Bishop19323692019-04-05 15:28:33 -040054PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
55PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050056PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
57PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
58PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
Brad Bishop19323692019-04-05 15:28:33 -040059
Andrew Geissler1fe918a2020-05-15 14:16:47 -050060EXTRA_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 Geissler064f75b2020-06-27 00:14:46 -050067 --without-secrets \
Andrew Geisslercc589282020-09-18 13:34:40 -050068 --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050069 --with-pid-path=/run \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050070"
Brad Bishop19323692019-04-05 15:28:33 -040071
72do_configure_prepend() {
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
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050080do_compile_prepend () {
81 echo '#define NSUPDATE_PATH "${bindir}"' >> ${B}/config.h
82}
Brad Bishop19323692019-04-05 15:28:33 -040083do_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 Geissler1fe918a2020-05-15 14:16:47 -050088 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 Bishop19323692019-04-05 15:28:33 -040094
Andrew Geisslera1a6aef2021-06-25 14:23:58 -050095 # Remove /run as it is created on startup
96 rm -rf ${D}/run
Brad Bishop19323692019-04-05 15:28:33 -040097
Andrew Geissler064f75b2020-06-27 00:14:46 -050098 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
Brad Bishop19323692019-04-05 15:28:33 -040099}
100
101pkg_postinst_ontarget_${PN} () {
102if [ -e /etc/init.d/populate-volatile.sh ] ; then
103 ${sysconfdir}/init.d/populate-volatile.sh update
104fi
105 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
106}
107
108CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
109
110INITSCRIPT_NAME = "sssd"
111INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500112SYSTEMD_SERVICE_${PN} = " \
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 Geissler1fe918a2020-05-15 14:16:47 -0500123 sssd.service \
124"
Brad Bishop19323692019-04-05 15:28:33 -0400125SYSTEMD_AUTO_ENABLE = "disable"
126
Andrew Geisslera1a6aef2021-06-25 14:23:58 -0500127FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss*.so"
Brad Bishop19323692019-04-05 15:28:33 -0400128FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
129
130# The package contains symlinks that trip up insane
131INSANE_SKIP_${PN} = "dev-so"
132
Andrew Geisslera1a6aef2021-06-25 14:23:58 -0500133RDEPENDS_${PN} = "bind bind-utils dbus libldb libpam"