microdnf icon indicating copy to clipboard operation
microdnf copied to clipboard

please support installs via local file

Open TomasTomecek opened this issue 8 years ago • 9 comments

It currently fails on error: No package matches './fedora-repos-26-0.8.noarch.rpm', more info:

bash-4.4# ls -lha
total 92K
dr-xr-x--- 1 root root  54 May  2 11:00 .
drwxr-xr-x 1 root root  47 May  2 10:53 ..
drwxr----- 3 root root  18 May  2 11:00 .pki
-rw-r--r-- 1 root root 89K May  2 11:00 fedora-repos-26-0.8.noarch.rpm
bash-4.4# microdnf install ./fedora-repos-26-0.8.noarch.rpm
Downloading metadata...
error: No package matches './fedora-repos-26-0.8.noarch.rpm'
bash-4.4# microdnf install fedora-repos-26-0.8.noarch.rpm
Downloading metadata...
error: No package matches 'fedora-repos-26-0.8.noarch.rpm'

TomasTomecek avatar May 02 '17 11:05 TomasTomecek

I got around this by using rpm to install the rpm. microdnf should be able to install an rpm from a local file system or a remote url. It seems weird to have to switch between rpm and mirodnf depending on if you're install from a yum repo or if you're installing an rpm directly.

mmckinst avatar May 17 '17 21:05 mmckinst

Is this still not possible with microdnf? I would prefer to install an rpm file via URL, (or at least be able install a local rpm file) with microdnf.

samibadra avatar Jul 12 '18 18:07 samibadra

I tried microdnf for a minimal container when I read this article https://fedoramagazine.org/building-smaller-container-images/

When I tried to use microdnf to install the rpmfusion packages it failed. It didn't like either local or remote files.

This makes using microdnf for minimal containers frustrating. Workarounds require copying a number of files.

Support for local file would be a great usability improvement.

ardrigh avatar May 20 '19 07:05 ardrigh

I have a use case

I wanted to add chrome to a container

neither file nor url

microdnf install https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
curl -sSL -o /tmp/chrome.rpm https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm && \
microdnf install /tmp/chrome.rpm && \
rm -rf /tmp/chrome.rpm

chrome has millions of dependencies

muayyad-alsadi avatar Nov 10 '19 23:11 muayyad-alsadi

Just ran into this trying to install chrome in a maven docker image. Way too many deps to try to do with microdnf.

jagibson avatar Oct 14 '20 20:10 jagibson

I have same issue as well.

When try to install cloud hsm with microdnf, it show cannot find package.

FROM ubi8/openjdk-8:1.10-1
USER root
RUN mkdir /cloudhsm
RUN microdnf install -y wget
WORKDIR /cloudhsm
RUN wget https://s3.amazonaws.com/cloudhsmv2-software/CloudHsmClient/EL8/cloudhsm-client-latest.el8.x86_64.rpm
RUN microdnf install -y cloudhsm-client-latest.el8.x86_64.rpm
RUN microdnf remove -y wget
WORKDIR /
ENTRYPOINT ls

Error message:

error: No package matches 'cloudhsm-client-latest.el8.x86_64.rpm'

smling avatar Sep 08 '21 05:09 smling

same issue.

ls -lrt total 166088 -rw-r--r--. 1 33754200 1049089 51055724 Sep 3 2020 microsoft-r-open-mro-4.0.2.rpm -rw-r--r--. 1 33754200 1049089 61173948 Sep 3 2020 microsoft-r-open-mkl-4.0.2.rpm -rw-r--r--. 1 33754200 1049089 57833112 Sep 3 2020 microsoft-r-open-sparklyr-4.0.2.rpm

microdnf install microsoft-r-open-mro-4.0.2.rpm Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... Downloading metadata... error: No package matches 'microsoft-r-open-mro-4.0.2.rpm'

poornachandratejasvi avatar Oct 01 '21 09:10 poornachandratejasvi

Need this feature too.

Nirvandil avatar Apr 13 '22 22:04 Nirvandil

I have a good news. The requested feature will be delivered with the next major Microdnf upgrade. The release is planned for Fedora 38 - see https://fedoraproject.org/wiki/Changes/MajorUpgradeOfMicrodnf#User_Experience.

j-mracek avatar Apr 14 '22 07:04 j-mracek

That's great. Can you backport it to RHEL 9?

ktdreyer avatar May 24 '23 21:05 ktdreyer

@j-mracek thanks for the info, did this end up making it into Fedora 38?

Do you have details on which version has this feature included or have a link to the PR where this was merged?

pixdrift avatar Jul 20 '23 01:07 pixdrift

The feature is delivered by DNF5 package in Fedora 38. therefore if you run microdnf install <rpm> it uses dnf5 on Fedora 38. dnf5 is a replacement of microdnf. We do not have a plan to add the support of installation of local rpms to microdnf package because it is obsoleted by DNF5 (Fedora 38+).

j-mracek avatar Jul 20 '23 05:07 j-mracek