flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
139 stars 91 forks source link

symlinkTargetLength: symlink target too long #603

Closed 2-www closed 1 month ago

2-www commented 3 months ago

Checklist

flatpak-builder version

flatpak-builder 1.4.1

Flatpak version

Flatpak 1.14.8

How to reproduce

build this:

{
"id": "io.github.foxnne.pixi",
"runtime": "org.freedesktop.Platform",
"runtime-version": "23.08",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": ["org.freedesktop.Sdk.Extension.ziglang"],
"finish-args": [
"--socket=wayland",
"--socket=x11",
"--socket=fallback-x11",
"--share=ipc",
"--device=dri"
],
"command": "pixi",
"modules": [
{
"name": "pixi",
"buildsystem": "simple",
"build-commands": ["/usr/lib/sdk/ziglang/zig build"],
"sources": [
{
"type": "git",
"url": "https://github.com/foxnne/pixi",
"branch": "master"
}
]
}
]
}

Expected Behavior

builds

Actual Behavior

Initialized empty Git repository in /home/user/Код/flatpaks/.flatpak-builder/git/https_github.com_foxnne_pixi-61OFO2/
Fetching full git repo https://github.com/foxnne/pixi
remote: Enumerating objects: 10568, done.
remote: Counting objects: 100% (2451/2451), done.
remote: Compressing objects: 100% (723/723), done.
remote: Total 10568 (delta 1776), reused 2305 (delta 1703), pack-reused 8117
Receiving objects: 100% (10568/10568), 13.47 MiB | 3.67 MiB/s, done.
error: object 6273d1ecefefaa2eb0ff266cfbb049177d96d013: symlinkTargetLength: symlink target too long
fatal: fsck error in packed object
fatal: fetch-pack: invalid index-pack output
Failed to download sources: module pixi: Дочірній процес закінчився з кодом 128

Additional Information

No response

smcv commented 1 month ago

Flatpak and flatpak-builder don't have anything called symlinkTargetLength (that isn't the naming convention we use).

This looks like a limitation of the version of git that you're using to download that repo - I'm not sure whether this is the version of git from your host system, or the version that's in org.freedesktop.Sdk//23.08. Or, it could be considered to be a problem with https://github.com/foxnne/pixi.

It seems like git has (or had in the past?) a maximum allowed length for symlink targets, and pixi exceeds it?

It seems unlikely that there is any change that could be made in flatpak-builder to resolve this: it's never going to be able to build successfully from a git repo if you can't git clone that repo.

2-www commented 1 month ago

i could git clone that repo normally

2-www commented 1 month ago

but now flatpak-builder also clones this successfully thx for reminding me

smcv commented 1 month ago

It sounds as though something (either the git on your host system or the git in the runtime, I'm not sure which one is the relevant one) had a limitation, but that limitation has now been fixed; or maybe pixi had a problematically long path, but that has now been fixed. Either way, if it works now, great.