[yocto] dnf causing build failure

Larry Brown elcapitanbrown at gmail.com
Fri Jun 14 12:10:38 PDT 2019


So I got the ${B} from the original openssh recipe so I'm not sure what
that variable equates to now.  But I changed to ${D} and had to change some
other aspects as well.  What I didn't understand is that the recipe is
installing the files into a folder (package folder) that is ultimately
packaged and then installed into the rootfs and that it is not installing
the files from a package folder into the rootfs directly by the script.  I
don't understand how the build system knows that the files in the install
directory need to be installed into the rootfs but I can only assume that
anything installed into a structure in the package directory will be
overlayed into the rootfs in the corresponding locations.  I'm guessing...

Well with the current layout working the DNF error went away.  Maybe it was
failing the file copy to begin with but quietly and only the DNF error was
displayed?  There is definitely a learning curve here...

Thanks so much,

Larry

On Fri, Jun 14, 2019 at 10:11 AM Alexander Kanavin <alex.kanavin at gmail.com>
wrote:

> Should be ${D}, not ${B} in do_install.
>
> Alex
>
> On Fri, 14 Jun 2019 at 15:53, Larry Brown <elcapitanbrown at gmail.com>
> wrote:
>
>> I've created a recipe that simply copies files into a folder of the
>> image.  Basically in this form:
>>
>> ------------------------------------------------------
>>
>> SUMMARY = "Some text"
>> HOMEPAGE = ""
>> LICENSE = "CLOSED"
>> LIC_FILES_CHKSUM = ""
>>
>> DEPENDS = "openssl"
>>
>> do_install () {
>>      install -m 0644 ${WORKDIR}/path/fileA ${B}/
>>      install -m 0644 ${WORKDIR}/path/fileB ${B}/
>> }
>>
>> FILES_${PN}-ssh = "${sysconfdir}/path/fileA ${sysconfdir}/path/fileB"
>>
>> -------------------------------------------------
>>
>> When I build this I only want the files in the target image.  I don't
>> need an rpm built that could be used to deliver these files.  Now there
>> might be something I could do that would enable DNF to succeed, however I
>> would like to learn how to get the package installer to ignore/skip a
>> recipe (openssh-keys-install.bb in this case) that is only used during
>> the initial build.
>>
>> Can someone shed some light here?
>>
>> Also, if there is already a way built into the build process to retain a
>> set of keys for each device so they don't keep creating new keys, that
>> would be cool and appreciated, but I'm wanting to learn how to accomplish
>> this so it does not stop me when wanting to include other files elsewhere.
>>
>> I'm assuming here that there is someone here that has dealt with this;
>> however, if I'm mistaken the following is the error that is generated when
>> building.  And by the way, the files do get placed into the correct folder
>> (after some bit of tweaking of the code).  But the error persists:
>>
>> ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command
>> '...--nogpgcheck install base-passwd iptables openssh openssh-keys-install
>> packagegroup-core-boot run-postinsts shadow' returned 1:
>> DNF version:4.2.2
>> cachedir:
>> /stor/development/yocto/poky/trident-build/tmp/work/raspberrypi3_64-poky-linux/core-image-minimal/1.0-r0/rootfs/var/cache/dnf
>> Added oe-repo repo from
>> /stor/development/yocto/poky/trident-build/tmp/work/raspberrypi3_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo
>> repo: using cache for: oe-repo
>> not found other for:
>> not found modules for:
>> not found deltainfo for:
>> not found updateinfo for:
>> oe-repo: using metadata from Thu 13 Jun 2019 09:13:54 PM UTC.
>> No module defaults found
>> No match for argument: openssh-keys-install
>> Error: Unable to find a match
>>
>> ERROR: core-image-minimal-1.0-r0 do_rootfs:
>> ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
>> ....
>>
>> TIA
>>
>>
>>
>> --
>> Larry Brown
>> S/V Trident
>> Palm Harbor, FL
>> ~~~~~~~~~~~~~~~~~_/)~~~~~~~~
>>     ~     ~          ~~           ~
>> ~           ~~_/)    ~      ~ ~        ~
>>      ~                  _/)          ~
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>

-- 
Larry Brown
S/V Trident
Palm Harbor, FL
~~~~~~~~~~~~~~~~~_/)~~~~~~~~
    ~     ~          ~~           ~
~           ~~_/)    ~      ~ ~        ~
     ~                  _/)          ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190614/99cf9088/attachment.html>


More information about the yocto mailing list