Ask Your Question

diskimage-builder and installing a downloaded RPM package

asked 2015-09-01 08:26:11 -0500

holger-king gravatar image

updated 2015-09-01 11:02:52 -0500

Dear OpenStack diskimage-builder community,

we just do want to install a RPM package (here: "cntlm" proxy) that is not part of the official RHEL 7.1 repositories. That means: we do have to download the Fedora image of "cntlm" via:

and finally do have to execute a "yum localinstall <package_name>" (since Fedora 22, "dnf" command is used instead where the option "install" does allow a "localinstall" of packages, too). Up to now, no option is available to allow that in a generic way for the available distro-specific package manager ELEMENTS in diskimage-builder. We only could identify the following options in "yum" (see "elements/yum/bin/install-packages"), "dpkg" (see "elements/dpkg/bin/install-packages")

  • u: system update
  • d: download
  • e: erase/remove
  • m: map element
  • h: help/show options

Do you agree? If you agree, we would like to enhance the functionality of "diskimage-builder" and contribute to an enhancement to implement that feature.

Or should we provide a "yaml" respectively a "json" file where we can distinguish the between family and distros specific repros. As for Fedora, the cntlm packages exists in its repositories but not for RHEL. For RHEL we could provide a custom diskimage-builder element that handles it. Would that be the recommended way?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-08 06:40:12 -0500

holger-king gravatar image

As Fedora 22 offers the proxy relay "cntlm" within its repositories it is easy to provide a custom:

  1. "package-installs.yaml"
  2. "pkg-map"

file for "diskimage-builder" (DIB). A documentation, how to offer a custom DIB element can be found here!

Regarding the above two files, the following content has been used:

For (1):

# Install any packages in this file that may not be in the base cloud
# image but could reasonably be expected
   phase: pre-install.d

For (2):

  "distro": {
    "fedora": {
      "cntlm_package": "cntlm"
  "family": {
    "redhat": {
      "cntlm_package": "cntlm"
    "suse": {
      "cntlm_package": ""
  "default": {
    "cntlm_package": "cntlm"

Nevertheless, it would be interesting for linux distributions that do not offer the package in their repository, how to handle it. Here, it might be helpful to:

  1. locate the package in the "install-static" element of DIB (guarantees a rsync transfer to the built image)
  2. execute the package manager in a custom script manually
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-09-01 08:26:11 -0500

Seen: 562 times

Last updated: Sep 08 '15