如何将ldapsearch实用程序添加到基于yocto-base的Linux发行版?

lf5gs5x2  于 2023-04-11  发布在  Linux
关注(0)|答案(1)|浏览(135)

我已经成功地将配方openldap添加到我的yocto-base Linux发行版中,通过以下指令:

IMAGE_INSTALL += "openldap"

之后,我创建了一个path/to/my-layer/recipes-support/openldap/openldap_%.bbappend文件,并将指令放入其中:

INSANE_SKIP_${PN} += "already-stripped"

之前的设置指定了质量保证(QA)检查要跳过的内容,在这种情况下(参见Yocto手册中关于insane.bbclass的内容),我们要求跳过:

已剥离:检查生成的二进制文件是否在生成系统提取调试符号之前尚未剥离。上游软件项目通常默认剥离输出二进制文件的调试符号。为了使用-dbg包在目标上进行调试,必须禁用此剥离。

如果没有前面的指令,openldap的编译将失败,并出现以下错误:

ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapcompare' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapdelete' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapexop' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapmodify' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapmodrdn' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldappasswd' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapsearch' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapurl' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/bin/ldapwhoami' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: QA Issue: File '/usr/sbin/slapd' from openldap was already stripped, this will prevent future debugging! [already-stripped]
ERROR: openldap-2.4.50-r0 do_package: Fatal QA errors found, failing task.

相反,通过将先前的赋值添加到变量INSANE_SKIP_${PN},QA检查停止失败。
编译过程为实用程序ldapsearch生成了二进制文件,但是这个二进制文件没有安装到镜像中。相反,我确信openldap结果正确安装。
我没有找到任何方法来添加ldapsearch和其他实用程序的形象。
有人能帮帮我吗

6ojccjat

6ojccjat1#

我已经成功地将配方openldap添加到我的Yocto图像中,通过指令:
IMAGE_INSTALL += "openldap"
您已经将 package openldap添加到您的镜像中。但是,配方定义了多个包:

# The executables go in a separate package.  This allows the
# installation of the libraries with no daemon support.
# Each module also has its own package - see above.
PACKAGES += "${PN}-slapd ${PN}-slurpd ${PN}-bin"

# Package contents - shift most standard contents to -bin
FILES:${PN} = "${libdir}/lib*.so.* ${sysconfdir}/openldap/ldap.* ${localstatedir}/${BPN}/data"
FILES:${PN}-slapd = "${sysconfdir}/init.d ${libexecdir}/slapd ${sbindir} ${localstatedir}/run ${localstatedir}/volatile/run \
    ${sysconfdir}/openldap/slapd.* ${sysconfdir}/openldap/schema \
    ${sysconfdir}/openldap/DB_CONFIG.example ${systemd_unitdir}/system/*"
FILES:${PN}-slurpd = "${libexecdir}/slurpd ${localstatedir}/openldap-slurp"
FILES:${PN}-bin = "${bindir}"
...

您可能希望将openldap-bin添加到图像中。

相关问题