summaryrefslogtreecommitdiffstats
path: root/recipes-security/sssd/sssd_2.5.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/sssd/sssd_2.5.2.bb')
-rw-r--r--recipes-security/sssd/sssd_2.5.2.bb150
1 files changed, 0 insertions, 150 deletions
diff --git a/recipes-security/sssd/sssd_2.5.2.bb b/recipes-security/sssd/sssd_2.5.2.bb
deleted file mode 100644
index 9f1d627..0000000
--- a/recipes-security/sssd/sssd_2.5.2.bb
+++ /dev/null
@@ -1,150 +0,0 @@
1SUMMARY = "system security services daemon"
2DESCRIPTION = "SSSD is a system security services daemon"
3HOMEPAGE = "https://pagure.io/SSSD/sssd/"
4SECTION = "base"
5LICENSE = "GPL-3.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
8DEPENDS = "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"
10
11DEPENDS:append:libc-musl = " musl-nscd"
12
13# 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://github.com/SSSD/sssd/releases/download/${PV}/sssd-${PV}.tar.gz \
19 file://sssd.conf \
20 file://volatiles.99_sssd \
21 file://no_gen.patch \
22 file://fix_gid.patch \
23 file://drop_ntpdate_chk.patch \
24 file://fix-ldblibdir.patch \
25 file://musl_fixup.patch \
26 file://CVE-2021-3621.patch \
27 "
28
29SRC_URI[sha256sum] = "5e21b3c7b4a2f1063d0fbdd3216d29886b6eaba153b44fb5961698367f399a0f"
30
31inherit autotools pkgconfig gettext python3-dir features_check systemd
32
33REQUIRED_DISTRO_FEATURES = "pam"
34
35SSSD_UID ?= "root"
36SSSD_GID ?= "root"
37
38CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \
39 ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \
40 "
41
42PACKAGECONFIG ?="nss nscd autofs sudo infopipe"
43PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
44PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
45
46PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no"
47PACKAGECONFIG[crypto] = ", , libcrypto"
48PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson"
49PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, "
50PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
51PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
52PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
53PACKAGECONFIG[nss] = ", ,nss,"
54PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings"
55PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
56PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
57PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
58PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, "
59PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
60
61EXTRA_OECONF += " \
62 --disable-cifs-idmap-plugin \
63 --without-nfsv4-idmapd-plugin \
64 --without-ipa-getkeytab \
65 --without-python2-bindings \
66 --enable-pammoddir=${base_libdir}/security \
67 --without-python2-bindings \
68 --without-secrets \
69 --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \
70 --with-pid-path=/run \
71"
72
73do_configure:prepend() {
74 mkdir -p ${AUTOTOOLS_AUXDIR}/build
75 cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/
76
77 # libresove has host path, remove it
78 sed -i -e "s#\$sss_extra_libdir##" ${S}/src/external/libresolv.m4
79}
80
81do_compile:prepend () {
82 echo '#define NSUPDATE_PATH "${bindir}"' >> ${B}/config.h
83}
84do_install () {
85 oe_runmake install DESTDIR="${D}"
86 rmdir --ignore-fail-on-non-empty "${D}/${bindir}"
87 install -d ${D}/${sysconfdir}/${BPN}
88 install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
89
90 # /var/log/sssd needs to be created in runtime. Use rmdir to catch if
91 # upstream stops creating /var/log/sssd, or adds something else in
92 # /var/log.
93 rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
94 rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
95
96 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
97 install -d ${D}${sysconfdir}/tmpfiles.d
98 echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf
99 fi
100
101 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
102 install -d ${D}${sysconfdir}/default/volatiles
103 echo "d ${SSSD_UID}:${SSSD_GID} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
104 fi
105
106 # Remove /run as it is created on startup
107 rm -rf ${D}/run
108
109 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
110}
111
112pkg_postinst_ontarget:${PN} () {
113if [ -e /etc/init.d/populate-volatile.sh ] ; then
114 ${sysconfdir}/init.d/populate-volatile.sh update
115fi
116 chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf
117}
118
119FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
120
121CONFFILES:${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
122
123INITSCRIPT_NAME = "sssd"
124INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
125SYSTEMD_SERVICE:${PN} = " \
126 ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \
127 ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \
128 ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \
129 ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \
130 ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \
131 sssd-nss.service \
132 sssd-nss.socket \
133 sssd-pam-priv.socket \
134 sssd-pam.service \
135 sssd-pam.socket \
136 sssd.service \
137"
138SYSTEMD_AUTO_ENABLE = "disable"
139
140PACKAGES =+ "libsss-sudo"
141ALLOW_EMPTY:libsss-sudo = "1"
142
143FILES:${PN} += "${base_libdir}/security/pam_sss*.so \
144 ${datadir}/dbus-1/system-services/*.service \
145 ${libdir}/krb5/* \
146 ${libdir}/ldb/* \
147 "
148FILES:libsss-sudo = "${libdir}/libsss_sudo.so"
149
150RDEPENDS:${PN} = "bind bind-utils dbus libldb libpam libsss-sudo"