blob: e54fa98e975d417d1956e2cc2d95495d74a52e88 [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 \
Andrew Geisslercc589282020-09-18 13:34:40 -050020 file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \
21 file://0001-nss-Collision-with-external-nss-symbol.patch \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050022 "
Brad Bishop19323692019-04-05 15:28:33 -040023
24SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
25SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959"
26
Andrew Geissler1fe918a2020-05-15 14:16:47 -050027inherit autotools pkgconfig gettext python3-dir features_check systemd
Brad Bishop19323692019-04-05 15:28:33 -040028
29REQUIRED_DISTRO_FEATURES = "pam"
30
31SSSD_UID ?= "root"
32SSSD_GID ?= "root"
33
34CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050035 ac_cv_path_NSUPDATE=${bindir} ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \
Brad Bishop19323692019-04-05 15:28:33 -040036 "
37
Andrew Geissler1fe918a2020-05-15 14:16:47 -050038PACKAGECONFIG ?="nss nscd autofs sudo infopipe"
Brad Bishop19323692019-04-05 15:28:33 -040039PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
40PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
41
Andrew Geissler1fe918a2020-05-15 14:16:47 -050042PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no"
43PACKAGECONFIG[crypto] = "--with-crypto=libcrypto, , libcrypto"
Andrew Geissler064f75b2020-06-27 00:14:46 -050044PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050045PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
Andrew Geisslercc589282020-09-18 13:34:40 -050046PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050047PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
48PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
49PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
50PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
Brad Bishop19323692019-04-05 15:28:33 -040051PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
52PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050053PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
54PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
55PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
Brad Bishop19323692019-04-05 15:28:33 -040056
Andrew Geissler1fe918a2020-05-15 14:16:47 -050057EXTRA_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 Geissler064f75b2020-06-27 00:14:46 -050064 --without-secrets \
Andrew Geisslercc589282020-09-18 13:34:40 -050065 --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
Andrew Geissler1fe918a2020-05-15 14:16:47 -050066"
Brad Bishop19323692019-04-05 15:28:33 -040067
68do_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
76do_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 Geissler1fe918a2020-05-15 14:16:47 -050081 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 Bishop19323692019-04-05 15:28:33 -040087
88 # Remove /var/run as it is created on startup
89 rm -rf ${D}${localstatedir}/run
90
Andrew Geissler064f75b2020-06-27 00:14:46 -050091 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
Brad Bishop19323692019-04-05 15:28:33 -040092}
93
94pkg_postinst_ontarget_${PN} () {
95if [ -e /etc/init.d/populate-volatile.sh ] ; then
96 ${sysconfdir}/init.d/populate-volatile.sh update
97fi
98 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
99}
100
101CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
102
103INITSCRIPT_NAME = "sssd"
104INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500105SYSTEMD_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 Geissler1fe918a2020-05-15 14:16:47 -0500116 sssd.service \
117"
Brad Bishop19323692019-04-05 15:28:33 -0400118SYSTEMD_AUTO_ENABLE = "disable"
119
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500120FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so"
Brad Bishop19323692019-04-05 15:28:33 -0400121FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
122
123# The package contains symlinks that trip up insane
124INSANE_SKIP_${PN} = "dev-so"
125
126RDEPENDS_${PN} = "bind dbus libldb libpam"