无法执行do_install_append

时间:2019-05-02 14:02:52

标签: yocto

我正在尝试在audit程序包中运行特定任务。
我已附上.bb文件供您参考

BB_VERSION:1.22.0
BUILD_SYS:x86_64-linux
NATIVELSBSTRING:Ubuntu-14.04
TARGET_SYS:arm-poky-linux-gnueabi
MACHINE:iwg22m
DISTRO:poky
DISTRO_VERSION:1.6.1
TUNE_FEATURES:armv7a vfp neon callconvention-hard cortexa7
TARGET_FPU:vfp-neon

登录相同

$ bitbake -c install_append audit
Loading cache: 100% |####################################################################################################################| ETA:  00:00:00
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.22.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "iwg22m"
DISTRO            = "poky"
DISTRO_VERSION    = "1.6.1"
TUNE_FEATURES     = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        
meta-yocto-bsp    = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas      
meta-rzg1         = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe           
meta-multimedia   = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"

NOTE: Preparing runqueue
ERROR: Task do_install_append does not exist for target audit. Close matches:
  do_install

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

audit_2.8.4.bb

SUMMARY = "User space tools for kernel auditing"
DESCRIPTION = "The audit package contains the user space utilities for \
storing and searching the audit records generated by the audit subsystem \
in the Linux kernel."
HOMEPAGE = "http://people.redhat.com/sgrubb/audit/"
SECTION = "base"
LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"


    SRC_URI = "http://people.redhat.com/sgrubb/${BPN}/${BPN}-${PV}.tar.gz \
               file://audit-python-configure.patch \
               file://audit-python.patch \
               file://fix-swig-host-contamination.patch \
               file://auditd \
               file://auditd.service \
               file://audit-volatile.conf \
    "
    SRC_URI[md5sum] = "871fbc03039a5101b5191c5dcc6e8ac2"
    SRC_URI[sha256sum] = "61d8dc61e882fdbb75153a1316817a8f8c8fca25de588256edd81fbb03e7994b"

    inherit autotools pythonnative update-rc.d systemd

    UPDATERCPN = "auditd"
    INITSCRIPT_NAME = "auditd"
    INITSCRIPT_PARAMS = "defaults"

    SYSTEMD_SERVICE_${PN} = "auditd.service"

    DEPENDS += "python tcp-wrappers libcap-ng linux-libc-headers (>= 2.6.30)"

    EXTRA_OECONF += "--without-prelude \
        --with-libwrap \
        --enable-gssapi-krb5=no \
        --with-libcap-ng=yes \
        --with-python=yes \
        --libdir=${base_libdir} \
        --sbindir=${base_sbindir} \
            --without-python3 \
            --disable-zos-remote \
        "
    EXTRA_OECONF_append_arm = " --with-arm=yes"

    EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \
        PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \
        pyexecdir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
        STDINC='${STAGING_INCDIR}' \
        "

    SUMMARY_audispd-plugins = "Plugins for the audit event dispatcher"
    DESCRIPTION_audispd-plugins = "The audispd-plugins package provides plugins for the real-time \
    interface to the audit system, audispd. These plugins can do things \
    like relay events to remote machines or analyze events for suspicious \
    behavior."

    PACKAGES =+ "audispd-plugins"
    PACKAGES += "auditd ${PN}-python"

    FILES_${PN} = "${sysconfdir}/libaudit.conf ${base_libdir}/libaudit.so.1* ${base_libdir}/libauparse.so.*"
    FILES_auditd += "${bindir}/* ${base_sbindir}/* ${sysconfdir}/*"
    FILES_audispd-plugins += "${sysconfdir}/audisp/audisp-remote.conf \
        ${sysconfdir}/audisp/plugins.d/au-remote.conf \
        ${sbindir}/audisp-remote ${localstatedir}/spool/audit \
        "
    FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
    FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
    FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la ${base_libdir}/pkgconfig/*"

    CONFFILES_auditd += "${sysconfdir}/audit/audit.rules"
    RDEPENDS_auditd += "bash"

    do_install_append() {
        rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a
        rm -f ${D}/${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la

        # reuse auditd config
        [ ! -e ${D}/etc/default ] && mkdir ${D}/etc/default
        mv ${D}/etc/sysconfig/auditd ${D}/etc/default
        rmdir ${D}/etc/sysconfig/

        # replace init.d
        install -D -m 0755 ${S}/../auditd ${D}/etc/init.d/auditd
        rm -rf ${D}/etc/rc.d

        if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
            install -d ${D}${sysconfdir}/tmpfiles.d/
            install -m 0644 ${WORKDIR}/audit-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
        fi

        # install systemd unit files
        install -d ${D}${systemd_unitdir}/system
        install -m 0644 ${WORKDIR}/auditd.service ${D}${systemd_unitdir}/system

        # audit-2.5 doesn't install any rules by default, so we do that here
        mkdir -p ${D}/etc/audit ${D}/etc/audit/rules.d
        cp ${S}/rules/10-base-config.rules ${D}/etc/audit/rules.d/audit.rules

        chmod 750 ${D}/etc/audit ${D}/etc/audit/rules.d
        chmod 640 ${D}/etc/audit/auditd.conf ${D}/etc/audit/rules.d/audit.rules

        # Based on the audit.spec "Copy default rules into place on new installation"
        cp ${D}/etc/audit/rules.d/audit.rules ${D}/etc/audit/audit.rules
    }

根据建议,我运行了“ bitbake -c安装| cat-”审核,当我运行“ bitbake审核| cat-”时,任务列表不同。

bitbake审核|猫-

Loading cache...done.
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.22.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "iwg22m"
DISTRO            = "poky"
DISTRO_VERSION    = "1.6.1"
TUNE_FEATURES     = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU        = "vfp-neon"
meta
meta-yocto
meta-yocto-bsp    = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas
meta-rzg1         = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe
meta-multimedia   = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Running setscene task 156 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_populate_sysroot_setscene)
NOTE: Running setscene task 157 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_populate_lic_setscene)
NOTE: Running setscene task 158 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_package_write_ipk_setscene)
NOTE: recipe audit-2.8.4-r0: task do_populate_sysroot_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_populate_lic_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_package_write_ipk_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_populate_lic_setscene: Succeeded
NOTE: recipe audit-2.8.4-r0: task do_populate_sysroot_setscene: Succeeded
NOTE: recipe audit-2.8.4-r0: task do_package_write_ipk_setscene: Succeeded
NOTE: Running setscene task 159 of 160 (/home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_packagedata_setscene)
NOTE: recipe audit-2.8.4-r0: task do_packagedata_setscene: Started
NOTE: recipe audit-2.8.4-r0: task do_packagedata_setscene: Succeeded
NOTE: Executing RunQueue Tasks

bitbake -c安装|猫-

Loading cache...done.
Loaded 1863 entries from dependency cache.
WARNING: No recipes available for:
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwebkit_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtwayland_git.bbappend
  /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-graphics/qt/qtbase_git.bbappend
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.22.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "iwg22m"
DISTRO            = "poky"
DISTRO_VERSION    = "1.6.1"
TUNE_FEATURES     = "armv7a vfp neon callconvention-hard cortexa7"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        
meta-yocto-bsp    = "tmp:c4f1f0f491f988901bfd6965f7d10f60cb94a76f"
meta-renesas      
meta-rzg1         = "tmp:19bf1ed97d04009722bb88a780268822ee60ff83"
meta-oe           
meta-multimedia   = "tmp:dca466c074c9a35bc0133e7e0d65cca0731e2acf"
meta-linaro-toolchain = "tmp:8a0601723c06fdb75e62aa0f0cf15fc9d7d90167"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 404 of 415 (ID: 3, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_fetch)
NOTE: recipe audit-2.8.4-r0: task do_fetch: Started
NOTE: recipe audit-2.8.4-r0: task do_fetch: Succeeded
NOTE: Running task 411 of 415 (ID: 0, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_unpack)
NOTE: recipe audit-2.8.4-r0: task do_unpack: Started
NOTE: recipe audit-2.8.4-r0: task do_unpack: Succeeded
NOTE: Running task 412 of 415 (ID: 1, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_patch)
NOTE: recipe audit-2.8.4-r0: task do_patch: Started
NOTE: recipe audit-2.8.4-r0: task do_patch: Succeeded
NOTE: Running task 413 of 415 (ID: 4, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_configure)
NOTE: recipe audit-2.8.4-r0: task do_configure: Started
NOTE: recipe audit-2.8.4-r0: task do_configure: Succeeded
NOTE: Running task 414 of 415 (ID: 5, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_compile)
NOTE: recipe audit-2.8.4-r0: task do_compile: Started
NOTE: recipe audit-2.8.4-r0: task do_compile: Succeeded
NOTE: Running task 415 of 415 (ID: 2, /home/sarjoodeen/Project/2018/Nippon/YOCTO/iwG22M-release-bsp/build/../meta-renesas/meta-rzg1/recipes-extended/audit/audit_2.8.4.bb, do_install)
NOTE: recipe audit-2.8.4-r0: task do_install: Started
NOTE: recipe audit-2.8.4-r0: task do_install: Succeeded
NOTE: Tasks Summary: Attempted 415 tasks of which 409 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.

任务列表完全不同

1 个答案:

答案 0 :(得分:0)

Bitbake创建动态执行的方法并运行它们,因此您的_append实际上被附加到do_install任务的末尾。然后执行任务。

使用bitbake -e audit查看调试输出可能会有所帮助,只需在do_install_append任务的do_install任务结尾处搜索audit代码即可。

如果输出太大,则可以尝试将bitbake管道输送到cat中以查看每个任务的执行情况,类似于bitbake audit | cat -

  

在变量值之后,所有功能都会出现在输出中。对于外壳函数,将扩展在函数体内引用的变量。如果使用覆盖或使用覆盖样式的运算符(如_append和_prepend)修改了函数,则最终的汇编函数主体将出现在输出中。

https://www.yoctoproject.org/docs/2.2.1/ref-manual/ref-manual.html#usingpoky-debugging-viewing-variable-values