docker调用yum时“"/usr/libexec/urlgrabber-ext-down" is not installed”

原因:

1 docker镜像为高版本的fedora30:latest镜像,yum本身已被dnf替代,但部分功能仍不完整; 如:yum-builddep SPECS/xxx.spec

解决办法:

1 安装dnf的插件 dnf-core-plugins

2 将yum-builddep替换为 dnf builddep SPECS/xxx.spec

Dokerfile内容如下:

FROM shim-build-fedora:v1.0
#FROM fedora:latest

RUN /bin/rm /etc/yum.repos.d/*.repo
COPY newstart-v3-shim-build-deps.repo /etc/yum.repos.d/
RUN yum install -y binutils gcc gnu-efi gnu-efi-devel make redhat-rpm-config rpm-build wget dnf dnf-plugins-core
COPY shim-unsigned-x64.spec /builddir/build/SPECS/
COPY shimx64.efi /
RUN dnf builddep -y /builddir/build/SPECS/shim-unsigned-x64.spec
COPY rpmmacros /root/.rpmmacros
WORKDIR /build
#RUN wget https://github.com/rhboot/shim/releases/download/15/shim-15.tar.bz2 -O /builddir/build/SOURCES/shim-15.tar.bz2
COPY shim-15.tar.bz2 /builddir/build/SOURCES/
COPY *.patch /builddir/build/SOURCES/
RUN rpmbuild -ba /builddir/build/SPECS/shim-unsigned-x64.spec --noclean --define 'dist .el8'
RUN find /builddir/build/ -name 'shim*.efi'
RUN sha256sum /builddir/build/BUILDROOT/shim*/usr/share/shim/*/*/shim*.efi
RUN sha256sum /shimx64.efi
RUN hexdump -Cv /builddir/build/BUILDROOT/shim*/usr/share/shim/*/*/shimx64.efi > /built.hex
RUN hexdump -Cv /shimx64.efi > /orig.hex
RUN diff -u /orig.hex /built.hex || true
#RUN objdump -x /shimx64.efi | head -n 60
#RUN objdump -x /build/builddir/BUILDROOT/shim*/usr/share/shim/*/*/shim*.efi | head -n 60

  

 

posted @ 2019-08-07 09:37  无边身尊者  阅读(414)  评论(0编辑  收藏  举报