如何将实用程序 ldapsearch 添加到 yocto 映像?

如何将实用程序 ldapsearch 添加到 yocto 映像?

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

IMAGE_INSTALL += "openldap"

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

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

先前的设置指定质量保证 (QA) 检查要跳过的内容,在本例中(请参阅约克托手册关于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.

编译过程会生成该实用程序的二进制文件ldapsearch,但该二进制文件未安装到映像中。相反,我确信openldap结果已正确安装到发行版中。

我找不到任何方法将ldapsearch(以及其他正确编译的实用程序)添加到图像中。

有人可以帮助我吗?

答案1

我的 yocto 基础系统构建中的配方meta-openembedded/meta-oe/recipes-support/openldap_2.4.50.bb包含许多包,而不仅仅是包openldap
另一个是包是openldap-bin,这是添加的包LDAP搜索到图像。

所以我将作业更改为IMAGE_INSTALL如下:

IMAGE_INSTALL += "openldap openldap-bin"

通过此修改,我的 Linux 发行版包含ldapsearch(和其他实用程序)。

相关内容