summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgael.portay+rtone@gmail.com <gael.portay+rtone@gmail.com>2024-10-25 10:22:33 +0200
committerArmin Kuster <akuster808@gmail.com>2024-11-24 20:19:50 -0500
commit29c1e8f0b6a4bc0811b0ac6500a4e432910465dc (patch)
treed4ae0dcb2e18f861223e830da0ba66a2ce7a11b5
parent0efc86634c7b189d729396d92705f401c0661527 (diff)
downloadmeta-security-29c1e8f0b6a4bc0811b0ac6500a4e432910465dc.tar.gz
sssd: fix installation sss_analyze python3 files
SSSD has introduced the internal tool sss_analyze since 2.6.0[1]. Add log parsing tool which can be used to track requests across responder and backend logs. sss_analyze is a python3 script[2] with modules[3] that is run by the sssctl command analyze[4][5][6]. The autotools installs the files to ${libexec} and ${python3dir}[7]. The latter is set if the configure option --with-python3-bindings is set only. As a consequence, the Makefile installs the python3 files to /sssd instead of /usr/lib/python3.12/site-packages/sssd if the option --with-python3-bindings is unset: gportay@archlinux ~/src $ find build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/modules build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/modules/__init__.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/modules/request.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/modules/error.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/__init__.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/source_files.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/source_journald.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/source_reader.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/parser.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/sss_analyze.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/sssd/util.py The sss_analyze tool is unrelated to the python3 bindings; the sssctl does not condition its code if the python3 bindings are unset. Therefore, sss_analyze has to be installed even if the python3 bindings are unset. This ensures the variable python3dir is set to the expected location by adding it to --without-python3-bindings if the python3 feature is disabled. gportay@archlinux ~/src $ find build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12 build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12 build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/modules build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/modules/__init__.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/modules/request.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/modules/error.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/__init__.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/source_files.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/source_journald.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/source_reader.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/parser.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/sss_analyze.py build/tmp/work/core2-64-poky-linux/sssd/2.9.2/image/usr/lib/python3.12/site-packages/sssd/util.py [1]: https://github.com/SSSD/sssd/commit/82e051e1f15060554ecacc07107c82675369e0bb [2]: https://github.com/SSSD/sssd/blob/2.9.2/src/tools/analyzer/sss_analyze#L1 [3]: https://github.com/SSSD/sssd/tree/2.9.2/src/tools/analyzer [4]: https://github.com/SSSD/sssd/blob/2.9.2/src/tools/sssctl/sssctl_logs.c#L47 [5]: https://github.com/SSSD/sssd/blob/2.9.2/src/tools/sssctl/sssctl_logs.c#L605 [6]: https://github.com/SSSD/sssd/blob/2.9.2/src/tools/sssctl/sssctl.c#L337 [7]: https://github.com/SSSD/sssd/blob/2.9.2/src/tools/analyzer/Makefile.am#L7 [8]: https://github.com/SSSD/sssd/blob/2.9.2/configure.ac#L394 Signed-off-by: Gaƫl PORTAY <gael.portay+rtone@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb6
1 files changed, 1 insertions, 5 deletions
diff --git a/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
index e8f3031..2035cd0 100644
--- a/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
+++ b/dynamic-layers/networking-layer/recipes-security/sssd/sssd_2.9.2.bb
@@ -54,7 +54,7 @@ PACKAGECONFIG[manpages] = "--with-manpages, --with-manpages=no, libxslt-native d
54PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl" 54PACKAGECONFIG[nl] = "--with-libnl, --with-libnl=no, libnl"
55PACKAGECONFIG[nss] = ", ,nss," 55PACKAGECONFIG[nss] = ", ,nss,"
56PACKAGECONFIG[oidc_child] = "--with-oidc-child, --without-oidc-child" 56PACKAGECONFIG[oidc_child] = "--with-oidc-child, --without-oidc-child"
57PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings" 57PACKAGECONFIG[python3] = "--with-python3-bindings, --without-python3-bindings python3dir=${PYTHON_SITEPACKAGES_DIR}"
58PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba" 58PACKAGECONFIG[samba] = "--with-samba, --with-samba=no, samba"
59PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux" 59PACKAGECONFIG[selinux] = "--with-selinux, --with-selinux=no --with-semanage=no, libselinux"
60PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, " 60PACKAGECONFIG[ssh] = "--with-ssh, --with-ssh=no, "
@@ -88,9 +88,6 @@ do_install () {
88 rmdir --ignore-fail-on-non-empty "${D}/${bindir}" 88 rmdir --ignore-fail-on-non-empty "${D}/${bindir}"
89 89
90 install -d ${D}/${sysconfdir}/${BPN} 90 install -d ${D}/${sysconfdir}/${BPN}
91 install -d ${D}/${PYTHON_SITEPACKAGES_DIR}
92 mv ${D}/${BPN} ${D}/${PYTHON_SITEPACKAGES_DIR}
93
94 install -m 600 ${UNPACKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN} 91 install -m 600 ${UNPACKDIR}/${BPN}.conf ${D}/${sysconfdir}/${BPN}
95 92
96 # /var/log/sssd needs to be created in runtime. Use rmdir to catch if 93 # /var/log/sssd needs to be created in runtime. Use rmdir to catch if
@@ -112,7 +109,6 @@ do_install () {
112 # Remove /run as it is created on startup 109 # Remove /run as it is created on startup
113 rm -rf ${D}/run 110 rm -rf ${D}/run
114 111
115# rm -fr ${D}/sssd
116 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.* 112 rm -f ${D}${systemd_system_unitdir}/sssd-secrets.*
117} 113}
118 114