-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a filter in install-debs.py #15372
Conversation
Are you sure we couldn't use the |
I build rootfs with and without it and diff the outputs of $ python3 installdebs.py --arch loong64 --rootfsdir /crossrootfs/loongarch64 \
--artool /usr/bin/ar --suite sid --suite unreleased --mirror http://ftp.ports.debian.org/debian-ports/ \
build-essential symlinks libicu-dev liblttng-ust-dev libunwind8-dev libcurl4-openssl-dev libkrb5-dev \
libssl-dev zlib1g-dev libbrotli-dev libomp5 libomp-dev liblldb-19-dev |
Yes which means we can use the I also tried
Btw. we don't check the signatures of these packages right? We're downloading them over http |
AFAIK, the symlinks are working fine. I had to change my entire approach to get the symlinks working otherwise https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/7859d6aa101d4bbb769a39d20358cc9e77f29292/src/azurelinux/3.0/net10.0/cross/loongarch64/Dockerfile#L13 was failing to build. In the finalize_setup, I had to streamline /lib->/usr/lib because it was ordered dependent.
We can add the sig check which should be straightforward. Feel free to enhance. ;) |
Did you try with the |
Not sure what is the issue we are trying to solve here. Can you explain? |
Tar files can have unexpected or potentially dangerous file path constructs and that's why Python is changing the defaults to prevent these. If possible we should leverage those protections instead of turning them off. If that's not possible then using |
Yes, as I explained earlier, debs extract in various system directories so we need out of tree extraction. I have changed it to idiomatic filter. |
That's normally not a problem, the paths in the tar files are relative and are extracted in a given destination directory (which is |
Ah right, so if our desitnation is /crossrootfs/loongarch64, then everything is contained within that root. 'tar' should be fine as well. |
Ok, let's use that then :) I'll take a look at adding the signature validation. |
Note it won't work for new arch, or more specificlaly on Debian sid. We don't have those in Azure Linux. The first time we enabled signature checking on riscv was when we moved it to Ubuntu 24.04. Before that, it was using |
@am11 ugh, looks like would you mind changing it back to |
To fix this warning: dotnet/dotnet-buildtools-prereqs-docker#1306 (comment)
cc @akoeplinger