Open kiszk opened 7 months ago
Even after I added apt-get -qq -y install cpio rpm2cpio
into Dockerfile.ubuntu
, I got the same error.
@nealef would you be able to look into this?
Will do. Has anything changed?
Nothing that I'm aware of. We have a couple of PRs in queue but I just haven't had the time to test the changes E2E and merge them.
After further investigation, I realized that --no-absolute-filenames
leads to this error. This option is specified in Rpm.pm
in alien
command.
How can we avoid this issue?
wget https://mirror.lchs.network/pub/almalinux/9.3/AppStream/s390x/os/Packages/dotnet-hostfxr-6.0-6.0.26-1.el9_3
rpm2cpio dotnet-host-8.0.1-1.el9_3.s390x.rpm | cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time
cpio: ./usr/bin/dotnet: Cannot open: No such file or directory
688 blocks
wget https://mirror.lchs.network/pub/almalinux/9.3/AppStream/s390x/os/Packages/dotnet-hostfxr-6.0-6.0.26-1.el9_3
rpm2cpio dotnet-host-8.0.1-1.el9_3.s390x.rpm | cpio --extract --make-directories --preserve-modification-time
688 blocks
root@apache-arrow-github-action:/tmp/dotnet# ls -al usr/bin/
total 8
drwxr-xr-x 2 root root 4096 May 4 18:12 .
drwxr-xr-x 6 root root 4096 May 4 18:12 ..
lrwxrwxrwx 1 root root 30 May 4 18:12 dotnet -> ../..//usr/lib64/dotnet/dotnet
I also saw the same behavior for another rpm
wget https://mirror.lchs.network/pub/almalinux/9.3/AppStream/s390x/os/Packages/dotnet-apphost-pack-6.0-6.0.26-1.el9_3.s390x.rpm
rpm2cpio dotnet-apphost-pack-6.0-6.0.26-1.el9_3.s390x.rpm | cpio --extract --make-directories --no-absolute-filenames --preserve-modification-time
cpio: ./usr/lib/.build-id/2f/ecb3486594e76a0b3787a4b60b41579081774b.1: Cannot open: No such file or directory
880 blocks
wget https://mirror.lchs.network/pub/almalinux/9.3/AppStream/s390x/os/Packages/dotnet-apphost-pack-6.0-6.0.26-1.el9_3.s390x.rpm
rpm2cpio dotnet-apphost-pack-6.0-6.0.26-1.el9_3.s390x.rpm | cpio --extract --make-directories --preserve-modification-time
880 blocks
ls -al usr/lib/.build-id/2f/ecb3486594e76a0b3787a4b60b41579081774b.1
lrwxrwxrwx 1 root root 118 May 5 09:05 usr/lib/.build-id/2f/ecb3486594e76a0b3787a4b60b41579081774b.1 -> ../../../../usr/lib64/dotnet/packs/Microsoft.NETCore.App.Host.rhel.9-s390x/6.0.26/runtimes/rhel.9-s390x/native/apphost
I don’t understand what has changed. I have run the build script scores of times in the past without error.
Hmm, interesting. I think that this issue is related to handling a symbolic link.
This is my workaround.
diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu
index 343faeb..ea10a3c 100644
--- a/Dockerfile.ubuntu
+++ b/Dockerfile.ubuntu
@@ -6,10 +6,14 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update -y && \
apt-get -qq -y install wget git sudo alien curl libicu70 sudo && \
+ apt-get -qq -y install cpio rpm2cpio && \
apt autoclean
COPY build-files/convert-rpm.sh /tmp
+RUN sed "s/--no-absolute-filenames//" /usr/share/perl5/Alien/Package/Rpm.pm > /tmp/Rpm.pm
+RUN cp /tmp/Rpm.pm /usr/share/perl5/Alien/Package/Rpm.pm
+
RUN /tmp/convert-rpm.sh ${SDK}
RUN dpkg --install /tmp/*.deb && \
It must be peculiar to powerPC as I don't have this problem with alien.
When I execute the script
./build-selfhosted.sh -b docker ubuntu
to build a image, I got the following errors.How can I avoid this issue? cc @shahidhs-ibm