Skip to contentSkip to conversation

How do I write a yocto/bitbake recipe to replace the default vsftpd.conf file with my own file?

DISCUSSION Bacheh Karaji 3 participants 3 messages Jul 24, 2017 – Jul 25, 2017 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi,I want to replace the default vsftpd.conf file with my own file!My bitbake file looks following:
bbexample_1.0.bb    DESCRIPTION = "Configuration and extra files for TX28"    LICENSE = "CLOSED"    LIC_FILES_CHKSUM = ""        S = "${WORKDIR}"        SRC_URI += " \        file://ld.so.conf \        file://vsftpd.conf \        file://nginx/nginx.conf \        file://init.d/myscript.sh"        inherit allarch        do_install () {        install -d ${D}${sysconfdir}        install -d ${D}${sysconfdir}/nginx        install -d ${D}${sysconfdir}/init.d        rm -f ${D}${sysconfdir}/ld.so.conf        rm -f ${D}${sysconfdir}/vsftpd.conf        install -m 0755 ${WORKDIR}/ld.so.conf ${D}${sysconfdir}        install -m 0755 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}        install -m 0755 ${WORKDIR}/nginx/nginx.conf ${D}${sysconfdir}/nginx/        install -m 0755 ${WORKDIR}/init.d/myscript.sh ${D}${sysconfdir}/init.d/    } But, the file could not be replaced! What is wrong?

#2 lore raw

The package that generates will conflict with the real one.

Write a bbappend for the recipe you want to replace the files in, add the files to SRC_URI, and use do_install_append() to overwrite the files in ${D}.

Ross

Quoted 43 lines · Bacheh Karaji

Hi,
I want to replace the default vsftpd.conf file with my own file! My bitbake file looks following:

bbexample_1.0.bb

    DESCRIPTION = "Configuration and extra files for TX28"
    LICENSE = "CLOSED"
    LIC_FILES_CHKSUM = ""

    S = "${WORKDIR}"

    SRC_URI += " \
        file://ld.so.conf \
        file://vsftpd.conf \
        file://nginx/nginx.conf \
        file://init.d/myscript.sh"

    inherit allarch

    do_install () {
        install -d ${D}${sysconfdir}
        install -d ${D}${sysconfdir}/nginx
        install -d ${D}${sysconfdir}/init.d
        rm -f ${D}${sysconfdir}/ld.so.conf
        rm -f ${D}${sysconfdir}/vsftpd.conf
        install -m 0755 ${WORKDIR}/ld.so.conf ${D}${sysconfdir}
        install -m 0755 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}
        install -m 0755 ${WORKDIR}/nginx/nginx.conf
${D}${sysconfdir}/nginx/
        install -m 0755 ${WORKDIR}/init.d/myscript.sh
${D}${sysconfdir}/init.d/
    }

But, the file could not be replaced!
What is wrong?

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#3 lore raw

FYI, "recipetool appendfile" can help you create this. See the "recipetool appendfile --help" output for details.

Cheers,
Paul

Quoted 54 lines · Ross

The package that generates will conflict with the real one.

Write a bbappend for the recipe you want to replace the files in, add the files to SRC_URI, and use do_install_append() to overwrite the files in ${D}.

Ross

Quoted 43 lines · Bacheh Karaji

Hi,
I want to replace the default vsftpd.conf file with my own file! My bitbake file looks following:

bbexample_1.0.bb

    DESCRIPTION = "Configuration and extra files for TX28"
    LICENSE = "CLOSED"
    LIC_FILES_CHKSUM = ""

    S = "${WORKDIR}"

    SRC_URI += " \
        file://ld.so.conf \
        file://vsftpd.conf \
        file://nginx/nginx.conf \
        file://init.d/myscript.sh"

    inherit allarch

    do_install () {
        install -d ${D}${sysconfdir}
        install -d ${D}${sysconfdir}/nginx
        install -d ${D}${sysconfdir}/init.d
        rm -f ${D}${sysconfdir}/ld.so.conf
        rm -f ${D}${sysconfdir}/vsftpd.conf
        install -m 0755 ${WORKDIR}/ld.so.conf ${D}${sysconfdir}
        install -m 0755 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}
        install -m 0755 ${WORKDIR}/nginx/nginx.conf
${D}${sysconfdir}/nginx/
        install -m 0755 ${WORKDIR}/init.d/myscript.sh
${D}${sysconfdir}/init.d/
    }

But, the file could not be replaced!
What is wrong?

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre