blob: 9784ec77d8b880ac0e3c6a40c7900862b3030909 [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
8DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
Andrew Geisslerd1d22e62020-10-16 10:14:32 -05009DEPENDS_append = " libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
10
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
18SRC_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 Geisslercc589282020-09-18 13:34:40 -050022 file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \
23 file://0001-nss-Collision-with-external-nss-symbol.patch \
Andrew Geisslerd1d22e62020-10-16 10:14:32 -050024 file://0002-Provide-missing-defines-which-otherwise-are-availabl.patch \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050025 "
Brad Bishop19323692019-04-05 15:28:33 -040026
Andrew Geisslerd1d22e62020-10-16 10:14:32 -050027SRC_URI[sha256sum] = "2e1a7bf036b583f686d35164f2d79bdf4857b98f51fe8b0d17aa0fa756e4d0c0"
Brad Bishop19323692019-04-05 15:28:33 -040028
Andrew Geissler1fe918a2020-05-15 14:16:47 -050029inherit autotools pkgconfig gettext python3-dir features_check systemd
Brad Bishop19323692019-04-05 15:28:33 -040030
31REQUIRED_DISTRO_FEATURES = "pam"
32
33SSSD_UID ?= "root"
34SSSD_GID ?= "root"
35
36CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050037 ac_cv_path_NSUPDATE=${bindir} ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \
Brad Bishop19323692019-04-05 15:28:33 -040038 "
39
Andrew Geissler1fe918a2020-05-15 14:16:47 -050040PACKAGECONFIG ?="nss nscd autofs sudo infopipe"
Brad Bishop19323692019-04-05 15:28:33 -040041PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
42PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
43
Andrew Geissler1fe918a2020-05-15 14:16:47 -050044PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no"
45PACKAGECONFIG[crypto] = "--with-crypto=libcrypto, , libcrypto"
Andrew Geissler064f75b2020-06-27 00:14:46 -050046PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050047PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
Andrew Geisslercc589282020-09-18 13:34:40 -050048PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050049PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
50PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
51PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
52PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
Brad Bishop19323692019-04-05 15:28:33 -040053PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
54PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050055PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
56PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
57PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
Brad Bishop19323692019-04-05 15:28:33 -040058
Andrew Geissler1fe918a2020-05-15 14:16:47 -050059EXTRA_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 Geissler064f75b2020-06-27 00:14:46 -050066 --without-secrets \
Andrew Geisslercc589282020-09-18 13:34:40 -050067 --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050068"
Brad Bishop19323692019-04-05 15:28:33 -040069
70do_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
78do_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 Geissler1fe918a2020-05-15 14:16:47 -050083 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 Bishop19323692019-04-05 15:28:33 -040089
90 # Remove /var/run as it is created on startup
91 rm -rf ${D}${localstatedir}/run
92
Andrew Geissler064f75b2020-06-27 00:14:46 -050093 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
Brad Bishop19323692019-04-05 15:28:33 -040094}
95
96pkg_postinst_ontarget_${PN} () {
97if [ -e /etc/init.d/populate-volatile.sh ] ; then
98 ${sysconfdir}/init.d/populate-volatile.sh update
99fi
100 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
101}
102
103CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
104
105INITSCRIPT_NAME = "sssd"
106INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500107SYSTEMD_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 Geissler1fe918a2020-05-15 14:16:47 -0500118 sssd.service \
119"
Brad Bishop19323692019-04-05 15:28:33 -0400120SYSTEMD_AUTO_ENABLE = "disable"
121
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500122FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so"
Brad Bishop19323692019-04-05 15:28:33 -0400123FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
124
125# The package contains symlinks that trip up insane
126INSANE_SKIP_${PN} = "dev-so"
127
128RDEPENDS_${PN} = "bind dbus libldb libpam"