diff options
Diffstat (limited to 'dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.7.1.bb')
| -rw-r--r-- | dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.7.1.bb | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.7.1.bb b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.7.1.bb new file mode 100644 index 0000000..71f14a0 --- /dev/null +++ b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.7.1.bb | |||
| @@ -0,0 +1,155 @@ | |||
| 1 | SUMMARY = "system security services daemon" | ||
| 2 | DESCRIPTION = "SSSD is a system security services daemon" | ||
| 3 | HOMEPAGE = "https://pagure.io/SSSD/sssd/" | ||
| 4 | SECTION = "base" | ||
| 5 | LICENSE = "GPL-3.0-or-later" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" | ||
| 7 | |||
| 8 | DEPENDS = "acl attr cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive" | ||
| 9 | DEPENDS:append = " libldb dbus libtalloc libpcre2 glib-2.0 popt e2fsprogs libtevent" | ||
| 10 | DEPENDS:append = " openldap bind p11-kit jansson softhsm openssl libunistring" | ||
| 11 | |||
| 12 | DEPENDS:append:libc-musl = " musl-nscd" | ||
| 13 | |||
| 14 | # If no crypto has been selected, default to DEPEND on nss, since that's what | ||
| 15 | # sssd will pick if no active choice is made during configure | ||
| 16 | DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'nss', '', \ | ||
| 17 | bb.utils.contains('PACKAGECONFIG', 'crypto', '', 'nss', d), d)}" | ||
| 18 | |||
| 19 | SRC_URI = "https://github.com/SSSD/sssd/releases/download/${PV}/sssd-${PV}.tar.gz \ | ||
| 20 | file://sssd.conf \ | ||
| 21 | file://volatiles.99_sssd \ | ||
| 22 | file://no_gen.patch \ | ||
| 23 | file://fix_gid.patch \ | ||
| 24 | file://drop_ntpdate_chk.patch \ | ||
| 25 | file://fix-ldblibdir.patch \ | ||
| 26 | file://musl_fixup.patch \ | ||
| 27 | " | ||
| 28 | |||
| 29 | SRC_URI[sha256sum] = "8eebd541a640aec95ed4b2da89713f0cbe8e4edf96895fbb972c0b9d570635c3" | ||
| 30 | |||
| 31 | inherit autotools pkgconfig gettext python3-dir features_check systemd | ||
| 32 | |||
| 33 | REQUIRED_DISTRO_FEATURES = "pam" | ||
| 34 | |||
| 35 | SSSD_UID ?= "root" | ||
| 36 | SSSD_GID ?= "root" | ||
| 37 | |||
| 38 | CACHED_CONFIGUREVARS = "ac_cv_member_struct_ldap_conncb_lc_arg=no \ | ||
| 39 | ac_cv_prog_HAVE_PYTHON3=${PYTHON_DIR} \ | ||
| 40 | " | ||
| 41 | |||
| 42 | PACKAGECONFIG ?="nss autofs sudo infopipe" | ||
| 43 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" | ||
| 44 | PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
| 45 | |||
| 46 | PACKAGECONFIG[autofs] = "--with-autofs, --with-autofs=no" | ||
| 47 | PACKAGECONFIG[crypto] = ", , libcrypto" | ||
| 48 | PACKAGECONFIG[curl] = "--with-kcm, --without-kcm, curl jansson" | ||
| 49 | PACKAGECONFIG[infopipe] = "--with-infopipe, --with-infopipe=no, " | ||
| 50 | PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" | ||
| 51 | PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" | ||
| 52 | PACKAGECONFIG[nss] = ", ,nss," | ||
| 53 | PACKAGECONFIG[oidc_child] = "--with-oidc-child, --without-oidc-child" | ||
| 54 | PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" | ||
| 55 | PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" | ||
| 56 | PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" | ||
| 57 | PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " | ||
| 58 | PACKAGECONFIG[sudo] = "--with-sudo, --with-sudo=no, " | ||
| 59 | PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv" | ||
| 60 | |||
| 61 | EXTRA_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 | --with-xml-catalog-path=${STAGING_ETCDIR_NATIVE}/xml/catalog \ | ||
| 69 | --with-pid-path=/run \ | ||
| 70 | " | ||
| 71 | |||
| 72 | do_configure:prepend() { | ||
| 73 | mkdir -p ${AUTOTOOLS_AUXDIR}/build | ||
| 74 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/build/ | ||
| 75 | |||
| 76 | # additional_libdir defaults to /usr/lib so replace with staging_libdir globally | ||
| 77 | sed -i -e "s#\$additional_libdir#\${STAGING_LIBDIR}#" ${S}/src/build_macros.m4 | ||
| 78 | } | ||
| 79 | |||
| 80 | do_compile:prepend () { | ||
| 81 | echo '#define NSUPDATE_PATH "${bindir}"' >> ${B}/config.h | ||
| 82 | } | ||
| 83 | do_install () { | ||
| 84 | oe_runmake install DESTDIR="${D}" | ||
| 85 | rmdir --ignore-fail-on-non-empty "${D}/${bindir}" | ||
| 86 | |||
| 87 | install -d ${D}/${sysconfdir}/${BPN} | ||
| 88 | install -d ${D}/${PYTHON_SITEPACKAGES_DIR} | ||
| 89 | mv ${D}/${BPN} ${D}/${PYTHON_SITEPACKAGES_DIR} | ||
| 90 | |||
| 91 | install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN} | ||
| 92 | |||
| 93 | # /var/log/sssd needs to be created in runtime. Use rmdir to catch if | ||
| 94 | # upstream stops creating /var/log/sssd, or adds something else in | ||
| 95 | # /var/log. | ||
| 96 | rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log | ||
| 97 | rmdir --ignore-fail-on-non-empty ${D}${localstatedir} | ||
| 98 | |||
| 99 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 100 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 101 | echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf | ||
| 102 | fi | ||
| 103 | |||
| 104 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then | ||
| 105 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 106 | echo "d ${SSSD_UID}:${SSSD_GID} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN} | ||
| 107 | fi | ||
| 108 | |||
| 109 | # Remove /run as it is created on startup | ||
| 110 | rm -rf ${D}/run | ||
| 111 | |||
| 112 | # rm -fr ${D}/sssd | ||
| 113 | rm -f ${D}${systemd_system_unitdir}/sssd-secrets.* | ||
| 114 | } | ||
| 115 | |||
| 116 | pkg_postinst_ontarget:${PN} () { | ||
| 117 | if [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
| 118 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
| 119 | fi | ||
| 120 | chown ${SSSD_UID}:${SSSD_GID} ${sysconfdir}/${BPN}/${BPN}.conf | ||
| 121 | } | ||
| 122 | |||
| 123 | CONFFILES:${PN} = "${sysconfdir}/${BPN}/${BPN}.conf" | ||
| 124 | |||
| 125 | INITSCRIPT_NAME = "sssd" | ||
| 126 | INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." | ||
| 127 | SYSTEMD_SERVICE:${PN} = " \ | ||
| 128 | ${@bb.utils.contains('PACKAGECONFIG', 'autofs', 'sssd-autofs.service sssd-autofs.socket', '', d)} \ | ||
| 129 | ${@bb.utils.contains('PACKAGECONFIG', 'curl', 'sssd-kcm.service sssd-kcm.socket', '', d)} \ | ||
| 130 | ${@bb.utils.contains('PACKAGECONFIG', 'infopipe', 'sssd-ifp.service ', '', d)} \ | ||
| 131 | ${@bb.utils.contains('PACKAGECONFIG', 'ssh', 'sssd-ssh.service sssd-ssh.socket', '', d)} \ | ||
| 132 | ${@bb.utils.contains('PACKAGECONFIG', 'sudo', 'sssd-sudo.service sssd-sudo.socket', '', d)} \ | ||
| 133 | sssd-nss.service \ | ||
| 134 | sssd-nss.socket \ | ||
| 135 | sssd-pam-priv.socket \ | ||
| 136 | sssd-pam.service \ | ||
| 137 | sssd-pam.socket \ | ||
| 138 | sssd.service \ | ||
| 139 | " | ||
| 140 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 141 | |||
| 142 | PACKAGES =+ "libsss-sudo" | ||
| 143 | ALLOW_EMPTY:libsss-sudo = "1" | ||
| 144 | |||
| 145 | FILES:${PN} += "${base_libdir}/security/pam_sss*.so \ | ||
| 146 | ${nonarch_libdir}/tmpfiles.d \ | ||
| 147 | ${datadir}/dbus-1/system-services/*.service \ | ||
| 148 | ${libdir}/krb5/* \ | ||
| 149 | ${libdir}/ldb/* \ | ||
| 150 | ${PYTHON_SITEPACKAGES_DIR}/sssd \ | ||
| 151 | " | ||
| 152 | |||
| 153 | FILES:libsss-sudo = "${libdir}/libsss_sudo.so" | ||
| 154 | |||
| 155 | RDEPENDS:${PN} = "bind bind-utils dbus libldb libpam libsss-sudo" | ||
