Setting up a package management service in Yocto for your image

Document created by Rodrigue Simonneau Employee on Nov 29, 2016Last modified by Rodrigue Simonneau Employee on Feb 5, 2019
Version 3Show Document
  • View in full screen mode

Wondering how to manage and install the various rpms generated under tmp/deploy/rpm?

smart is the application you need on the target to replace apt-get

 

Please set your local.conf with the following:

# It is also recommended you use build history, which adds some sanity checks to package versions, in conjunction with the server that

# is running the PR Service. To enable build history, add the following to each building system's
# It is recommended to activate "buildhistory" for testing the PR service

INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"

PRSERV_HOST = "localhost:0"  # This will set up your host computer as Package Revision Server
// PACKAGE_FEED_URIS = "http://10.170.96.7/imx7rpm" #please place any server ip addr, this one is mine.

add also the following to enable the package management (smart):

EXTRA_IMAGE_FEATURES += "package-management"

 

Setup your own http server, and link the server repository with your tmp/deploy/rpm repo (your are free to use your preferred http server).

 

Since Morty (yocto 2.4), smart has been deprecated, and now the package management is done with dnf (from Debian).

Please check dnf document to get more to know about dnf.

The dependencies are still poorly controlled.

After compiling a pkg the easiest remain: dnf install package.rpm

 

example:

root@imx8mmevk:~# dnf install libfuse2-2.9.7-r0.aarch64.rpm
Failed to synchronize cache for repo 'oe-remote-repo-imx8m-imx8mqevk-arm', disabling.
Dependencies resolved.
===============================================================================================================
 Package                  Arch                    Version                   Repository                    Size
===============================================================================================================
Installing:
 libfuse2                 aarch64                 2.9.7-r0                  @commandline                  56 k

Transaction Summary
===============================================================================================================
Install  1 Package

Total size: 56 k
Installed size: 212 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                       1/1
  Installing       : libfuse2-2.9.7-r0.aarch64                                                             1/1
  Running scriptlet: libfuse2-2.9.7-r0.aarch64                                                             1/1
/sbin/ldconfig: /usr/lib/libOpenVG.so is not a symbolic link

  Verifying        : libfuse2-2.9.7-r0.aarch64                                                             1/1

Installed:
  libfuse2.aarch64 2.9.7-r0

Complete!

2 people found this helpful

Attachments

    Outcomes