What is best practice to install Package in ubi-minimal which is not in offical repo but in CentOS

657 views Asked by At

I am trying to make small container which uses qeum-img, qemu-kvm.

How can I install package which is not in offical ubi-minimal repository but in CentOS 8 Appstream?
* I know that both ubi-minimal and CentOS 8 Stream are almost same because it is originated from Fedora.

My Environment

Local OS: CentOS 8 Stream
VM (Container) OS: ubi-minimal

About package and repository

[root@computer1 ~]# cat /etc/yum.repos.d/CentOS-Stream-AppStream.repo
# CentOS-Stream-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client.  You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.

[appstream]
name=CentOS Stream $releasever - AppStream
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[root@computer1 ~]# dnf list | grep qemu
ipxe-roms-qemu.noarch                                             20181214-11.git133f4c47.el8                                @AppStream
libvirt-daemon-driver-qemu.x86_64                                 8.0.0-14.module_el8.8.0+1257+0c3374ae                      @appstream
qemu-guest-agent.x86_64                                           15:6.2.0-28.module_el8.8.0+1257+0c3374ae                   @appstream
qemu-img.x86_64                                                   15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm.x86_64                                                   15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-block-curl.x86_64                                        15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-block-gluster.x86_64                                     15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-block-iscsi.x86_64                                       15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-block-rbd.x86_64                                         15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-block-ssh.x86_64                                         15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-common.x86_64                                            15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-core.x86_64                                              15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-docs.x86_64                                              15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-hw-usbredir.x86_64                                       15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-ui-opengl.x86_64                                         15:6.2.0-34.module_el8+407+df018485                        @appstream
qemu-kvm-ui-spice.x86_64                                          15:6.2.0-34.module_el8+407+df018485                        @appstream

As you can see, we can find qemu-img package in appstream repository.

However, in ubi-minimal, there is no qemu-img

[root@d3c0cf37860b /]# microdnf repolist *qemu*

(microdnf:133): librhsm-WARNING **: 10:10:14.681: Found 0 entitlement certificates

(microdnf:133): librhsm-WARNING **: 10:10:14.681: Found 0 entitlement certificates
error: Unknown argument *qemu*

What I tried to solve this problem

There is source code for building myself but, it needs make. In order to do this, there should be gcc make etc. which removes the benefit of using minimal version of container base image.

2.

I tried to find all dependencies for using qemu-img in rpmfind. However, there are too many dependencies and also, it looks not cool. I think there is more ARTISTIC way to solve this problem.

3.

I already read below two articles but it won't help.

The funny thing is the package, that they used for example, bzip2 and httpd can easily find in original repository like below command.

[root@d3c0cf37860b /]# microdnf repoquery *bzip*

(microdnf:136): librhsm-WARNING **: 10:18:21.931: Found 0 entitlement certificates

(microdnf:136): librhsm-WARNING **: 10:18:21.932: Found 0 entitlement certificates
bzip2-1.0.8-8.el9.x86_64
bzip2-devel-1.0.8-8.el9.i686
bzip2-devel-1.0.8-8.el9.x86_64
bzip2-libs-1.0.8-8.el9.i686
bzip2-libs-1.0.8-8.el9.x86_64
libzip-1.7.3-7.el9.i686
libzip-1.7.3-7.el9.x86_64

What I want to know is "If there is no package in official repository of ubi, how to handle it?"

0

There are 0 answers