Hi, On Mon, 23 Dec 2024 07:43:39 +0100 Johannes Schauer Marin Rodrigues <jo...@debian.org> wrote: > Hi, > > Quoting Antoine Beaupré (2024-12-23 02:32:25) > > On 2024-12-22 22:59:22, Johannes Schauer Marin Rodrigues wrote: > > > Quoting Antoine Beaupré (2024-12-22 22:39:12) > > >> On 2024-12-22 22:21:22, Johannes Schauer Marin Rodrigues wrote: > > >> > Hi, > > >> > > > >> > Quoting Antoine Beaupre (2024-12-22 21:34:14) > > >> >> I'm getting this if I use symlinks for tarballs in unshare mode: > > >> >> > > >> >> Warning : > > >> >> /home/anarcat/.cache/sbuild/UNRELEASED-amd64.tar.zst is a symbolic > > >> >> link, ignoring > > >> >> > > >> >> I'm not sure why this is happening, but it's quite inconvenient as I > > >> >> need to build a new chroot just for that UNRELEASED thing... > > >> > > > >> > can you show me a more complete log? I wonder what is producing this > > >> > error > > >> > message. I grepped for it in the sbuild source and cannot find what > > >> > emits > > >> > it. > > > > > > can you give me the output of this: > > > > > > $ file /home/anarcat/.cache/sbuild/UNRELEASED-amd64.tar.zst > > > > /home/anarcat/.cache/sbuild/UNRELEASED-amd64.tar.zst: symbolic link to > > unstable-amd64.tar.zst > > > > Or do you mean: > > > > $ file -L /home/anarcat/.cache/sbuild/UNRELEASED-amd64.tar.zst > > /home/anarcat/.cache/sbuild/UNRELEASED-amd64.tar.zst: Zstandard compressed > > data (v0.8+), Dictionary ID: None > > thank you for both outputs. My hunch was that the symlink was broken and > that's > why it failed. I am still wondering where the message you see is from. This > made me find this here: > > https://sources.debian.org/src/libzstd/1.5.6+dfsg-1/programs/zstdcli.c/?hl=1328#L1328 > > Could you try switching the compression of your tarball (or use no > compression) > and check if the problem persists? If not, maybe something special has to be > done with zstd compressed tarballs? Looks like zstd ignores symlinks unless --force is passed [1]. Editing the command in ChrootUnshare.pm [2] to add it makes it work for me, but it may be too lenient with the file? From the zstd man page:
> -f, --force: disable input and output checks. Allows overwriting ex‐ > isting files, input from console, output to stdout, operating on > links, block devices, etc. During decompression and when the output > destination is stdout, pass-through unrecognized formats as-is. [1] https://github.com/facebook/zstd/commit/680e4e0953bf7c895165e41098a37c3279870c1f [2] https://salsa.debian.org/debian/sbuild/-/blob/main/lib/Sbuild/ChrootUnshare.pm#L520 Thanks for all the work on sbuild!