blob: 7ea1586bd44a0f7a4ddc821f1407ed1948f922a4 [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"
42PACKAGECONFIG[curl] = "--with-secrets --with-kcm, --without-secrets --without-kcm, curl jansson"
43PACKAGECONFIG[http] = "--with-secrets, --without-secrets, apache2"
44PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
45PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no"
46PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
47PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
48PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
49PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
Brad Bishop19323692019-04-05 15:28:33 -040050PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
51PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
Andrew Geissler1fe918a2020-05-15 14:16:47 -050052PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
53PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
54PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
Brad Bishop19323692019-04-05 15:28:33 -040055
Andrew Geissler1fe918a2020-05-15 14:16:47 -050056EXTRA_OECONF += " \
57 --disable-cifs-idmap-plugin \
58 --without-nfsv4-idmapd-plugin \
59 --without-ipa-getkeytab \
60 --without-python2-bindings \
61 --enable-pammoddir=${base_libdir}/security \
62 --without-python2-bindings \
63"
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
88}
89
90pkg_postinst_ontarget_${PN} () {
91if [ -e /etc/init.d/populate-volatile.sh ] ; then
92 ${sysconfdir}/init.d/populate-volatile.sh update
93fi
94 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
95}
96
97CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
98
99INITSCRIPT_NAME = "sssd"
100INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500101SYSTEMD_SERVICE_${PN} = " \
102 ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \
103 ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \
104 ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \
105 ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \
106 ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \
107 sssd-nss.service \
108 sssd-nss.socket \
109 sssd-pam-priv.socket \
110 sssd-pam.service \
111 sssd-pam.socket \
112 sssd-secrets.service \
113 sssd-secrets.socket \
114 sssd.service \
115"
Brad Bishop19323692019-04-05 15:28:33 -0400116SYSTEMD_AUTO_ENABLE = "disable"
117
Andrew Geissler1fe918a2020-05-15 14:16:47 -0500118FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so"
Brad Bishop19323692019-04-05 15:28:33 -0400119FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
120
121# The package contains symlinks that trip up insane
122INSANE_SKIP_${PN} = "dev-so"
123
124RDEPENDS_${PN} = "bind dbus libldb libpam"