blob: 2c3c8032ec6079932a7b3f854d6f99ef687f8f50 [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"
9DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
10
Andrew Geissler1fe918a2020-05-15 14:16:47 -050011# 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
13DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'nss', '', \
14 bb.utils.contains('PACKAGECONFIG', 'crypto', '', 'nss', d), d)}"
15
16SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \
17 file://sssd.conf \
18 file://volatiles.99_sssd \
19 file://fix-ldblibdir.patch \
20 "
Brad Bishop19323692019-04-05 15:28:33 -040021
22SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
23SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959"
24
Andrew Geissler1fe918a2020-05-15 14:16:47 -050025inherit autotools pkgconfig gettext python3-dir features_check systemd
Brad Bishop19323692019-04-05 15:28:33 -040026
27REQUIRED_DISTRO_FEATURES = "pam"
28
29SSSD_UID ?= "root"
30SSSD_GID ?= "root"
31
32CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050033 ac_cv_path_NSUPDATE=${bindir} ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \
Brad Bishop19323692019-04-05 15:28:33 -040034 "
35
Andrew Geissler1fe918a2020-05-15 14:16:47 -050036PACKAGECONFIG ?="nss nscd autofs sudo infopipe"
Brad Bishop19323692019-04-05 15:28:33 -040037PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
38PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
39
Andrew Geissler1fe918a2020-05-15 14:16:47 -050040PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no"
41PACKAGECONFIG[crypto] = "--with-crypto=libcrypto, , libcrypto"
Andrew Geissler064f75b2020-06-27 00:14:46 -050042PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050043PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
44PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
45PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
46PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
47PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
48PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
Brad Bishop19323692019-04-05 15:28:33 -040049PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
50PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050051PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
52PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
53PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
Brad Bishop19323692019-04-05 15:28:33 -040054
Andrew Geissler1fe918a2020-05-15 14:16:47 -050055EXTRA_OECONF += " \
56 --disable-cifs-idmap-plugin \
57 --without-nfsv4-idmapd-plugin \
58 --without-ipa-getkeytab \
59 --without-python2-bindings \
60 --enable-pammoddir=${base_libdir}/security \
61 --without-python2-bindings \
Andrew Geissler064f75b2020-06-27 00:14:46 -050062 --without-secrets \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050063"
Brad Bishop19323692019-04-05 15:28:33 -040064
65do_configure_prepend() {
66 mkdir -p ${AUTOTOOLS_AUXDIR}/build
67 cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/
68
69 # libresove has host path, remove it
70 sed -i -e "s#\$sss_extra_libdir##" ${S}/src/external/libresolv.m4
71}
72
73do_install () {
74 oe_runmake install DESTDIR="${D}"
75 rmdir --ignore-fail-on-non-empty "${D}/${bindir}"
76 install -d ${D}/${sysconfdir}/${BPN}
77 install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
Andrew Geissler1fe918a2020-05-15 14:16:47 -050078 install -D -m 644 ${WORKDIR}/volatiles.99_sssd ${D}/${sysconfdir}/default/volatiles/99_sssd
79
80 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
81 install -d ${D}${sysconfdir}/tmpfiles.d
82 echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf
83 fi
Brad Bishop19323692019-04-05 15:28:33 -040084
85 # Remove /var/run as it is created on startup
86 rm -rf ${D}${localstatedir}/run
87
Andrew Geissler064f75b2020-06-27 00:14:46 -050088 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
Brad Bishop19323692019-04-05 15:28:33 -040089}
90
91pkg_postinst_ontarget_${PN} () {
92if [ -e /etc/init.d/populate-volatile.sh ] ; then
93 ${sysconfdir}/init.d/populate-volatile.sh update
94fi
95 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
96}
97
98CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
99
100INITSCRIPT_NAME = "sssd"
101INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500102SYSTEMD_SERVICE_${PN} = " \
103 ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \
104 ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \
105 ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \
106 ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \
107 ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \
108 sssd-nss.service \
109 sssd-nss.socket \
110 sssd-pam-priv.socket \
111 sssd-pam.service \
112 sssd-pam.socket \
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500113 sssd.service \
114"
Brad Bishop19323692019-04-05 15:28:33 -0400115SYSTEMD_AUTO_ENABLE = "disable"
116
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500117FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so"
Brad Bishop19323692019-04-05 15:28:33 -0400118FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
119
120# The package contains symlinks that trip up insane
121INSANE_SKIP_${PN} = "dev-so"
122
123RDEPENDS_${PN} = "bind dbus libldb libpam"