sssd: fix for ldblibdir and systemd etc

Fix sssd issue for ldblibdir, systemd, pam etc.

* fix ldblibdir which is not calculated right for cross compile
* create directory /var/log/sssd which is required by sssd daemon
* disable building python2 binding
* fix pam module path
* update systemd configure options and service files

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Kai Kang
2020-03-02 22:47:37 +08:00
committed by Armin Kuster
parent 15061e3a4e
commit 4375507f39
3 changed files with 62 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
When calculate value of ldblibdir, it checks whether the directory of
$ldblibdir exists. If not, it assigns ldblibdir with ${libdir}/ldb. It is not
suitable for cross compile. Fix it that only re-assign ldblibdir when its value
is empty.
Upstream-Status: Inappropriate [cross compile specific]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
src/external/libldb.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/external/libldb.m4 b/src/external/libldb.m4
index c400add..5e5f06d 100644
--- a/src/external/libldb.m4
+++ b/src/external/libldb.m4
@@ -19,7 +19,7 @@ if test x"$with_ldb_lib_dir" != x; then
ldblibdir=$with_ldb_lib_dir
else
ldblibdir="`$PKG_CONFIG --variable=modulesdir ldb`"
- if ! test -d $ldblibdir; then
+ if test -z $ldblibdir; then
ldblibdir="${libdir}/ldb"
fi
fi

View File

@@ -0,0 +1 @@
d root root 0750 /var/log/sssd none

View File

@@ -8,13 +8,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz\
file://sssd.conf "
SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \
file://sssd.conf \
file://volatiles.99_sssd \
file://fix-ldblibdir.patch \
"
SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959"
inherit autotools pkgconfig gettext python3-dir features_check
inherit autotools pkgconfig gettext python3-dir features_check systemd
REQUIRED_DISTRO_FEATURES = "pam"
@@ -38,11 +41,17 @@ PACKAGECONFIG[nss] = "--with-crypto=nss, ,nss,"
PACKAGECONFIG[cyrpto] = "--with-crypto=libcrypto, , libcrypto"
PACKAGECONFIG[nscd] = "--with-nscd=${sbindir}, --with-nscd=no "
PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/, --with-systemdunitdir="
PACKAGECONFIG[systemd] = "--with-initscript=systemd,--with-initscript=sysv"
PACKAGECONFIG[http] = "--with-secrets, --without-secrets, apache2"
PACKAGECONFIG[curl] = "--with-secrets --with-kcm, --without-secrets --without-kcm, curl"
EXTRA_OECONF += "--disable-cifs-idmap-plugin --without-nfsv4-idmapd-plugin --without-ipa-getkeytab"
EXTRA_OECONF += " \
--disable-cifs-idmap-plugin \
--without-nfsv4-idmapd-plugin \
--without-ipa-getkeytab \
--without-python2-bindings \
--enable-pammoddir=${base_libdir}/security \
"
do_configure_prepend() {
mkdir -p ${AUTOTOOLS_AUXDIR}/build
@@ -57,6 +66,12 @@ do_install () {
rmdir --ignore-fail-on-non-empty "${D}/${bindir}"
install -d ${D}/${sysconfdir}/${BPN}
install -m 600 ${WORKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
install -D -m 644 ${WORKDIR}/volatiles.99_sssd ${D}/${sysconfdir}/default/volatiles/99_sssd
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /var/log/sssd 0750 - - - -" > ${D}${sysconfdir}/tmpfiles.d/sss.conf
fi
# Remove /var/run as it is created on startup
rm -rf ${D}${localstatedir}/run
@@ -74,10 +89,24 @@ CONFFILES_${PN} = "${sysconfdir}/${BPN}/${BPN}.conf"
INITSCRIPT_NAME = "sssd"
INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
SYSTEMD_SERVICE_${PN} = " \
sssd-autofs.service \
sssd-autofs.socket \
sssd-ifp.service \
sssd-nss.service \
sssd-nss.socket \
sssd-pam-priv.socket \
sssd-pam.service \
sssd-pam.socket \
sssd-secrets.service \
sssd-secrets.socket \
sssd.service \
sssd-sudo.service \
sssd-sudo.socket \
"
SYSTEMD_AUTO_ENABLE = "disable"
FILES_${PN} += "${libdir} ${datadir} /run ${libdir}/*.so* "
FILES_${PN} += "${libdir} ${datadir} ${base_libdir}/security/pam_sss.so"
FILES_${PN}-dev = " ${includedir}/* ${libdir}/*la ${libdir}/*/*la"
# The package contains symlinks that trip up insane